[webkit-changes] [WebKit/WebKit] 540afd: Using `rotate: x` and `transform: rotate(x)` yield...

Antoine Quint noreply at github.com
Fri Jan 13 11:58:21 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 540afd68832196a977584e05afc0a139f564063f
      https://github.com/WebKit/WebKit/commit/540afd68832196a977584e05afc0a139f564063f
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-01-13 (Fri, 13 Jan 2023)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg.html
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/svg/LegacyRenderSVGModelObject.cpp

  Log Message:
  -----------
  Using `rotate: x` and `transform: rotate(x)` yields different behavior with SVG
https://bugs.webkit.org/show_bug.cgi?id=250387

Reviewed by Simon Fraser.

Check whether any transform-related property changed in LegacyRenderSVGModelObject::styleDidChange()
to determine whether an SVG element's needs to update its transform. To support this we add a new
RenderStyle::affectsTransform() method which returns true when any of the RenderStyle data
structures related to the "transform", "scale", "rotate", "translate" and "offset" CSS properties
are non-empty or defined.

* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg.html: Added.
* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::affectsTransform const):
* Source/WebCore/rendering/svg/LegacyRenderSVGModelObject.cpp:
(WebCore::LegacyRenderSVGModelObject::styleDidChange):

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




More information about the webkit-changes mailing list