Commit 03f97d29 authored by Mike Dougherty's avatar Mike Dougherty Committed by Commit Bot

[iOS] Update spiralCoordinates range for context menu

These points were fanning out so much that text could not be selected
above or below a link. Reduce the distance between the touced point and
locations tested for a context menu element.

Additionally, fix the context_menu.html test page. The value of
webkit-touch-callout should be overridden to default. This broke when
the test page was moved to its own file in crrev.com/c/1543633, but the
test failure was covered up by the large spiralCoordinates used.

Bug: 1000611
Change-Id: If2c06f86c33bf7b8cb244c2e67e8c72df4b952bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1828103
Auto-Submit: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700859}
parent 7d19ffd6
......@@ -13,7 +13,7 @@ This file contains elements for context menu test. -->
</div>
<!-- mirror elements above with style="-webkit-touch-callout: none" -->
<div style="-webkit-touch-callout: none">
<a id="no-webkit-link" href="/destination.html" style="-webkit-touch-callout: none">no-webkit-link-text</a>
<a id="no-webkit-link" href="/destination.html" style="-webkit-touch-callout: default">no-webkit-link-text</a>
</div>
</body>
</html>
......
......@@ -265,10 +265,10 @@ var elementsFromCoordinates = function(coordinates) {
* @return {Object}
*/
var spiralCoordinates_ = function(x, y) {
var MAX_ANGLE = Math.PI * 2.0 * 3.0;
var POINT_COUNT = 30;
var MAX_ANGLE = Math.PI * 2.0 * 2.0;
var POINT_COUNT = 10;
var ANGLE_STEP = MAX_ANGLE / POINT_COUNT;
var TOUCH_MARGIN = 25;
var TOUCH_MARGIN = 15;
var SPEED = TOUCH_MARGIN / MAX_ANGLE;
var coordinates = [];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment