WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
57050
Untangle dependency between event ancestor chain computation and InspectorDOMAgent.
https://bugs.webkit.org/show_bug.cgi?id=57050
Summary
Untangle dependency between event ancestor chain computation and InspectorDOM...
Dimitri Glazkov (Google)
Reported
Thursday, March 24, 2011 9:50:14 PM UTC
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+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dimitri Glazkov (Google)
Comment 1
Thursday, March 24, 2011 9:58:25 PM UTC
Created
attachment 86826
[details]
Patch
Darin Adler
Comment 2
Thursday, March 24, 2011 11:02:58 PM UTC
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
Thursday, March 24, 2011 11:06:49 PM UTC
(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
Thursday, March 24, 2011 11:20:26 PM UTC
Committed
r81909
: <
http://trac.webkit.org/changeset/81909
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug