[webkit-reviews] review granted: [Bug 135244] Let WheelEvent wrap a PlatformWheelEvent : [Attachment 235567] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 27 23:14:34 PDT 2014


Darin Adler <darin at apple.com> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 135244: Let WheelEvent wrap a PlatformWheelEvent
https://bugs.webkit.org/show_bug.cgi?id=135244

Attachment 235567: Patch
https://bugs.webkit.org/attachment.cgi?id=235567&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=235567&action=review


> Source/WebCore/dom/WheelEvent.cpp:53
> +    , m_wheelEvent(PlatformWheelEvent())

No need to include this. This is what happens if you don’t explicitly
initialize m_wheelEvent, so you should just omit this line.

> Source/WebCore/dom/WheelEvent.cpp:65
> +    , m_wheelEvent(PlatformWheelEvent())

No need to include this. This is what happens if you don’t explicitly
initialize m_wheelEvent, so you should just omit this line.

> Source/WebCore/dom/WheelEvent.h:81
> +    // Returns a null pointer if WheelEvent was not created using a
PlatformWheelEvent.
> +    const PlatformWheelEvent* wheelEvent() const { return
m_initializedWithPlatformWheelEvent ? &m_wheelEvent : nullptr; }

This comment is not needed if we put the implementation inline like this, since
the code says the same thing the comment does.

But also, I am not convinced this boolean and null pointer technique is the
right way to achieve what you want to achieve. Since this patch doesn’t include
the changes to code that uses the wheelEvent() function, I can’t judge whether
an alternative solution would be better, since I don’t know what problem the
nullptr is trying to solve.


More information about the webkit-reviews mailing list