WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
57045
Eliminate Node::dispatchGenericEvent.
https://bugs.webkit.org/show_bug.cgi?id=57045
Summary
Eliminate Node::dispatchGenericEvent.
Dimitri Glazkov (Google)
Reported
2011-03-24 12:50:06 PDT
Eliminate Node::dispatchGenericEvent.
Attachments
Patch
(5.84 KB, patch)
2011-03-24 12:52 PDT
,
Dimitri Glazkov (Google)
no flags
Details
Formatted Diff
Diff
Removed unnecessary extra ref and stale comment.
(6.46 KB, patch)
2011-03-24 13:01 PDT
,
Dimitri Glazkov (Google)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dimitri Glazkov (Google)
Comment 1
2011-03-24 12:52:06 PDT
Created
attachment 86814
[details]
Patch
Dimitri Glazkov (Google)
Comment 2
2011-03-24 13:01:12 PDT
Created
attachment 86816
[details]
Removed unnecessary extra ref and stale comment.
Dimitri Glazkov (Google)
Comment 3
2011-03-24 16:31:25 PDT
Comment on
attachment 86816
[details]
Removed unnecessary extra ref and stale comment. commit queue should do it, for safety.
Darin Adler
Comment 4
2011-03-24 17:21:39 PDT
Comment on
attachment 86816
[details]
Removed unnecessary extra ref and stale comment. View in context:
https://bugs.webkit.org/attachment.cgi?id=86816&action=review
Wow, this is a really great thing to do. Who on earth every understood the difference between dispatchGenericEvent and dispatchEvent!?
> Source/WebCore/dom/Node.cpp:2699 > + RefPtr<FrameView> view = document()->view();
Since this is never used, I think this should be named protectView instead of just view. I also think it makes sense to put this with the other protect before doing any work with the event.
> Source/WebCore/svg/SVGElementInstance.cpp:142 > SVGElement* element = shadowTreeElement(); > if (!element) > return false; > > - RefPtr<FrameView> view = element->document()->view(); > - return element->dispatchGenericEvent(event.release()); > + return element->dispatchEvent(event);
I can’t resist pointing out the way I like to write these: SVGElement* element = shadowTreeElement(); return element && element->dispatchEvent(event); But I will set commit-queue+ anyway, because it probably is clearer the way it’s written here anyway.
WebKit Commit Bot
Comment 5
2011-03-24 19:34:47 PDT
Comment on
attachment 86816
[details]
Removed unnecessary extra ref and stale comment. Clearing flags on attachment: 86816 Committed
r81932
: <
http://trac.webkit.org/changeset/81932
>
WebKit Commit Bot
Comment 6
2011-03-24 19:34:53 PDT
All reviewed patches have been landed. Closing bug.
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