[webkit-changes] [WebKit/WebKit] 8a7cdf: Web Inspector: Backend fails to bind WebAnimation ...

Patrick Angle noreply at github.com
Thu Jan 26 11:49:27 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a7cdf98234b35d9d4e5a1b2eb6daf449bef8258
      https://github.com/WebKit/WebKit/commit/8a7cdf98234b35d9d4e5a1b2eb6daf449bef8258
  Author: Patrick Angle <pangle at apple.com>
  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




More information about the webkit-changes mailing list