RESOLVED FIXED 96519
[TouchAdjustment] Simplify and improve hybrid distance function.
https://bugs.webkit.org/show_bug.cgi?id=96519
Summary [TouchAdjustment] Simplify and improve hybrid distance function.
Allan Sandfeld Jensen
Reported 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.
Attachments
Patch (7.65 KB, patch)
2012-09-12 08:13 PDT, Allan Sandfeld Jensen
no flags
Patch (8.61 KB, patch)
2012-09-12 08:16 PDT, Allan Sandfeld Jensen
no flags
Allan Sandfeld Jensen
Comment 1 2012-09-12 08:13:17 PDT
Allan Sandfeld Jensen
Comment 2 2012-09-12 08:16:42 PDT
Created attachment 163633 [details] Patch Forgot a hunk in the patch
WebKit Review Bot
Comment 3 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>
WebKit Review Bot
Comment 4 2012-09-20 01:44:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.