Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6dd6ecba860d6cb63c04059fb0e2b817c9ced21e
      
https://github.com/WebKit/WebKit/commit/6dd6ecba860d6cb63c04059fb0e2b817c9ced21e
  Author: Antoine Quint <grao...@webkit.org>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M LayoutTests/platform/glib/TestExpectations
    A 
LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-5-expected.txt
    A 
LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-5.html
    M Source/WebCore/animation/KeyframeEffectStack.cpp
    M Source/WebCore/animation/KeyframeEffectStack.h
    M Source/WebCore/style/PropertyCascade.cpp
    M Source/WebCore/style/PropertyCascade.h
    M Source/WebCore/style/StyleBuilder.h
    M Source/WebCore/style/StyleTreeResolver.cpp
    M Source/WebCore/style/StyleTreeResolver.h

  Log Message:
  -----------
  [web-animations] first frame of "transform" animation is visible when 
!important style overrides the animated value
https://bugs.webkit.org/show_bug.cgi?id=254665

Reviewed by Antti Koivisto.

When fixing bug 252481, we introduced a mechanism to detect properties 
overriding animated properties through
the cascade, primarily !important values. We achieved this by comparing the 
RenderStyle after animations were
applied and after the cascade was fully applied, determining that any value 
that changed meant it was overridden.
But this technique failed to detect the case where the animated value matched 
the value after the cascade was
fully applied, as would be the case if the 0% keyframe was the same as the 
!important style. This would happen
for instance if there is no 0% keyframe explicitly provided.

We now use a more robust approach by populating a HashSet<AnimatedProperty> 
while the cascade is built under
Style::TreeResolver::applyCascadeAfterAnimation() and returning that list of 
overridden properties. We then pass
that list to the KeyframeEffectStack in didApplyCascade() which will filter it 
for accelerated properties only and
notify relevant keyframe effects.

* LayoutTests/platform/glib/TestExpectations:
* 
LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-5-expected.txt:
 Added.
* 
LayoutTests/webanimations/combining-transform-animations-with-different-acceleration-capabilities-5.html:
 Added.
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::cascadeDidOverrideProperties):
(WebCore::KeyframeEffectStack::didApplyCascade): Deleted.
* Source/WebCore/animation/KeyframeEffectStack.h:
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::PropertyCascade::overriddenAnimatedProperties const):
* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/StyleBuilder.h:
(WebCore::Style::Builder::overriddenAnimatedProperties const):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::TreeResolver::applyCascadeAfterAnimation):
* Source/WebCore/style/StyleTreeResolver.h:

Canonical link: https://commits.webkit.org/262327@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to