WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
122533
Turn EventPath into a real class
https://bugs.webkit.org/show_bug.cgi?id=122533
Summary
Turn EventPath into a real class
Ryosuke Niwa
Reported
2013-10-08 16:47:56 PDT
Turn EventPath into a real class
Attachments
Cleanup
(15.16 KB, patch)
2013-10-08 16:50 PDT
,
Ryosuke Niwa
koivisto
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-10-08 16:50:09 PDT
Created
attachment 213734
[details]
Cleanup
Antti Koivisto
Comment 2
2013-10-08 17:04:25 PDT
Comment on
attachment 213734
[details]
Cleanup View in context:
https://bugs.webkit.org/attachment.cgi?id=213734&action=review
> Source/WebCore/ChangeLog:8 > + Since we can't forward-declare typedef, turning EventPath into a real class helps our defactoring.
The comment about forward-declaring typedef is not necessary. Refactoring strategies not chosen are not that interesting.
> Source/WebCore/dom/EventDispatcher.h:62 > + const EventContext& item(size_t i) const { return *m_path[i]; } > + EventContext& item(size_t i) { return *m_path[i]; }
The interface is not great. item() is vague and and it is not clear which way the path goes. But I suppose you plan to improve this later.
Anders Carlsson
Comment 3
2013-10-08 17:06:02 PDT
Comment on
attachment 213734
[details]
Cleanup View in context:
https://bugs.webkit.org/attachment.cgi?id=213734&action=review
> Source/WebCore/dom/EventDispatcher.h:68 > + void shrink(size_t newSize) { m_path.shrink(newSize); }
Can't you just get rid of this?
> Source/WebCore/dom/EventDispatcher.h:73 > + Vector<OwnPtr<EventContext>, 32> m_path;
This should be std::unique_ptr.
> Source/WebCore/dom/EventRetargeter.cpp:94 > + m_path.append(adoptPtr(new MouseOrFocusEventContext(node, ¤tTarget, target)));
Instead of using adoptPtr(new Foo(, you should use std::make_unique<Foo>(
Ryosuke Niwa
Comment 4
2013-10-08 17:40:34 PDT
Committed
r157152
: <
http://trac.webkit.org/changeset/157152
>
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