Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c148a252e8ff4bb32d7537cb35638741cf6fe9d5
      
https://github.com/WebKit/WebKit/commit/c148a252e8ff4bb32d7537cb35638741cf6fe9d5
  Author: Antoine Quint <grao...@webkit.org>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles.html
    M Source/WebCore/animation/WebAnimation.cpp
    M Source/WebCore/css/ComputedStyleExtractor.cpp

  Log Message:
  -----------
  Animation.commitStyles() doesn't change "style" attribute for individual CSS 
transform properties
https://bugs.webkit.org/show_bug.cgi?id=247245
rdar://102014524

Reviewed by Antti Koivisto.

When commitStyles() is called a null renderer is passed down to 
ComputedStyleExtractor::valueForPropertyInStyle().
This would make the various functions computing values for individual transform 
properties return "none" since
those would check for a non-null, non-inline renderer. We change those checks 
to only check for an inline renderer
to return "none".

We also had to make a change to how we call 
MutableStyleProperties::setProperty() in commitStyles() to provide an
explicit CSSParserContext created for the styled element's document such that 
we have valid settings. Otherwise,
properties governed by a runtime flag, such as the individual transform 
properties, would show as disabled and
we would hit an ASSERT_NOT_REACHED under MutableStyleProperties::setProperty().

Finally, we add a new WPT test to check that commitStyles() correctly commits 
individual transform properties
to the inline style.

* 
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles.html:
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::commitStyles):
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::computedTranslate):
(WebCore::computedScale):
(WebCore::computedRotate):
(WebCore::rendererCanBeTransformed): Deleted.

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


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

Reply via email to