Changeset 85860 in webkit
- Timestamp:
- May 5, 2011 9:57:50 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r85859 r85860 1 2011-05-05 Jeff Miller <jeffm@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Add didNotHandleWheelEvent callback to WKPageUIClient 6 https://bugs.webkit.org/show_bug.cgi?id=60203 7 8 Remove Windows-specific WebPageProxy::wheelEventNotHandled() member function and use 9 didNotHandleWheelEvent callback in WKPageUIClient instead. It turns out that just 10 resending the wheel event to the parent window doesn't provide the client with enough context 11 to know that WebKit has already attempted to handle the event. 12 13 * UIProcess/API/C/WKPage.h: Added WKPageDidNotHandleWheelEventCallback typedef and didNotHandleWheelEvent to WKPageUIClient. 14 15 * UIProcess/API/gtk/PageClientImpl.cpp: 16 (WebKit::PageClientImpl::didNotHandleWheelEvent): Added, but not implemented. 17 * UIProcess/API/gtk/PageClientImpl.h: Added didNotHandleWheelEvent(). 18 * UIProcess/API/qt/qwkpage.cpp: 19 (QWKPage::QWKPage):Stubbed out didNotHandleWheelEvent callback. 20 21 * UIProcess/WebPageProxy.cpp: 22 (WebKit::WebPageProxy::didReceiveEvent): Call didNotHandleWheelEvent in WKPageUIClient if wheel event is not handled. 23 * UIProcess/WebPageProxy.h: Removed wheelEventNotHandled(). 24 25 * UIProcess/WebUIClient.cpp: 26 (WebKit::WebUIClient::implementsDidNotHandleWheelEvent): Added. 27 (WebKit::WebUIClient::didNotHandleWheelEvent): Added. 28 * UIProcess/WebUIClient.h: Added implementsDidNotHandleWheelEvent() and didNotHandleWheelEvent(). 29 30 * UIProcess/win/WebPageProxyWin.cpp: Removed wheelEventNotHandled(). 31 1 32 2011-05-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 33 -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.h
r85356 r85860 164 164 typedef void (*WKPageMissingPluginButtonClickedCallback)(WKPageRef page, WKStringRef mimeType, WKStringRef url, WKStringRef pluginsPageURL, const void* clientInfo); 165 165 typedef void (*WKPageDidNotHandleKeyEventCallback)(WKPageRef page, WKNativeEventPtr event, const void *clientInfo); 166 typedef void (*WKPageDidNotHandleWheelEventCallback)(WKPageRef page, WKNativeEventPtr event, const void *clientInfo); 166 167 typedef bool (*WKPageGetToolbarsAreVisibleCallback)(WKPageRef page, const void *clientInfo); 167 168 typedef void (*WKPageSetToolbarsAreVisibleCallback)(WKPageRef page, bool toolbarsVisible, const void *clientInfo); … … 203 204 WKPageMissingPluginButtonClickedCallback missingPluginButtonClicked; 204 205 WKPageDidNotHandleKeyEventCallback didNotHandleKeyEvent; 206 WKPageDidNotHandleWheelEventCallback didNotHandleWheelEvent; 205 207 WKPageGetToolbarsAreVisibleCallback toolbarsAreVisible; 206 208 WKPageSetToolbarsAreVisibleCallback setToolbarsAreVisible; -
trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp
r85199 r85860 427 427 } 428 428 429 void PageClientImpl::didNotHandleWheelEvent(const NativeWebWheelEvent&) 430 { 431 notImplemented(); 432 } 433 429 434 PassRefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy*) 430 435 { -
trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
r85198 r85860 78 78 virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled); 79 79 virtual void didNotHandleKeyEvent(const NativeWebKeyboardEvent&); 80 virtual void didNotHandleWheelEvent(const NativeWebWhellboardEvent&); 80 81 virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*); 81 82 virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*); -
trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp
r85808 r85860 478 478 0, /* missingPluginButtonClicked */ 479 479 0, /* didNotHandleKeyEvent */ 480 0, /* didNotHandleWheelEvent */ 480 481 0, /* toolbarsAreVisible */ 481 482 0, /* setToolbarsAreVisible */ -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r85808 r85860 2628 2628 ASSERT(m_currentlyProcessedWheelEvent); 2629 2629 2630 #if PLATFORM(WIN) 2631 if (!handled && m_currentlyProcessedWheelEvent) 2632 wheelEventNotHandled(*m_currentlyProcessedWheelEvent); 2633 #endif 2630 if (!handled && m_currentlyProcessedWheelEvent && m_uiClient.implementsDidNotHandleWheelEvent()) 2631 m_uiClient.didNotHandleWheelEvent(this, *m_currentlyProcessedWheelEvent); 2634 2632 2635 2633 m_currentlyProcessedWheelEvent = nullptr; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r85808 r85860 693 693 void stopResponsivenessTimer(); 694 694 695 #if PLATFORM(WIN)696 void wheelEventNotHandled(NativeWebWheelEvent&) const;697 #endif698 699 695 void voidCallback(uint64_t); 700 696 void dataCallback(const CoreIPC::DataReference&, uint64_t); -
trunk/Source/WebKit2/UIProcess/WebUIClient.cpp
r84702 r85860 29 29 #include "ImmutableDictionary.h" 30 30 #include "NativeWebKeyboardEvent.h" 31 #include "NativeWebWheelEvent.h" 31 32 #include "WKAPICast.h" 32 33 #include "WebNumber.h" … … 176 177 } 177 178 179 bool WebUIClient::implementsDidNotHandleWheelEvent() const 180 { 181 return m_client.didNotHandleWheelEvent; 182 } 183 184 void WebUIClient::didNotHandleWheelEvent(WebPageProxy* page, const NativeWebWheelEvent& event) 185 { 186 if (!m_client.didNotHandleWheelEvent) 187 return; 188 m_client.didNotHandleWheelEvent(toAPI(page), event.nativeEvent(), m_client.clientInfo); 189 } 190 178 191 bool WebUIClient::toolbarsAreVisible(WebPageProxy* page) 179 192 { -
trunk/Source/WebKit2/UIProcess/WebUIClient.h
r84702 r85860 45 45 class GeolocationPermissionRequestProxy; 46 46 class NativeWebKeyboardEvent; 47 class NativeWebWheelEvent; 47 48 class WebData; 48 49 class WebFrameProxy; … … 71 72 bool implementsDidNotHandleKeyEvent() const; 72 73 void didNotHandleKeyEvent(WebPageProxy*, const NativeWebKeyboardEvent&); 74 75 bool implementsDidNotHandleWheelEvent() const; 76 void didNotHandleWheelEvent(WebPageProxy*, const NativeWebWheelEvent&); 73 77 74 78 bool toolbarsAreVisible(WebPageProxy*); -
trunk/Source/WebKit2/UIProcess/win/WebPageProxyWin.cpp
r85808 r85860 27 27 #include "WebPageProxy.h" 28 28 29 #include "NativeWebWheelEvent.h"30 29 #include "PageClient.h" 31 30 #include "WebPopupMenuProxyWin.h" … … 77 76 } 78 77 79 void WebPageProxy::wheelEventNotHandled(NativeWebWheelEvent& event) const80 {81 const MSG* msg = event.nativeEvent();82 ::PostMessage(::GetParent(nativeWindow()), msg->message, msg->wParam, msg->lParam);83 }84 85 78 } // namespace WebKit -
trunk/Tools/ChangeLog
r85827 r85860 1 2011-05-05 Jeff Miller <jeffm@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Add didNotHandleWheelEvent callback to WKPageUIClient 6 https://bugs.webkit.org/show_bug.cgi?id=60203 7 8 * MiniBrowser/gtk/BrowserWindow.c: 9 (browserWindowUIClientInit): Stub out didNotHandleWheelEvent callback. 10 * MiniBrowser/mac/BrowserWindowController.m: 11 (-[BrowserWindowController awakeFromNib]): Stub out didNotHandleWheelEvent callback. 12 * MiniBrowser/win/BrowserView.cpp: 13 (BrowserView::create): Stub out didNotHandleWheelEvent callback. 14 * WebKitTestRunner/TestController.cpp: 15 (WTR::TestController::createOtherPage): Stub out didNotHandleWheelEvent callback. 16 (WTR::TestController::initialize): Stub out didNotHandleWheelEvent callback. 17 1 18 2011-05-04 Eric Seidel <eric@webkit.org> 2 19 -
trunk/Tools/MiniBrowser/gtk/BrowserWindow.c
r85313 r85860 423 423 0, /* missingPluginButtonClicked */ 424 424 0, /* didNotHandleKeyEvent */ 425 0, /* didNotHandleWheelEvent */ 425 426 0, /* toolbarsAreVisible */ 426 427 0, /* setToolbarsAreVisible */ -
trunk/Tools/MiniBrowser/mac/BrowserWindowController.m
r85120 r85860 630 630 0, /* missingPluginButtonClicked */ 631 631 0, /* didNotHandleKeyEvent */ 632 0, /* didNotHandleWheelEvent */ 632 633 0, /* toolbarsAreVisible */ 633 634 0, /* setToolbarsAreVisible */ -
trunk/Tools/MiniBrowser/win/BrowserView.cpp
r84702 r85860 108 108 mouseDidMoveOverElement, 109 109 0, /* didNotHandleKeyEvent */ 110 0, /* didNotHandleWheelEvent */ 110 111 0, /* toolbarsAreVisible */ 111 112 0, /* setToolbarsAreVisible */ -
trunk/Tools/WebKitTestRunner/TestController.cpp
r85120 r85860 152 152 0, // missingPluginButtonClicked 153 153 0, // didNotHandleKeyEvent 154 0, // didNotHandleWheelEvent 154 155 0, // toolbarsAreVisible 155 156 0, // setToolbarsAreVisible … … 294 295 0, // missingPluginButtonClicked 295 296 0, // didNotHandleKeyEvent 297 0, // didNotHandleWheelEvent 296 298 0, // toolbarsAreVisible 297 299 0, // setToolbarsAreVisible
Note: See TracChangeset
for help on using the changeset viewer.