Changeset 287535 in webkit
- Timestamp:
- Jan 3, 2022 3:55:54 AM (7 months ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/computed-style-animation-parsing-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/parsing/animation-computed-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSComputedStyleDeclaration.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r287534 r287535 1 2022-01-03 Antoine Quint <graouts@webkit.org> 2 3 Support the "animation" shorthand property in the computed style 4 https://bugs.webkit.org/show_bug.cgi?id=234785 5 6 Reviewed by Sam Weinig. 7 8 Mark WPT progressions. 9 10 * web-platform-tests/css/css-animations/computed-style-animation-parsing-expected.txt: 11 * web-platform-tests/css/css-animations/parsing/animation-computed-expected.txt: 12 * web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt: 13 1 14 2022-01-02 Antoine Quint <graouts@webkit.org> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/computed-style-animation-parsing-expected.txt
r267650 r287535 1 1 2 2 PASS Test animation name being empty. 3 FAIL Test a non-conflicting animation name. assert_equals: computedStyle2.animationName expected "myShorthandAnim" but got "none" 4 FAIL Test an animation name that is the same as a possible animation fill-mode. assert_equals: computedStyle2.animationName expected "forwards" but got "none" 5 FAIL Test an animation name that is the same as a possible animation direction. assert_equals: computedStyle2.animationName expected "normal" but got "none" 6 FAIL Test an animation name that is the same as a possible running state. assert_equals: computedStyle2.animationName expected "running" but got "none" 3 PASS Test a non-conflicting animation name. 4 PASS Test an animation name that is the same as a possible animation fill-mode. 5 PASS Test an animation name that is the same as a possible animation direction. 6 PASS Test an animation name that is the same as a possible running state. 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/parsing/animation-computed-expected.txt
r264456 r287535 1 1 2 FAIL Property animation value '1s' assert_equals: expected "1s ease 0s 1 normal none running none" but got "" 3 FAIL Property animation value 'cubic-bezier(0, -2, 1, 3)' assert_equals: expected "0s cubic-bezier(0, -2, 1, 3) 0s 1 normal none running none" but got "" 4 FAIL Property animation value '1s -3s' assert_equals: expected "1s ease -3s 1 normal none running none" but got "" 5 FAIL Property animation value '4' assert_equals: expected "0s ease 0s 4 normal none running none" but got "" 6 FAIL Property animation value 'reverse' assert_equals: expected "0s ease 0s 1 reverse none running none" but got "" 7 FAIL Property animation value 'both' assert_equals: expected "0s ease 0s 1 normal both running none" but got "" 8 FAIL Property animation value 'paused' assert_equals: expected "0s ease 0s 1 normal none paused none" but got "" 9 FAIL Property animation value 'none' assert_equals: expected "0s ease 0s 1 normal none running none" but got "" 10 FAIL Property animation value 'anim' assert_equals: expected "0s ease 0s 1 normal none running anim" but got "" 11 FAIL Property animation value 'anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)' assert_equals: expected "1s cubic-bezier(0, -2, 1, 3) -3s 4 reverse both paused anim" but got "" 12 FAIL Property animation value 'anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)' assert_equals: expected "0s ease 0s 1 reverse both paused anim, 1s cubic-bezier(0, -2, 1, 3) -3s 4 normal none running none" but got "" 2 PASS Property animation value '1s' 3 PASS Property animation value 'cubic-bezier(0, -2, 1, 3)' 4 PASS Property animation value '1s -3s' 5 PASS Property animation value '4' 6 PASS Property animation value 'reverse' 7 PASS Property animation value 'both' 8 PASS Property animation value 'paused' 9 PASS Property animation value 'none' 10 PASS Property animation value 'anim' 11 PASS Property animation value 'anim paused both reverse 4 1s -3s cubic-bezier(0, -2, 1, 3)' 12 PASS Property animation value 'anim paused both reverse, 4 1s -3s cubic-bezier(0, -2, 1, 3)' 13 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt
r287487 r287535 23 23 PASS Property direction value 'rtl' in ::marker 24 24 PASS Property content value '"foo"' in ::marker 25 FAIL Property animation value '1s linear 2s infinite alternate forwards paused anim' in ::marker assert_equals: expected "1s linear 2s infinite alternate forwards paused anim" but got "" 25 PASS Property animation value '1s linear 2s infinite alternate forwards paused anim' in ::marker 26 26 PASS Property animation-delay value '1s' in ::marker 27 27 PASS Property animation-direction value 'alternate' in ::marker -
trunk/Source/WebCore/ChangeLog
r287534 r287535 1 2022-01-03 Antoine Quint <graouts@webkit.org> 2 3 Support the "animation" shorthand property in the computed style 4 https://bugs.webkit.org/show_bug.cgi?id=234785 5 6 Reviewed by Sam Weinig. 7 8 There is an existing WPT for the "animation" shorthand in the computed style which we 9 used to fail because we would simply not do any work to return the longhands compiled 10 into a list. It seems that the CSS WG, per https://github.com/w3c/csswg-drafts/issues/2529, 11 is moving in the direction of specifying what happens with shorthands in computed style, 12 so we're adding support for the "animation" shorthand. 13 14 * css/CSSComputedStyleDeclaration.cpp: 15 (WebCore::animationShorthandValue): 16 (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): 17 1 18 2022-01-02 Antoine Quint <graouts@webkit.org> 2 19 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r287534 r287535 1484 1484 list->append(ComputedStyleExtractor::valueForAnimationTimingFunction(Animation::initialTimingFunction())); 1485 1485 return list; 1486 } 1487 1488 static Ref<CSSValueList> animationShorthandValue(const AnimationList* animationList) 1489 { 1490 auto parentList = CSSValueList::createCommaSeparated(); 1491 if (animationList) { 1492 for (size_t i = 0; i < animationList->size(); ++i) { 1493 const auto& animation = animationList->animation(i); 1494 auto childList = CSSValueList::createSpaceSeparated(); 1495 childList->append(ComputedStyleExtractor::valueForAnimationDuration(animation.duration())); 1496 childList->append(ComputedStyleExtractor::valueForAnimationTimingFunction(*animation.timingFunction())); 1497 childList->append(ComputedStyleExtractor::valueForAnimationDelay(animation.delay())); 1498 childList->append(ComputedStyleExtractor::valueForAnimationIterationCount(animation.iterationCount())); 1499 childList->append(ComputedStyleExtractor::valueForAnimationDirection(animation.direction())); 1500 childList->append(ComputedStyleExtractor::valueForAnimationFillMode(animation.fillMode())); 1501 childList->append(ComputedStyleExtractor::valueForAnimationPlayState(animation.playState())); 1502 childList->append(ComputedStyleExtractor::valueForAnimationName(animation.name())); 1503 parentList->append(childList); 1504 } 1505 } 1506 return parentList; 1486 1507 } 1487 1508 … … 3567 3588 return cssValuePool.createIdentifierValue(CSSValueContentBox); 3568 3589 return cssValuePool.createIdentifierValue(CSSValueBorderBox); 3590 case CSSPropertyAnimation: 3591 return animationShorthandValue(style.animations()); 3569 3592 case CSSPropertyAnimationDelay: 3570 3593 return delayValue(style.animations()); … … 4099 4122 /* Unimplemented CSS 3 properties (including CSS3 shorthand properties) */ 4100 4123 case CSSPropertyAll: 4101 case CSSPropertyAnimation:4102 4124 case CSSPropertyTextEmphasis: 4103 4125 break;
Note: See TracChangeset
for help on using the changeset viewer.