haikuwebkit/LayoutTests/fast/css/prefixed-unprefixed-variant...

400 lines
21 KiB
Plaintext
Raw Permalink Normal View History

Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
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 "transition-property" to "width"
PASS element.style.transitionProperty
PASS element.style.webkitTransitionProperty
PASS element.style.getPropertyValue("transition-property")
PASS element.style.getPropertyValue("-webkit-transition-property")
PASS element.style.getPropertyCSSValue("transition-property")
PASS element.style.getPropertyCSSValue("-webkit-transition-property")
PASS getComputedStyle(element).transitionProperty
PASS getComputedStyle(element).webkitTransitionProperty
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-transition-property" to "width"
PASS element.style.transitionProperty
PASS element.style.webkitTransitionProperty
PASS element.style.getPropertyValue("transition-property")
PASS element.style.getPropertyValue("-webkit-transition-property")
PASS element.style.getPropertyCSSValue("transition-property")
PASS element.style.getPropertyCSSValue("-webkit-transition-property")
PASS getComputedStyle(element).transitionProperty
PASS getComputedStyle(element).webkitTransitionProperty
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "transition-duration" to "1s"
PASS element.style.transitionDuration
PASS element.style.webkitTransitionDuration
PASS element.style.getPropertyValue("transition-duration")
PASS element.style.getPropertyValue("-webkit-transition-duration")
PASS element.style.getPropertyCSSValue("transition-duration")
PASS element.style.getPropertyCSSValue("-webkit-transition-duration")
PASS getComputedStyle(element).transitionDuration
PASS getComputedStyle(element).webkitTransitionDuration
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-transition-duration" to "1s"
PASS element.style.transitionDuration
PASS element.style.webkitTransitionDuration
PASS element.style.getPropertyValue("transition-duration")
PASS element.style.getPropertyValue("-webkit-transition-duration")
PASS element.style.getPropertyCSSValue("transition-duration")
PASS element.style.getPropertyCSSValue("-webkit-transition-duration")
PASS getComputedStyle(element).transitionDuration
PASS getComputedStyle(element).webkitTransitionDuration
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "transition-timing-function" to "linear"
PASS element.style.transitionTimingFunction
PASS element.style.webkitTransitionTimingFunction
PASS element.style.getPropertyValue("transition-timing-function")
PASS element.style.getPropertyValue("-webkit-transition-timing-function")
PASS element.style.getPropertyCSSValue("transition-timing-function")
PASS element.style.getPropertyCSSValue("-webkit-transition-timing-function")
PASS getComputedStyle(element).transitionTimingFunction
PASS getComputedStyle(element).webkitTransitionTimingFunction
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-transition-timing-function" to "linear"
PASS element.style.transitionTimingFunction
PASS element.style.webkitTransitionTimingFunction
PASS element.style.getPropertyValue("transition-timing-function")
PASS element.style.getPropertyValue("-webkit-transition-timing-function")
PASS element.style.getPropertyCSSValue("transition-timing-function")
PASS element.style.getPropertyCSSValue("-webkit-transition-timing-function")
PASS getComputedStyle(element).transitionTimingFunction
PASS getComputedStyle(element).webkitTransitionTimingFunction
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "transition-delay" to "0.5s"
PASS element.style.transitionDelay
PASS element.style.webkitTransitionDelay
PASS element.style.getPropertyValue("transition-delay")
PASS element.style.getPropertyValue("-webkit-transition-delay")
PASS element.style.getPropertyCSSValue("transition-delay")
PASS element.style.getPropertyCSSValue("-webkit-transition-delay")
PASS getComputedStyle(element).transitionDelay
PASS getComputedStyle(element).webkitTransitionDelay
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-transition-delay" to "0.5s"
PASS element.style.transitionDelay
PASS element.style.webkitTransitionDelay
PASS element.style.getPropertyValue("transition-delay")
PASS element.style.getPropertyValue("-webkit-transition-delay")
PASS element.style.getPropertyCSSValue("transition-delay")
PASS element.style.getPropertyCSSValue("-webkit-transition-delay")
PASS getComputedStyle(element).transitionDelay
PASS getComputedStyle(element).webkitTransitionDelay
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "animation-name" to "foo"
PASS element.style.animationName
PASS element.style.webkitAnimationName
PASS element.style.getPropertyValue("animation-name")
PASS element.style.getPropertyValue("-webkit-animation-name")
PASS element.style.getPropertyCSSValue("animation-name")
PASS element.style.getPropertyCSSValue("-webkit-animation-name")
PASS getComputedStyle(element).animationName
PASS getComputedStyle(element).webkitAnimationName
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-animation-name" to "foo"
PASS element.style.animationName
PASS element.style.webkitAnimationName
PASS element.style.getPropertyValue("animation-name")
PASS element.style.getPropertyValue("-webkit-animation-name")
PASS element.style.getPropertyCSSValue("animation-name")
PASS element.style.getPropertyCSSValue("-webkit-animation-name")
PASS getComputedStyle(element).animationName
PASS getComputedStyle(element).webkitAnimationName
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "animation-duration" to "1s"
PASS element.style.animationDuration
PASS element.style.webkitAnimationDuration
PASS element.style.getPropertyValue("animation-duration")
PASS element.style.getPropertyValue("-webkit-animation-duration")
PASS element.style.getPropertyCSSValue("animation-duration")
PASS element.style.getPropertyCSSValue("-webkit-animation-duration")
PASS getComputedStyle(element).animationDuration
PASS getComputedStyle(element).webkitAnimationDuration
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-animation-duration" to "1s"
PASS element.style.animationDuration
PASS element.style.webkitAnimationDuration
PASS element.style.getPropertyValue("animation-duration")
PASS element.style.getPropertyValue("-webkit-animation-duration")
PASS element.style.getPropertyCSSValue("animation-duration")
PASS element.style.getPropertyCSSValue("-webkit-animation-duration")
PASS getComputedStyle(element).animationDuration
PASS getComputedStyle(element).webkitAnimationDuration
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "animation-timing-function" to "linear"
PASS element.style.animationTimingFunction
PASS element.style.webkitAnimationTimingFunction
PASS element.style.getPropertyValue("animation-timing-function")
PASS element.style.getPropertyValue("-webkit-animation-timing-function")
PASS element.style.getPropertyCSSValue("animation-timing-function")
PASS element.style.getPropertyCSSValue("-webkit-animation-timing-function")
PASS getComputedStyle(element).animationTimingFunction
PASS getComputedStyle(element).webkitAnimationTimingFunction
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-animation-timing-function" to "linear"
PASS element.style.animationTimingFunction
PASS element.style.webkitAnimationTimingFunction
PASS element.style.getPropertyValue("animation-timing-function")
PASS element.style.getPropertyValue("-webkit-animation-timing-function")
PASS element.style.getPropertyCSSValue("animation-timing-function")
PASS element.style.getPropertyCSSValue("-webkit-animation-timing-function")
PASS getComputedStyle(element).animationTimingFunction
PASS getComputedStyle(element).webkitAnimationTimingFunction
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "animation-iteration-count" to "5"
PASS element.style.animationIterationCount
PASS element.style.webkitAnimationIterationCount
PASS element.style.getPropertyValue("animation-iteration-count")
PASS element.style.getPropertyValue("-webkit-animation-iteration-count")
PASS element.style.getPropertyCSSValue("animation-iteration-count")
PASS element.style.getPropertyCSSValue("-webkit-animation-iteration-count")
PASS getComputedStyle(element).animationIterationCount
PASS getComputedStyle(element).webkitAnimationIterationCount
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-animation-iteration-count" to "5"
PASS element.style.animationIterationCount
PASS element.style.webkitAnimationIterationCount
PASS element.style.getPropertyValue("animation-iteration-count")
PASS element.style.getPropertyValue("-webkit-animation-iteration-count")
PASS element.style.getPropertyCSSValue("animation-iteration-count")
PASS element.style.getPropertyCSSValue("-webkit-animation-iteration-count")
PASS getComputedStyle(element).animationIterationCount
PASS getComputedStyle(element).webkitAnimationIterationCount
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "animation-direction" to "reverse"
PASS element.style.animationDirection
PASS element.style.webkitAnimationDirection
PASS element.style.getPropertyValue("animation-direction")
PASS element.style.getPropertyValue("-webkit-animation-direction")
PASS element.style.getPropertyCSSValue("animation-direction")
PASS element.style.getPropertyCSSValue("-webkit-animation-direction")
PASS getComputedStyle(element).animationDirection
PASS getComputedStyle(element).webkitAnimationDirection
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-animation-direction" to "reverse"
PASS element.style.animationDirection
PASS element.style.webkitAnimationDirection
PASS element.style.getPropertyValue("animation-direction")
PASS element.style.getPropertyValue("-webkit-animation-direction")
PASS element.style.getPropertyCSSValue("animation-direction")
PASS element.style.getPropertyCSSValue("-webkit-animation-direction")
PASS getComputedStyle(element).animationDirection
PASS getComputedStyle(element).webkitAnimationDirection
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "animation-play-state" to "paused"
PASS element.style.animationPlayState
PASS element.style.webkitAnimationPlayState
PASS element.style.getPropertyValue("animation-play-state")
PASS element.style.getPropertyValue("-webkit-animation-play-state")
PASS element.style.getPropertyCSSValue("animation-play-state")
PASS element.style.getPropertyCSSValue("-webkit-animation-play-state")
PASS getComputedStyle(element).animationPlayState
PASS getComputedStyle(element).webkitAnimationPlayState
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-animation-play-state" to "paused"
PASS element.style.animationPlayState
PASS element.style.webkitAnimationPlayState
PASS element.style.getPropertyValue("animation-play-state")
PASS element.style.getPropertyValue("-webkit-animation-play-state")
PASS element.style.getPropertyCSSValue("animation-play-state")
PASS element.style.getPropertyCSSValue("-webkit-animation-play-state")
PASS getComputedStyle(element).animationPlayState
PASS getComputedStyle(element).webkitAnimationPlayState
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "animation-delay" to "0.5s"
PASS element.style.animationDelay
PASS element.style.webkitAnimationDelay
PASS element.style.getPropertyValue("animation-delay")
PASS element.style.getPropertyValue("-webkit-animation-delay")
PASS element.style.getPropertyCSSValue("animation-delay")
PASS element.style.getPropertyCSSValue("-webkit-animation-delay")
PASS getComputedStyle(element).animationDelay
PASS getComputedStyle(element).webkitAnimationDelay
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-animation-delay" to "0.5s"
PASS element.style.animationDelay
PASS element.style.webkitAnimationDelay
PASS element.style.getPropertyValue("animation-delay")
PASS element.style.getPropertyValue("-webkit-animation-delay")
PASS element.style.getPropertyCSSValue("animation-delay")
PASS element.style.getPropertyCSSValue("-webkit-animation-delay")
PASS getComputedStyle(element).animationDelay
PASS getComputedStyle(element).webkitAnimationDelay
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "animation-fill-mode" to "forwards"
PASS element.style.animationFillMode
PASS element.style.webkitAnimationFillMode
PASS element.style.getPropertyValue("animation-fill-mode")
PASS element.style.getPropertyValue("-webkit-animation-fill-mode")
PASS element.style.getPropertyCSSValue("animation-fill-mode")
PASS element.style.getPropertyCSSValue("-webkit-animation-fill-mode")
PASS getComputedStyle(element).animationFillMode
PASS getComputedStyle(element).webkitAnimationFillMode
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
Setting "-webkit-animation-fill-mode" to "forwards"
PASS element.style.animationFillMode
PASS element.style.webkitAnimationFillMode
PASS element.style.getPropertyValue("animation-fill-mode")
PASS element.style.getPropertyValue("-webkit-animation-fill-mode")
PASS element.style.getPropertyCSSValue("animation-fill-mode")
PASS element.style.getPropertyCSSValue("-webkit-animation-fill-mode")
PASS getComputedStyle(element).animationFillMode
PASS getComputedStyle(element).webkitAnimationFillMode
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")
Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569 https://bugs.webkit.org/show_bug.cgi?id=160474 <rdar://problem/27668170> Reviewed by Simon Fraser. The fixes are behaviour we want. They just caused a regression on medium.com (reverted in http://trac.webkit.org/r203380). Now that we've branched, revert the reversion (which itself was a reversion), so we can fix the actual bug: https://bugs.webkit.org/show_bug.cgi?id=160478 Source/WebCore: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): (WebCore::CSSParser::parseTransitionShorthand): * 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::StyleProperties::asText): (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): 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: Canonical link: https://commits.webkit.org/178614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-02 23:43:30 +00:00
PASS element.style.cssText
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
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. 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: Canonical link: https://commits.webkit.org/180012@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-12 15:50:17 +00:00
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
Correctly handle prefixed and unprefixed variants in CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=157569 <rdar://problem/26223115> Patch by Antoine Quint <graouts@apple.com> on 2016-05-12 Reviewed by Dean Jackson. Source/WebCore: Tests: fast/css/prefixed-unprefixed-variant-style-declaration.html fast/css/shorthand-omitted-initial-value-overrides-shorthand.html We essentially revert the code added with https://bugs.webkit.org/show_bug.cgi?id=110011 which duplicated properties that had a prefixed or unprefixed variant. What we do now is to return the value of the prefixed or unprefixed variant through a CSSStyleDeclaration, but only return the properties specified by the author when reading from the `cssText` property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted. * css/CSSParser.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. * css/CSSPropertyNames.in: Treat transition properties as we do animation properties. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Make these two methods call into the matching getXXXInternal() variant instead of going through the property set directly so that they would correctly pick up on the prefixed or unprefixed variant should there be one when the specified property is not specified directly. (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): We used to simply return the value for the given property from the property set, which we still do but now also check if there is prefixed or unprefixed variant for the provided property in case it was absent. * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::removeShorthandProperty): Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. (WebCore::StyleProperties::asText): Drive-by fix to also handle the animation-play-state and -webkit-animation-play-state properties when serializing to the shorthand. (WebCore::MutableStyleProperties::removeProperty): Deleted. (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted. (WebCore::MutableStyleProperties::setProperty): Deleted. (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted. (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted. (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted. * css/StyleProperties.h: Remove all code adding duplicated properties for the prefixed or unprefixed variant of properties that exist in both forms. LayoutTests: * animations/fill-mode-forwards-zero-duration.html: * animations/play-state-start-paused.html: These two tests incorrectly expected a shorthand property not to reset longhand properties that it covers to their initial values even if left out of the shorthand. * animations/unprefixed-properties-expected.txt: * animations/unprefixed-properties.html: This test incorrectly expected that setting an unprefixed property only would lead to reading the prefixed property through the CSSOM return the empty string, rather than the value set on the unprefixed property. * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt: Added. * fast/css/prefixed-unprefixed-variant-style-declaration.html: Added. New test checking that setting one of two of a property's unprefixed and prefixed variants correctly allows to read the style through the CSS OM for both variants, while only serializing the property that was set through cssText. * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: Added. * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: Added. New test checking that setting a longhand property and then the shorthand for that longhand correctly resets the initial values, even if they were omitted in the shorthand. Canonical link: https://commits.webkit.org/175753@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-12 12:47:21 +00:00
PASS successfullyParsed is true
TEST COMPLETE