[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
jam at chromium.org
jam at chromium.org
Thu Apr 8 02:18:14 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 34862b39bad7c7d0890d25900aab1a38fd23095b
Author: jam at chromium.org <jam at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Mar 10 01:44:59 2010 +0000
Reviewed by Darin Fisher.
Need to send mouse events to plugin when it has mouse capture
https://bugs.webkit.org/show_bug.cgi?id=35900
* public/WebInputEvent.h:
(WebKit::WebInputEvent::isMouseEventType):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::mouseDown):
(WebKit::WebViewImpl::mouseUp):
(WebKit::WebViewImpl::handleInputEvent):
* src/WebViewImpl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index b649c3e..fc82419 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,19 @@
+2010-03-08 John Abd-El-Malek <jam at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Need to send mouse events to plugin when it has mouse capture
+ https://bugs.webkit.org/show_bug.cgi?id=35900
+
+ * public/WebInputEvent.h:
+ (WebKit::WebInputEvent::isMouseEventType):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::mouseDown):
+ (WebKit::WebViewImpl::mouseUp):
+ (WebKit::WebViewImpl::handleInputEvent):
+ * src/WebViewImpl.h:
+
2010-03-09 Anton Muhin <antonm at chromium.org>
Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/public/WebInputEvent.h b/WebKit/chromium/public/WebInputEvent.h
index ab3257c..2ac7475 100644
--- a/WebKit/chromium/public/WebInputEvent.h
+++ b/WebKit/chromium/public/WebInputEvent.h
@@ -128,6 +128,16 @@ public:
int modifiers;
double timeStampSeconds; // Seconds since epoch.
+ // Returns true if the WebInputEvent |type| is a mouse event.
+ static bool isMouseEventType(int type)
+ {
+ return type == MouseDown
+ || type == MouseUp
+ || type == MouseMove
+ || type == MouseEnter
+ || type == MouseLeave;
+ }
+
// Returns true if the WebInputEvent |type| is a keyboard event.
static bool isKeyboardEventType(int type)
{
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index e70c572..1e4f274 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -245,6 +245,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_suggestionsPopup(0)
, m_isTransparent(false)
, m_tabsToLinks(false)
+ , m_haveMouseCapture(false)
{
// WebKit/win/WebView.cpp does the same thing, except they call the
// KJS specific wrapper around this method. We need to have threading
@@ -327,6 +328,7 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
return;
m_lastMouseDownPoint = WebPoint(event.x, event.y);
+ m_haveMouseCapture = true;
// If a text field that has focus is clicked again, we should display the
// suggestions popup.
@@ -441,7 +443,6 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
}
#endif
- mouseCaptureLost();
mainFrameImpl()->frame()->eventHandler()->handleMouseReleaseEvent(
PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event));
@@ -899,6 +900,34 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
if (m_ignoreInputEvents)
return true;
+ if (m_haveMouseCapture && WebInputEvent::isMouseEventType(inputEvent.type)) {
+ Node* node = focusedWebCoreNode();
+ if (node && node->renderer() && node->renderer()->isEmbeddedObject()) {
+ AtomicString eventType;
+ switch (inputEvent.type) {
+ case WebInputEvent::MouseMove:
+ eventType = eventNames().mousemoveEvent;
+ break;
+ case WebInputEvent::MouseLeave:
+ eventType = eventNames().mouseoutEvent;
+ break;
+ case WebInputEvent::MouseDown:
+ eventType = eventNames().mousedownEvent;
+ break;
+ case WebInputEvent::MouseUp:
+ eventType = eventNames().mouseupEvent;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+
+ node->dispatchMouseEvent(
+ PlatformMouseEventBuilder(mainFrameImpl()->frameView(), *static_cast<const WebMouseEvent*>(&inputEvent)),
+ eventType);
+ return true;
+ }
+ }
+
// FIXME: Remove m_currentInputEvent.
// This only exists to allow ChromeClient::show() to know which mouse button
// triggered a window.open event.
@@ -954,6 +983,7 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
void WebViewImpl::mouseCaptureLost()
{
+ m_haveMouseCapture = false;
}
void WebViewImpl::setFocus(bool enable)
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 286ac43..a913115 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -446,6 +446,8 @@ private:
NotificationPresenterImpl m_notificationPresenter;
#endif
+ bool m_haveMouseCapture;
+
static const WebInputEvent* m_currentInputEvent;
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list