Bug 60220 - Send unhandled wheel events to parent window on Windows
Summary: Send unhandled wheel events to parent window on Windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Unspecified
: P2 Normal
Assignee: Jeff Miller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-04 15:39 PDT by Jeff Miller
Modified: 2011-05-04 16:49 PDT (History)
0 users

See Also:


Attachments
Patch (11.43 KB, patch)
2011-05-04 15:47 PDT, Jeff Miller
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Miller 2011-05-04 15:39:12 PDT
To match WebKit1 behavior, we need to send unhandled wheel events to the parent window on Windows to allow the application to deal with them.
Comment 1 Jeff Miller 2011-05-04 15:47:46 PDT
Created attachment 92334 [details]
Patch
Comment 2 Darin Adler 2011-05-04 16:19:18 PDT
Comment on attachment 92334 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=92334&action=review

> Source/WebKit2/UIProcess/WebPageProxy.cpp:2633
> +#if PLATFORM(WIN)
> +        if (!handled && m_currentlyProcessedWheelEvent)
> +            wheelEventNotHandled(*m_currentlyProcessedWheelEvent);
> +#endif

Does this need to be Windows-only?

> Source/WebKit2/UIProcess/WebPageProxy.h:697
> +#if PLATFORM(WIN)
> +    void wheelEventNotHandled(NativeWebWheelEvent&) const;
> +#endif

Does this need to be Windows-only?

> Source/WebKit2/UIProcess/API/qt/qwkpage.cpp:343
> -    WebWheelEvent wheelEvent = WebEventFactory::createWebWheelEvent(ev);
> +    NativeWebWheelEvent wheelEvent = NativeWebWheelEvent(ev);
>      page->handleWheelEvent(wheelEvent);

Can we write this more simply, taking advantage of the default constructor?

> Source/WebKit2/UIProcess/win/WebView.cpp:438
> +    NativeWebWheelEvent wheelEvent = NativeWebWheelEvent(hWnd, message, wParam, lParam);

We should write this with construction syntax, not construct an object and then assign it.
Comment 3 Jeff Miller 2011-05-04 16:44:30 PDT
Comment on attachment 92334 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=92334&action=review

>> Source/WebKit2/UIProcess/WebPageProxy.cpp:2633
>> +#endif
> 
> Does this need to be Windows-only?

I'm certain this is not needed on the Mac, although I'm not sure about other platforms.  I'm assuming this is Windows-only for now.

>> Source/WebKit2/UIProcess/WebPageProxy.h:697
>> +#endif
> 
> Does this need to be Windows-only?

I'm certain this is not needed on the Mac, although I'm not sure about other platforms.  I'm assuming this is Windows-only for now.

>> Source/WebKit2/UIProcess/API/qt/qwkpage.cpp:343
>>      page->handleWheelEvent(wheelEvent);
> 
> Can we write this more simply, taking advantage of the default constructor?

I will clean this up before landing (hopefully without breaking the qt build, since I relied on the ews bots to catch my previous mistakes).

>> Source/WebKit2/UIProcess/win/WebView.cpp:438
>> +    NativeWebWheelEvent wheelEvent = NativeWebWheelEvent(hWnd, message, wParam, lParam);
> 
> We should write this with construction syntax, not construct an object and then assign it.

Fixed.
Comment 4 Jeff Miller 2011-05-04 16:49:41 PDT
Committed r85808: <http://trac.webkit.org/changeset/85808>