Bad copy constructor in StyleRareNonInheritedData
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 06:25:13 +0000 (06:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 06:25:13 +0000 (06:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=98950

Patch by Rik Cabanier <cabanier@adobe.com> on 2012-10-11
Reviewed by Eric Seidel.

Typo in copy constructor caused blendmode to always be the default.

Source/WebCore:

* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

LayoutTests:

* platform/chromium/TestExpectations:
* transitions/blendmode-transitions-expected.txt: Added.
* transitions/blendmode-transitions.html: Added.
* transitions/resources/transition-test-helpers.js:
* transitions/svg-transitions-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131146 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
LayoutTests/transitions/blendmode-transitions-expected.txt [new file with mode: 0644]
LayoutTests/transitions/blendmode-transitions.html [new file with mode: 0644]
LayoutTests/transitions/resources/transition-test-helpers.js
LayoutTests/transitions/svg-transitions-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

index 540b4ca..b073efd 100644 (file)
@@ -1,3 +1,18 @@
+2012-10-11  Rik Cabanier  <cabanier@adobe.com>
+
+        Bad copy constructor in StyleRareNonInheritedData
+        https://bugs.webkit.org/show_bug.cgi?id=98950
+
+        Reviewed by Eric Seidel.
+
+        Typo in copy constructor caused blendmode to always be the default.
+
+        * platform/chromium/TestExpectations:
+        * transitions/blendmode-transitions-expected.txt: Added.
+        * transitions/blendmode-transitions.html: Added.
+        * transitions/resources/transition-test-helpers.js:
+        * transitions/svg-transitions-expected.txt:
+
 2012-10-11  Shinya Kawanaka  <shinyak@chromium.org> 
 
         [Chromium] Unreviewed gardening, TestExpectation updated.
index 26e3eb3..cdf635b 100644 (file)
@@ -107,6 +107,9 @@ webkit.org/b/94332 http/tests/security/contentSecurityPolicy/function-constructo
 # ever expect to pass this.
 crbug.com/24189 fast/dom/open-and-close-by-DOM.html [ Skip ]
 
+# Fails because Blend Mode is not enabled on Chromium yet 
+webkit.org/b/98950 transitions/blendmode-transitions.html [ Skip ]
+
 # Implement java testing harness.
 crbug.com/36681 java [ Skip ]
 
diff --git a/LayoutTests/transitions/blendmode-transitions-expected.txt b/LayoutTests/transitions/blendmode-transitions-expected.txt
new file mode 100644 (file)
index 0000000..1ee1e1e
--- /dev/null
@@ -0,0 +1,4 @@
+Test to make sure that the blendmode property is properly propagated to shared styles
+BOX
+PASS - "-webkit-blend-mode" property for "box" element at 0.5s saw something close to: difference
+
diff --git a/LayoutTests/transitions/blendmode-transitions.html b/LayoutTests/transitions/blendmode-transitions.html
new file mode 100644 (file)
index 0000000..7f7f66d
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+  <style>
+    .box {
+      height: 100px;
+      width: 100px;
+      margin: 50px;
+      border: 1px solid black;
+      text-align: center;
+      padding: 20px;
+      -webkit-transition-duration: 10s;
+      -webkit-transition-timing-function: linear;
+      -webkit-transition-property: opacity;
+         opacity:1;
+         -webkit-blend-mode: difference;
+    }
+    
+    .final {
+      opacity: 0;
+    }
+  </style>
+  <script src="resources/transition-test-helpers.js"></script>
+  <script type="text/javascript">
+
+    const expectedValues = [
+      // [time, element-id, property, expected-value, tolerance]
+      [0.5, 'box', '-webkit-blend-mode', 'difference', 0],
+    ];
+  
+    function setupTest()
+    {
+      document.getElementById('box').className = 'box final';
+    }
+  
+    runTransitionTest(expectedValues, setupTest, false);
+  </script>
+</head>
+<body>
+Test to make sure that the blendmode property is properly propagated to shared styles
+  <div id="box" class="box">BOX</div>
+  <div id="result">
+  </div>
+
+</body>
+</html>
index 3d40b4f..4a4971d 100644 (file)
@@ -163,6 +163,7 @@ function checkExpectedValue(expected, index)
         } else if (computedStyle.cssValueType == CSSValue.CSS_PRIMITIVE_VALUE) {
             switch (computedStyle.primitiveType) {
                 case CSSPrimitiveValue.CSS_STRING:
+                case CSSPrimitiveValue.CSS_IDENT:
                     computedValue = computedStyle.getStringValue();
                     pass = computedValue == expectedValue;
                     break;
index ee9a7b7..24e04e1 100644 (file)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 239: Failed to pause 'fill' transition on element 'rect7'
+CONSOLE MESSAGE: line 240: Failed to pause 'fill' transition on element 'rect7'
 Example
 PASS - "fill-opacity" property for "rect1" element at 1s saw something close to: 0.6
 PASS - "stroke-width" property for "rect1" element at 1s saw something close to: 3
index 8efc0bd..c3f80e7 100644 (file)
@@ -1,3 +1,15 @@
+2012-10-11  Rik Cabanier  <cabanier@adobe.com>
+
+        Bad copy constructor in StyleRareNonInheritedData
+        https://bugs.webkit.org/show_bug.cgi?id=98950
+
+        Reviewed by Eric Seidel.
+
+        Typo in copy constructor caused blendmode to always be the default.
+
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+
 2012-10-11  Takashi Sakamoto  <tasak@google.com>
 
         [WebKit IDL] remove all module from idl files.
index 5d4d2cc..1285bf6 100644 (file)
@@ -165,7 +165,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
 #endif
     , m_hasAspectRatio(o.m_hasAspectRatio)
 #if ENABLE(CSS_COMPOSITING)
-    , m_effectiveBlendMode(RenderStyle::initialBlendMode())
+    , m_effectiveBlendMode(o.m_effectiveBlendMode)
 #endif
 {
 }