REGRESSION (r202950): Image zoom animations are broken at medium.com (159861)
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Jul 2016 23:39:38 +0000 (23:39 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Jul 2016 23:39:38 +0000 (23:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159906
<rdar://problem/27391725>

Reviewed by Simon Fraser.

The fix for webkit.org/b/157569 in r200769 broke AMP pages.
The followup fix for webkit.org/b/159450 in r202950 broke Medium pages.

Revert them both until we have better testing.

Source/WebCore:

* css/CSSParser.cpp:
(WebCore::CSSParser::addPropertyWithPrefixingVariant):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand): Deleted.
* css/CSSPropertyNames.in:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::removeShorthandProperty):
(WebCore::MutableStyleProperties::removeProperty):
(WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty):
(WebCore::MutableStyleProperties::setProperty):
(WebCore::getIndexInShorthandVectorForPrefixingVariant):
(WebCore::MutableStyleProperties::appendPrefixingVariantProperty):
(WebCore::MutableStyleProperties::setPrefixingVariantProperty):
(WebCore::StyleProperties::asText): Deleted.
* css/StyleProperties.h:

LayoutTests:

* animations/fill-mode-forwards-zero-duration.html:
* animations/play-state-start-paused.html:
* animations/script-tests/spring-parsing.js:
(testSpring):
* animations/spring-parsing-expected.txt:
* animations/unprefixed-properties-expected.txt:
* animations/unprefixed-properties.html:
* fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
* fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt:

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

15 files changed:
LayoutTests/ChangeLog
LayoutTests/animations/fill-mode-forwards-zero-duration.html
LayoutTests/animations/play-state-start-paused.html
LayoutTests/animations/script-tests/spring-parsing.js
LayoutTests/animations/spring-parsing-expected.txt
LayoutTests/animations/unprefixed-properties-expected.txt
LayoutTests/animations/unprefixed-properties.html
LayoutTests/fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt
LayoutTests/fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
Source/WebCore/css/StyleProperties.cpp
Source/WebCore/css/StyleProperties.h

index 54bf4eb..0221e5a 100644 (file)
@@ -1,3 +1,26 @@
+2016-07-18  Dean Jackson  <dino@apple.com>
+
+        REGRESSION (r202950): Image zoom animations are broken at medium.com (159861)
+        https://bugs.webkit.org/show_bug.cgi?id=159906
+        <rdar://problem/27391725>
+
+        Reviewed by Simon Fraser.
+
+        The fix for webkit.org/b/157569 in r200769 broke AMP pages.
+        The followup fix for webkit.org/b/159450 in r202950 broke Medium pages.
+
+        Revert them both until we have better testing.
+
+        * animations/fill-mode-forwards-zero-duration.html:
+        * animations/play-state-start-paused.html:
+        * animations/script-tests/spring-parsing.js:
+        (testSpring):
+        * animations/spring-parsing-expected.txt:
+        * animations/unprefixed-properties-expected.txt:
+        * animations/unprefixed-properties.html:
+        * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
+        * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt:
+
 2016-07-18  Andreas Kling  <akling@apple.com>
 
         There should be a way to simulate memory pressure in layout tests
index 0ac79a9..831d5f9 100644 (file)
@@ -9,7 +9,8 @@
       height: 100px;
       width: 100px;
       background-color: blue;
-      animation: anim1 0 2s linear forwards;
+      animation-fill-mode: forwards;
+      animation: anim1 0 2s linear;
     }
     @keyframes anim1 {
         from { left: 400px; }
index 966a87b..a2b3843 100644 (file)
@@ -13,6 +13,8 @@
             width: 100px;
             height: 100px;
             background-color: green;
+            animation-delay: -0.5s;
+            animation-play-state: paused;
         }
         
         /* For manual testing. */
         }
         
         .mover {
-            animation: move 1s linear -0.5s paused;
+            animation: move 1s linear;
         }
         
         .slider {
-            animation: slide 1s linear -0.5s paused;
+            animation: slide 1s linear;
         }
         
         @keyframes move {
index 933b40a..82eabf4 100644 (file)
@@ -29,7 +29,7 @@ function testSpring(description, spring, expectedValue)
         return;
     }
 
-    shouldBe("declaration.length", "1");
+    shouldBe("declaration.length", "2");
     shouldBe("declaration.getPropertyValue('transition-timing-function')", "'" + expectedValue + "'");
 
     propertyValue = declaration.getPropertyCSSValue("transition-timing-function");
index b6de69a..10b1f18 100644 (file)
@@ -9,37 +9,37 @@ Valid spring tests
 
 Basic : spring(1 100 10 0)
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 100 10 0)'
 PASS propertyValue.cssText is 'spring(1 100 10 0)'
 
 Negative Velocity : spring(1 100 10 -10)
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 100 10 -10)'
 PASS propertyValue.cssText is 'spring(1 100 10 -10)'
 
 Positive Velocity : spring(1 100 10 10)
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 100 10 10)'
 PASS propertyValue.cssText is 'spring(1 100 10 10)'
 
 Zero Damping : spring(1 100 0 10)
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 100 0 10)'
 PASS propertyValue.cssText is 'spring(1 100 0 10)'
 
 Minimum Values : spring(1 1 0 -999999)
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 1 0 -999999)'
 PASS propertyValue.cssText is 'spring(1 1 0 -999999)'
 
 Floating Point Values : spring(1.5 2.3 3.7 -1.8)
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1.5 2.3 3.7 -1.8)'
 PASS propertyValue.cssText is 'spring(1.5 2.3 3.7 -1.8)'
 
index 5baddae..92d6d05 100644 (file)
@@ -6,13 +6,13 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 Parsing - Basic animation-name : waldo
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-name') is 'waldo'
 PASS declaration.getPropertyValue('-webkit-animation-name') is 'waldo'
 
 Parsing - Multiple animation-names : waldo, wally
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-name') is 'waldo, wally'
 PASS declaration.getPropertyValue('-webkit-animation-name') is 'waldo, wally'
 PASS subRule.cssText is 'waldo'
@@ -20,13 +20,13 @@ PASS subRule.cssText is 'wally'
 
 Parsing - Basic animation-duration : 5s
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-duration') is '5s'
 PASS declaration.getPropertyValue('-webkit-animation-duration') is '5s'
 
 Parsing - Multiple animation-durations : 10s, 20ms
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-duration') is '10s, 20ms'
 PASS declaration.getPropertyValue('-webkit-animation-duration') is '10s, 20ms'
 PASS subRule.cssText is '10s'
@@ -34,13 +34,13 @@ PASS subRule.cssText is '20ms'
 
 Parsing - Basic animation-delay : 5s
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-delay') is '5s'
 PASS declaration.getPropertyValue('-webkit-animation-delay') is '5s'
 
 Parsing - Multiple animation-delays : 10s, 20ms
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-delay') is '10s, 20ms'
 PASS declaration.getPropertyValue('-webkit-animation-delay') is '10s, 20ms'
 PASS subRule.cssText is '10s'
@@ -48,19 +48,19 @@ PASS subRule.cssText is '20ms'
 
 Parsing - Basic animation-timing-function : ease-in-out
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-timing-function') is 'ease-in-out'
 PASS declaration.getPropertyValue('-webkit-animation-timing-function') is 'ease-in-out'
 
 Parsing - animation-timing-function with bezier : cubic-bezier(0.2, 0.3, 0.4, 0.5)
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-timing-function') is 'cubic-bezier(0.2, 0.3, 0.4, 0.5)'
 PASS declaration.getPropertyValue('-webkit-animation-timing-function') is 'cubic-bezier(0.2, 0.3, 0.4, 0.5)'
 
 Parsing - Multiple animation-timing-functions : ease-in, ease-out
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-timing-function') is 'ease-in, ease-out'
 PASS declaration.getPropertyValue('-webkit-animation-timing-function') is 'ease-in, ease-out'
 PASS subRule.cssText is 'ease-in'
@@ -68,19 +68,19 @@ PASS subRule.cssText is 'ease-out'
 
 Parsing - Basic animation-iteration-count : 4
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-iteration-count') is '4'
 PASS declaration.getPropertyValue('-webkit-animation-iteration-count') is '4'
 
 Parsing - animation-iteration-count with keyword : infinite
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-iteration-count') is 'infinite'
 PASS declaration.getPropertyValue('-webkit-animation-iteration-count') is 'infinite'
 
 Parsing - Multiple animation-iteration-counts : 2, infinite, 4
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-iteration-count') is '2, infinite, 4'
 PASS declaration.getPropertyValue('-webkit-animation-iteration-count') is '2, infinite, 4'
 PASS subRule.cssText is '2'
@@ -89,31 +89,31 @@ PASS subRule.cssText is '4'
 
 Parsing - Normal animation-direction : normal
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-direction') is 'normal'
 PASS declaration.getPropertyValue('-webkit-animation-direction') is 'normal'
 
 Parsing - Alternate animation-direction : alternate
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-direction') is 'alternate'
 PASS declaration.getPropertyValue('-webkit-animation-direction') is 'alternate'
 
 Parsing - Reverse animation-direction : reverse
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-direction') is 'reverse'
 PASS declaration.getPropertyValue('-webkit-animation-direction') is 'reverse'
 
 Parsing - Alternate Reverse animation-direction : alternate-reverse
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-direction') is 'alternate-reverse'
 PASS declaration.getPropertyValue('-webkit-animation-direction') is 'alternate-reverse'
 
 Parsing - Multiple animation-directions : alternate, alternate, normal
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-direction') is 'alternate, alternate, normal'
 PASS declaration.getPropertyValue('-webkit-animation-direction') is 'alternate, alternate, normal'
 PASS subRule.cssText is 'alternate'
@@ -122,31 +122,31 @@ PASS subRule.cssText is 'normal'
 
 Parsing - None animation-fill-mode : none
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-fill-mode') is 'none'
 PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'none'
 
 Parsing - Forwards animation-fill-mode : forwards
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-fill-mode') is 'forwards'
 PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'forwards'
 
 Parsing - Backwards animation-fill-mode : backwards
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-fill-mode') is 'backwards'
 PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'backwards'
 
 Parsing - Both animation-fill-mode : both
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-fill-mode') is 'both'
 PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'both'
 
 Parsing - Multiple animation-fill-modes : none, forwards, backwards, both
 PASS cssRule.type is 1
-PASS declaration.length is 1
+PASS declaration.length is 2
 PASS declaration.getPropertyValue('animation-fill-mode') is 'none, forwards, backwards, both'
 PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'none, forwards, backwards, both'
 PASS subRule.cssText is 'none'
index 1d7a04f..2bd26e8 100644 (file)
@@ -27,7 +27,7 @@ function testAnimationRule(description, property, value, expectedTexts)
     shouldBe("cssRule.type", "1");
 
     declaration = cssRule.style;
-    shouldBe("declaration.length", "1");
+    shouldBe("declaration.length", "2"); // We set both the prefixed and unprefixed version.
     shouldBe("declaration.getPropertyValue('" + property + "')", "'" + value + "'");
     shouldBe("declaration.getPropertyValue('-webkit-" + property + "')", "'" + value + "'");
 
index 15496e9..8741a2a 100644 (file)
@@ -16,7 +16,7 @@ PASS getComputedStyle(element).getPropertyValue("transition-property")
 PASS getComputedStyle(element).getPropertyValue("-webkit-transition-property")
 PASS getComputedStyle(element).getPropertyCSSValue("transition-property")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-property")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "transition-property: width;" but got "transition-property: width; -webkit-transition-property: width;"
 
 Setting "-webkit-transition-property" to "width"
 PASS element.style.transitionProperty
@@ -31,7 +31,7 @@ PASS getComputedStyle(element).getPropertyValue("transition-property")
 PASS getComputedStyle(element).getPropertyValue("-webkit-transition-property")
 PASS getComputedStyle(element).getPropertyCSSValue("transition-property")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-property")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-transition-property: width;" but got "-webkit-transition-property: width; transition-property: width;"
 
 Setting "transition-duration" to "1s"
 PASS element.style.transitionDuration
@@ -46,7 +46,7 @@ PASS getComputedStyle(element).getPropertyValue("transition-duration")
 PASS getComputedStyle(element).getPropertyValue("-webkit-transition-duration")
 PASS getComputedStyle(element).getPropertyCSSValue("transition-duration")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-duration")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "transition-duration: 1s;" but got "transition-duration: 1s; -webkit-transition-duration: 1s;"
 
 Setting "-webkit-transition-duration" to "1s"
 PASS element.style.transitionDuration
@@ -61,7 +61,7 @@ PASS getComputedStyle(element).getPropertyValue("transition-duration")
 PASS getComputedStyle(element).getPropertyValue("-webkit-transition-duration")
 PASS getComputedStyle(element).getPropertyCSSValue("transition-duration")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-duration")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-transition-duration: 1s;" but got "-webkit-transition-duration: 1s; transition-duration: 1s;"
 
 Setting "transition-timing-function" to "linear"
 PASS element.style.transitionTimingFunction
@@ -76,7 +76,7 @@ PASS getComputedStyle(element).getPropertyValue("transition-timing-function")
 PASS getComputedStyle(element).getPropertyValue("-webkit-transition-timing-function")
 PASS getComputedStyle(element).getPropertyCSSValue("transition-timing-function")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-timing-function")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "transition-timing-function: linear;" but got "transition-timing-function: linear; -webkit-transition-timing-function: linear;"
 
 Setting "-webkit-transition-timing-function" to "linear"
 PASS element.style.transitionTimingFunction
@@ -91,7 +91,7 @@ PASS getComputedStyle(element).getPropertyValue("transition-timing-function")
 PASS getComputedStyle(element).getPropertyValue("-webkit-transition-timing-function")
 PASS getComputedStyle(element).getPropertyCSSValue("transition-timing-function")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-timing-function")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-transition-timing-function: linear;" but got "-webkit-transition-timing-function: linear; transition-timing-function: linear;"
 
 Setting "transition-delay" to "0.5s"
 PASS element.style.transitionDelay
@@ -106,7 +106,7 @@ PASS getComputedStyle(element).getPropertyValue("transition-delay")
 PASS getComputedStyle(element).getPropertyValue("-webkit-transition-delay")
 PASS getComputedStyle(element).getPropertyCSSValue("transition-delay")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-delay")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "transition-delay: 0.5s;" but got "transition-delay: 0.5s; -webkit-transition-delay: 0.5s;"
 
 Setting "-webkit-transition-delay" to "0.5s"
 PASS element.style.transitionDelay
@@ -121,7 +121,7 @@ PASS getComputedStyle(element).getPropertyValue("transition-delay")
 PASS getComputedStyle(element).getPropertyValue("-webkit-transition-delay")
 PASS getComputedStyle(element).getPropertyCSSValue("transition-delay")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-delay")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-transition-delay: 0.5s;" but got "-webkit-transition-delay: 0.5s; transition-delay: 0.5s;"
 
 Setting "animation-name" to "foo"
 PASS element.style.animationName
@@ -136,7 +136,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-name")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-name")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-name")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-name")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "animation-name: foo;" but got "animation-name: foo; -webkit-animation-name: foo;"
 
 Setting "-webkit-animation-name" to "foo"
 PASS element.style.animationName
@@ -151,7 +151,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-name")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-name")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-name")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-name")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-animation-name: foo;" but got "-webkit-animation-name: foo; animation-name: foo;"
 
 Setting "animation-duration" to "1s"
 PASS element.style.animationDuration
@@ -166,7 +166,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-duration")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-duration")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-duration")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-duration")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "animation-duration: 1s;" but got "animation-duration: 1s; -webkit-animation-duration: 1s;"
 
 Setting "-webkit-animation-duration" to "1s"
 PASS element.style.animationDuration
@@ -181,7 +181,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-duration")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-duration")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-duration")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-duration")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-animation-duration: 1s;" but got "-webkit-animation-duration: 1s; animation-duration: 1s;"
 
 Setting "animation-timing-function" to "linear"
 PASS element.style.animationTimingFunction
@@ -196,7 +196,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-timing-function")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-timing-function")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-timing-function")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-timing-function")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "animation-timing-function: linear;" but got "animation-timing-function: linear; -webkit-animation-timing-function: linear;"
 
 Setting "-webkit-animation-timing-function" to "linear"
 PASS element.style.animationTimingFunction
@@ -211,7 +211,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-timing-function")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-timing-function")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-timing-function")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-timing-function")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-animation-timing-function: linear;" but got "-webkit-animation-timing-function: linear; animation-timing-function: linear;"
 
 Setting "animation-iteration-count" to "5"
 PASS element.style.animationIterationCount
@@ -226,7 +226,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-iteration-count")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-iteration-count")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-iteration-count")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-iteration-count")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "animation-iteration-count: 5;" but got "animation-iteration-count: 5; -webkit-animation-iteration-count: 5;"
 
 Setting "-webkit-animation-iteration-count" to "5"
 PASS element.style.animationIterationCount
@@ -241,7 +241,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-iteration-count")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-iteration-count")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-iteration-count")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-iteration-count")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-animation-iteration-count: 5;" but got "-webkit-animation-iteration-count: 5; animation-iteration-count: 5;"
 
 Setting "animation-direction" to "reverse"
 PASS element.style.animationDirection
@@ -256,7 +256,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-direction")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-direction")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-direction")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-direction")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "animation-direction: reverse;" but got "animation-direction: reverse; -webkit-animation-direction: reverse;"
 
 Setting "-webkit-animation-direction" to "reverse"
 PASS element.style.animationDirection
@@ -271,7 +271,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-direction")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-direction")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-direction")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-direction")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-animation-direction: reverse;" but got "-webkit-animation-direction: reverse; animation-direction: reverse;"
 
 Setting "animation-play-state" to "paused"
 PASS element.style.animationPlayState
@@ -286,7 +286,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-play-state")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-play-state")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-play-state")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-play-state")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "animation-play-state: paused;" but got "animation-play-state: paused; -webkit-animation-play-state: paused;"
 
 Setting "-webkit-animation-play-state" to "paused"
 PASS element.style.animationPlayState
@@ -301,7 +301,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-play-state")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-play-state")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-play-state")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-play-state")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-animation-play-state: paused;" but got "-webkit-animation-play-state: paused; animation-play-state: paused;"
 
 Setting "animation-delay" to "0.5s"
 PASS element.style.animationDelay
@@ -316,7 +316,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-delay")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-delay")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-delay")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-delay")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "animation-delay: 0.5s;" but got "animation-delay: 0.5s; -webkit-animation-delay: 0.5s;"
 
 Setting "-webkit-animation-delay" to "0.5s"
 PASS element.style.animationDelay
@@ -331,7 +331,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-delay")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-delay")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-delay")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-delay")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-animation-delay: 0.5s;" but got "-webkit-animation-delay: 0.5s; animation-delay: 0.5s;"
 
 Setting "animation-fill-mode" to "forwards"
 PASS element.style.animationFillMode
@@ -346,7 +346,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-fill-mode")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-fill-mode")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-fill-mode")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-fill-mode")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "animation-fill-mode: forwards;" but got "animation-fill-mode: forwards; -webkit-animation-fill-mode: forwards;"
 
 Setting "-webkit-animation-fill-mode" to "forwards"
 PASS element.style.animationFillMode
@@ -361,7 +361,7 @@ PASS getComputedStyle(element).getPropertyValue("animation-fill-mode")
 PASS getComputedStyle(element).getPropertyValue("-webkit-animation-fill-mode")
 PASS getComputedStyle(element).getPropertyCSSValue("animation-fill-mode")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-fill-mode")
-PASS element.style.cssText
+FAIL expected element.style.cssText to be "-webkit-animation-fill-mode: forwards;" but got "-webkit-animation-fill-mode: forwards; animation-fill-mode: forwards;"
 
 PASS successfullyParsed is true
 
index aa9f0bb..421c0e2 100644 (file)
@@ -16,20 +16,20 @@ PASS transition-property
 PASS transition-property
 
 Animation properties
-PASS animation-name
-PASS animation-duration
-PASS animation-timing-function
-PASS animation-iteration-count
-PASS animation-direction
-PASS animation-play-state
-PASS animation-delay
-PASS animation-fill-mode
+FAIL expected that setting "animation-name: foo; animation: 1s;" would compute animation-name to "none" but got "foo"
+FAIL expected that setting "animation-duration: 1s; animation: none;" would compute animation-duration to "0s" but got "1s"
+FAIL expected that setting "animation-timing-function: linear; animation: none;" would compute animation-timing-function to "ease" but got "linear"
+FAIL expected that setting "animation-iteration-count: 5; animation: none;" would compute animation-iteration-count to "1" but got "5"
+FAIL expected that setting "animation-direction: reverse; animation: none;" would compute animation-direction to "normal" but got "reverse"
+FAIL expected that setting "animation-play-state: paused; animation: none;" would compute animation-play-state to "running" but got "paused"
+FAIL expected that setting "animation-delay: 1s; animation: none;" would compute animation-delay to "0s" but got "1s"
+FAIL expected that setting "animation-fill-mode: forwards; animation: none;" would compute animation-fill-mode to "none" but got "forwards"
 
 Prefixed animation properties
 PASS -webkit-animation-name
-PASS animation-name
+FAIL expected that setting "-webkit-animation-name: foo; animation: none;" would compute animation-name to "none" but got "foo"
 PASS -webkit-animation-name
-PASS animation-name
+FAIL expected that setting "animation-name: foo; animation: none;" would compute animation-name to "none" but got "foo"
 
 PASS successfullyParsed is true
 
index e608d8f..e79ca0f 100644 (file)
@@ -1,3 +1,38 @@
+2016-07-18  Dean Jackson  <dino@apple.com>
+
+        REGRESSION (r202950): Image zoom animations are broken at medium.com (159861)
+        https://bugs.webkit.org/show_bug.cgi?id=159906
+        <rdar://problem/27391725>
+
+        Reviewed by Simon Fraser.
+
+        The fix for webkit.org/b/157569 in r200769 broke AMP pages.
+        The followup fix for webkit.org/b/159450 in r202950 broke Medium pages.
+
+        Revert them both until we have better testing.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::addPropertyWithPrefixingVariant):
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseAnimationShorthand):
+        (WebCore::CSSParser::parseTransitionShorthand): Deleted.
+        * css/CSSPropertyNames.in:
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
+        (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
+        (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
+        (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
+        * css/StyleProperties.cpp:
+        (WebCore::MutableStyleProperties::removeShorthandProperty):
+        (WebCore::MutableStyleProperties::removeProperty):
+        (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty):
+        (WebCore::MutableStyleProperties::setProperty):
+        (WebCore::getIndexInShorthandVectorForPrefixingVariant):
+        (WebCore::MutableStyleProperties::appendPrefixingVariantProperty):
+        (WebCore::MutableStyleProperties::setPrefixingVariantProperty):
+        (WebCore::StyleProperties::asText): Deleted.
+        * css/StyleProperties.h:
+
 2016-07-18  Andreas Kling  <akling@apple.com>
 
         There should be a way to simulate memory pressure in layout tests
index 36868a0..002f4ec 100644 (file)
@@ -1605,6 +1605,23 @@ Ref<ImmutableStyleProperties> CSSParser::createStyleProperties()
     return ImmutableStyleProperties::create(results.data(), results.size(), m_context.mode);
 }
 
+void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important, bool implicit)
+{
+    addProperty(propId, value.copyRef(), important, implicit);
+
+    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId);
+    if (prefixingVariant == propId)
+        return;
+
+    if (m_currentShorthand) {
+        // We can't use ShorthandScope here as we can already be inside one (e.g we are parsing CSSTransition).
+        m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);
+        addProperty(prefixingVariant, WTFMove(value), important, implicit);
+        m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);
+    } else
+        addProperty(prefixingVariant, WTFMove(value), important, implicit);
+}
+
 void CSSParser::addProperty(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important, bool implicit)
 {
     // This property doesn't belong to a shorthand or is a CSS variable (which will be resolved later).
@@ -2722,7 +2739,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
         RefPtr<CSSValue> val;
         AnimationParseContext context;
         if (parseAnimationProperty(propId, val, context)) {
-            addProperty(propId, WTFMove(val), important);
+            addPropertyWithPrefixingVariant(propId, WTFMove(val), important);
             return true;
         }
         return false;
@@ -3816,40 +3833,17 @@ bool CSSParser::parseAnimationShorthand(CSSPropertyID propId, bool important)
             return false;
     }
 
-    // Fill in any remaining properties with the initial value.
     for (i = 0; i < numProperties; ++i) {
+        // If we didn't find the property, set an intial value.
         if (!parsedProperty[i])
             addAnimationValue(values[i], cssValuePool.createImplicitInitialValue());
-    }
 
-    // Now add all of the properties we found.
-    // In this case we have to explicitly set the variant form as well,
-    // to make sure that a shorthand clears all existing prefixed and
-    // unprefixed values.
-    for (i = 0; i < numProperties; ++i)
-        addPropertyWithPrefixingVariant(shorthand.properties()[i], WTFMove(values[i]), important);
+        addProperty(shorthand.properties()[i], WTFMove(values[i]), important);
+    }
 
     return true;
 }
 
-void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important, bool implicit)
-{
-    addProperty(propId, value.copyRef(), important, implicit);
-
-    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId);
-    if (prefixingVariant == propId)
-        return;
-
-    if (m_currentShorthand) {
-        // We can't use ShorthandScope here as we can already be inside one (e.g we are parsing CSSTransition).
-        m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);
-        addProperty(prefixingVariant, WTFMove(value), important, implicit);
-        m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);
-    } else
-        addProperty(prefixingVariant, WTFMove(value), important, implicit);
-}
-
-
 RefPtr<CSSPrimitiveValue> CSSParser::parseColumnWidth()
 {
     ValueWithCalculation valueWithCalculation(*m_valueList->current());
@@ -3977,9 +3971,6 @@ bool CSSParser::parseTransitionShorthand(CSSPropertyID propId, bool important)
     }
 
     // Now add all of the properties we found.
-    // In this case we have to explicitly set the variant form as well,
-    // to make sure that a shorthand clears all existing prefixed and
-    // unprefixed values.
     for (i = 0; i < numProperties; ++i)
         addPropertyWithPrefixingVariant(shorthand.properties()[i], WTFMove(values[i]), important);
 
index ff663c4..5ae0735 100644 (file)
@@ -348,10 +348,10 @@ text-underline-style [SkipBuilder]
 text-underline-width [SkipBuilder]
 top [Initial=initialOffset, Converter=LengthOrAuto]
 transition [Longhands=transition-property|transition-duration|transition-timing-function|transition-delay]
-transition-delay [AnimationProperty, NameForMethods=Delay]
-transition-duration [AnimationProperty, NameForMethods=Duration]
-transition-property [AnimationProperty, NameForMethods=Property]
-transition-timing-function [AnimationProperty, NameForMethods=TimingFunction]
+transition-delay [SkipBuilder]
+transition-duration [SkipBuilder]
+transition-property [SkipBuilder]
+transition-timing-function [SkipBuilder]
 
 unicode-bidi
 unicode-range [SkipBuilder]
index e036164..031831b 100644 (file)
@@ -172,7 +172,7 @@ RefPtr<CSSValue> PropertySetCSSStyleDeclaration::getPropertyCSSValue(const Strin
     CSSPropertyID propertyID = cssPropertyID(propertyName);
     if (!propertyID)
         return nullptr;
-    return cloneAndCacheForCSSOM(getPropertyCSSValueInternal(propertyID).get());
+    return cloneAndCacheForCSSOM(m_propertySet->getPropertyCSSValue(propertyID).get());
 }
 
 String PropertySetCSSStyleDeclaration::getPropertyValue(const String& propertyName)
@@ -183,7 +183,7 @@ String PropertySetCSSStyleDeclaration::getPropertyValue(const String& propertyNa
     CSSPropertyID propertyID = cssPropertyID(propertyName);
     if (!propertyID)
         return String();
-    return getPropertyValueInternal(propertyID);
+    return m_propertySet->getPropertyValue(propertyID);
 }
 
 String PropertySetCSSStyleDeclaration::getPropertyPriority(const String& propertyName)
@@ -265,28 +265,12 @@ String PropertySetCSSStyleDeclaration::removeProperty(const String& propertyName
 
 RefPtr<CSSValue> PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal(CSSPropertyID propertyID)
 {
-    RefPtr<CSSValue> value = m_propertySet->getPropertyCSSValue(propertyID);
-    if (value)
-        return value;
-
-    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
-    if (prefixingVariant != propertyID)
-        return m_propertySet->getPropertyCSSValue(prefixingVariant);
-
-    return nullptr;
+    return m_propertySet->getPropertyCSSValue(propertyID);
 }
 
 String PropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPropertyID propertyID)
-{
-    String value = m_propertySet->getPropertyValue(propertyID);
-    if (!value.isEmpty())
-        return value;
-
-    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
-    if (prefixingVariant != propertyID)
-        return m_propertySet->getPropertyValue(prefixingVariant);
-
-    return String();
+{ 
+    return m_propertySet->getPropertyValue(propertyID);
 }
 
 bool PropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID propertyID, const String& value, bool important, ExceptionCode& ec)
index 94b51ed..2a2dcc1 100644 (file)
@@ -640,15 +640,14 @@ bool MutableStyleProperties::removeShorthandProperty(CSSPropertyID propertyID)
     if (!shorthand.length())
         return false;
 
-    bool propertiesWereRemoved = removePropertiesInSet(shorthand.properties(), shorthand.length());
+    bool ret = removePropertiesInSet(shorthand.properties(), shorthand.length());
 
     CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
     if (prefixingVariant == propertyID)
-        return propertiesWereRemoved;
+        return ret;
 
     StylePropertyShorthand shorthandPrefixingVariant = shorthandForProperty(prefixingVariant);
-    bool prefixedVariantPropertiesWereRemoved = removePropertiesInSet(shorthandPrefixingVariant.properties(), shorthandPrefixingVariant.length());
-    return propertiesWereRemoved || prefixedVariantPropertiesWereRemoved;
+    return removePropertiesInSet(shorthandPrefixingVariant.properties(), shorthandPrefixingVariant.length());
 }
 
 bool MutableStyleProperties::removeProperty(CSSPropertyID propertyID, String* returnText)
@@ -674,6 +673,8 @@ bool MutableStyleProperties::removeProperty(CSSPropertyID propertyID, String* re
     // and sweeping them when the vector grows too big.
     m_propertyVector.remove(foundPropertyIndex);
 
+    removePrefixedOrUnprefixedProperty(propertyID);
+
     return true;
 }
 
@@ -696,6 +697,14 @@ bool MutableStyleProperties::removeCustomProperty(const String& propertyName, St
     return true;
 }
 
+void MutableStyleProperties::removePrefixedOrUnprefixedProperty(CSSPropertyID propertyID)
+{
+    int foundPropertyIndex = findPropertyIndex(prefixingVariantForPropertyId(propertyID));
+    if (foundPropertyIndex == -1)
+        return;
+    m_propertyVector.remove(foundPropertyIndex);
+}
+
 bool StyleProperties::propertyIsImportant(CSSPropertyID propertyID) const
 {
     int foundPropertyIndex = findPropertyIndex(propertyID);
@@ -792,14 +801,42 @@ bool MutableStyleProperties::setProperty(const CSSProperty& property, CSSPropert
                 return false;
 
             *toReplace = property;
+            setPrefixingVariantProperty(property);
             return true;
         }
     }
 
+    return appendPrefixingVariantProperty(property);
+}
+
+static unsigned getIndexInShorthandVectorForPrefixingVariant(const CSSProperty& property, CSSPropertyID prefixingVariant)
+{
+    if (!property.isSetFromShorthand())
+        return 0;
+
+    CSSPropertyID prefixedShorthand = prefixingVariantForPropertyId(property.shorthandID());
+    return indexOfShorthandForLonghand(prefixedShorthand, matchingShorthandsForLonghand(prefixingVariant));
+}
+
+bool MutableStyleProperties::appendPrefixingVariantProperty(const CSSProperty& property)
+{
     m_propertyVector.append(property);
+    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
+    if (prefixingVariant == property.id())
+        return true;
+
+    m_propertyVector.append(CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.isSetFromShorthand(), getIndexInShorthandVectorForPrefixingVariant(property, prefixingVariant), property.metadata().m_implicit));
     return true;
 }
 
+void MutableStyleProperties::setPrefixingVariantProperty(const CSSProperty& property)
+{
+    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
+    CSSProperty* toReplace = findCSSPropertyWithID(prefixingVariant);
+    if (toReplace && prefixingVariant != property.id())
+        *toReplace = CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.isSetFromShorthand(), getIndexInShorthandVectorForPrefixingVariant(property, prefixingVariant), property.metadata().m_implicit);
+}
+
 bool MutableStyleProperties::setProperty(CSSPropertyID propertyID, CSSValueID identifier, bool important)
 {
     return setProperty(CSSProperty(propertyID, CSSValuePool::singleton().createIdentifierValue(identifier), important));
@@ -888,7 +925,6 @@ String StyleProperties::asText() const
             case CSSPropertyAnimationIterationCount:
             case CSSPropertyAnimationDirection:
             case CSSPropertyAnimationFillMode:
-            case CSSPropertyAnimationPlayState:
                 shorthandPropertyID = CSSPropertyAnimation;
                 break;
             case CSSPropertyBackgroundPositionX:
@@ -988,7 +1024,6 @@ String StyleProperties::asText() const
             case CSSPropertyWebkitAnimationIterationCount:
             case CSSPropertyWebkitAnimationDirection:
             case CSSPropertyWebkitAnimationFillMode:
-            case CSSPropertyWebkitAnimationPlayState:
                 shorthandPropertyID = CSSPropertyWebkitAnimation;
                 break;
             case CSSPropertyFlexDirection:
index b85e85e..6a65ab9 100644 (file)
@@ -207,9 +207,12 @@ public:
     // These do not. FIXME: This is too messy, we can do better.
     bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = false);
     bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = false);
+    bool appendPrefixingVariantProperty(const CSSProperty&);
+    void setPrefixingVariantProperty(const CSSProperty&);
     bool setProperty(const CSSProperty&, CSSProperty* slot = nullptr);
 
     bool removeProperty(CSSPropertyID, String* returnText = nullptr);
+    void removePrefixedOrUnprefixedProperty(CSSPropertyID);
     void removeBlockProperties();
     bool removePropertiesInSet(const CSSPropertyID* set, unsigned length);