Changeset 289167 in webkit


Ignore:
Timestamp:
Feb 6, 2022 7:17:32 AM (5 months ago)
Author:
graouts@webkit.org
Message:

[css-logical] [css-transitions] Resolve logic properties when compiling the list of transition properties
https://bugs.webkit.org/show_bug.cgi?id=236197

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/css/css-logical/animation-004-expected.txt:

Source/WebCore:

In r289161 we added initial support for transitions of logical properties. However, we would resolve the
transition-property in updateCSSTransitionsForStyleableAndProperty() whereas we should resolve them earlier
when compiling the list of transition-property values found in the previous style and the new style.

  • style/Styleable.cpp:

(WebCore::keyframeEffectForElementAndProperty):
(WebCore::compileTransitionPropertiesInStyle):
(WebCore::updateCSSTransitionsForStyleableAndProperty):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r289165 r289167  
     12022-02-06  Antoine Quint  <graouts@webkit.org>
     2
     3        [css-logical] [css-transitions] Resolve logic properties when compiling the list of transition properties
     4        https://bugs.webkit.org/show_bug.cgi?id=236197
     5
     6        Reviewed by Dean Jackson.
     7
     8        Mark WPT progressions.
     9
     10        * web-platform-tests/css/css-logical/animation-004-expected.txt:
     11
    1122022-02-05  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt

    r289161 r289167  
    88PASS Physical properties and logical properties can be mixed
    99PASS Declaration order is respected on each keyframe individually
    10 FAIL Transitions update when the writing-mode is changed assert_equals: expected "0px" but got "50px"
     10PASS Transitions update when the writing-mode is changed
    1111PASS 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"
     12PASS The number of interpolating properties can be increased when the writing-mode is changed
     13PASS The number of interpolating properties can be decreased when the writing-mode is changed
    1414FAIL 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"
     15PASS Transitions update when the direction is changed
     16PASS Transitions from logical to physical update when the direction is changed
     17PASS Transitions from physical to logical update when the direction is changed
    1818
  • trunk/Source/WebCore/ChangeLog

    r289163 r289167  
     12022-02-06  Antoine Quint  <graouts@webkit.org>
     2
     3        [css-logical] [css-transitions] Resolve logic properties when compiling the list of transition properties
     4        https://bugs.webkit.org/show_bug.cgi?id=236197
     5
     6        Reviewed by Dean Jackson.
     7
     8        In r289161 we added initial support for transitions of logical properties. However, we would resolve the
     9        transition-property in updateCSSTransitionsForStyleableAndProperty() whereas we should resolve them earlier
     10        when compiling the list of transition-property values found in the previous style and the new style.
     11
     12        * style/Styleable.cpp:
     13        (WebCore::keyframeEffectForElementAndProperty):
     14        (WebCore::compileTransitionPropertiesInStyle):
     15        (WebCore::updateCSSTransitionsForStyleableAndProperty):
     16
    1172022-02-03  Nikolas Zimmermann  <nzimmermann@igalia.com>
    218
  • trunk/Source/WebCore/style/Styleable.cpp

    r289161 r289167  
    322322}
    323323
    324 static KeyframeEffect* keyframeEffectForElementAndProperty(const Styleable& styleable, CSSPropertyID resolvedProperty, CSSPropertyID unresolvedProperty)
     324static KeyframeEffect* keyframeEffectForElementAndProperty(const Styleable& styleable, CSSPropertyID property)
    325325{
    326326    if (auto* keyframeEffectStack = styleable.keyframeEffectStack()) {
    327327        auto effects = keyframeEffectStack->sortedEffects();
    328328        for (const auto& effect : makeReversedRange(effects)) {
    329             if (effect->animatesProperty(resolvedProperty) || (resolvedProperty != unresolvedProperty && effect->animatesProperty(unresolvedProperty)))
     329            if (effect->animatesProperty(property))
    330330                return effect.get();
    331331        }
     
    382382        auto mode = animation->property().mode;
    383383        if (mode == Animation::TransitionMode::SingleProperty) {
    384             auto property = animation->property().id;
     384            auto property = CSSProperty::resolveDirectionAwareProperty(animation->property().id, style.direction(), style.writingMode());
    385385            if (isShorthandCSSProperty(property)) {
    386386                for (auto longhand : shorthandForProperty(property))
     
    397397static void updateCSSTransitionsForStyleableAndProperty(const Styleable& styleable, CSSPropertyID property, const RenderStyle& currentStyle, const RenderStyle& newStyle, const MonotonicTime generationTime)
    398398{
    399     auto unresolvedProperty = property;
    400     property = CSSProperty::resolveDirectionAwareProperty(property, newStyle.direction(), newStyle.writingMode());
    401 
    402     auto* keyframeEffect = keyframeEffectForElementAndProperty(styleable, property, unresolvedProperty);
     399    auto* keyframeEffect = keyframeEffectForElementAndProperty(styleable, property);
    403400    auto* animation = keyframeEffect ? keyframeEffect->animation() : nullptr;
    404401
Note: See TracChangeset for help on using the changeset viewer.