Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a7cdf98234b35d9d4e5a1b2eb6daf449bef8258
      
https://github.com/WebKit/WebKit/commit/8a7cdf98234b35d9d4e5a1b2eb6daf449bef8258
  Author: Patrick Angle <[email protected]>
  Date:   2023-01-26 (Thu, 26 Jan 2023)

  Changed paths:
    M LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt
    M LayoutTests/inspector/animation/lifecycle-web-animation.html
    M LayoutTests/inspector/animation/resources/lifecycle-utilities.js
    M Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp
    M Source/WebCore/inspector/agents/InspectorAnimationAgent.h

  Log Message:
  -----------
  Web Inspector: Backend fails to bind WebAnimation with custom properties in 
keyframes
https://bugs.webkit.org/show_bug.cgi?id=251173
rdar://104555265

Reviewed by Antti Koivisto.

InspectorAnimationAgent::didCreateAnimation is called during 
WebCore::Document::updateStyleIfNeeded, but in order to
resolve custom properties of animations, we may have to again enter 
WebCore::Document::updateStyleIfNeeded via
WebCore::ComputedStyleExtractor::updateStyleIfNeededForProperty. Instead, we 
should wait until after styles have been
updated which will prevent us from reentering 
WebCore::Document::updateStyleIfNeeded in order to resolve custom
properties.

This also has the benefit that the frontend will no longer receive a 
WebAnimation immediately followed by an update to
its name, since the name is set later. This allows us to capture the animation 
after it has been fully set up via the
updating of styles.

* LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt:
* LayoutTests/inspector/animation/lifecycle-web-animation.html:
- Add test case to exercise the creation/deletion of animations with custom 
properties.

* LayoutTests/inspector/animation/resources/lifecycle-utilities.js:
- As a result of defering animation binding until later, the name no longer 
changes immediately after binding.

* Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp:
(WebCore::InspectorAnimationAgent::InspectorAnimationAgent):
(WebCore::InspectorAnimationAgent::enable):
(WebCore::InspectorAnimationAgent::didCreateWebAnimation):
(WebCore::InspectorAnimationAgent::animationBindingTimerFired):
(WebCore::InspectorAnimationAgent::bindAnimation):
(WebCore::InspectorAnimationAgent::reset):
* Source/WebCore/inspector/agents/InspectorAnimationAgent.h:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to