[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

girish at forwardbias.in girish at forwardbias.in
Wed Dec 22 12:38:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 41020375bb86928f672020b70090b18a484e382b
Author: girish at forwardbias.in <girish at forwardbias.in@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 26 11:56:40 2010 +0000

    [Qt] Set the clipRect correctly in windowed and windowless mode.
    In Windowed mode, the values are in page coordinates. In Windowless
    mode the values are in drawable coordinates. Setting these values is
    purely academic since they are not used by Flash. However, there is a
    possibility that plugins might infer a 'null' clipRect to mean 'invisible'.
    
    https://bugs.webkit.org/show_bug.cgi?id=44594
    
    Reviewed by Simon Hausmann.
    
    * plugins/qt/PluginViewQt.cpp:
    (WebCore::PluginView::setNPWindowIfNeeded):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1ea2839..30693ab 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-26  Girish Ramakrishnan  <girish at forwardbias.in>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Set the clipRect correctly in windowed and windowless mode.
+        In Windowed mode, the values are in page coordinates. In Windowless
+        mode the values are in drawable coordinates. Setting these values is
+        purely academic since they are not used by Flash. However, there is a
+        possibility that plugins might infer a 'null' clipRect to mean 'invisible'.
+
+        https://bugs.webkit.org/show_bug.cgi?id=44594
+
+        * plugins/qt/PluginViewQt.cpp:
+        (WebCore::PluginView::setNPWindowIfNeeded):
+
 2010-08-26  Pavel Podivilov  <podivilov at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index 4e89c7b..47e27d8 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -578,19 +578,24 @@ void PluginView::setNPWindowIfNeeded()
 
         m_npWindow.x = m_windowRect.x();
         m_npWindow.y = m_windowRect.y();
-
-        m_npWindow.clipRect.left = max(0, m_clipRect.x());
-        m_npWindow.clipRect.top = max(0, m_clipRect.y());
-        m_npWindow.clipRect.right = m_clipRect.x() + m_clipRect.width();
-        m_npWindow.clipRect.bottom = m_clipRect.y() + m_clipRect.height();
     } else {
         m_npWindow.x = 0;
         m_npWindow.y = 0;
+    }
 
+    // If the width or height are null, set the clipRect to null, indicating that
+    // the plugin is not visible/scrolled out.
+    if (!m_clipRect.width() || !m_clipRect.height()) {
         m_npWindow.clipRect.left = 0;
-        m_npWindow.clipRect.top = 0;
         m_npWindow.clipRect.right = 0;
+        m_npWindow.clipRect.top = 0;
         m_npWindow.clipRect.bottom = 0;
+    } else {
+        // Clipping rectangle of the plug-in; the origin is the top left corner of the drawable or window. 
+        m_npWindow.clipRect.left = m_npWindow.x + m_clipRect.x();
+        m_npWindow.clipRect.top = m_npWindow.y + m_clipRect.y();
+        m_npWindow.clipRect.right = m_npWindow.x + m_clipRect.x() + m_clipRect.width();
+        m_npWindow.clipRect.bottom = m_npWindow.y + m_clipRect.y() + m_clipRect.height();
     }
 
     if (m_plugin->quirks().contains(PluginQuirkDontCallSetWindowMoreThanOnce)) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list