Bug 96519 - [TouchAdjustment] Simplify and improve hybrid distance function.
Summary: [TouchAdjustment] Simplify and improve hybrid distance function.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 08:05 PDT by Allan Sandfeld Jensen
Modified: 2012-09-20 01:44 PDT (History)
2 users (show)

See Also:


Attachments
Patch (7.65 KB, patch)
2012-09-12 08:13 PDT, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Patch (8.61 KB, patch)
2012-09-12 08:16 PDT, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld Jensen 2012-09-12 08:05:41 PDT
The current distance function is a combination of two functions. One measuring the distance from the hot-spot in the touch-area to the centerline of the target, and one measuring how much of the target is covered.

The distance to the center-line was originally used instead of just the distance to the target, to make it easier to hit small targets near big targets. The very same feature is however also what measing how much of the target is covered is good at. Using the distance to center-line is therefore redundant now, and can be replaced with the simpler 'distance the hot-spot needs to be adjusted'.

Since 'distance the hot-spot needs to be adjusted' is also used later to choose between targets that have been fully covered, it could simply be added making the switch from one to the other in the hybrid distance function more gradual.

This greatly simplies a lot of code, and means several functions can be removed as dead code, and without any regressions in touchadjustment cases.
Comment 1 Allan Sandfeld Jensen 2012-09-12 08:13:17 PDT
Created attachment 163632 [details]
Patch
Comment 2 Allan Sandfeld Jensen 2012-09-12 08:16:42 PDT
Created attachment 163633 [details]
Patch

Forgot a hunk in the patch
Comment 3 WebKit Review Bot 2012-09-20 01:44:21 PDT
Comment on attachment 163633 [details]
Patch

Clearing flags on attachment: 163633

Committed r129108: <http://trac.webkit.org/changeset/129108>
Comment 4 WebKit Review Bot 2012-09-20 01:44:24 PDT
All reviewed patches have been landed.  Closing bug.