[webkit-changes] [WebKit/WebKit] 3f5059: [motion-path] Refactor various parts of path opera...

Nikos Mouchtaris noreply at github.com
Tue Aug 29 12:56:47 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3f5059d542cf81542755719fab60d75462d24768
      https://github.com/WebKit/WebKit/commit/3f5059d542cf81542755719fab60d75462d24768
  Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
  Date:   2023-08-29 (Tue, 29 Aug 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-ray-019-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-ray-019.html
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/animation/KeyframeEffect.cpp
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/platform/animation/AcceleratedEffectValues.cpp
    A Source/WebCore/rendering/MotionPath.cpp
    A Source/WebCore/rendering/MotionPath.h
    M Source/WebCore/rendering/PathOperation.cpp
    M Source/WebCore/rendering/PathOperation.h
    M Source/WebCore/rendering/RenderBlockFlow.cpp
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayer.h
    M Source/WebCore/rendering/RenderLayerModelObject.cpp
    M Source/WebCore/rendering/style/RenderStyle.cpp
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/svg/SVGRenderSupport.cpp
    M Source/WebCore/svg/SVGGraphicsElement.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  [motion-path] Refactor various parts of path operation and RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=260818
rdar://114584136

Reviewed by Simon Fraser.

This refactoring addresses a few issues with the current motion path design. First,
for paths that need additional data including its containing block rect or the element's
offset from its containing block, it is not correct to use the path operation to hold
these values, as the path operation is supposed to represent just the path specified by the
css. Instead, pass down these necessary values through a TransformOperationData struct.
Also added a test for this case to ensure that style sharing is not broken after this change.
Also, factor out some of the code related to computing the ray path into the new MotionPath
class, which now also includes applyMotionPathTransform.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-ray-019-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-ray-019.html: Added.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::computeTransformedExtentViaMatrix const):
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::computedTransform):
* Source/WebCore/platform/animation/AcceleratedEffectValues.cpp:
(WebCore::AcceleratedEffectValues::AcceleratedEffectValues):
* Source/WebCore/rendering/PathOperation.cpp:
(WebCore::RayPathOperation::create):
(WebCore::RayPathOperation::clone const):
(WebCore::RayPathOperation::getPath const):
(WebCore::RayPathOperation::lengthForPath const): Deleted.
(WebCore::RayPathOperation::lengthForContainPath const): Deleted.
* Source/WebCore/rendering/PathOperation.h:
(WebCore::PathOperation::getPath): Deleted.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::applyTransform const):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateTransform):
(WebCore::RenderLayer::setReferenceBoxForPathOperations): Deleted.
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::applySVGTransform const):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::applyTransform const):
(WebCore::RenderStyle::applyCSSTransform const):
(WebCore::getTraversalStateAtDistance): Deleted.
(WebCore::RenderStyle::applyMotionPathTransform const): Deleted.
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::animatedLocalTransform const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

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




More information about the webkit-changes mailing list