-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Percentage-based translations don't work with SVG <text>
https://bugs.webkit.org/show_bug.cgi?id=245122 <rdar://99854408> Reviewed by Myles C. Maxfield. The two main issues are: - Stale SVGTextElement::animatedLocalTransform() function: Historically, all SVG elements have had the same animatedLocalTransform function, see: f8cc29f This looks like an artifact of when SVGTextElement did not inherit from the common SVGGraphicsElement class, where we had to add the same function twice. Removing this code puts it in-line with SVGGraphicsElement::animatedLocalTransform() which does take in account the reference box rect (for percentage based transforms) and transform-origin. - We also need to compute transform at the end of RenderSVGText::layout, to avoid computing with the wrong bounds (which may happen if the font hasn't loaded yet). Rebaseline tests resulting from these changes (mainly minor differences in dimensions that match other browsers). Test: imported/w3c/web-platform-tests/css/css-transforms/transform-box/view-box-mutation-002.html * LayoutTests/TestExpectations: * LayoutTests/platform/gtk/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.txt: * LayoutTests/platform/gtk/svg/batik/text/smallFonts-expected.txt: * LayoutTests/platform/gtk/svg/batik/text/textFeatures-expected.txt: * LayoutTests/platform/gtk/svg/text/select-textLength-spacing-squeeze-2-expected.txt: * LayoutTests/platform/ios/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: * LayoutTests/platform/ios/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.txt: * LayoutTests/platform/ios/svg/batik/text/textFeatures-expected.txt: * LayoutTests/platform/ios/svg/text/append-text-node-to-tspan-expected.txt: * LayoutTests/platform/ios/svg/text/modify-text-node-in-tspan-expected.txt: * LayoutTests/platform/ios/svg/text/remove-text-node-from-tspan-expected.txt: * LayoutTests/platform/ios/svg/text/scaled-font-expected.txt: * LayoutTests/platform/ios/svg/text/scaling-font-with-geometric-precision-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.txt: * LayoutTests/platform/mac/svg/batik/text/smallFonts-expected.txt: * LayoutTests/platform/mac/svg/batik/text/textFeatures-expected.txt: * LayoutTests/platform/mac/svg/text/scaling-font-with-geometric-precision-expected.txt: * Source/WebCore/svg/SVGTextElement.cpp: (WebCore::SVGTextElement::animatedLocalTransform const): Deleted. * Source/WebCore/svg/SVGTextElement.h: * Source/WebCore/rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): Canonical link: https://commits.webkit.org/254656@main
- Loading branch information
Showing
20 changed files
with
180 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.