Changeset 281683 in webkit


Ignore:
Timestamp:
Aug 26, 2021 8:52:54 PM (11 months ago)
Author:
Simon Fraser
Message:

CSS keyframed animations don't respect edges in 4 value background-position
https://bugs.webkit.org/show_bug.cgi?id=228995

Reviewed by Darin Adler.

For some background-position animations we'd fail to set backgroundOriginX/Y in the
destination style's FillLayer, because this is not set in the destination style initially.

So have FillLayerPositionPropertyWrapper::blend() always set it.

Source/WebCore:

Test: animations/background-position.html

  • animation/CSSPropertyAnimation.cpp:

LayoutTests:

  • animations/background-position-expected.html: Added.
  • animations/background-position.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r281682 r281683  
     12021-08-26  Simon Fraser  <simon.fraser@apple.com>
     2
     3        CSS keyframed animations don't respect edges in 4 value background-position
     4        https://bugs.webkit.org/show_bug.cgi?id=228995
     5
     6        Reviewed by Darin Adler.
     7
     8        For some background-position animations we'd fail to set backgroundOriginX/Y in the
     9        destination style's FillLayer, because this is not set in the destination style initially.
     10       
     11        So have FillLayerPositionPropertyWrapper::blend() always set it.
     12
     13        * animations/background-position-expected.html: Added.
     14        * animations/background-position.html: Added.
     15
    1162021-08-26  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r281682 r281683  
     12021-08-26  Simon Fraser  <simon.fraser@apple.com>
     2
     3        CSS keyframed animations don't respect edges in 4 value background-position
     4        https://bugs.webkit.org/show_bug.cgi?id=228995
     5
     6        Reviewed by Darin Adler.
     7
     8        For some background-position animations we'd fail to set backgroundOriginX/Y in the
     9        destination style's FillLayer, because this is not set in the destination style initially.
     10       
     11        So have FillLayerPositionPropertyWrapper::blend() always set it.
     12
     13        Test: animations/background-position.html
     14
     15        * animation/CSSPropertyAnimation.cpp:
     16
    1172021-08-26  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp

    r281512 r281683  
    16441644        Edge toEdge = (to->*m_originGetter)();
    16451645       
     1646        Edge destinationEdge = toEdge;
    16461647        if (fromEdge != toEdge) {
    16471648            // Convert the right/bottom into a calc expression,
     
    16501651            else if (toEdge == m_farEdge) {
    16511652                toLength = convertTo100PercentMinusLength(toLength);
    1652                 (destination->*m_originSetter)(fromEdge); // Now we have a calc(100% - l), it's relative to the left/top edge.
     1653                destinationEdge = fromEdge; // Now we have a calc(100% - l), it's relative to the left/top edge.
    16531654            }
    16541655        }
    16551656
     1657        (destination->*m_originSetter)(destinationEdge);
    16561658        (destination->*m_lengthSetter)(blendFunc(fromLength, toLength, context));
    16571659    }
Note: See TracChangeset for help on using the changeset viewer.