Changeset 55758 in webkit
- Timestamp:
- Mar 9, 2010 5:44:59 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r55748 r55758 1 2010-03-08 John Abd-El-Malek <jam@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Need to send mouse events to plugin when it has mouse capture 6 https://bugs.webkit.org/show_bug.cgi?id=35900 7 8 * public/WebInputEvent.h: 9 (WebKit::WebInputEvent::isMouseEventType): 10 * src/WebViewImpl.cpp: 11 (WebKit::WebViewImpl::WebViewImpl): 12 (WebKit::WebViewImpl::mouseDown): 13 (WebKit::WebViewImpl::mouseUp): 14 (WebKit::WebViewImpl::handleInputEvent): 15 * src/WebViewImpl.h: 16 1 17 2010-03-09 Anton Muhin <antonm@chromium.org> 2 18 -
trunk/WebKit/chromium/public/WebInputEvent.h
r55507 r55758 129 129 double timeStampSeconds; // Seconds since epoch. 130 130 131 // Returns true if the WebInputEvent |type| is a mouse event. 132 static bool isMouseEventType(int type) 133 { 134 return type == MouseDown 135 || type == MouseUp 136 || type == MouseMove 137 || type == MouseEnter 138 || type == MouseLeave; 139 } 140 131 141 // Returns true if the WebInputEvent |type| is a keyboard event. 132 142 static bool isKeyboardEventType(int type) -
trunk/WebKit/chromium/src/WebViewImpl.cpp
r55686 r55758 246 246 , m_isTransparent(false) 247 247 , m_tabsToLinks(false) 248 , m_haveMouseCapture(false) 248 249 { 249 250 // WebKit/win/WebView.cpp does the same thing, except they call the … … 328 329 329 330 m_lastMouseDownPoint = WebPoint(event.x, event.y); 331 m_haveMouseCapture = true; 330 332 331 333 // If a text field that has focus is clicked again, we should display the … … 442 444 #endif 443 445 444 mouseCaptureLost();445 446 mainFrameImpl()->frame()->eventHandler()->handleMouseReleaseEvent( 446 447 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event)); … … 900 901 return true; 901 902 903 if (m_haveMouseCapture && WebInputEvent::isMouseEventType(inputEvent.type)) { 904 Node* node = focusedWebCoreNode(); 905 if (node && node->renderer() && node->renderer()->isEmbeddedObject()) { 906 AtomicString eventType; 907 switch (inputEvent.type) { 908 case WebInputEvent::MouseMove: 909 eventType = eventNames().mousemoveEvent; 910 break; 911 case WebInputEvent::MouseLeave: 912 eventType = eventNames().mouseoutEvent; 913 break; 914 case WebInputEvent::MouseDown: 915 eventType = eventNames().mousedownEvent; 916 break; 917 case WebInputEvent::MouseUp: 918 eventType = eventNames().mouseupEvent; 919 break; 920 default: 921 ASSERT_NOT_REACHED(); 922 } 923 924 node->dispatchMouseEvent( 925 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), *static_cast<const WebMouseEvent*>(&inputEvent)), 926 eventType); 927 return true; 928 } 929 } 930 902 931 // FIXME: Remove m_currentInputEvent. 903 932 // This only exists to allow ChromeClient::show() to know which mouse button … … 955 984 void WebViewImpl::mouseCaptureLost() 956 985 { 986 m_haveMouseCapture = false; 957 987 } 958 988 -
trunk/WebKit/chromium/src/WebViewImpl.h
r54586 r55758 447 447 #endif 448 448 449 bool m_haveMouseCapture; 450 449 451 static const WebInputEvent* m_currentInputEvent; 450 452 };
Note: See TracChangeset
for help on using the changeset viewer.