Bug 57050

Summary: Untangle dependency between event ancestor chain computation and InspectorDOMAgent.
Product: WebKit Reporter: Dimitri Glazkov (Google) <dglazkov>
Component: New BugsAssignee: Dimitri Glazkov (Google) <dglazkov>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 55515    
Attachments:
Description Flags
Patch darin: review+

Dimitri Glazkov (Google)
Reported 2011-03-24 13:50:14 PDT
Untangle dependency between event ancestor chain computation and InspectorDOMAgent.
Attachments
Patch (5.13 KB, patch)
2011-03-24 13:58 PDT, Dimitri Glazkov (Google)
darin: review+
Dimitri Glazkov (Google)
Comment 1 2011-03-24 13:58:25 PDT
Darin Adler
Comment 2 2011-03-24 15:02:58 PDT
Comment on attachment 86826 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=86826&action=review > Source/WebCore/ChangeLog:9 > + Inspector's list of event listeners does not need to invoke Node::getEventListeners, > + because it simply needs a list of all ancestors of a node. How did you know it only needed that? > Source/WebCore/ChangeLog:16 > + (WebCore::Node::dispatchGenericEvent): Move inDocument check out here from > + getEventAncestors. Why? > Source/WebCore/inspector/InspectorDOMAgent.cpp:748 > // The Node's Event Ancestors (not including self) I don’t think that calling these “Event Ancestors” is all that clear since it’s not necessarily the same objects you’d send a DOM event to.
Dimitri Glazkov (Google)
Comment 3 2011-03-24 15:06:49 PDT
(In reply to comment #2) > (From update of attachment 86826 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=86826&action=review > > > Source/WebCore/ChangeLog:9 > > + Inspector's list of event listeners does not need to invoke Node::getEventListeners, > > + because it simply needs a list of all ancestors of a node. > > How did you know it only needed that? The Inspector method just looks at all ancestors, outside the context of an event, and doesn't ever use the target/currentTarget parts of the EventContext. I'll update the ChangeLog to clarify. > > > Source/WebCore/ChangeLog:16 > > + (WebCore::Node::dispatchGenericEvent): Move inDocument check out here from > > + getEventAncestors. > > Why? Ah, good catch. This is unnecessary, now that I am passing node in. This is a vestigial bit, I'll remove. > > > Source/WebCore/inspector/InspectorDOMAgent.cpp:748 > > // The Node's Event Ancestors (not including self) > > I don’t think that calling these “Event Ancestors” is all that clear since it’s not necessarily the same objects you’d send a DOM event to. Right. These are just node ancestors. I'll change the comment.
Dimitri Glazkov (Google)
Comment 4 2011-03-24 15:20:26 PDT
Note You need to log in before you can comment on or make changes to this bug.