Changeset 200043 in webkit
- Timestamp:
- Apr 25, 2016 1:06:09 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r200042 r200043 1 2016-04-25 Simon Fraser <simon.fraser@apple.com> 2 3 play-state not parsed as part of animation shorthand 4 https://bugs.webkit.org/show_bug.cgi?id=156959 5 6 Reviewed by Darin Adler. 7 8 * animations/animation-shorthand-expected.txt: 9 * animations/animation-shorthand.html: 10 * animations/play-state-in-shorthand-expected.txt: Added. 11 * animations/play-state-in-shorthand.html: Added. 12 * animations/resources/animation-test-helpers.js: 13 (getPropertyValue): 14 (comparePropertyValue): 15 1 16 2016-04-25 Simon Fraser <simon.fraser@apple.com> 2 17 -
trunk/LayoutTests/animations/animation-shorthand-expected.txt
r180441 r200043 6 6 Testing webkitAnimationDirection on a: PASS 7 7 Testing webkitAnimationFillMode on a: PASS 8 Testing webkitAnimationPlayState on a: PASS 8 9 Testing webkitAnimationName on b: PASS 9 10 Testing webkitAnimationDuration on b: PASS … … 13 14 Testing webkitAnimationDirection on b: PASS 14 15 Testing webkitAnimationFillMode on b: PASS 16 Testing webkitAnimationPlayState on b: PASS 15 17 Testing webkitAnimationName on c: PASS 16 18 Testing webkitAnimationDuration on c: PASS … … 20 22 Testing webkitAnimationDirection on c: PASS 21 23 Testing webkitAnimationFillMode on c: PASS 24 Testing webkitAnimationPlayState on c: PASS 22 25 Testing webkitAnimationName on d: PASS 23 26 Testing webkitAnimationDuration on d: PASS … … 27 30 Testing webkitAnimationDirection on d: PASS 28 31 Testing webkitAnimationFillMode on d: PASS 32 Testing webkitAnimationPlayState on d: PASS 29 33 Testing webkitAnimationName on e: PASS 30 34 Testing webkitAnimationDuration on e: PASS … … 34 38 Testing webkitAnimationDirection on e: PASS 35 39 Testing webkitAnimationFillMode on e: PASS 40 Testing webkitAnimationPlayState on e: PASS 36 41 Testing webkitAnimationName on f: PASS 37 42 Testing webkitAnimationDuration on f: PASS … … 41 46 Testing webkitAnimationDirection on f: PASS 42 47 Testing webkitAnimationFillMode on f: PASS 48 Testing webkitAnimationPlayState on f: PASS 43 49 Testing webkitAnimationName on g: PASS 44 50 Testing webkitAnimationDuration on g: PASS … … 48 54 Testing webkitAnimationDirection on g: PASS 49 55 Testing webkitAnimationFillMode on g: PASS 56 Testing webkitAnimationPlayState on g: PASS 50 57 Testing webkitAnimationName on h: PASS 51 58 Testing webkitAnimationDuration on h: PASS … … 55 62 Testing webkitAnimationDirection on h: PASS 56 63 Testing webkitAnimationFillMode on h: PASS 64 Testing webkitAnimationPlayState on h: PASS 57 65 Testing webkitAnimationName on i: PASS 58 66 Testing webkitAnimationDuration on i: PASS … … 62 70 Testing webkitAnimationDirection on i: PASS 63 71 Testing webkitAnimationFillMode on i: PASS 72 Testing webkitAnimationPlayState on i: PASS 64 73 Testing webkitAnimationName on j: PASS 65 74 Testing webkitAnimationDuration on j: PASS … … 69 78 Testing webkitAnimationDirection on j: PASS 70 79 Testing webkitAnimationFillMode on j: PASS 80 Testing webkitAnimationPlayState on j: PASS 81 Testing webkitAnimationName on k: PASS 82 Testing webkitAnimationDuration on k: PASS 83 Testing webkitAnimationTimingFunction on k: PASS 84 Testing webkitAnimationDelay on k: PASS 85 Testing webkitAnimationIterationCount on k: PASS 86 Testing webkitAnimationDirection on k: PASS 87 Testing webkitAnimationFillMode on k: PASS 88 Testing webkitAnimationPlayState on k: PASS 71 89 -
trunk/LayoutTests/animations/animation-shorthand.html
r180441 r200043 35 35 } 36 36 #j { 37 -webkit-animation: anim1 10s linear infinite backwards, anim2 3s none, anim3 5s both; 37 -webkit-animation: anim1 10s ease infinite both paused; 38 } 39 #k { 40 -webkit-animation: anim1 10s linear infinite backwards, anim2 3s none paused, anim3 5s both; 38 41 } 39 42 … … 52 55 "webkitAnimationIterationCount", 53 56 "webkitAnimationDirection", 54 "webkitAnimationFillMode" 57 "webkitAnimationFillMode", 58 "webkitAnimationPlayState", 55 59 ]; 56 60 const kExpectedResults = [ 57 { id: 'a', values: [ "none", "0s", "ease", "0s", "1", "normal", "none" ] }, 58 { id: 'b', values: [ "none", "0s", "ease", "0s", "1", "normal", "none" ] }, 59 { id: 'c', values: [ "anim1", "10s", "ease", "0s", "1", "normal", "none" ] }, 60 { id: 'd', values: [ "anim1", "10s", "linear", "0s", "1", "normal", "none" ] }, 61 { id: 'e', values: [ "anim1", "10s", "linear", "5s", "1", "normal", "none" ] }, 62 { id: 'f', values: [ "anim1", "10s", "linear", "5s", "3", "normal", "none" ] }, 63 { id: 'g', values: [ "anim1", "10s", "linear", "5s", "infinite", "alternate", "none" ] }, 64 { id: 'h', values: [ "anim1", "10s", "linear", "5s", "infinite", "alternate", "forwards" ] }, 65 { id: 'i', values: [ "anim1", "10s", "linear", "0s", "1", "normal", "none" ] }, 66 { id: 'j', values: [ "anim1, anim2, anim3", "10s, 3s, 5s", "linear, ease, ease", "0s, 0s, 0s", "infinite, 1, 1", "normal, normal, normal", "backwards, none, both" ] } 61 { id: 'a', values: [ "none", "0s", "ease", "0s", "1", "normal", "none", "running" ] }, 62 { id: 'b', values: [ "none", "0s", "ease", "0s", "1", "normal", "none", "running" ] }, 63 { id: 'c', values: [ "anim1", "10s", "ease", "0s", "1", "normal", "none", "running" ] }, 64 { id: 'd', values: [ "anim1", "10s", "linear", "0s", "1", "normal", "none", "running" ] }, 65 { id: 'e', values: [ "anim1", "10s", "linear", "5s", "1", "normal", "none", "running" ] }, 66 { id: 'f', values: [ "anim1", "10s", "linear", "5s", "3", "normal", "none", "running" ] }, 67 { id: 'g', values: [ "anim1", "10s", "linear", "5s", "infinite", "alternate", "none", "running" ] }, 68 { id: 'h', values: [ "anim1", "10s", "linear", "5s", "infinite", "alternate", "forwards", "running" ] }, 69 { id: 'i', values: [ "anim1", "10s", "linear", "0s", "1", "normal", "none", "running" ] }, 70 { id: 'j', values: [ "anim1", "10s", "ease", "0s", "infinite", "normal", "both", "paused" ] }, 71 { id: 'k', values: [ "anim1, anim2, anim3", "10s, 3s, 5s", "linear, ease, ease", "0s, 0s, 0s", "infinite, 1, 1", "normal, normal, normal", "backwards, none, both", "running, paused, running" ] }, 67 72 ]; 68 73 … … 103 108 <div id="i" class="box"></div> 104 109 <div id="j" class="box"></div> 110 <div id="k" class="box"></div> 105 111 <div id="result"> 106 112 </div> -
trunk/LayoutTests/animations/resources/animation-test-helpers.js
r188647 r200043 400 400 || property == "webkitShapeInside" 401 401 || property == "webkitShapeOutside" 402 || !property.indexOf("webkitTransform")) { 402 || !property.indexOf("webkitTransform") 403 || !property.indexOf("transform")) { 403 404 computedValue = window.getComputedStyle(element)[property.split(".")[0]]; 404 405 } else { … … 414 415 var result = true; 415 416 416 if (!property.indexOf("webkitTransform") ) {417 if (!property.indexOf("webkitTransform") || !property.indexOf("transform")) { 417 418 if (typeof expectedValue == "string") 418 419 result = (computedValue == expectedValue); -
trunk/Source/WebCore/ChangeLog
r200042 r200043 1 2016-04-25 Simon Fraser <simon.fraser@apple.com> 2 3 play-state not parsed as part of animation shorthand 4 https://bugs.webkit.org/show_bug.cgi?id=156959 5 6 Reviewed by Darin Adler. 7 8 We failed to parse animation-play-state as part of the animation shorthand, contrary 9 to the spec and other browsers. 10 11 Fix for both the prefixed and unprefixed properties. There is some compat risk here, 12 but only changing unprefixed behavior will probably lead to more author confusion. 13 14 Test: animations/play-state-in-shorthand.html 15 16 * css/CSSParser.cpp: 17 (WebCore::CSSParser::parseAnimationShorthand): 18 * css/CSSPropertyNames.in: 19 * css/StylePropertyShorthand.cpp: 20 (WebCore::animationShorthandForParsing): Remove the long comment which is no longer relevant 21 now that the behavior has been written into the spec. 22 1 23 2016-04-25 Simon Fraser <simon.fraser@apple.com> 2 24 -
trunk/Source/WebCore/css/CSSParser.cpp
r199343 r200043 3786 3786 ASSERT(propId == CSSPropertyAnimation || propId == CSSPropertyWebkitAnimation); 3787 3787 3788 const unsigned numProperties = 7;3788 const unsigned numProperties = 8; 3789 3789 const StylePropertyShorthand& shorthand = animationShorthandForParsing(propId); 3790 3790 -
trunk/Source/WebCore/css/CSSPropertyNames.in
r197617 r200043 133 133 alignment-baseline [SVG] 134 134 all [Longhands=all] 135 animation [Longhands=animation-name|animation-duration|animation-timing-function|animation-delay|animation-iteration-count|animation-direction|animation-fill-mode ]135 animation [Longhands=animation-name|animation-duration|animation-timing-function|animation-delay|animation-iteration-count|animation-direction|animation-fill-mode|animation-play-state] 136 136 animation-delay [AnimationProperty, NameForMethods=Delay] 137 137 animation-direction [AnimationProperty, NameForMethods=Direction] … … 373 373 alt [NameForMethods=ContentAltText, Custom=Value] 374 374 -webkit-alt = alt 375 -webkit-animation [Longhands=-webkit-animation-name|-webkit-animation-duration|-webkit-animation-timing-function|-webkit-animation-delay|-webkit-animation-iteration-count|-webkit-animation-direction|-webkit-animation-fill-mode ]375 -webkit-animation [Longhands=-webkit-animation-name|-webkit-animation-duration|-webkit-animation-timing-function|-webkit-animation-delay|-webkit-animation-iteration-count|-webkit-animation-direction|-webkit-animation-fill-mode|-webkit-animation-play-state] 376 376 -webkit-animation-delay [AnimationProperty, NameForMethods=Delay] 377 377 -webkit-animation-direction [AnimationProperty, NameForMethods=Direction] -
trunk/Source/WebCore/css/StylePropertyShorthand.cpp
r179227 r200043 36 36 StylePropertyShorthand animationShorthandForParsing(CSSPropertyID propId) 37 37 { 38 // When we parse the animation shorthand we need to look for animation-name 39 // last because otherwise it might match against the keywords for fill mode, 40 // timing functions and infinite iteration. This means that animation names 41 // that are the same as keywords (e.g. 'forwards') won't always match in the 42 // shorthand. In that case the authors should be using longhands (or 43 // reconsidering their approach). This is covered by the animations spec 44 // bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=14790 45 // And in the spec (editor's draft) at: 46 // http://dev.w3.org/csswg/css3-animations/#animation-shorthand-property 38 // Animation-name must come last, so that keywords for other properties in the shorthand 39 // preferentially match those properties. 47 40 static const CSSPropertyID animationPropertiesForParsing[] = { 48 41 CSSPropertyAnimationDuration, … … 52 45 CSSPropertyAnimationDirection, 53 46 CSSPropertyAnimationFillMode, 47 CSSPropertyAnimationPlayState, 54 48 CSSPropertyAnimationName 55 49 }; … … 62 56 CSSPropertyWebkitAnimationDirection, 63 57 CSSPropertyWebkitAnimationFillMode, 58 CSSPropertyWebkitAnimationPlayState, 64 59 CSSPropertyWebkitAnimationName 65 60 };
Note: See TracChangeset
for help on using the changeset viewer.