[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

girish at forwardbias.in girish at forwardbias.in
Thu Apr 8 00:00:17 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9efe23b65c5507dfeb863ffd1885e27c3e37ea01
Author: girish at forwardbias.in <girish at forwardbias.in@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 30 12:08:20 2009 +0000

    [Qt] Mac Plugins : Get context menu to work in QGraphicsView
    
    Reviewed by Holger Freyther.
    
    Flash expects the value in record.where to be the global position for
    displaying the context menu.
    
    https://bugs.webkit.org/show_bug.cgi?id=31979
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51485 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b944094..ad83fd3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-11-30  Girish Ramakrishnan  <girish at forwardbias.in>
+
+        Reviewed by Holger Freyther.
+
+        [Qt] Mac Plugins : Get context menu to work in QGraphicsView
+        
+        Flash expects the value in record.where to be the global position for
+        displaying the context menu.
+        
+        https://bugs.webkit.org/show_bug.cgi?id=31979
+
+        * plugins/mac/PluginViewMac.cpp:
+        (WebCore::PluginView::handleMouseEvent):
+
 2009-11-30  Steve Block  <steveblock at google.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/plugins/mac/PluginViewMac.cpp b/WebCore/plugins/mac/PluginViewMac.cpp
index e77f261..7586774 100644
--- a/WebCore/plugins/mac/PluginViewMac.cpp
+++ b/WebCore/plugins/mac/PluginViewMac.cpp
@@ -566,11 +566,16 @@ void PluginView::handleMouseEvent(MouseEvent* event)
     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;
+        if (event->button() == 2) {
+            // always pass the global position for right-click since Flash uses it to position the context menu
+            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);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list