[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
girish at forwardbias.in
girish at forwardbias.in
Thu Dec 3 13:45:21 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 466da42004ff12566b108eed1c9b67677cbc3658
Author: girish at forwardbias.in <girish at forwardbias.in@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 26 13:04:06 2009 +0000
[Qt] Mac Plugins : Pass mouse position relative to the fake window
Reviewed by Holger Freyther.
When using off-screen rendering, we need to pass mouse events relative
to the fake window instead of the global position.
https://bugs.webkit.org/show_bug.cgi?id=31794
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0b239f6..7100d10 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-11-26 Girish Ramakrishnan <girish at forwardbias.in>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Mac Plugins : Pass mouse position relative to the fake window
+
+ When using off-screen rendering, we need to pass mouse events relative
+ to the fake window instead of the global position.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31794
+
+ * plugins/mac/PluginViewMac.cpp:
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::handleMouseEvent):
+
2009-11-24 Holger Hans Peter Freyther <zecke at selfish.org>
Reviewed by Eric Seidel.
diff --git a/WebCore/plugins/mac/PluginViewMac.cpp b/WebCore/plugins/mac/PluginViewMac.cpp
index 6044313..e77f261 100644
--- a/WebCore/plugins/mac/PluginViewMac.cpp
+++ b/WebCore/plugins/mac/PluginViewMac.cpp
@@ -175,7 +175,7 @@ bool PluginView::platformStart()
}
#if PLATFORM(QT)
- // Set the platformPluginWidget only in the case of QWebView until we get mouse events working.
+ // Set the platformPluginWidget only in the case of QWebView so that the context menu appears in the right place.
// In all other cases, we use off-screen rendering
if (QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient()) {
if (QWidget* widget = qobject_cast<QWidget*>(client->pluginParent()))
@@ -185,8 +185,12 @@ bool PluginView::platformStart()
// Create a fake window relative to which all events will be sent when using offscreen rendering
if (!platformPluginWidget()) {
- ::Rect windowBounds = { 0, 0, 100, 100 };
+ // Make the default size really big. It is unclear why this is required but with a smaller size, mouse move
+ // events don't get processed. Resizing the fake window to flash's size doesn't help.
+ ::Rect windowBounds = { 0, 0, 1000, 1000 };
CreateNewWindow(kDocumentWindowClass, kWindowStandardDocumentAttributes, &windowBounds, &m_fakeWindow);
+ // Flash requires the window to be hilited to process mouse move events.
+ HiliteWindow(m_fakeWindow, true);
}
show();
@@ -559,7 +563,15 @@ void PluginView::handleMouseEvent(MouseEvent* event)
return;
}
- record.where = globalMousePosForPlugin();
+ if (platformPluginWidget()) {
+ record.where = globalMousePosForPlugin();
+ } else {
+ IntPoint postZoomPos = roundedIntPoint(m_element->renderer()->absoluteToLocal(event->absoluteLocation()));
+ record.where.h = postZoomPos.x() + m_windowRect.x();
+ // The number 22 is the height of the title bar. As to why it figures in the calculation below
+ // is left as an exercise to the reader :-)
+ record.where.v = postZoomPos.y() + m_windowRect.y() - 22;
+ }
record.modifiers = modifiersForEvent(event);
if (!event->buttonDown())
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list