[Webkit-unassigned] [Bug 94107] Refactoring: move EventHandler::targetNode into HitTestResult

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 15 10:16:00 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=94107





--- Comment #6 from Dimitri Glazkov (Google) <dglazkov at chromium.org>  2012-08-15 10:16:32 PST ---
(From update of attachment 158566)
View in context: https://bugs.webkit.org/attachment.cgi?id=158566&action=review

>>>> Source/WebCore/rendering/HitTestResult.cpp:808
>>>> +        return element;
>>> 
>>> I'm trying to understanding how this is different from innerNode.  In the context of an event, it makes sense to speak about the targetNode of an event, but outside the context of an event the word "target" doesn't mean that much.
>>> 
>>> Specifically, how can a node not be inDocument but its parentElement be inDocument?
>> 
>> That's a great question, and I don't know! I'm trying to understand this code by teasing apart the bits that look unnecessarily tangled-up.
>> 
>> Does inDocument() refer to the shadow DOM?
> 
> No. It's a bit on a node that tracks whether a node is in a document tree (shadow DOM elements are  considered in-document for this purpose). It answer the question: is the node floating in space, or can you reach the document node by traversing its ancestor?

Ah, the difference is that the innerNode can be a non-Element for hit-testing purposes. For events, it has to be an element.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list