Bug 112450

Summary: Clean up RenderFrameSet::nodeAtPoint
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: UI EventsAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric, esprehn+autocc, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Allan Sandfeld Jensen
Reported 2013-03-15 09:50:54 PDT
As part of my work to remove side-effects in hit-testing I want to also eliminate any tests on the HitTestRequest::isReadOnly(), only one such remain and is in a cryptic test in RenderFrameSet::nodeAtPoint. if (inside && frameSet()->noResize() && !request.readOnly() && !result.innerNode() && !request.touchMove()) Reseaching the history of the test shows that it has been invalid since r18333 in December 2006 where a part of the test was accidentally reversed from !element()->noResize to frameSet->noResize(). That has however had no effect since the check itself was dead code since r17770 in November 2006 where the newly introduced EventHandler started taking care of sending events the frameset being resized without needing a hit-test. The check can therefore be removed and RenderFrameSet::nodeAtPoint made both cleaner and sane.
Attachments
Patch (2.00 KB, patch)
2013-03-15 10:04 PDT, Allan Sandfeld Jensen
no flags
Patch for landing (3.00 KB, patch)
2013-03-18 04:40 PDT, Allan Sandfeld Jensen
no flags
Allan Sandfeld Jensen
Comment 1 2013-03-15 10:04:34 PDT
Eric Seidel (no email)
Comment 2 2013-03-15 11:53:17 PDT
Comment on attachment 193328 [details] Patch OK. I assume we have some tests for this? If not, we definitely need to add one.
Darin Adler
Comment 3 2013-03-15 16:29:12 PDT
Comment on attachment 193328 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193328&action=review > Source/WebCore/rendering/RenderFrameSet.cpp:166 > if (action != HitTestForeground) > return false; Do we still need this part? What does this accomplish? I think we probably want to remove the entire function unless this has some benefit.
Allan Sandfeld Jensen
Comment 4 2013-03-18 04:27:46 PDT
(In reply to comment #3) > (From update of attachment 193328 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=193328&action=review > > > Source/WebCore/rendering/RenderFrameSet.cpp:166 > > if (action != HitTestForeground) > > return false; > > Do we still need this part? What does this accomplish? I think we probably want to remove the entire function unless this has some benefit. No, I guess not. RenderBox::nodeAtPoint also makes the check if (action == HitTestForeground).
Allan Sandfeld Jensen
Comment 5 2013-03-18 04:40:08 PDT
Created attachment 193527 [details] Patch for landing
Allan Sandfeld Jensen
Comment 6 2013-03-18 05:01:41 PDT
Note You need to log in before you can comment on or make changes to this bug.