Bug 101915 - hitTestResultAtPoint does two hit-tests if called on non main frame
Summary: hitTestResultAtPoint does two hit-tests if called on non main frame
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 420+
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords:
Depends on:
Blocks: 98139
  Show dependency treegraph
 
Reported: 2012-11-12 03:07 PST by Allan Sandfeld Jensen
Modified: 2012-11-12 10:13 PST (History)
2 users (show)

See Also:


Attachments
Patch (3.70 KB, patch)
2012-11-12 03:21 PST, 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-11-12 03:07:09 PST
EventHandler::hitTestResultAtPoint performs a second hit-test if it hits something and it was not started on the main-frame. Due to another quirk in RenderLayer hit-tests will in most cases pretend to hit the frame. 

This leads to not only needlessly performing multiple test, but having rare cases where the returned empty result is not performed from the perspective of the main frame.

Changing the logic to always redirect to the main-frame will save one of the hit-tests in most cases, and simplify the hitTestResult to always being started in the context of the main-frame. The last part is needed to clarify the hitTestResult interface in bug #98139
Comment 1 Allan Sandfeld Jensen 2012-11-12 03:21:54 PST
Created attachment 173603 [details]
Patch
Comment 2 Antonio Gomes 2012-11-12 05:41:39 PST
Comment on attachment 173603 [details]
Patch

r=me
Comment 3 WebKit Review Bot 2012-11-12 10:13:42 PST
Comment on attachment 173603 [details]
Patch

Clearing flags on attachment: 173603

Committed r134253: <http://trac.webkit.org/changeset/134253>
Comment 4 WebKit Review Bot 2012-11-12 10:13:45 PST
All reviewed patches have been landed.  Closing bug.