[Webkit-unassigned] [Bug 135244] Let WheelEvent wrap a PlatformWheelEvent

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


https://bugs.webkit.org/show_bug.cgi?id=135244


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #235567|review?, commit-queue?      |review+, commit-queue-
               Flag|                            |




--- Comment #15 from Darin Adler <darin at apple.com>  2014-07-27 23:14:48 PST ---
(From update of attachment 235567)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list