Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 98a4d85150264a070b7957c27fd465eeb6a93366 https://github.com/WebKit/WebKit/commit/98a4d85150264a070b7957c27fd465eeb6a93366 Author: Tim Nguyen <n...@apple.com> Date: 2023-10-22 (Sun, 22 Oct 2023)
Changed paths: M LayoutTests/TestExpectations 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 M Source/WebCore/rendering/MotionPath.cpp M Source/WebCore/rendering/MotionPath.h M Source/WebCore/rendering/PathOperation.h M Source/WebCore/rendering/RenderBox.cpp M Source/WebCore/rendering/RenderLayer.cpp M Source/WebCore/rendering/RenderLayerModelObject.cpp A Source/WebCore/rendering/TransformOperationData.cpp A Source/WebCore/rendering/TransformOperationData.h 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] Incorrect anchoring when SVG renderers are used https://bugs.webkit.org/show_bug.cgi?id=255684 rdar://108285569 Reviewed by Darin Adler. When we use SVG layout, and transform-box is not view-box, the current implementation makes the object not align with offset-path because there may be an offset (SVG x and y values) between the anchor point and offset-path. We have to tweak the anchor point to fix the alignment. This solution is analogous to Gecko's code: https://searchfox.org/mozilla-central/rev/47be6b9a0719f4311356695d9eed48de97b432b2/layout/base/MotionPathUtils.cpp#30 We also split out TransformOperationData into its own files, to avoid circular dependencies. This brings the Interop Motion Path score from 96% to 99%. * LayoutTests/TestExpectations: * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/animation/KeyframeEffect.cpp: * Source/WebCore/css/ComputedStyleExtractor.cpp: * Source/WebCore/platform/animation/AcceleratedEffectValues.cpp: * Source/WebCore/rendering/MotionPath.cpp: (WebCore::MotionPath::applyMotionPathTransform): (WebCore::MotionPath::computePathForRay): (WebCore::MotionPath::computePathForBox): (WebCore::MotionPath::computePathForShape): * Source/WebCore/rendering/MotionPath.h: (WebCore::TransformOperationData::TransformOperationData): Deleted. (WebCore::TransformOperationData::boundingBox const): Deleted. (WebCore::TransformOperationData::motionPathData const): Deleted. * Source/WebCore/rendering/PathOperation.h: * Source/WebCore/rendering/RenderBox.cpp: * Source/WebCore/rendering/RenderLayer.cpp: * Source/WebCore/rendering/RenderLayerModelObject.cpp: * Source/WebCore/rendering/TransformOperationData.cpp: Added. (WebCore::TransformOperationData::TransformOperationData): * Source/WebCore/rendering/TransformOperationData.h: Added. * Source/WebCore/rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::applyTransform const): (WebCore::RenderStyle::applyCSSTransform const): * Source/WebCore/rendering/style/RenderStyle.h: * Source/WebCore/rendering/svg/SVGRenderSupport.cpp: * Source/WebCore/svg/SVGGraphicsElement.cpp: * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: Canonical link: https://commits.webkit.org/269642@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes