[webkit-reviews] review granted: [Bug 57921] Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler. : [Attachment 88585] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 7 00:57:37 PDT 2011
Ryosuke Niwa <rniwa at webkit.org> has granted Alice Boxhall
<aboxhall at chromium.org>'s request for review:
Bug 57921: Move the MouseEventWithHitTestResults::targetNode() method on to
EventHandler.
https://bugs.webkit.org/show_bug.cgi?id=57921
Attachment 88585: Patch
https://bugs.webkit.org/attachment.cgi?id=88585&action=review
------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=88585&action=review
>> Source/WebCore/page/EventHandler.cpp:1304
>> +Node* EventHandler::targetNode(const HitTestResult& hitTestResult)
>
> Oh my second thought, targetNode isn't really a descriptive name. How about
nodePreferringAttached or attachedNodeOrInnerNode?
For now, I'd say r+ since I can't come up with a better name.
> Source/WebCore/page/EventHandler.cpp:1314
> + Element* element = node->parentElement();
> + if (element && element->inDocument())
> + return element;
What if parent element was also detached? I don't think this covers all the
cases.
> Source/WebCore/page/EventHandler.cpp:1316
> + return node;
It seems really odd to "prefer" attached node yet we also return unattached
innerNode.
More information about the webkit-reviews
mailing list