Changeset 203380 in webkit


Ignore:
Timestamp:
Jul 18, 2016 4:39:38 PM (8 years ago)
Author:
dino@apple.com
Message:

REGRESSION (r202950): Image zoom animations are broken at medium.com (159861)
https://bugs.webkit.org/show_bug.cgi?id=159906
<rdar://problem/27391725>

Reviewed by Simon Fraser.

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

Revert them both until we have better testing.

Source/WebCore:

  • css/CSSParser.cpp:

(WebCore::CSSParser::addPropertyWithPrefixingVariant):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand): Deleted.

  • css/CSSPropertyNames.in:
  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):

  • css/StyleProperties.cpp:

(WebCore::MutableStyleProperties::removeShorthandProperty):
(WebCore::MutableStyleProperties::removeProperty):
(WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty):
(WebCore::MutableStyleProperties::setProperty):
(WebCore::getIndexInShorthandVectorForPrefixingVariant):
(WebCore::MutableStyleProperties::appendPrefixingVariantProperty):
(WebCore::MutableStyleProperties::setPrefixingVariantProperty):
(WebCore::StyleProperties::asText): Deleted.

  • css/StyleProperties.h:

LayoutTests:

  • animations/fill-mode-forwards-zero-duration.html:
  • animations/play-state-start-paused.html:
  • animations/script-tests/spring-parsing.js:

(testSpring):

  • animations/spring-parsing-expected.txt:
  • animations/unprefixed-properties-expected.txt:
  • animations/unprefixed-properties.html:
  • fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
  • fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt:
Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r203379 r203380  
     12016-07-18  Dean Jackson  <dino@apple.com>
     2
     3        REGRESSION (r202950): Image zoom animations are broken at medium.com (159861)
     4        https://bugs.webkit.org/show_bug.cgi?id=159906
     5        <rdar://problem/27391725>
     6
     7        Reviewed by Simon Fraser.
     8
     9        The fix for webkit.org/b/157569 in r200769 broke AMP pages.
     10        The followup fix for webkit.org/b/159450 in r202950 broke Medium pages.
     11
     12        Revert them both until we have better testing.
     13
     14        * animations/fill-mode-forwards-zero-duration.html:
     15        * animations/play-state-start-paused.html:
     16        * animations/script-tests/spring-parsing.js:
     17        (testSpring):
     18        * animations/spring-parsing-expected.txt:
     19        * animations/unprefixed-properties-expected.txt:
     20        * animations/unprefixed-properties.html:
     21        * fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
     22        * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt:
     23
    1242016-07-18  Andreas Kling  <akling@apple.com>
    225
  • trunk/LayoutTests/animations/fill-mode-forwards-zero-duration.html

    r200769 r203380  
    1010      width: 100px;
    1111      background-color: blue;
    12       animation: anim1 0 2s linear forwards;
     12      animation-fill-mode: forwards;
     13      animation: anim1 0 2s linear;
    1314    }
    1415    @keyframes anim1 {
  • trunk/LayoutTests/animations/play-state-start-paused.html

    r200769 r203380  
    1414            height: 100px;
    1515            background-color: green;
     16            animation-delay: -0.5s;
     17            animation-play-state: paused;
    1618        }
    1719       
     
    2224       
    2325        .mover {
    24             animation: move 1s linear -0.5s paused;
     26            animation: move 1s linear;
    2527        }
    2628       
    2729        .slider {
    28             animation: slide 1s linear -0.5s paused;
     30            animation: slide 1s linear;
    2931        }
    3032       
  • trunk/LayoutTests/animations/script-tests/spring-parsing.js

    r201781 r203380  
    3030    }
    3131
    32     shouldBe("declaration.length", "1");
     32    shouldBe("declaration.length", "2");
    3333    shouldBe("declaration.getPropertyValue('transition-timing-function')", "'" + expectedValue + "'");
    3434
  • trunk/LayoutTests/animations/spring-parsing-expected.txt

    r201759 r203380  
    1010Basic : spring(1 100 10 0)
    1111PASS cssRule.type is 1
    12 PASS declaration.length is 1
     12PASS declaration.length is 2
    1313PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 100 10 0)'
    1414PASS propertyValue.cssText is 'spring(1 100 10 0)'
     
    1616Negative Velocity : spring(1 100 10 -10)
    1717PASS cssRule.type is 1
    18 PASS declaration.length is 1
     18PASS declaration.length is 2
    1919PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 100 10 -10)'
    2020PASS propertyValue.cssText is 'spring(1 100 10 -10)'
     
    2222Positive Velocity : spring(1 100 10 10)
    2323PASS cssRule.type is 1
    24 PASS declaration.length is 1
     24PASS declaration.length is 2
    2525PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 100 10 10)'
    2626PASS propertyValue.cssText is 'spring(1 100 10 10)'
     
    2828Zero Damping : spring(1 100 0 10)
    2929PASS cssRule.type is 1
    30 PASS declaration.length is 1
     30PASS declaration.length is 2
    3131PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 100 0 10)'
    3232PASS propertyValue.cssText is 'spring(1 100 0 10)'
     
    3434Minimum Values : spring(1 1 0 -999999)
    3535PASS cssRule.type is 1
    36 PASS declaration.length is 1
     36PASS declaration.length is 2
    3737PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1 1 0 -999999)'
    3838PASS propertyValue.cssText is 'spring(1 1 0 -999999)'
     
    4040Floating Point Values : spring(1.5 2.3 3.7 -1.8)
    4141PASS cssRule.type is 1
    42 PASS declaration.length is 1
     42PASS declaration.length is 2
    4343PASS declaration.getPropertyValue('transition-timing-function') is 'spring(1.5 2.3 3.7 -1.8)'
    4444PASS propertyValue.cssText is 'spring(1.5 2.3 3.7 -1.8)'
  • trunk/LayoutTests/animations/unprefixed-properties-expected.txt

    r200769 r203380  
    77Parsing - Basic animation-name : waldo
    88PASS cssRule.type is 1
    9 PASS declaration.length is 1
     9PASS declaration.length is 2
    1010PASS declaration.getPropertyValue('animation-name') is 'waldo'
    1111PASS declaration.getPropertyValue('-webkit-animation-name') is 'waldo'
     
    1313Parsing - Multiple animation-names : waldo, wally
    1414PASS cssRule.type is 1
    15 PASS declaration.length is 1
     15PASS declaration.length is 2
    1616PASS declaration.getPropertyValue('animation-name') is 'waldo, wally'
    1717PASS declaration.getPropertyValue('-webkit-animation-name') is 'waldo, wally'
     
    2121Parsing - Basic animation-duration : 5s
    2222PASS cssRule.type is 1
    23 PASS declaration.length is 1
     23PASS declaration.length is 2
    2424PASS declaration.getPropertyValue('animation-duration') is '5s'
    2525PASS declaration.getPropertyValue('-webkit-animation-duration') is '5s'
     
    2727Parsing - Multiple animation-durations : 10s, 20ms
    2828PASS cssRule.type is 1
    29 PASS declaration.length is 1
     29PASS declaration.length is 2
    3030PASS declaration.getPropertyValue('animation-duration') is '10s, 20ms'
    3131PASS declaration.getPropertyValue('-webkit-animation-duration') is '10s, 20ms'
     
    3535Parsing - Basic animation-delay : 5s
    3636PASS cssRule.type is 1
    37 PASS declaration.length is 1
     37PASS declaration.length is 2
    3838PASS declaration.getPropertyValue('animation-delay') is '5s'
    3939PASS declaration.getPropertyValue('-webkit-animation-delay') is '5s'
     
    4141Parsing - Multiple animation-delays : 10s, 20ms
    4242PASS cssRule.type is 1
    43 PASS declaration.length is 1
     43PASS declaration.length is 2
    4444PASS declaration.getPropertyValue('animation-delay') is '10s, 20ms'
    4545PASS declaration.getPropertyValue('-webkit-animation-delay') is '10s, 20ms'
     
    4949Parsing - Basic animation-timing-function : ease-in-out
    5050PASS cssRule.type is 1
    51 PASS declaration.length is 1
     51PASS declaration.length is 2
    5252PASS declaration.getPropertyValue('animation-timing-function') is 'ease-in-out'
    5353PASS declaration.getPropertyValue('-webkit-animation-timing-function') is 'ease-in-out'
     
    5555Parsing - animation-timing-function with bezier : cubic-bezier(0.2, 0.3, 0.4, 0.5)
    5656PASS cssRule.type is 1
    57 PASS declaration.length is 1
     57PASS declaration.length is 2
    5858PASS declaration.getPropertyValue('animation-timing-function') is 'cubic-bezier(0.2, 0.3, 0.4, 0.5)'
    5959PASS declaration.getPropertyValue('-webkit-animation-timing-function') is 'cubic-bezier(0.2, 0.3, 0.4, 0.5)'
     
    6161Parsing - Multiple animation-timing-functions : ease-in, ease-out
    6262PASS cssRule.type is 1
    63 PASS declaration.length is 1
     63PASS declaration.length is 2
    6464PASS declaration.getPropertyValue('animation-timing-function') is 'ease-in, ease-out'
    6565PASS declaration.getPropertyValue('-webkit-animation-timing-function') is 'ease-in, ease-out'
     
    6969Parsing - Basic animation-iteration-count : 4
    7070PASS cssRule.type is 1
    71 PASS declaration.length is 1
     71PASS declaration.length is 2
    7272PASS declaration.getPropertyValue('animation-iteration-count') is '4'
    7373PASS declaration.getPropertyValue('-webkit-animation-iteration-count') is '4'
     
    7575Parsing - animation-iteration-count with keyword : infinite
    7676PASS cssRule.type is 1
    77 PASS declaration.length is 1
     77PASS declaration.length is 2
    7878PASS declaration.getPropertyValue('animation-iteration-count') is 'infinite'
    7979PASS declaration.getPropertyValue('-webkit-animation-iteration-count') is 'infinite'
     
    8181Parsing - Multiple animation-iteration-counts : 2, infinite, 4
    8282PASS cssRule.type is 1
    83 PASS declaration.length is 1
     83PASS declaration.length is 2
    8484PASS declaration.getPropertyValue('animation-iteration-count') is '2, infinite, 4'
    8585PASS declaration.getPropertyValue('-webkit-animation-iteration-count') is '2, infinite, 4'
     
    9090Parsing - Normal animation-direction : normal
    9191PASS cssRule.type is 1
    92 PASS declaration.length is 1
     92PASS declaration.length is 2
    9393PASS declaration.getPropertyValue('animation-direction') is 'normal'
    9494PASS declaration.getPropertyValue('-webkit-animation-direction') is 'normal'
     
    9696Parsing - Alternate animation-direction : alternate
    9797PASS cssRule.type is 1
    98 PASS declaration.length is 1
     98PASS declaration.length is 2
    9999PASS declaration.getPropertyValue('animation-direction') is 'alternate'
    100100PASS declaration.getPropertyValue('-webkit-animation-direction') is 'alternate'
     
    102102Parsing - Reverse animation-direction : reverse
    103103PASS cssRule.type is 1
    104 PASS declaration.length is 1
     104PASS declaration.length is 2
    105105PASS declaration.getPropertyValue('animation-direction') is 'reverse'
    106106PASS declaration.getPropertyValue('-webkit-animation-direction') is 'reverse'
     
    108108Parsing - Alternate Reverse animation-direction : alternate-reverse
    109109PASS cssRule.type is 1
    110 PASS declaration.length is 1
     110PASS declaration.length is 2
    111111PASS declaration.getPropertyValue('animation-direction') is 'alternate-reverse'
    112112PASS declaration.getPropertyValue('-webkit-animation-direction') is 'alternate-reverse'
     
    114114Parsing - Multiple animation-directions : alternate, alternate, normal
    115115PASS cssRule.type is 1
    116 PASS declaration.length is 1
     116PASS declaration.length is 2
    117117PASS declaration.getPropertyValue('animation-direction') is 'alternate, alternate, normal'
    118118PASS declaration.getPropertyValue('-webkit-animation-direction') is 'alternate, alternate, normal'
     
    123123Parsing - None animation-fill-mode : none
    124124PASS cssRule.type is 1
    125 PASS declaration.length is 1
     125PASS declaration.length is 2
    126126PASS declaration.getPropertyValue('animation-fill-mode') is 'none'
    127127PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'none'
     
    129129Parsing - Forwards animation-fill-mode : forwards
    130130PASS cssRule.type is 1
    131 PASS declaration.length is 1
     131PASS declaration.length is 2
    132132PASS declaration.getPropertyValue('animation-fill-mode') is 'forwards'
    133133PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'forwards'
     
    135135Parsing - Backwards animation-fill-mode : backwards
    136136PASS cssRule.type is 1
    137 PASS declaration.length is 1
     137PASS declaration.length is 2
    138138PASS declaration.getPropertyValue('animation-fill-mode') is 'backwards'
    139139PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'backwards'
     
    141141Parsing - Both animation-fill-mode : both
    142142PASS cssRule.type is 1
    143 PASS declaration.length is 1
     143PASS declaration.length is 2
    144144PASS declaration.getPropertyValue('animation-fill-mode') is 'both'
    145145PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'both'
     
    147147Parsing - Multiple animation-fill-modes : none, forwards, backwards, both
    148148PASS cssRule.type is 1
    149 PASS declaration.length is 1
     149PASS declaration.length is 2
    150150PASS declaration.getPropertyValue('animation-fill-mode') is 'none, forwards, backwards, both'
    151151PASS declaration.getPropertyValue('-webkit-animation-fill-mode') is 'none, forwards, backwards, both'
  • trunk/LayoutTests/animations/unprefixed-properties.html

    r200769 r203380  
    2828
    2929    declaration = cssRule.style;
    30     shouldBe("declaration.length", "1");
     30    shouldBe("declaration.length", "2"); // We set both the prefixed and unprefixed version.
    3131    shouldBe("declaration.getPropertyValue('" + property + "')", "'" + value + "'");
    3232    shouldBe("declaration.getPropertyValue('-webkit-" + property + "')", "'" + value + "'");
  • trunk/LayoutTests/fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt

    r200769 r203380  
    1717PASS getComputedStyle(element).getPropertyCSSValue("transition-property")
    1818PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-property")
    19 PASS element.style.cssText
     19FAIL expected element.style.cssText to be "transition-property: width;" but got "transition-property: width; -webkit-transition-property: width;"
    2020
    2121Setting "-webkit-transition-property" to "width"
     
    3232PASS getComputedStyle(element).getPropertyCSSValue("transition-property")
    3333PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-property")
    34 PASS element.style.cssText
     34FAIL expected element.style.cssText to be "-webkit-transition-property: width;" but got "-webkit-transition-property: width; transition-property: width;"
    3535
    3636Setting "transition-duration" to "1s"
     
    4747PASS getComputedStyle(element).getPropertyCSSValue("transition-duration")
    4848PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-duration")
    49 PASS element.style.cssText
     49FAIL expected element.style.cssText to be "transition-duration: 1s;" but got "transition-duration: 1s; -webkit-transition-duration: 1s;"
    5050
    5151Setting "-webkit-transition-duration" to "1s"
     
    6262PASS getComputedStyle(element).getPropertyCSSValue("transition-duration")
    6363PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-duration")
    64 PASS element.style.cssText
     64FAIL expected element.style.cssText to be "-webkit-transition-duration: 1s;" but got "-webkit-transition-duration: 1s; transition-duration: 1s;"
    6565
    6666Setting "transition-timing-function" to "linear"
     
    7777PASS getComputedStyle(element).getPropertyCSSValue("transition-timing-function")
    7878PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-timing-function")
    79 PASS element.style.cssText
     79FAIL expected element.style.cssText to be "transition-timing-function: linear;" but got "transition-timing-function: linear; -webkit-transition-timing-function: linear;"
    8080
    8181Setting "-webkit-transition-timing-function" to "linear"
     
    9292PASS getComputedStyle(element).getPropertyCSSValue("transition-timing-function")
    9393PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-timing-function")
    94 PASS element.style.cssText
     94FAIL expected element.style.cssText to be "-webkit-transition-timing-function: linear;" but got "-webkit-transition-timing-function: linear; transition-timing-function: linear;"
    9595
    9696Setting "transition-delay" to "0.5s"
     
    107107PASS getComputedStyle(element).getPropertyCSSValue("transition-delay")
    108108PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-delay")
    109 PASS element.style.cssText
     109FAIL expected element.style.cssText to be "transition-delay: 0.5s;" but got "transition-delay: 0.5s; -webkit-transition-delay: 0.5s;"
    110110
    111111Setting "-webkit-transition-delay" to "0.5s"
     
    122122PASS getComputedStyle(element).getPropertyCSSValue("transition-delay")
    123123PASS getComputedStyle(element).getPropertyCSSValue("-webkit-transition-delay")
    124 PASS element.style.cssText
     124FAIL expected element.style.cssText to be "-webkit-transition-delay: 0.5s;" but got "-webkit-transition-delay: 0.5s; transition-delay: 0.5s;"
    125125
    126126Setting "animation-name" to "foo"
     
    137137PASS getComputedStyle(element).getPropertyCSSValue("animation-name")
    138138PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-name")
    139 PASS element.style.cssText
     139FAIL expected element.style.cssText to be "animation-name: foo;" but got "animation-name: foo; -webkit-animation-name: foo;"
    140140
    141141Setting "-webkit-animation-name" to "foo"
     
    152152PASS getComputedStyle(element).getPropertyCSSValue("animation-name")
    153153PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-name")
    154 PASS element.style.cssText
     154FAIL expected element.style.cssText to be "-webkit-animation-name: foo;" but got "-webkit-animation-name: foo; animation-name: foo;"
    155155
    156156Setting "animation-duration" to "1s"
     
    167167PASS getComputedStyle(element).getPropertyCSSValue("animation-duration")
    168168PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-duration")
    169 PASS element.style.cssText
     169FAIL expected element.style.cssText to be "animation-duration: 1s;" but got "animation-duration: 1s; -webkit-animation-duration: 1s;"
    170170
    171171Setting "-webkit-animation-duration" to "1s"
     
    182182PASS getComputedStyle(element).getPropertyCSSValue("animation-duration")
    183183PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-duration")
    184 PASS element.style.cssText
     184FAIL expected element.style.cssText to be "-webkit-animation-duration: 1s;" but got "-webkit-animation-duration: 1s; animation-duration: 1s;"
    185185
    186186Setting "animation-timing-function" to "linear"
     
    197197PASS getComputedStyle(element).getPropertyCSSValue("animation-timing-function")
    198198PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-timing-function")
    199 PASS element.style.cssText
     199FAIL expected element.style.cssText to be "animation-timing-function: linear;" but got "animation-timing-function: linear; -webkit-animation-timing-function: linear;"
    200200
    201201Setting "-webkit-animation-timing-function" to "linear"
     
    212212PASS getComputedStyle(element).getPropertyCSSValue("animation-timing-function")
    213213PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-timing-function")
    214 PASS element.style.cssText
     214FAIL expected element.style.cssText to be "-webkit-animation-timing-function: linear;" but got "-webkit-animation-timing-function: linear; animation-timing-function: linear;"
    215215
    216216Setting "animation-iteration-count" to "5"
     
    227227PASS getComputedStyle(element).getPropertyCSSValue("animation-iteration-count")
    228228PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-iteration-count")
    229 PASS element.style.cssText
     229FAIL expected element.style.cssText to be "animation-iteration-count: 5;" but got "animation-iteration-count: 5; -webkit-animation-iteration-count: 5;"
    230230
    231231Setting "-webkit-animation-iteration-count" to "5"
     
    242242PASS getComputedStyle(element).getPropertyCSSValue("animation-iteration-count")
    243243PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-iteration-count")
    244 PASS element.style.cssText
     244FAIL expected element.style.cssText to be "-webkit-animation-iteration-count: 5;" but got "-webkit-animation-iteration-count: 5; animation-iteration-count: 5;"
    245245
    246246Setting "animation-direction" to "reverse"
     
    257257PASS getComputedStyle(element).getPropertyCSSValue("animation-direction")
    258258PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-direction")
    259 PASS element.style.cssText
     259FAIL expected element.style.cssText to be "animation-direction: reverse;" but got "animation-direction: reverse; -webkit-animation-direction: reverse;"
    260260
    261261Setting "-webkit-animation-direction" to "reverse"
     
    272272PASS getComputedStyle(element).getPropertyCSSValue("animation-direction")
    273273PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-direction")
    274 PASS element.style.cssText
     274FAIL expected element.style.cssText to be "-webkit-animation-direction: reverse;" but got "-webkit-animation-direction: reverse; animation-direction: reverse;"
    275275
    276276Setting "animation-play-state" to "paused"
     
    287287PASS getComputedStyle(element).getPropertyCSSValue("animation-play-state")
    288288PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-play-state")
    289 PASS element.style.cssText
     289FAIL expected element.style.cssText to be "animation-play-state: paused;" but got "animation-play-state: paused; -webkit-animation-play-state: paused;"
    290290
    291291Setting "-webkit-animation-play-state" to "paused"
     
    302302PASS getComputedStyle(element).getPropertyCSSValue("animation-play-state")
    303303PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-play-state")
    304 PASS element.style.cssText
     304FAIL expected element.style.cssText to be "-webkit-animation-play-state: paused;" but got "-webkit-animation-play-state: paused; animation-play-state: paused;"
    305305
    306306Setting "animation-delay" to "0.5s"
     
    317317PASS getComputedStyle(element).getPropertyCSSValue("animation-delay")
    318318PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-delay")
    319 PASS element.style.cssText
     319FAIL expected element.style.cssText to be "animation-delay: 0.5s;" but got "animation-delay: 0.5s; -webkit-animation-delay: 0.5s;"
    320320
    321321Setting "-webkit-animation-delay" to "0.5s"
     
    332332PASS getComputedStyle(element).getPropertyCSSValue("animation-delay")
    333333PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-delay")
    334 PASS element.style.cssText
     334FAIL expected element.style.cssText to be "-webkit-animation-delay: 0.5s;" but got "-webkit-animation-delay: 0.5s; animation-delay: 0.5s;"
    335335
    336336Setting "animation-fill-mode" to "forwards"
     
    347347PASS getComputedStyle(element).getPropertyCSSValue("animation-fill-mode")
    348348PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-fill-mode")
    349 PASS element.style.cssText
     349FAIL expected element.style.cssText to be "animation-fill-mode: forwards;" but got "animation-fill-mode: forwards; -webkit-animation-fill-mode: forwards;"
    350350
    351351Setting "-webkit-animation-fill-mode" to "forwards"
     
    362362PASS getComputedStyle(element).getPropertyCSSValue("animation-fill-mode")
    363363PASS getComputedStyle(element).getPropertyCSSValue("-webkit-animation-fill-mode")
    364 PASS element.style.cssText
     364FAIL expected element.style.cssText to be "-webkit-animation-fill-mode: forwards;" but got "-webkit-animation-fill-mode: forwards; animation-fill-mode: forwards;"
    365365
    366366PASS successfullyParsed is true
  • trunk/LayoutTests/fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt

    r202950 r203380  
    1717
    1818Animation properties
    19 PASS animation-name
    20 PASS animation-duration
    21 PASS animation-timing-function
    22 PASS animation-iteration-count
    23 PASS animation-direction
    24 PASS animation-play-state
    25 PASS animation-delay
    26 PASS animation-fill-mode
     19FAIL expected that setting "animation-name: foo; animation: 1s;" would compute animation-name to "none" but got "foo"
     20FAIL expected that setting "animation-duration: 1s; animation: none;" would compute animation-duration to "0s" but got "1s"
     21FAIL expected that setting "animation-timing-function: linear; animation: none;" would compute animation-timing-function to "ease" but got "linear"
     22FAIL expected that setting "animation-iteration-count: 5; animation: none;" would compute animation-iteration-count to "1" but got "5"
     23FAIL expected that setting "animation-direction: reverse; animation: none;" would compute animation-direction to "normal" but got "reverse"
     24FAIL expected that setting "animation-play-state: paused; animation: none;" would compute animation-play-state to "running" but got "paused"
     25FAIL expected that setting "animation-delay: 1s; animation: none;" would compute animation-delay to "0s" but got "1s"
     26FAIL expected that setting "animation-fill-mode: forwards; animation: none;" would compute animation-fill-mode to "none" but got "forwards"
    2727
    2828Prefixed animation properties
    2929PASS -webkit-animation-name
    30 PASS animation-name
     30FAIL expected that setting "-webkit-animation-name: foo; animation: none;" would compute animation-name to "none" but got "foo"
    3131PASS -webkit-animation-name
    32 PASS animation-name
     32FAIL expected that setting "animation-name: foo; animation: none;" would compute animation-name to "none" but got "foo"
    3333
    3434PASS successfullyParsed is true
  • trunk/Source/WebCore/ChangeLog

    r203379 r203380  
     12016-07-18  Dean Jackson  <dino@apple.com>
     2
     3        REGRESSION (r202950): Image zoom animations are broken at medium.com (159861)
     4        https://bugs.webkit.org/show_bug.cgi?id=159906
     5        <rdar://problem/27391725>
     6
     7        Reviewed by Simon Fraser.
     8
     9        The fix for webkit.org/b/157569 in r200769 broke AMP pages.
     10        The followup fix for webkit.org/b/159450 in r202950 broke Medium pages.
     11
     12        Revert them both until we have better testing.
     13
     14        * css/CSSParser.cpp:
     15        (WebCore::CSSParser::addPropertyWithPrefixingVariant):
     16        (WebCore::CSSParser::parseValue):
     17        (WebCore::CSSParser::parseAnimationShorthand):
     18        (WebCore::CSSParser::parseTransitionShorthand): Deleted.
     19        * css/CSSPropertyNames.in:
     20        * css/PropertySetCSSStyleDeclaration.cpp:
     21        (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
     22        (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
     23        (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
     24        (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
     25        * css/StyleProperties.cpp:
     26        (WebCore::MutableStyleProperties::removeShorthandProperty):
     27        (WebCore::MutableStyleProperties::removeProperty):
     28        (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty):
     29        (WebCore::MutableStyleProperties::setProperty):
     30        (WebCore::getIndexInShorthandVectorForPrefixingVariant):
     31        (WebCore::MutableStyleProperties::appendPrefixingVariantProperty):
     32        (WebCore::MutableStyleProperties::setPrefixingVariantProperty):
     33        (WebCore::StyleProperties::asText): Deleted.
     34        * css/StyleProperties.h:
     35
    1362016-07-18  Andreas Kling  <akling@apple.com>
    237
  • trunk/Source/WebCore/css/CSSParser.cpp

    r203269 r203380  
    16061606}
    16071607
     1608void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important, bool implicit)
     1609{
     1610    addProperty(propId, value.copyRef(), important, implicit);
     1611
     1612    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId);
     1613    if (prefixingVariant == propId)
     1614        return;
     1615
     1616    if (m_currentShorthand) {
     1617        // We can't use ShorthandScope here as we can already be inside one (e.g we are parsing CSSTransition).
     1618        m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);
     1619        addProperty(prefixingVariant, WTFMove(value), important, implicit);
     1620        m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);
     1621    } else
     1622        addProperty(prefixingVariant, WTFMove(value), important, implicit);
     1623}
     1624
    16081625void CSSParser::addProperty(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important, bool implicit)
    16091626{
     
    27232740        AnimationParseContext context;
    27242741        if (parseAnimationProperty(propId, val, context)) {
    2725             addProperty(propId, WTFMove(val), important);
     2742            addPropertyWithPrefixingVariant(propId, WTFMove(val), important);
    27262743            return true;
    27272744        }
     
    38173834    }
    38183835
    3819     // Fill in any remaining properties with the initial value.
    38203836    for (i = 0; i < numProperties; ++i) {
     3837        // If we didn't find the property, set an intial value.
    38213838        if (!parsedProperty[i])
    38223839            addAnimationValue(values[i], cssValuePool.createImplicitInitialValue());
    3823     }
    3824 
    3825     // Now add all of the properties we found.
    3826     // In this case we have to explicitly set the variant form as well,
    3827     // to make sure that a shorthand clears all existing prefixed and
    3828     // unprefixed values.
    3829     for (i = 0; i < numProperties; ++i)
    3830         addPropertyWithPrefixingVariant(shorthand.properties()[i], WTFMove(values[i]), important);
     3840
     3841        addProperty(shorthand.properties()[i], WTFMove(values[i]), important);
     3842    }
    38313843
    38323844    return true;
    38333845}
    3834 
    3835 void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important, bool implicit)
    3836 {
    3837     addProperty(propId, value.copyRef(), important, implicit);
    3838 
    3839     CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId);
    3840     if (prefixingVariant == propId)
    3841         return;
    3842 
    3843     if (m_currentShorthand) {
    3844         // We can't use ShorthandScope here as we can already be inside one (e.g we are parsing CSSTransition).
    3845         m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);
    3846         addProperty(prefixingVariant, WTFMove(value), important, implicit);
    3847         m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand);
    3848     } else
    3849         addProperty(prefixingVariant, WTFMove(value), important, implicit);
    3850 }
    3851 
    38523846
    38533847RefPtr<CSSPrimitiveValue> CSSParser::parseColumnWidth()
     
    39783972
    39793973    // Now add all of the properties we found.
    3980     // In this case we have to explicitly set the variant form as well,
    3981     // to make sure that a shorthand clears all existing prefixed and
    3982     // unprefixed values.
    39833974    for (i = 0; i < numProperties; ++i)
    39843975        addPropertyWithPrefixingVariant(shorthand.properties()[i], WTFMove(values[i]), important);
  • trunk/Source/WebCore/css/CSSPropertyNames.in

    r201666 r203380  
    349349top [Initial=initialOffset, Converter=LengthOrAuto]
    350350transition [Longhands=transition-property|transition-duration|transition-timing-function|transition-delay]
    351 transition-delay [AnimationProperty, NameForMethods=Delay]
    352 transition-duration [AnimationProperty, NameForMethods=Duration]
    353 transition-property [AnimationProperty, NameForMethods=Property]
    354 transition-timing-function [AnimationProperty, NameForMethods=TimingFunction]
     351transition-delay [SkipBuilder]
     352transition-duration [SkipBuilder]
     353transition-property [SkipBuilder]
     354transition-timing-function [SkipBuilder]
    355355
    356356unicode-bidi
  • trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp

    r203322 r203380  
    173173    if (!propertyID)
    174174        return nullptr;
    175     return cloneAndCacheForCSSOM(getPropertyCSSValueInternal(propertyID).get());
     175    return cloneAndCacheForCSSOM(m_propertySet->getPropertyCSSValue(propertyID).get());
    176176}
    177177
     
    184184    if (!propertyID)
    185185        return String();
    186     return getPropertyValueInternal(propertyID);
     186    return m_propertySet->getPropertyValue(propertyID);
    187187}
    188188
     
    266266RefPtr<CSSValue> PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal(CSSPropertyID propertyID)
    267267{
    268     RefPtr<CSSValue> value = m_propertySet->getPropertyCSSValue(propertyID);
    269     if (value)
    270         return value;
    271 
    272     CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
    273     if (prefixingVariant != propertyID)
    274         return m_propertySet->getPropertyCSSValue(prefixingVariant);
    275 
    276     return nullptr;
     268    return m_propertySet->getPropertyCSSValue(propertyID);
    277269}
    278270
    279271String PropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPropertyID propertyID)
    280 {
    281     String value = m_propertySet->getPropertyValue(propertyID);
    282     if (!value.isEmpty())
    283         return value;
    284 
    285     CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
    286     if (prefixingVariant != propertyID)
    287         return m_propertySet->getPropertyValue(prefixingVariant);
    288 
    289     return String();
     272{
     273    return m_propertySet->getPropertyValue(propertyID);
    290274}
    291275
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r203250 r203380  
    641641        return false;
    642642
    643     bool propertiesWereRemoved = removePropertiesInSet(shorthand.properties(), shorthand.length());
     643    bool ret = removePropertiesInSet(shorthand.properties(), shorthand.length());
    644644
    645645    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
    646646    if (prefixingVariant == propertyID)
    647         return propertiesWereRemoved;
     647        return ret;
    648648
    649649    StylePropertyShorthand shorthandPrefixingVariant = shorthandForProperty(prefixingVariant);
    650     bool prefixedVariantPropertiesWereRemoved = removePropertiesInSet(shorthandPrefixingVariant.properties(), shorthandPrefixingVariant.length());
    651     return propertiesWereRemoved || prefixedVariantPropertiesWereRemoved;
     650    return removePropertiesInSet(shorthandPrefixingVariant.properties(), shorthandPrefixingVariant.length());
    652651}
    653652
     
    675674    m_propertyVector.remove(foundPropertyIndex);
    676675
     676    removePrefixedOrUnprefixedProperty(propertyID);
     677
    677678    return true;
    678679}
     
    695696
    696697    return true;
     698}
     699
     700void MutableStyleProperties::removePrefixedOrUnprefixedProperty(CSSPropertyID propertyID)
     701{
     702    int foundPropertyIndex = findPropertyIndex(prefixingVariantForPropertyId(propertyID));
     703    if (foundPropertyIndex == -1)
     704        return;
     705    m_propertyVector.remove(foundPropertyIndex);
    697706}
    698707
     
    793802
    794803            *toReplace = property;
     804            setPrefixingVariantProperty(property);
    795805            return true;
    796806        }
    797807    }
    798808
     809    return appendPrefixingVariantProperty(property);
     810}
     811
     812static unsigned getIndexInShorthandVectorForPrefixingVariant(const CSSProperty& property, CSSPropertyID prefixingVariant)
     813{
     814    if (!property.isSetFromShorthand())
     815        return 0;
     816
     817    CSSPropertyID prefixedShorthand = prefixingVariantForPropertyId(property.shorthandID());
     818    return indexOfShorthandForLonghand(prefixedShorthand, matchingShorthandsForLonghand(prefixingVariant));
     819}
     820
     821bool MutableStyleProperties::appendPrefixingVariantProperty(const CSSProperty& property)
     822{
    799823    m_propertyVector.append(property);
     824    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
     825    if (prefixingVariant == property.id())
     826        return true;
     827
     828    m_propertyVector.append(CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.isSetFromShorthand(), getIndexInShorthandVectorForPrefixingVariant(property, prefixingVariant), property.metadata().m_implicit));
    800829    return true;
     830}
     831
     832void MutableStyleProperties::setPrefixingVariantProperty(const CSSProperty& property)
     833{
     834    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
     835    CSSProperty* toReplace = findCSSPropertyWithID(prefixingVariant);
     836    if (toReplace && prefixingVariant != property.id())
     837        *toReplace = CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.isSetFromShorthand(), getIndexInShorthandVectorForPrefixingVariant(property, prefixingVariant), property.metadata().m_implicit);
    801838}
    802839
     
    889926            case CSSPropertyAnimationDirection:
    890927            case CSSPropertyAnimationFillMode:
    891             case CSSPropertyAnimationPlayState:
    892928                shorthandPropertyID = CSSPropertyAnimation;
    893929                break;
     
    9891025            case CSSPropertyWebkitAnimationDirection:
    9901026            case CSSPropertyWebkitAnimationFillMode:
    991             case CSSPropertyWebkitAnimationPlayState:
    9921027                shorthandPropertyID = CSSPropertyWebkitAnimation;
    9931028                break;
  • trunk/Source/WebCore/css/StyleProperties.h

    r201113 r203380  
    208208    bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = false);
    209209    bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = false);
     210    bool appendPrefixingVariantProperty(const CSSProperty&);
     211    void setPrefixingVariantProperty(const CSSProperty&);
    210212    bool setProperty(const CSSProperty&, CSSProperty* slot = nullptr);
    211213
    212214    bool removeProperty(CSSPropertyID, String* returnText = nullptr);
     215    void removePrefixedOrUnprefixedProperty(CSSPropertyID);
    213216    void removeBlockProperties();
    214217    bool removePropertiesInSet(const CSSPropertyID* set, unsigned length);
Note: See TracChangeset for help on using the changeset viewer.