Bug 83148

Summary: Best zoomable area does not balance intersection with target area.
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: UI EventsAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Allan Sandfeld Jensen
Reported 2012-04-04 04:59:57 PDT
The algorithm for best zoomable area currently chooses the area with the largest intersection, and if more than one area has the same intersection area, chooses the smallest target area. This correctly chooses the smallest area when a touch is fully contained in the target area. But in cases where a small part of the touch is outside the targeted area, it will end up picking the background instead. To fix this, change the algorithm from a two step sort to one step sort that picks the best target using a formula that balances the smallest area and the largest intersection with each other.
Attachments
Patch (6.85 KB, patch)
2012-04-04 05:03 PDT, Allan Sandfeld Jensen
no flags
Patch (10.02 KB, patch)
2012-04-04 05:12 PDT, Allan Sandfeld Jensen
no flags
Allan Sandfeld Jensen
Comment 1 2012-04-04 05:03:34 PDT
Allan Sandfeld Jensen
Comment 2 2012-04-04 05:12:17 PDT
WebKit Review Bot
Comment 3 2012-04-04 05:48:09 PDT
Comment on attachment 135562 [details] Patch Clearing flags on attachment: 135562 Committed r113179: <http://trac.webkit.org/changeset/113179>
WebKit Review Bot
Comment 4 2012-04-04 05:48:13 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.