Skip to content

Commit

Permalink
[view-transitions] Spinner animation on https://www.kvin.me/posts/but…
Browse files Browse the repository at this point in the history
…ton-interaction jumps

https://bugs.webkit.org/show_bug.cgi?id=274400
<rdar://128405857>

Reviewed by Tim Nguyen.

When an element is captured in a view transition, its 'transform' gets applied to the
::view-transition-group pseudo element, and we stop it being applied to the layer
for the element itself.
This makes sure we don't accidentally put it back again with an async animation.

* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):

Canonical link: https://commits.webkit.org/279170@main
  • Loading branch information
mattwoodrow committed May 23, 2024
1 parent ece697a commit a0dd96a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/WebCore/rendering/RenderLayerBacking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3997,6 +3997,9 @@ void RenderLayerBacking::verifyNotPainting()

bool RenderLayerBacking::startAnimation(double timeOffset, const Animation& animation, const BlendingKeyframes& keyframes)
{
if (renderer().capturedInViewTransition())
return false;

bool shouldApplyAnimationsToTargetRenderer = renderer().isRenderBox() || renderer().isSVGLayerAwareRenderer();

bool hasOpacity = keyframes.containsProperty(CSSPropertyOpacity);
Expand Down

0 comments on commit a0dd96a

Please sign in to comment.