Changeset 289161 in webkit
- Timestamp:
- Feb 5, 2022 1:25:27 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/style/Styleable.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r289141 r289161 1 2022-02-05 Antoine Quint <graouts@webkit.org> 2 3 [CSS transition] can't use CSS logical properties in transition syntax 4 https://bugs.webkit.org/show_bug.cgi?id=232361 5 <rdar://problem/84958347> 6 7 Reviewed by Dean Jackson. 8 9 Mark some WPT progressions. The new FAIL result isn't a real regression, that test 10 simply passed by virtue of not ever starting a transition for a logical property. 11 12 * web-platform-tests/css/css-logical/animation-004-expected.txt: 13 1 14 2022-02-04 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt
r267650 r289161 1 1 2 Harness Error (TIMEOUT), message = null 3 4 FAIL Logical properties can be transitioned assert_equals: expected "50px" but got "100px" 5 FAIL Logical properties in transitions respect the writing-mode assert_equals: expected "50px" but got "100px" 6 FAIL Logical properties in transitions respect the direction assert_equals: expected "50px" but got "100px" 2 PASS Logical properties can be transitioned 3 PASS Logical properties in transitions respect the writing-mode 4 PASS Logical properties in transitions respect the direction 7 5 PASS Declaration order is respected within declaration blocks 8 6 PASS Logical properties are able to override physical properties in declaration blocks … … 10 8 PASS Physical properties and logical properties can be mixed 11 9 PASS Declaration order is respected on each keyframe individually 12 FAIL Transitions update when the writing-mode is changed assert_equals: expected " 50px" but got "100px"13 TIMEOUT Filling transitions update when the writing-mode is changed Test timed out 14 FAIL The number of interpolating properties can be increased when the writing-mode is changed assert_equals: expected " 50px" but got "100px"15 FAIL The number of interpolating properties can be decreased when the writing-mode is changed assert_equals: expected " 150px" but got "200px"16 FAIL Transitions update when the writing-mode is changed through a CSS variable assert_equals: expected "50px" but got " 100px"17 FAIL Transitions update when the direction is changed assert_equals: expected " 50px" but got "100px"18 PASS Transitions from logical to physical update when the direction is changed 19 FAIL Transitions from physical to logical update when the direction is changed assert_equals: expected " 150px" but got "100px"10 FAIL Transitions update when the writing-mode is changed assert_equals: expected "0px" but got "50px" 11 PASS Filling transitions update when the writing-mode is changed 12 FAIL The number of interpolating properties can be increased when the writing-mode is changed assert_equals: expected "0px" but got "50px" 13 FAIL The number of interpolating properties can be decreased when the writing-mode is changed assert_equals: expected "300px" but got "275px" 14 FAIL Transitions update when the writing-mode is changed through a CSS variable assert_equals: expected "50px" but got "0px" 15 FAIL Transitions update when the direction is changed assert_equals: expected "0px" but got "50px" 16 FAIL Transitions from logical to physical update when the direction is changed assert_equals: expected "0px" but got "50px" 17 FAIL Transitions from physical to logical update when the direction is changed assert_equals: expected "0px" but got "50px" 20 18 -
trunk/Source/WebCore/ChangeLog
r289158 r289161 1 2022-02-05 Antoine Quint <graouts@webkit.org> 2 3 [CSS transition] can't use CSS logical properties in transition syntax 4 https://bugs.webkit.org/show_bug.cgi?id=232361 5 <rdar://problem/84958347> 6 7 Reviewed by Dean Jackson. 8 9 Resolve logical properties when considering properties that should trigger a transition. 10 To do so, we must pass the newly-set style to some methods such that they may be able to 11 reolve logical properties as well. 12 13 * style/Styleable.cpp: 14 (WebCore::keyframeEffectForElementAndProperty): 15 (WebCore::transitionMatchesProperty): 16 (WebCore::updateCSSTransitionsForStyleableAndProperty): 17 1 18 2022-02-05 Antoine Quint <graouts@webkit.org> 2 19 -
trunk/Source/WebCore/style/Styleable.cpp
r289156 r289161 322 322 } 323 323 324 static KeyframeEffect* keyframeEffectForElementAndProperty(const Styleable& styleable, CSSPropertyID property)324 static KeyframeEffect* keyframeEffectForElementAndProperty(const Styleable& styleable, CSSPropertyID resolvedProperty, CSSPropertyID unresolvedProperty) 325 325 { 326 326 if (auto* keyframeEffectStack = styleable.keyframeEffectStack()) { 327 327 auto effects = keyframeEffectStack->sortedEffects(); 328 328 for (const auto& effect : makeReversedRange(effects)) { 329 if (effect->animatesProperty( property))329 if (effect->animatesProperty(resolvedProperty) || (resolvedProperty != unresolvedProperty && effect->animatesProperty(unresolvedProperty))) 330 330 return effect.get(); 331 331 } … … 349 349 } 350 350 351 static bool transitionMatchesProperty(const Animation& transition, CSSPropertyID property )351 static bool transitionMatchesProperty(const Animation& transition, CSSPropertyID property, const RenderStyle& style) 352 352 { 353 353 if (transition.isPropertyFilled()) … … 358 358 return false; 359 359 if (mode == Animation::TransitionMode::SingleProperty) { 360 auto transitionProperty = transition.property().id;360 auto transitionProperty = CSSProperty::resolveDirectionAwareProperty(transition.property().id, style.direction(), style.writingMode()); 361 361 if (transitionProperty != property) { 362 362 for (auto longhand : shorthandForProperty(transitionProperty)) { … … 397 397 static void updateCSSTransitionsForStyleableAndProperty(const Styleable& styleable, CSSPropertyID property, const RenderStyle& currentStyle, const RenderStyle& newStyle, const MonotonicTime generationTime) 398 398 { 399 auto* keyframeEffect = keyframeEffectForElementAndProperty(styleable, property); 399 auto unresolvedProperty = property; 400 property = CSSProperty::resolveDirectionAwareProperty(property, newStyle.direction(), newStyle.writingMode()); 401 402 auto* keyframeEffect = keyframeEffectForElementAndProperty(styleable, property, unresolvedProperty); 400 403 auto* animation = keyframeEffect ? keyframeEffect->animation() : nullptr; 401 404 … … 412 415 if (auto* transitions = newStyle.transitions()) { 413 416 for (auto& backingAnimation : *transitions) { 414 if (transitionMatchesProperty(backingAnimation.get(), property ))417 if (transitionMatchesProperty(backingAnimation.get(), property, newStyle)) 415 418 matchingBackingAnimation = backingAnimation.ptr(); 416 419 }
Note: See TracChangeset
for help on using the changeset viewer.