[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:40:53 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 18d21c0a3db406168b262ffac2f97cc572d18ae5
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 7 07:40:05 2009 +0000

    2009-10-07  Girish Ramakrishnan  <girish at forwardbias.in>
    
            Reviewed by Simon Hausmann.
    
            [Qt] Windowless Plugins: Disable content propagation for QGraphicsView items
    
            We cannot support content propagation for items in QGraphicsView because
            the contents of the backing store might be transformed. So turn it off
            if we are not painting on QWidget.
    
            Note that this check will not work for a QWebView in a
            QGraphicsProxyWidget, but I guess it's fine. Alternative is to do an
            even uglier cast: static_cast painter's paintDevice() to QWidget and
            check if it is the viewport() of QGraphicsView.
    
            https://bugs.webkit.org/show_bug.cgi?id=30149
    
            * plugins/qt/PluginViewQt.cpp:
            (WebCore::PluginView::paint):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49231 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 738e9b6..7b78218 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2009-10-07  Girish Ramakrishnan  <girish at forwardbias.in>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Windowless Plugins: Disable content propagation for QGraphicsView items
+        
+        We cannot support content propagation for items in QGraphicsView because
+        the contents of the backing store might be transformed. So turn it off
+        if we are not painting on QWidget.
+        
+        Note that this check will not work for a QWebView in a
+        QGraphicsProxyWidget, but I guess it's fine. Alternative is to do an
+        even uglier cast: static_cast painter's paintDevice() to QWidget and
+        check if it is the viewport() of QGraphicsView.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30149
+
+        * plugins/qt/PluginViewQt.cpp:
+        (WebCore::PluginView::paint):
+
 2009-10-07  Simon Hausmann  <simon.hausmann at nokia.com>
 
         Fix the Qt build by adding the missing files to the build.
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index f11fa66..6b26b45 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -190,7 +190,14 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
         const bool hasValidBackingStore = backingStoreDevice && backingStoreDevice->devType() == QInternal::Pixmap;
         QPixmap* backingStorePixmap = static_cast<QPixmap*>(backingStoreDevice);
 
-        if (hasValidBackingStore && backingStorePixmap->depth() == drawableDepth) {
+        // We cannot grab contents from the backing store when painting on QGraphicsView items
+        // (because backing store contents are already transformed). What we really mean to do 
+        // here is to check if we are painting on QWebView, but let's be a little permissive :)
+        QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient();
+        const bool backingStoreHasUntransformedContents = qobject_cast<QWidget*>(client->pluginParent());
+
+        if (hasValidBackingStore && backingStorePixmap->depth() == drawableDepth 
+            && backingStoreHasUntransformedContents) {
             GC gc = XDefaultGC(QX11Info::display(), QX11Info::appScreen());
             XCopyArea(QX11Info::display(), backingStorePixmap->handle(), m_drawable, gc,
                 offset.x() + m_windowRect.x() + m_clipRect.x(), offset.y() + m_windowRect.y() + m_clipRect.y(),

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list