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

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


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


Dimitri Glazkov (Google) <dglazkov at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dglazkov at chromium.org




--- Comment #5 from Dimitri Glazkov (Google) <dglazkov at chromium.org>  2012-08-15 10:12:32 PST ---
(In reply to comment #4)
> (From update of attachment 158566 [details])
> 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?

> 
> >> Source/WebCore/rendering/HitTestResult.h:180
> >> +    Node* targetNode() const;
> > 
> > I would move this function next to innerNode() so that it's clear that there is a choice between the two.
> 
> Good idea, will do.

-- 
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