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

eric at webkit.org eric at webkit.org
Thu Apr 8 02:21:55 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit d3084ba232915ca685601e6c5e590fd57da4358a
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Mar 13 19:28:45 2010 +0000

    2010-03-13  Kim Grönholm  <kim.gronholm at nomovok.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] GraphicsLayer: Opacity change from zero to non-zero doesn't always have effect with AC
            https://bugs.webkit.org/show_bug.cgi?id=36034
    
            * platform/graphics/qt/GraphicsLayerQt.cpp:
            (WebCore::OpacityAnimationQt::applyFrame):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1c413b6..2df04b5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,16 @@
 
         Reviewed by Kenneth Rohde Christiansen.
 
+        [Qt] GraphicsLayer: Opacity change from zero to non-zero doesn't always have effect with AC
+        https://bugs.webkit.org/show_bug.cgi?id=36034
+
+        * platform/graphics/qt/GraphicsLayerQt.cpp:
+        (WebCore::OpacityAnimationQt::applyFrame):
+
+2010-03-13  Kim Grönholm  <kim.gronholm at nomovok.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
         [Qt] GraphicsLayer: Opacity transitions end with begin value
         https://bugs.webkit.org/show_bug.cgi?id=36019
 
diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index 68a3063..957b49c 100644
--- a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -1134,7 +1134,14 @@ public:
 
     virtual void applyFrame(const qreal& fromValue, const qreal& toValue, qreal progress)
     {
-        m_layer.data()->setOpacity(qMin<qreal>(qMax<qreal>(fromValue + (toValue-fromValue)*progress, 0), 1));
+        qreal opacity = qBound(qreal(0), fromValue + (toValue-fromValue)*progress, qreal(1));
+
+        // FIXME: this is a hack, due to a probable QGraphicsScene bug.
+        // Without this the opacity change doesn't always have immediate effect.
+        if (!m_layer.data()->opacity() && opacity)
+            m_layer.data()->scene()->update();
+
+        m_layer.data()->setOpacity(opacity);
     }
 
     virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list