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

simon.fraser at apple.com simon.fraser at apple.com
Thu Oct 29 20:37:34 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit f478d5f78c5d76b950753a9590e868763d274325
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 1 17:29:32 2009 +0000

    2009-10-01  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dave Hyatt.
    
            Odd color transitions on anchors with transition-property: all
            https://bugs.webkit.org/show_bug.cgi?id=29911
    
            When transitioning maybe-invalid colors, if the source and destination
            color are both invalid, then don't animate.
    
            This fixes an issue where a child element of an element running a color
            transition, with -webkit-transition-property:all, would show a color change.
            This happened because the "maybe invalid color" logic copied the color style
            into -webkit-text-fill-color for both endpoints, causing -webkit-text-fill-color
            to animate while the transition ran, and to then to disappear when the transition
            finished.
    
            Test: transitions/color-transition-all.html
    
            * page/animation/AnimationBase.cpp:
            (WebCore::PropertyWrapperMaybeInvalidColor::equals):
            (WebCore::PropertyWrapperMaybeInvalidColor::blend):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48982 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 961f064..108e592 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-01  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dave Hyatt.
+
+        Odd color transitions on anchors with transition-property: all
+        https://bugs.webkit.org/show_bug.cgi?id=29911
+        
+        Testcase for 'color' changing with -webkit-transition-property: all,
+        to test whether -webkit-text-fill-color animates.
+
+        * transitions/color-transition-all-expected.txt: Added.
+        * transitions/color-transition-all.html: Added.
+
 2009-10-01  Victor Wang  <victorw at chromium.org>
 
         Reviewed by Oliver Hunt.
diff --git a/LayoutTests/transitions/color-transition-all-expected.txt b/LayoutTests/transitions/color-transition-all-expected.txt
new file mode 100644
index 0000000..f4adc27
--- /dev/null
+++ b/LayoutTests/transitions/color-transition-all-expected.txt
@@ -0,0 +1,6 @@
+inner
+outer
+PASS - "color" property for "outer" element at 0.5s saw something close to: 0,127,127
+PASS - "color" property for "inner" element at 0.5s saw something close to: 255,0,0
+PASS - "-webkit-text-fill-color" property for "inner" element at 0.5s saw something close to: 255,0,0
+
diff --git a/LayoutTests/transitions/color-transition-all.html b/LayoutTests/transitions/color-transition-all.html
new file mode 100644
index 0000000..8676a32
--- /dev/null
+++ b/LayoutTests/transitions/color-transition-all.html
@@ -0,0 +1,51 @@
+<!DOCTYPE>
+
+<html lang="en">
+<head>
+  <title>Color transition with transition-property: all</title>
+  <style type="text/css" media="screen">
+    #outer {
+      font-size: 200%;
+      color: #00F;
+      -webkit-transition: all 1s linear;
+    }
+    
+    #inner {
+      color: #F00;
+    }
+    
+    #outer.changed {
+      color: #0F0;
+    }
+  </style>
+  <script src="transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
+  <script type="text/javascript" charset="utf-8">
+    const expectedValues = [
+      // [time, element-id, property, expected-value, tolerance]
+      [0.5, 'outer', 'color', [0, 127, 127], 2],
+      [0.5, 'inner', 'color', [255, 0, 0], 2],
+      [0.5, 'inner', '-webkit-text-fill-color', [255, 0, 0], 2],
+    ];
+
+    function setupTest()
+    {
+      document.getElementById('outer').className = 'changed';
+    }
+
+    runTransitionTest(expectedValues, setupTest, true);
+  </script>
+</head>
+<body>
+
+  <div id="outer">
+    <div id="inner">
+      inner
+    </div>
+    outer
+  </div>
+  
+  <div id="result">
+  </div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f36b4ee..32d8e14 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2009-10-01  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dave Hyatt.
+
+        Odd color transitions on anchors with transition-property: all
+        https://bugs.webkit.org/show_bug.cgi?id=29911
+
+        When transitioning maybe-invalid colors, if the source and destination
+        color are both invalid, then don't animate.
+        
+        This fixes an issue where a child element of an element running a color
+        transition, with -webkit-transition-property:all, would show a color change.
+        This happened because the "maybe invalid color" logic copied the color style
+        into -webkit-text-fill-color for both endpoints, causing -webkit-text-fill-color
+        to animate while the transition ran, and to then to disappear when the transition
+        finished.
+        
+        Test: transitions/color-transition-all.html
+
+        * page/animation/AnimationBase.cpp:
+        (WebCore::PropertyWrapperMaybeInvalidColor::equals):
+        (WebCore::PropertyWrapperMaybeInvalidColor::blend):
+
 2009-10-01  Victor Wang  <victorw at chromium.org>
 
         Reviewed by Oliver Hunt.
diff --git a/WebCore/page/animation/AnimationBase.cpp b/WebCore/page/animation/AnimationBase.cpp
index e54be8b..dec6f4b 100644
--- a/WebCore/page/animation/AnimationBase.cpp
+++ b/WebCore/page/animation/AnimationBase.cpp
@@ -361,6 +361,10 @@ public:
     {
         Color fromColor = (a->*m_getter)();
         Color toColor = (b->*m_getter)();
+
+        if (!fromColor.isValid() && !toColor.isValid())
+            return true;
+
         if (!fromColor.isValid())
             fromColor = a->color();
         if (!toColor.isValid())
@@ -373,6 +377,10 @@ public:
     {
         Color fromColor = (a->*m_getter)();
         Color toColor = (b->*m_getter)();
+
+        if (!fromColor.isValid() && !toColor.isValid())
+            return;
+
         if (!fromColor.isValid())
             fromColor = a->color();
         if (!toColor.isValid())

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list