Make -webkit-transition-* and -webkit-animation-* properties be pure aliases of the...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Sep 2016 15:50:17 +0000 (15:50 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Sep 2016 15:50:17 +0000 (15:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=160478

Reviewed by Dean Jackson.

Source/WebCore:

Remove the custom -webkit prefixed transition and animation properties, and just make
them aliases of the unprefixed ones, as we do for transforms.

-webkit-animation-trigger remains as the only prefixed-only animation property.

This is mostly code deletion.

Test: fast/css/longhand-overrides-shorthand-prefixing.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperty.h:
(WebCore::prefixingVariantForPropertyId): Deleted.
* css/CSSPropertyNames.in:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
(WebCore::MutableStyleProperties::removeShorthandProperty):
(WebCore::StyleProperties::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::animationShorthandForParsing):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForKeyframe):
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted.
* css/parser/CSSParser.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::makeOpaque):
(WebCore::MediaControlPanelElement::makeTransparent):

LayoutTests:

Updated results, and a new test to ensure that longhand properties override
shorthand ones, with various combinations of prefixing.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/longhand-overrides-shorthand-prefixing-expected.txt: Added.
* fast/css/longhand-overrides-shorthand-prefixing.html: Added.
* fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
* fast/css/prefixed-unprefixed-variant-style-declaration.html:
* transitions/svg-transitions-expected.txt:
* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:

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

23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/fast/css/longhand-overrides-shorthand-prefixing-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/longhand-overrides-shorthand-prefixing.html [new file with mode: 0644]
LayoutTests/fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt
LayoutTests/fast/css/prefixed-unprefixed-variant-style-declaration.html
LayoutTests/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/transitions/transitions-parsing-expected.txt
LayoutTests/transitions/transitions-parsing.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSProperty.h
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSToStyleMap.cpp
Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
Source/WebCore/css/StyleProperties.cpp
Source/WebCore/css/StylePropertyShorthand.cpp
Source/WebCore/css/StylePropertyShorthand.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/parser/CSSParser.cpp
Source/WebCore/css/parser/CSSParser.h
Source/WebCore/html/shadow/MediaControlElements.cpp

index a65c33e..d23d850 100644 (file)
@@ -1,3 +1,23 @@
+2016-09-12  Simon Fraser  <simon.fraser@apple.com>
+
+        Make -webkit-transition-* and -webkit-animation-* properties be pure aliases of the unprefixed ones
+        https://bugs.webkit.org/show_bug.cgi?id=160478
+
+        Reviewed by Dean Jackson.
+        
+        Updated results, and a new test to ensure that longhand properties override
+        shorthand ones, with various combinations of prefixing.
+
+        * fast/css/getComputedStyle/computed-style-expected.txt:
+        * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * fast/css/longhand-overrides-shorthand-prefixing-expected.txt: Added.
+        * fast/css/longhand-overrides-shorthand-prefixing.html: Added.
+        * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
+        * fast/css/prefixed-unprefixed-variant-style-declaration.html:
+        * transitions/svg-transitions-expected.txt:
+        * transitions/transitions-parsing-expected.txt:
+        * transitions/transitions-parsing.html:
+
 2016-09-12  Javier Fernandez  <jfernandez@igalia.com>
 
         [css-align] Initial values are parsed as invalid for some Alignment properties
index 1f0d6d6..af0536c 100644 (file)
@@ -107,14 +107,6 @@ word-spacing: 0px;
 word-wrap: normal;
 z-index: auto;
 zoom: 1;
--webkit-animation-delay: 0s;
--webkit-animation-direction: normal;
--webkit-animation-duration: 0s;
--webkit-animation-fill-mode: none;
--webkit-animation-iteration-count: 1;
--webkit-animation-name: none;
--webkit-animation-play-state: running;
--webkit-animation-timing-function: ease;
 -webkit-appearance: none;
 -webkit-backface-visibility: visible;
 -webkit-background-clip: border-box;
@@ -222,10 +214,6 @@ perspective-origin: 392px 288px;
 -webkit-text-stroke-color: rgb(0, 0, 0);
 -webkit-text-stroke-width: 0px;
 -webkit-transform-style: flat;
--webkit-transition-delay: 0s;
--webkit-transition-duration: 0s;
--webkit-transition-property: all;
--webkit-transition-timing-function: ease;
 -webkit-user-drag: auto;
 -webkit-user-modify: read-only;
 -webkit-user-select: text;
index 83979d8..8aa1d98 100644 (file)
@@ -106,14 +106,6 @@ word-spacing: 0px
 word-wrap: normal
 z-index: auto
 zoom: 1
--webkit-animation-delay: 0s
--webkit-animation-direction: normal
--webkit-animation-duration: 0s
--webkit-animation-fill-mode: none
--webkit-animation-iteration-count: 1
--webkit-animation-name: none
--webkit-animation-play-state: running
--webkit-animation-timing-function: ease
 -webkit-appearance: none
 -webkit-backface-visibility: visible
 -webkit-background-clip: border-box
@@ -221,10 +213,6 @@ perspective-origin: 50% 50%
 -webkit-text-stroke-color: rgb(0, 0, 0)
 -webkit-text-stroke-width: 0px
 -webkit-transform-style: flat
--webkit-transition-delay: 0s
--webkit-transition-duration: 0s
--webkit-transition-property: all
--webkit-transition-timing-function: ease
 -webkit-user-drag: auto
 -webkit-user-modify: read-only
 -webkit-user-select: text
diff --git a/LayoutTests/fast/css/longhand-overrides-shorthand-prefixing-expected.txt b/LayoutTests/fast/css/longhand-overrides-shorthand-prefixing-expected.txt
new file mode 100644 (file)
index 0000000..49293e2
--- /dev/null
@@ -0,0 +1,41 @@
+Test the prefixed or the unprefixed variant of a property allows reading from the CSS OM with both the prefixed and unprefixed variant.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Setting "animation" to "move 2s" then "animation-duration" to "10s" accessing "animation"
+PASS element.style.animation
+PASS element.style.cssText
+
+Setting "animation" to "move 2s" then "animation-duration" to "10s" accessing "webkitAnimation"
+PASS element.style.animation
+PASS element.style.cssText
+
+Setting "-webkit-animation" to "move 2s" then "animation-duration" to "10s" accessing "animation"
+PASS element.style.webkitAnimation
+PASS element.style.cssText
+
+Setting "-webkit-animation" to "move 2s" then "animation-duration" to "10s" accessing "webkitAnimation"
+PASS element.style.webkitAnimation
+PASS element.style.cssText
+
+Setting "animation" to "move 2s" then "-webkit-animation-duration" to "10s" accessing "animation"
+PASS element.style.animation
+PASS element.style.cssText
+
+Setting "animation" to "move 2s" then "-webkit-animation-duration" to "10s" accessing "webkitAnimation"
+PASS element.style.animation
+PASS element.style.cssText
+
+Setting "-webkit-animation" to "move 2s" then "-webkit-animation-duration" to "10s" accessing "animation"
+PASS element.style.webkitAnimation
+PASS element.style.cssText
+
+Setting "-webkit-animation" to "move 2s" then "-webkit-animation-duration" to "10s" accessing "webkitAnimation"
+PASS element.style.webkitAnimation
+PASS element.style.cssText
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/css/longhand-overrides-shorthand-prefixing.html b/LayoutTests/fast/css/longhand-overrides-shorthand-prefixing.html
new file mode 100644 (file)
index 0000000..7b1bc24
--- /dev/null
@@ -0,0 +1,72 @@
+<script src="../../resources/js-test-pre.js"></script>
+<body>
+<script>
+
+description("Test the prefixed or the unprefixed variant of a property allows reading from the CSS OM with both the prefixed and unprefixed variant.");
+
+const PREFIX = "-webkit-";
+
+function accessorForProperty(property)
+{
+    var firstIndexToTranspose = property.indexOf(PREFIX) === 0 ? 2 : 1;
+    return property.split("-").map(function(component, index) {
+        if (index < firstIndexToTranspose)
+            return component;
+        return component.charAt(0).toUpperCase() + component.substr(1);
+    }).join("");
+}
+
+function testPropertyVariants(shorthandProperty, longhandProperty, initialShorthandValue, finalShorthandValue, longhandValue)
+{
+    var shorthandAccessor = accessorForProperty(shorthandProperty);
+    var prefixedShorthandProperty = PREFIX + shorthandProperty;
+    var prefixedShorthandAccessor = accessorForProperty(prefixedShorthandProperty);
+
+    var longhandAccessor = accessorForProperty(shorthandProperty);
+    var prefixedLonghandProperty = PREFIX + longhandProperty;
+    var prefixedLonghandAccessor = accessorForProperty(prefixedLonghandProperty);
+
+    testProperty(shorthandProperty, shorthandProperty, longhandProperty, shorthandAccessor, initialShorthandValue, finalShorthandValue, longhandValue);
+    testProperty(shorthandProperty, shorthandProperty, longhandProperty, prefixedShorthandAccessor, initialShorthandValue, finalShorthandValue, longhandValue);
+
+    testProperty(prefixedShorthandProperty, shorthandProperty, longhandProperty, shorthandAccessor, initialShorthandValue, finalShorthandValue, longhandValue);
+    testProperty(prefixedShorthandProperty, shorthandProperty, longhandProperty, prefixedShorthandAccessor, initialShorthandValue, finalShorthandValue, longhandValue);
+
+    testProperty(shorthandProperty, shorthandProperty, prefixedLonghandProperty, shorthandAccessor, initialShorthandValue, finalShorthandValue, longhandValue);
+    testProperty(shorthandProperty, shorthandProperty, prefixedLonghandProperty, prefixedShorthandAccessor, initialShorthandValue, finalShorthandValue, longhandValue);
+
+    testProperty(prefixedShorthandProperty, shorthandProperty, prefixedLonghandProperty, shorthandAccessor, initialShorthandValue, finalShorthandValue, longhandValue);
+    testProperty(prefixedShorthandProperty, shorthandProperty, prefixedLonghandProperty, prefixedShorthandAccessor, initialShorthandValue, finalShorthandValue, longhandValue);
+}
+
+function testProperty(shorthandProperty, unprefixedShorthandProperty, longhandProperty, accessor, initialShorthandValue, finalShorthandValue, longhandValue)
+{
+    function test(message, actual, expected) {
+        if (actual === expected)
+            testPassed(message);
+        else
+            testFailed(`expected ${message} to be "${expected}" but got "${actual}"`);
+    }
+
+    var element = document.body.appendChild(document.createElement("div"));
+    element.style.setProperty(shorthandProperty, initialShorthandValue);
+    element.style.setProperty(longhandProperty, longhandValue);
+
+    debug(`Setting "${shorthandProperty}" to "${initialShorthandValue}" then "${longhandProperty}" to "${longhandValue}" accessing "${accessor}"`);
+
+    var style = element.style;
+    test(`element.style.${accessorForProperty(shorthandProperty)}`, style[accessorForProperty(shorthandProperty)], finalShorthandValue);
+    test(`element.style.cssText`, element.style.cssText, `${unprefixedShorthandProperty}: ${finalShorthandValue};`, longhandValue);
+
+    element.remove();
+
+    debug("");
+}
+
+testPropertyVariants("animation", "animation-duration", "move 2s", "move 10s", "10s");
+
+successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
\ No newline at end of file
index 15496e9..08a65bb 100644 (file)
@@ -363,6 +363,36 @@ PASS getComputedStyle(element).getPropertyCSSValue("animation-fill-mode")
 PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-fill-mode")
 PASS element.style.cssText
 
+Setting "transform" to "matrix(1, 0, 0, 1, 1, 1)"
+PASS element.style.transform
+PASS element.style.webkitTransform
+PASS element.style.getPropertyValue("transform")
+PASS element.style.getPropertyValue("-webkit-transform")
+PASS element.style.getPropertyCSSValue("transform")
+PASS element.style.getPropertyCSSValue("-webkit-transform")
+PASS getComputedStyle(element).transform
+PASS getComputedStyle(element).webkitTransform
+PASS getComputedStyle(element).getPropertyValue("transform")
+PASS getComputedStyle(element).getPropertyValue("-webkit-transform")
+PASS getComputedStyle(element).getPropertyCSSValue("transform")
+PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transform")
+PASS element.style.cssText
+
+Setting "-webkit-transform" to "matrix(1, 0, 0, 1, 1, 1)"
+PASS element.style.transform
+PASS element.style.webkitTransform
+PASS element.style.getPropertyValue("transform")
+PASS element.style.getPropertyValue("-webkit-transform")
+PASS element.style.getPropertyCSSValue("transform")
+PASS element.style.getPropertyCSSValue("-webkit-transform")
+PASS getComputedStyle(element).transform
+PASS getComputedStyle(element).webkitTransform
+PASS getComputedStyle(element).getPropertyValue("transform")
+PASS getComputedStyle(element).getPropertyValue("-webkit-transform")
+PASS getComputedStyle(element).getPropertyCSSValue("transform")
+PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transform")
+PASS element.style.cssText
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 53dc84b..2d762ea 100644 (file)
@@ -56,7 +56,7 @@ function testProperty(propertyToSet, unprefixedProperty, prefixedProperty, unpre
     test(`getComputedStyle(element).getPropertyCSSValue("${unprefixedProperty}")`, computedStyle.getPropertyCSSValue(unprefixedProperty).cssText);
     test(`getComputedStyle(element).getPropertyCSSValue("${prefixedProperty}")`, computedStyle.getPropertyCSSValue(prefixedProperty).cssText);
 
-    test(`element.style.cssText`, element.style.cssText, `${propertyToSet}: ${value};`);
+    test(`element.style.cssText`, element.style.cssText, `${unprefixedProperty}: ${value};`);
 
     element.remove();
 
@@ -77,6 +77,8 @@ testPropertyVariants("animation-play-state", "paused");
 testPropertyVariants("animation-delay", "0.5s");
 testPropertyVariants("animation-fill-mode", "forwards");
 
+testPropertyVariants("transform", "matrix(1, 0, 0, 1, 1, 1)");
+
 successfullyParsed = true;
 
 </script>
index 5144ffb..b27ed34 100644 (file)
@@ -212,22 +212,6 @@ rect: style.getPropertyValue(z-index) : auto
 rect: style.getPropertyCSSValue(z-index) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(zoom) : 1
 rect: style.getPropertyCSSValue(zoom) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-animation-delay) : 0s
-rect: style.getPropertyCSSValue(-webkit-animation-delay) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-animation-direction) : normal
-rect: style.getPropertyCSSValue(-webkit-animation-direction) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-animation-duration) : 0s
-rect: style.getPropertyCSSValue(-webkit-animation-duration) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-animation-fill-mode) : none
-rect: style.getPropertyCSSValue(-webkit-animation-fill-mode) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-animation-iteration-count) : 1
-rect: style.getPropertyCSSValue(-webkit-animation-iteration-count) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-animation-name) : none
-rect: style.getPropertyCSSValue(-webkit-animation-name) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-animation-play-state) : running
-rect: style.getPropertyCSSValue(-webkit-animation-play-state) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-animation-timing-function) : ease
-rect: style.getPropertyCSSValue(-webkit-animation-timing-function) : [object CSSValueList]
 rect: style.getPropertyValue(-webkit-appearance) : none
 rect: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-backface-visibility) : visible
@@ -442,14 +426,6 @@ rect: style.getPropertyValue(-webkit-text-stroke-width) : 0px
 rect: style.getPropertyCSSValue(-webkit-text-stroke-width) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-transform-style) : flat
 rect: style.getPropertyCSSValue(-webkit-transform-style) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-transition-delay) : 0s
-rect: style.getPropertyCSSValue(-webkit-transition-delay) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-transition-duration) : 0s
-rect: style.getPropertyCSSValue(-webkit-transition-duration) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-transition-property) : all
-rect: style.getPropertyCSSValue(-webkit-transition-property) : [object CSSValueList]
-rect: style.getPropertyValue(-webkit-transition-timing-function) : ease
-rect: style.getPropertyCSSValue(-webkit-transition-timing-function) : [object CSSValueList]
 rect: style.getPropertyValue(-webkit-user-drag) : auto
 rect: style.getPropertyCSSValue(-webkit-user-drag) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-user-modify) : read-only
@@ -746,22 +722,6 @@ g: style.getPropertyValue(z-index) : auto
 g: style.getPropertyCSSValue(z-index) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(zoom) : 1
 g: style.getPropertyCSSValue(zoom) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-animation-delay) : 0s
-g: style.getPropertyCSSValue(-webkit-animation-delay) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-animation-direction) : normal
-g: style.getPropertyCSSValue(-webkit-animation-direction) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-animation-duration) : 0s
-g: style.getPropertyCSSValue(-webkit-animation-duration) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-animation-fill-mode) : none
-g: style.getPropertyCSSValue(-webkit-animation-fill-mode) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-animation-iteration-count) : 1
-g: style.getPropertyCSSValue(-webkit-animation-iteration-count) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-animation-name) : none
-g: style.getPropertyCSSValue(-webkit-animation-name) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-animation-play-state) : running
-g: style.getPropertyCSSValue(-webkit-animation-play-state) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-animation-timing-function) : ease
-g: style.getPropertyCSSValue(-webkit-animation-timing-function) : [object CSSValueList]
 g: style.getPropertyValue(-webkit-appearance) : none
 g: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-backface-visibility) : visible
@@ -976,14 +936,6 @@ g: style.getPropertyValue(-webkit-text-stroke-width) : 0px
 g: style.getPropertyCSSValue(-webkit-text-stroke-width) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-transform-style) : flat
 g: style.getPropertyCSSValue(-webkit-transform-style) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-transition-delay) : 0s
-g: style.getPropertyCSSValue(-webkit-transition-delay) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-transition-duration) : 0s
-g: style.getPropertyCSSValue(-webkit-transition-duration) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-transition-property) : all
-g: style.getPropertyCSSValue(-webkit-transition-property) : [object CSSValueList]
-g: style.getPropertyValue(-webkit-transition-timing-function) : ease
-g: style.getPropertyCSSValue(-webkit-transition-timing-function) : [object CSSValueList]
 g: style.getPropertyValue(-webkit-user-drag) : auto
 g: style.getPropertyCSSValue(-webkit-user-drag) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-user-modify) : read-only
index 32b8e4f..a1868e1 100644 (file)
@@ -7,7 +7,7 @@ Valid transition-property values.
 PASS computedStyle.transitionProperty is 'all'
 PASS computedStyle.webkitTransitionProperty is 'all'
 PASS Object.keys(style).indexOf('transitionProperty') is not -1
-PASS Object.keys(style).indexOf('webkitTransitionProperty') is not -1
+PASS Object.keys(style).indexOf('webkitTransitionProperty') is -1
 PASS style.transitionProperty is 'none'
 PASS computedStyle.transitionProperty is 'none'
 PASS style.webkitTransitionProperty is 'none'
@@ -101,7 +101,7 @@ Valid transition-duration values.
 PASS computedStyle.transitionDuration is '0s'
 PASS computedStyle.webkitTransitionDuration is '0s'
 PASS Object.keys(style).indexOf('transitionDuration') is not -1
-PASS Object.keys(style).indexOf('webkitTransitionDuration') is not -1
+PASS Object.keys(style).indexOf('webkitTransitionDuration') is -1
 PASS style.transitionDuration is '0s'
 PASS computedStyle.transitionDuration is '0s'
 PASS style.webkitTransitionDuration is '0s'
@@ -151,7 +151,7 @@ Valid transition-timing-function values.
 PASS computedStyle.transitionTimingFunction is 'ease'
 PASS computedStyle.webkitTransitionTimingFunction is 'ease'
 PASS Object.keys(style).indexOf('transitionTimingFunction') is not -1
-PASS Object.keys(style).indexOf('webkitTransitionTimingFunction') is not -1
+PASS Object.keys(style).indexOf('webkitTransitionTimingFunction') is -1
 PASS style.transitionTimingFunction is 'linear'
 PASS computedStyle.transitionTimingFunction is 'linear'
 PASS style.webkitTransitionTimingFunction is 'linear'
@@ -297,7 +297,7 @@ Valid transition-delay values.
 PASS computedStyle.transitionDelay is '0s'
 PASS computedStyle.webkitTransitionDelay is '0s'
 PASS Object.keys(style).indexOf('transitionDelay') is not -1
-PASS Object.keys(style).indexOf('webkitTransitionDelay') is not -1
+PASS Object.keys(style).indexOf('webkitTransitionDelay') is -1
 PASS style.transitionDelay is '0s'
 PASS computedStyle.transitionDelay is '0s'
 PASS style.webkitTransitionDelay is '0s'
@@ -347,7 +347,7 @@ Valid transition shorthand values.
 PASS computedStyle.transition is 'all 0s ease 0s'
 PASS computedStyle.webkitTransition is 'all 0s ease 0s'
 PASS Object.keys(style).indexOf('transition') is not -1
-PASS Object.keys(style).indexOf('webkitTransition') is not -1
+PASS Object.keys(style).indexOf('webkitTransition') is -1
 PASS style.transition is 'none'
 PASS computedStyle.transition is 'none 0s ease 0s'
 PASS style.webkitTransition is 'none'
index 02e8506..60f9e70 100644 (file)
@@ -31,7 +31,7 @@ shouldBe("computedStyle.webkitTransitionProperty", "'all'");
 
 style.transitionProperty = "none";
 shouldNotBe("Object.keys(style).indexOf('transitionProperty')", "-1");
-shouldNotBe("Object.keys(style).indexOf('webkitTransitionProperty')", "-1");
+shouldBe("Object.keys(style).indexOf('webkitTransitionProperty')", "-1");
 shouldBe("style.transitionProperty", "'none'");
 shouldBe("computedStyle.transitionProperty", "'none'");
 shouldBe("style.webkitTransitionProperty", "'none'");
@@ -175,7 +175,7 @@ shouldBe("computedStyle.webkitTransitionDuration", "'0s'");
 
 style.transitionDuration = "0s";
 shouldNotBe("Object.keys(style).indexOf('transitionDuration')", "-1");
-shouldNotBe("Object.keys(style).indexOf('webkitTransitionDuration')", "-1");
+shouldBe("Object.keys(style).indexOf('webkitTransitionDuration')", "-1");
 shouldBe("style.transitionDuration", "'0s'");
 shouldBe("computedStyle.transitionDuration", "'0s'");
 shouldBe("style.webkitTransitionDuration", "'0s'");
@@ -255,7 +255,7 @@ shouldBe("computedStyle.webkitTransitionTimingFunction", "'ease'");
 
 style.transitionTimingFunction = "linear";
 shouldNotBe("Object.keys(style).indexOf('transitionTimingFunction')", "-1");
-shouldNotBe("Object.keys(style).indexOf('webkitTransitionTimingFunction')", "-1");
+shouldBe("Object.keys(style).indexOf('webkitTransitionTimingFunction')", "-1");
 shouldBe("style.transitionTimingFunction", "'linear'");
 shouldBe("computedStyle.transitionTimingFunction", "'linear'");
 shouldBe("style.webkitTransitionTimingFunction", "'linear'");
@@ -478,7 +478,7 @@ shouldBe("computedStyle.webkitTransitionDelay", "'0s'");
 
 style.transitionDelay = "0s";
 shouldNotBe("Object.keys(style).indexOf('transitionDelay')", "-1");
-shouldNotBe("Object.keys(style).indexOf('webkitTransitionDelay')", "-1");
+shouldBe("Object.keys(style).indexOf('webkitTransitionDelay')", "-1");
 shouldBe("style.transitionDelay", "'0s'");
 shouldBe("computedStyle.transitionDelay", "'0s'");
 shouldBe("style.webkitTransitionDelay", "'0s'");
@@ -558,7 +558,7 @@ shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'");
 
 style.transition = "none";
 shouldNotBe("Object.keys(style).indexOf('transition')", "-1");
-shouldNotBe("Object.keys(style).indexOf('webkitTransition')", "-1");
+shouldBe("Object.keys(style).indexOf('webkitTransition')", "-1");
 shouldBe("style.transition", "'none'");
 shouldBe("computedStyle.transition", "'none 0s ease 0s'");
 shouldBe("style.webkitTransition", "'none'");
index e333837..b5da379 100644 (file)
@@ -1,3 +1,57 @@
+2016-09-12  Simon Fraser  <simon.fraser@apple.com>
+
+        Make -webkit-transition-* and -webkit-animation-* properties be pure aliases of the unprefixed ones
+        https://bugs.webkit.org/show_bug.cgi?id=160478
+
+        Reviewed by Dean Jackson.
+        
+        Remove the custom -webkit prefixed transition and animation properties, and just make
+        them aliases of the unprefixed ones, as we do for transforms.
+        
+        -webkit-animation-trigger remains as the only prefixed-only animation property.
+        
+        This is mostly code deletion.
+
+        Test: fast/css/longhand-overrides-shorthand-prefixing.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSProperty.h:
+        (WebCore::prefixingVariantForPropertyId): Deleted.
+        * css/CSSPropertyNames.in:
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapAnimationDelay):
+        (WebCore::CSSToStyleMap::mapAnimationDirection):
+        (WebCore::CSSToStyleMap::mapAnimationDuration):
+        (WebCore::CSSToStyleMap::mapAnimationFillMode):
+        (WebCore::CSSToStyleMap::mapAnimationIterationCount):
+        (WebCore::CSSToStyleMap::mapAnimationName):
+        (WebCore::CSSToStyleMap::mapAnimationPlayState):
+        (WebCore::CSSToStyleMap::mapAnimationProperty):
+        (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
+        (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
+        * css/StyleProperties.cpp:
+        (WebCore::StyleProperties::getPropertyValue):
+        (WebCore::MutableStyleProperties::removeShorthandProperty):
+        (WebCore::StyleProperties::asText):
+        * css/StylePropertyShorthand.cpp:
+        (WebCore::animationShorthandForParsing):
+        * css/StylePropertyShorthand.h:
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::styleForKeyframe):
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseAnimationShorthand):
+        (WebCore::CSSParser::parseTransitionShorthand):
+        (WebCore::CSSParser::parseAnimationProperty):
+        (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted.
+        * css/parser/CSSParser.h:
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlPanelElement::makeOpaque):
+        (WebCore::MediaControlPanelElement::makeTransparent):
+
 2016-09-12  Per Arne Vollan  <pvollan@apple.com>
 
         Unreviewed build fix after r205090.
index a4a8ca0..ba08186 100644 (file)
@@ -244,14 +244,6 @@ static const CSSPropertyID computedProperties[] = {
 #endif
     CSSPropertyZIndex,
     CSSPropertyZoom,
-    CSSPropertyWebkitAnimationDelay,
-    CSSPropertyWebkitAnimationDirection,
-    CSSPropertyWebkitAnimationDuration,
-    CSSPropertyWebkitAnimationFillMode,
-    CSSPropertyWebkitAnimationIterationCount,
-    CSSPropertyWebkitAnimationName,
-    CSSPropertyWebkitAnimationPlayState,
-    CSSPropertyWebkitAnimationTimingFunction,
 #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
     CSSPropertyWebkitAnimationTrigger,
 #endif
@@ -407,10 +399,6 @@ static const CSSPropertyID computedProperties[] = {
     CSSPropertyWebkitTextStrokeWidth,
     CSSPropertyWebkitTextZoom,
     CSSPropertyWebkitTransformStyle,
-    CSSPropertyWebkitTransitionDelay,
-    CSSPropertyWebkitTransitionDuration,
-    CSSPropertyWebkitTransitionProperty,
-    CSSPropertyWebkitTransitionTimingFunction,
     CSSPropertyWebkitUserDrag,
     CSSPropertyWebkitUserModify,
     CSSPropertyWebkitUserSelect,
@@ -3349,10 +3337,8 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
         }
 #endif
         case CSSPropertyAnimationDelay:
-        case CSSPropertyWebkitAnimationDelay:
             return getDelayValue(style->animations());
-        case CSSPropertyAnimationDirection:
-        case CSSPropertyWebkitAnimationDirection: {
+        case CSSPropertyAnimationDirection: {
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             const AnimationList* t = style->animations();
             if (t) {
@@ -3377,10 +3363,8 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
             return list;
         }
         case CSSPropertyAnimationDuration:
-        case CSSPropertyWebkitAnimationDuration:
             return getDurationValue(style->animations());
-        case CSSPropertyAnimationFillMode:
-        case CSSPropertyWebkitAnimationFillMode: {
+        case CSSPropertyAnimationFillMode: {
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             const AnimationList* t = style->animations();
             if (t) {
@@ -3404,8 +3388,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
                 list->append(cssValuePool.createIdentifierValue(CSSValueNone));
             return list;
         }
-        case CSSPropertyAnimationIterationCount:
-        case CSSPropertyWebkitAnimationIterationCount: {
+        case CSSPropertyAnimationIterationCount: {
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             const AnimationList* t = style->animations();
             if (t) {
@@ -3420,8 +3403,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
                 list->append(cssValuePool.createValue(Animation::initialIterationCount(), CSSPrimitiveValue::CSS_NUMBER));
             return list;
         }
-        case CSSPropertyAnimationName:
-        case CSSPropertyWebkitAnimationName: {
+        case CSSPropertyAnimationName: {
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             const AnimationList* t = style->animations();
             if (t) {
@@ -3431,8 +3413,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
                 list->append(cssValuePool.createIdentifierValue(CSSValueNone));
             return list;
         }
-        case CSSPropertyAnimationPlayState:
-        case CSSPropertyWebkitAnimationPlayState: {
+        case CSSPropertyAnimationPlayState: {
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             const AnimationList* t = style->animations();
             if (t) {
@@ -3448,7 +3429,6 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
             return list;
         }
         case CSSPropertyAnimationTimingFunction:
-        case CSSPropertyWebkitAnimationTimingFunction:
             return getTimingFunctionValue(style->animations());
 #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
         case CSSPropertyWebkitAnimationTrigger:
@@ -3592,19 +3572,14 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
         case CSSPropertyWebkitTransformStyle:
             return cssValuePool.createIdentifierValue((style->transformStyle3D() == TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat);
         case CSSPropertyTransitionDelay:
-        case CSSPropertyWebkitTransitionDelay:
             return getDelayValue(style->transitions());
         case CSSPropertyTransitionDuration:
-        case CSSPropertyWebkitTransitionDuration:
             return getDurationValue(style->transitions());
         case CSSPropertyTransitionProperty:
-        case CSSPropertyWebkitTransitionProperty:
             return getTransitionPropertyValue(style->transitions());
         case CSSPropertyTransitionTimingFunction:
-        case CSSPropertyWebkitTransitionTimingFunction:
             return getTimingFunctionValue(style->transitions());
-        case CSSPropertyTransition:
-        case CSSPropertyWebkitTransition: {
+        case CSSPropertyTransition: {
             const AnimationList* animList = style->transitions();
             if (animList) {
                 RefPtr<CSSValueList> transitionsList = CSSValueList::createCommaSeparated();
@@ -3873,7 +3848,6 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
             break;
 
         /* Unimplemented -webkit- properties */
-        case CSSPropertyWebkitAnimation:
         case CSSPropertyWebkitBorderRadius:
         case CSSPropertyWebkitMarginCollapse:
         case CSSPropertyWebkitMarquee:
index 8ab9e49..54356e0 100644 (file)
@@ -103,72 +103,6 @@ private:
 
 typedef Vector<CSSProperty, 256> ParsedPropertyVector;
 
-inline CSSPropertyID prefixingVariantForPropertyId(CSSPropertyID propertyID)
-{
-    ASSERT(propertyID != CSSPropertyInvalid);
-
-    switch (propertyID) {
-    case CSSPropertyAnimation:
-        return CSSPropertyWebkitAnimation;
-    case CSSPropertyAnimationDelay:
-        return CSSPropertyWebkitAnimationDelay;
-    case CSSPropertyAnimationDirection:
-        return CSSPropertyWebkitAnimationDirection;
-    case CSSPropertyAnimationDuration:
-        return CSSPropertyWebkitAnimationDuration;
-    case CSSPropertyAnimationFillMode:
-        return CSSPropertyWebkitAnimationFillMode;
-    case CSSPropertyAnimationName:
-        return CSSPropertyWebkitAnimationName;
-    case CSSPropertyAnimationPlayState:
-        return CSSPropertyWebkitAnimationPlayState;
-    case CSSPropertyAnimationIterationCount:
-        return CSSPropertyWebkitAnimationIterationCount;
-    case CSSPropertyAnimationTimingFunction:
-        return CSSPropertyWebkitAnimationTimingFunction;
-    case CSSPropertyWebkitAnimation:
-        return CSSPropertyAnimation;
-    case CSSPropertyWebkitAnimationDelay:
-        return CSSPropertyAnimationDelay;
-    case CSSPropertyWebkitAnimationDirection:
-        return CSSPropertyAnimationDirection;
-    case CSSPropertyWebkitAnimationDuration:
-        return CSSPropertyAnimationDuration;
-    case CSSPropertyWebkitAnimationFillMode:
-        return CSSPropertyAnimationFillMode;
-    case CSSPropertyWebkitAnimationName:
-        return CSSPropertyAnimationName;
-    case CSSPropertyWebkitAnimationPlayState:
-        return CSSPropertyAnimationPlayState;
-    case CSSPropertyWebkitAnimationIterationCount:
-        return CSSPropertyAnimationIterationCount;
-    case CSSPropertyWebkitAnimationTimingFunction:
-        return CSSPropertyAnimationTimingFunction;
-    case CSSPropertyTransitionDelay:
-        return CSSPropertyWebkitTransitionDelay;
-    case CSSPropertyTransitionDuration:
-        return CSSPropertyWebkitTransitionDuration;
-    case CSSPropertyTransitionProperty:
-        return CSSPropertyWebkitTransitionProperty;
-    case CSSPropertyTransitionTimingFunction:
-        return CSSPropertyWebkitTransitionTimingFunction;
-    case CSSPropertyTransition:
-        return CSSPropertyWebkitTransition;
-    case CSSPropertyWebkitTransitionDelay:
-        return CSSPropertyTransitionDelay;
-    case CSSPropertyWebkitTransitionDuration:
-        return CSSPropertyTransitionDuration;
-    case CSSPropertyWebkitTransitionProperty:
-        return CSSPropertyTransitionProperty;
-    case CSSPropertyWebkitTransitionTimingFunction:
-        return CSSPropertyTransitionTimingFunction;
-    case CSSPropertyWebkitTransition:
-        return CSSPropertyTransition;
-    default:
-        return propertyID;
-    }
-}
-
 } // namespace WebCore
 
 namespace WTF {
index fa43995..9b9ee3e 100644 (file)
@@ -352,7 +352,6 @@ transition-delay [AnimationProperty, NameForMethods=Delay]
 transition-duration [AnimationProperty, NameForMethods=Duration]
 transition-property [AnimationProperty, NameForMethods=Property]
 transition-timing-function [AnimationProperty, NameForMethods=TimingFunction]
-
 unicode-bidi
 unicode-range [SkipBuilder]
 vector-effect [SVG]
@@ -372,15 +371,15 @@ y [Initial=initialZeroLength, Converter=Length]
 z-index [AutoFunctions]
 alt [NameForMethods=ContentAltText, Custom=Value]
 -webkit-alt = alt
--webkit-animation [Longhands=-webkit-animation-name|-webkit-animation-duration|-webkit-animation-timing-function|-webkit-animation-delay|-webkit-animation-iteration-count|-webkit-animation-direction|-webkit-animation-fill-mode|-webkit-animation-play-state]
--webkit-animation-delay [AnimationProperty, NameForMethods=Delay]
--webkit-animation-direction [AnimationProperty, NameForMethods=Direction]
--webkit-animation-duration [AnimationProperty, NameForMethods=Duration]
--webkit-animation-fill-mode [AnimationProperty, NameForMethods=FillMode]
--webkit-animation-iteration-count [AnimationProperty, NameForMethods=IterationCount]
--webkit-animation-name [AnimationProperty, NameForMethods=Name]
--webkit-animation-play-state [AnimationProperty, NameForMethods=PlayState]
--webkit-animation-timing-function [AnimationProperty, NameForMethods=TimingFunction]
+-webkit-animation = animation
+-webkit-animation-delay = animation-delay
+-webkit-animation-direction = animation-direction
+-webkit-animation-duration = animation-duration
+-webkit-animation-fill-mode = animation-fill-mode
+-webkit-animation-iteration-count = animation-iteration-count
+-webkit-animation-name = animation-name
+-webkit-animation-play-state = animation-play-state
+-webkit-animation-timing-function = animation-timing-function
 #if defined(ENABLE_CSS_ANIMATIONS_LEVEL_2) && ENABLE_CSS_ANIMATIONS_LEVEL_2
 -webkit-animation-trigger [AnimationProperty, NameForMethods=Trigger]
 #endif
@@ -622,6 +621,7 @@ text-emphasis-style = -webkit-text-emphasis-style
 -webkit-text-stroke [Inherited, Longhands=-webkit-text-stroke-width|-webkit-text-stroke-color]
 -webkit-text-stroke-color [Inherited, VisitedLinkColorSupport, Initial=invalidColor]
 -webkit-text-stroke-width [Inherited, Converter=TextStrokeWidth]
+
 transform [Converter=Transform]
 -webkit-transform = transform
 transform-origin [Longhands=transform-origin-x|transform-origin-y|transform-origin-z]
@@ -635,11 +635,11 @@ transform-origin-z [Converter=ComputedLength<float>]
 transform-style [NameForMethods=TransformStyle3D]
 // Keeping -webkit-transform-style around is how we'll detect legacy content. At that point we'll have to add a custom builder and a new ETransformStyle3D type.
 -webkit-transform-style [NameForMethods=TransformStyle3D]
--webkit-transition [Longhands=-webkit-transition-property|-webkit-transition-duration|-webkit-transition-timing-function|-webkit-transition-delay]
--webkit-transition-delay [AnimationProperty, NameForMethods=Delay]
--webkit-transition-duration [AnimationProperty, NameForMethods=Duration]
--webkit-transition-property [AnimationProperty, NameForMethods=Property]
--webkit-transition-timing-function [AnimationProperty, NameForMethods=TimingFunction]
+-webkit-transition = transition
+-webkit-transition-delay = transition-delay
+-webkit-transition-duration = transition-duration
+-webkit-transition-property = transition-property
+-webkit-transition-timing-function = transition-timing-function
 -webkit-user-drag
 -webkit-user-modify [Inherited]
 -webkit-user-select [Inherited]
index 16dd2f0..9bd2fd6 100644 (file)
@@ -316,7 +316,7 @@ void CSSToStyleMap::mapFillMaskSourceType(CSSPropertyID propertyID, FillLayer& l
 
 void CSSToStyleMap::mapAnimationDelay(Animation& animation, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationDelay)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimationDelay)) {
         animation.setDelay(Animation::initialDelay());
         return;
     }
@@ -329,7 +329,7 @@ void CSSToStyleMap::mapAnimationDelay(Animation& animation, const CSSValue& valu
 
 void CSSToStyleMap::mapAnimationDirection(Animation& layer, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationDirection)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimationDirection)) {
         layer.setDirection(Animation::initialDirection());
         return;
     }
@@ -357,7 +357,7 @@ void CSSToStyleMap::mapAnimationDirection(Animation& layer, const CSSValue& valu
 
 void CSSToStyleMap::mapAnimationDuration(Animation& animation, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationDuration)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimationDuration)) {
         animation.setDuration(Animation::initialDuration());
         return;
     }
@@ -370,7 +370,7 @@ void CSSToStyleMap::mapAnimationDuration(Animation& animation, const CSSValue& v
 
 void CSSToStyleMap::mapAnimationFillMode(Animation& layer, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationFillMode)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimationFillMode)) {
         layer.setFillMode(Animation::initialFillMode());
         return;
     }
@@ -398,7 +398,7 @@ void CSSToStyleMap::mapAnimationFillMode(Animation& layer, const CSSValue& value
 
 void CSSToStyleMap::mapAnimationIterationCount(Animation& animation, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationIterationCount)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimationIterationCount)) {
         animation.setIterationCount(Animation::initialIterationCount());
         return;
     }
@@ -415,7 +415,7 @@ void CSSToStyleMap::mapAnimationIterationCount(Animation& animation, const CSSVa
 
 void CSSToStyleMap::mapAnimationName(Animation& layer, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationName)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimationName)) {
         layer.setName(Animation::initialName());
         return;
     }
@@ -432,7 +432,7 @@ void CSSToStyleMap::mapAnimationName(Animation& layer, const CSSValue& value)
 
 void CSSToStyleMap::mapAnimationPlayState(Animation& layer, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationPlayState)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimationPlayState)) {
         layer.setPlayState(Animation::initialPlayState());
         return;
     }
@@ -446,7 +446,7 @@ void CSSToStyleMap::mapAnimationPlayState(Animation& layer, const CSSValue& valu
 
 void CSSToStyleMap::mapAnimationProperty(Animation& animation, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimation)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimation)) {
         animation.setAnimationMode(Animation::AnimateAll);
         animation.setProperty(CSSPropertyInvalid);
         return;
@@ -470,7 +470,7 @@ void CSSToStyleMap::mapAnimationProperty(Animation& animation, const CSSValue& v
 
 void CSSToStyleMap::mapAnimationTimingFunction(Animation& animation, const CSSValue& value)
 {
-    if (value.treatAsInitialValue(CSSPropertyWebkitAnimationTimingFunction)) {
+    if (value.treatAsInitialValue(CSSPropertyAnimationTimingFunction)) {
         animation.setTimingFunction(Animation::initialTimingFunction());
         return;
     }
index a7f6b88..354da15 100644 (file)
@@ -271,10 +271,6 @@ RefPtr<CSSValue> PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal(CSS
     if (value)
         return value;
 
-    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
-    if (prefixingVariant != propertyID)
-        return m_propertySet->getPropertyCSSValue(prefixingVariant);
-
     return nullptr;
 }
 
@@ -284,10 +280,6 @@ String PropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPropertyID pr
     if (!value.isEmpty())
         return value;
 
-    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
-    if (prefixingVariant != propertyID)
-        return m_propertySet->getPropertyValue(prefixingVariant);
-
     return String();
 }
 
index 87976c4..2a140cd 100644 (file)
@@ -208,10 +208,6 @@ String StyleProperties::getPropertyValue(CSSPropertyID propertyID) const
         return getShorthandValue(perspectiveOriginShorthand());
     case CSSPropertyTransformOrigin:
         return getShorthandValue(transformOriginShorthand());
-    case CSSPropertyWebkitTransition:
-        return getLayeredShorthandValue(webkitTransitionShorthand());
-    case CSSPropertyWebkitAnimation:
-        return getLayeredShorthandValue(webkitAnimationShorthand());
     case CSSPropertyMarker: {
         RefPtr<CSSValue> value = getPropertyCSSValueInternal(CSSPropertyMarkerStart);
         if (value)
@@ -640,15 +636,7 @@ bool MutableStyleProperties::removeShorthandProperty(CSSPropertyID propertyID)
     if (!shorthand.length())
         return false;
 
-    bool propertiesWereRemoved = removePropertiesInSet(shorthand.properties(), shorthand.length());
-
-    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
-    if (prefixingVariant == propertyID)
-        return propertiesWereRemoved;
-
-    StylePropertyShorthand shorthandPrefixingVariant = shorthandForProperty(prefixingVariant);
-    bool prefixedVariantPropertiesWereRemoved = removePropertiesInSet(shorthandPrefixingVariant.properties(), shorthandPrefixingVariant.length());
-    return propertiesWereRemoved || prefixedVariantPropertiesWereRemoved;
+    return removePropertiesInSet(shorthand.properties(), shorthand.length());
 }
 
 bool MutableStyleProperties::removeProperty(CSSPropertyID propertyID, String* returnText)
@@ -976,16 +964,6 @@ String StyleProperties::asText() const
             case CSSPropertyTransitionDelay:
                 shorthandPropertyID = CSSPropertyTransition;
                 break;
-            case CSSPropertyWebkitAnimationName:
-            case CSSPropertyWebkitAnimationDuration:
-            case CSSPropertyWebkitAnimationTimingFunction:
-            case CSSPropertyWebkitAnimationDelay:
-            case CSSPropertyWebkitAnimationIterationCount:
-            case CSSPropertyWebkitAnimationDirection:
-            case CSSPropertyWebkitAnimationFillMode:
-            case CSSPropertyWebkitAnimationPlayState:
-                shorthandPropertyID = CSSPropertyWebkitAnimation;
-                break;
             case CSSPropertyFlexDirection:
             case CSSPropertyFlexWrap:
                 shorthandPropertyID = CSSPropertyFlexFlow;
@@ -1015,12 +993,6 @@ String StyleProperties::asText() const
             case CSSPropertyTransformOriginZ:
                 shorthandPropertyID = CSSPropertyTransformOrigin;
                 break;
-            case CSSPropertyWebkitTransitionProperty:
-            case CSSPropertyWebkitTransitionDuration:
-            case CSSPropertyWebkitTransitionTimingFunction:
-            case CSSPropertyWebkitTransitionDelay:
-                shorthandPropertyID = CSSPropertyWebkitTransition;
-                break;
             default:
                 break;
             }
index 2e5999c..071633b 100644 (file)
@@ -32,7 +32,7 @@ StylePropertyShorthand borderAbridgedShorthand()
     return StylePropertyShorthand(CSSPropertyBorder, borderAbridgedProperties, propertiesForInitialization);
 }
 
-StylePropertyShorthand animationShorthandForParsing(CSSPropertyID propId)
+StylePropertyShorthand animationShorthandForParsing()
 {
     // Animation-name must come last, so that keywords for other properties in the shorthand
     // preferentially match those properties.
@@ -47,20 +47,7 @@ StylePropertyShorthand animationShorthandForParsing(CSSPropertyID propId)
         CSSPropertyAnimationName
     };
 
-    static const CSSPropertyID prefixedAnimationPropertiesForParsing[] = {
-        CSSPropertyWebkitAnimationDuration,
-        CSSPropertyWebkitAnimationTimingFunction,
-        CSSPropertyWebkitAnimationDelay,
-        CSSPropertyWebkitAnimationIterationCount,
-        CSSPropertyWebkitAnimationDirection,
-        CSSPropertyWebkitAnimationFillMode,
-        CSSPropertyWebkitAnimationPlayState,
-        CSSPropertyWebkitAnimationName
-    };
-
-    if (propId == CSSPropertyAnimation)
-        return StylePropertyShorthand(CSSPropertyAnimation, animationPropertiesForParsing);
-    return StylePropertyShorthand(CSSPropertyWebkitAnimation, prefixedAnimationPropertiesForParsing);
+    return StylePropertyShorthand(CSSPropertyAnimation, animationPropertiesForParsing);
 }
 
 bool isShorthandCSSProperty(CSSPropertyID id)
index a8757c1..287adac 100644 (file)
@@ -52,7 +52,7 @@ private:
 };
 
 // Custom StylePropertyShorthand functions.
-StylePropertyShorthand animationShorthandForParsing(CSSPropertyID);
+StylePropertyShorthand animationShorthandForParsing();
 StylePropertyShorthand borderAbridgedShorthand();
 
 // Returns empty value if the property is not a shorthand.
index 12ba180..9016240 100644 (file)
@@ -493,7 +493,7 @@ std::unique_ptr<RenderStyle> StyleResolver::styleForKeyframe(const RenderStyle*
         CSSPropertyID property = keyframe->properties().propertyAt(i).id();
         // Timing-function within keyframes is special, because it is not animated; it just
         // describes the timing function between this keyframe and the next.
-        if (property != CSSPropertyWebkitAnimationTimingFunction && property != CSSPropertyAnimationTimingFunction)
+        if (property != CSSPropertyAnimationTimingFunction)
             keyframeValue.addProperty(property);
     }
 
index bc0dd54..d77a390 100644 (file)
@@ -2721,25 +2721,13 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyAnimationPlayState:
     case CSSPropertyAnimationIterationCount:
     case CSSPropertyAnimationTimingFunction:
-    case CSSPropertyWebkitAnimationDelay:
-    case CSSPropertyWebkitAnimationDirection:
-    case CSSPropertyWebkitAnimationDuration:
-    case CSSPropertyWebkitAnimationFillMode:
-    case CSSPropertyWebkitAnimationName:
-    case CSSPropertyWebkitAnimationPlayState:
-    case CSSPropertyWebkitAnimationIterationCount:
-    case CSSPropertyWebkitAnimationTimingFunction:
 #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
     case CSSPropertyWebkitAnimationTrigger:
 #endif
     case CSSPropertyTransitionDelay:
     case CSSPropertyTransitionDuration:
     case CSSPropertyTransitionTimingFunction:
-    case CSSPropertyTransitionProperty:
-    case CSSPropertyWebkitTransitionDelay:
-    case CSSPropertyWebkitTransitionDuration:
-    case CSSPropertyWebkitTransitionTimingFunction:
-    case CSSPropertyWebkitTransitionProperty: {
+    case CSSPropertyTransitionProperty: {
         RefPtr<CSSValue> val;
         AnimationParseContext context;
         if (parseAnimationProperty(propId, val, context)) {
@@ -3070,10 +3058,8 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyWebkitTextStroke:
         return parseShorthand(propId, webkitTextStrokeShorthand(), important);
     case CSSPropertyAnimation:
-    case CSSPropertyWebkitAnimation:
         return parseAnimationShorthand(propId, important);
     case CSSPropertyTransition:
-    case CSSPropertyWebkitTransition:
         return parseTransitionShorthand(propId, important);
     case CSSPropertyInvalid:
         return false;
@@ -3790,17 +3776,16 @@ void CSSParser::addAnimationValue(RefPtr<CSSValue>& lval, Ref<CSSValue>&& rval)
 
 bool CSSParser::parseAnimationShorthand(CSSPropertyID propId, bool important)
 {
-    ASSERT(propId == CSSPropertyAnimation || propId == CSSPropertyWebkitAnimation);
+    ASSERT(propId == CSSPropertyAnimation);
 
     const unsigned numProperties = 8;
-    const StylePropertyShorthand& shorthand = animationShorthandForParsing(propId);
+    const StylePropertyShorthand& shorthand = animationShorthandForParsing();
 
     // The list of properties in the shorthand should be the same
     // length as the list with animation name in last position, even though they are
     // in a different order.
     ASSERT(numProperties == shorthand.length());
     ASSERT(numProperties == animationShorthand().length());
-    ASSERT(numProperties == webkitAnimationShorthand().length());
 
     ShorthandScope scope(this, propId);
 
@@ -3858,29 +3843,11 @@ bool CSSParser::parseAnimationShorthand(CSSPropertyID propId, bool important)
     // 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());
@@ -4012,7 +3979,7 @@ bool CSSParser::parseTransitionShorthand(CSSPropertyID propId, bool important)
     // 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;
 }
@@ -5381,53 +5348,43 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r
         else {
             switch (propId) {
             case CSSPropertyAnimationDelay:
-            case CSSPropertyWebkitAnimationDelay:
             case CSSPropertyTransitionDelay:
-            case CSSPropertyWebkitTransitionDelay:
                 currValue = parseAnimationDelay();
                 if (currValue)
                     m_valueList->next();
                 break;
             case CSSPropertyAnimationDirection:
-            case CSSPropertyWebkitAnimationDirection:
                 currValue = parseAnimationDirection();
                 if (currValue)
                     m_valueList->next();
                 break;
             case CSSPropertyAnimationDuration:
-            case CSSPropertyWebkitAnimationDuration:
             case CSSPropertyTransitionDuration:
-            case CSSPropertyWebkitTransitionDuration:
                 currValue = parseAnimationDuration();
                 if (currValue)
                     m_valueList->next();
                 break;
             case CSSPropertyAnimationFillMode:
-            case CSSPropertyWebkitAnimationFillMode:
                 currValue = parseAnimationFillMode();
                 if (currValue)
                     m_valueList->next();
                 break;
             case CSSPropertyAnimationIterationCount:
-            case CSSPropertyWebkitAnimationIterationCount:
                 currValue = parseAnimationIterationCount();
                 if (currValue)
                     m_valueList->next();
                 break;
             case CSSPropertyAnimationName:
-            case CSSPropertyWebkitAnimationName:
                 currValue = parseAnimationName();
                 if (currValue)
                     m_valueList->next();
                 break;
             case CSSPropertyAnimationPlayState:
-            case CSSPropertyWebkitAnimationPlayState:
                 currValue = parseAnimationPlayState();
                 if (currValue)
                     m_valueList->next();
                 break;
             case CSSPropertyTransitionProperty:
-            case CSSPropertyWebkitTransitionProperty:
                 currValue = parseAnimationProperty(context);
                 if (value && !context.animationPropertyKeywordAllowed())
                     return false;
@@ -5435,9 +5392,7 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r
                     m_valueList->next();
                 break;
             case CSSPropertyAnimationTimingFunction:
-            case CSSPropertyWebkitAnimationTimingFunction:
             case CSSPropertyTransitionTimingFunction:
-            case CSSPropertyWebkitTransitionTimingFunction:
                 currValue = parseAnimationTimingFunction();
                 if (currValue)
                     m_valueList->next();
index dc654e5..0ec9629 100644 (file)
@@ -145,7 +145,6 @@ public:
     static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, Element*);
     std::unique_ptr<MediaQuery> parseMediaQuery(const String&);
 
-    void addPropertyWithPrefixingVariant(CSSPropertyID, RefPtr<CSSValue>&&, bool important, bool implicit = false);
     void addProperty(CSSPropertyID, RefPtr<CSSValue>&&, bool important, bool implicit = false);
     void rollbackLastProperties(int num);
     bool hasProperties() const { return !m_parsedProperties.isEmpty(); }
index df67faf..0f495a7 100644 (file)
@@ -190,8 +190,8 @@ void MediaControlPanelElement::makeOpaque()
 
     double duration = document().page() ? document().page()->theme().mediaControlsFadeInDuration() : 0;
 
-    setInlineStyleProperty(CSSPropertyWebkitTransitionProperty, CSSPropertyOpacity);
-    setInlineStyleProperty(CSSPropertyWebkitTransitionDuration, duration, CSSPrimitiveValue::CSS_S);
+    setInlineStyleProperty(CSSPropertyTransitionProperty, CSSPropertyOpacity);
+    setInlineStyleProperty(CSSPropertyTransitionDuration, duration, CSSPrimitiveValue::CSS_S);
     setInlineStyleProperty(CSSPropertyOpacity, 1.0, CSSPrimitiveValue::CSS_NUMBER);
 
     m_opaque = true;
@@ -207,8 +207,8 @@ void MediaControlPanelElement::makeTransparent()
 
     double duration = document().page() ? document().page()->theme().mediaControlsFadeOutDuration() : 0;
 
-    setInlineStyleProperty(CSSPropertyWebkitTransitionProperty, CSSPropertyOpacity);
-    setInlineStyleProperty(CSSPropertyWebkitTransitionDuration, duration, CSSPrimitiveValue::CSS_S);
+    setInlineStyleProperty(CSSPropertyTransitionProperty, CSSPropertyOpacity);
+    setInlineStyleProperty(CSSPropertyTransitionDuration, duration, CSSPrimitiveValue::CSS_S);
     setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER);
 
     m_opaque = false;