[webkit-changes] [WebKit/WebKit] 7eeb61: Setting the "vector-effect" attribute in the SVG <...
Nikolas Zimmermann
noreply at github.com
Thu Jun 15 11:32:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7eeb61cf4db43f5580bb7cc0b7df42128ee7a22e
https://github.com/WebKit/WebKit/commit/7eeb61cf4db43f5580bb7cc0b7df42128ee7a22e
Author: Nikolas Zimmermann <nzimmermann at igalia.com>
Date: 2023-06-15 (Thu, 15 Jun 2023)
Changed paths:
A LayoutTests/fast/repaint/resources/async-text-based-repaint.js
M LayoutTests/platform/glib/TestExpectations
A LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
A LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
A LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
A LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
A LayoutTests/platform/mac-ventura-wk2-lbse-text/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
A LayoutTests/platform/mac-ventura-wk2-lbse-text/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
A LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt
A LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-decoration.html
A LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-expected.txt
A LayoutTests/svg/repaint/repaint-non-scaling-stroke-text.html
A LayoutTests/svg/stroke/non-scaling-stroke-gradient-text-expected.html
A LayoutTests/svg/stroke/non-scaling-stroke-gradient-text.html
A LayoutTests/svg/stroke/non-scaling-stroke-text-decoration-expected.html
A LayoutTests/svg/stroke/non-scaling-stroke-text-decoration.html
A LayoutTests/svg/stroke/non-scaling-stroke-text-expected.html
A LayoutTests/svg/stroke/non-scaling-stroke-text.html
A LayoutTests/svg/text/non-scaling-stroke-textRendering-default-expected.svg
A LayoutTests/svg/text/non-scaling-stroke-textRendering-default.svg
A LayoutTests/svg/text/non-scaling-stroke-textRendering-geometricPrecision-expected.svg
A LayoutTests/svg/text/non-scaling-stroke-textRendering-geometricPrecision.svg
A LayoutTests/svg/zoom/page/non-scaling-stroke-textRendering-default-expected.svg
A LayoutTests/svg/zoom/page/non-scaling-stroke-textRendering-default.svg
A LayoutTests/svg/zoom/page/non-scaling-stroke-textRendering-geometricPrecision-expected.svg
A LayoutTests/svg/zoom/page/non-scaling-stroke-textRendering-geometricPrecision.svg
A LayoutTests/svg/zoom/page/text-with-non-scaling-stroke-expected.html
A LayoutTests/svg/zoom/page/text-with-non-scaling-stroke.html
M Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
M Source/WebCore/rendering/svg/RenderSVGInlineText.h
M Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Log Message:
-----------
Setting the "vector-effect" attribute in the SVG <text> tag to "non-scaling-stroke" has no effect
https://bugs.webkit.org/show_bug.cgi?id=139322
Reviewed by Rob Buis.
Add missing <text> support for vector-effect: non-scaling-stroke.
Take into account deviceScaleFactor / pageZoomFactor / text-rendering: geometricPrecision.
This brings us on-par with Gecko, which had excellent support for this feature,
and a bit further than Blink (which is broken when applying text-rendering: geometricPrecision
and vector-effect: non-scaling-stroke at the same time).
Cover all corner cases with tests: repaint rects, page zoom handling, gradients-on-text,
text decoration, etc.
* LayoutTests/fast/repaint/resources/async-text-based-repaint.js: Added.
(runRepaintTest):
(finishRepaintTest):
Like text-based-repaint.js, but supporting async execution.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt: Added.
* LayoutTests/platform/glib/svg/repaint/repaint-non-scaling-stroke-text-expected.txt: Added.
* LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt: Added.
* LayoutTests/platform/ios/svg/repaint/repaint-non-scaling-stroke-text-expected.txt: Added.
* LayoutTests/platform/mac-ventura-wk2-lbse-text/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt: Added.
* LayoutTests/platform/mac-ventura-wk2-lbse-text/svg/repaint/repaint-non-scaling-stroke-text-expected.txt: Added.
Updated expectations / add new results based on EWS run.
* LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-decoration-expected.txt: Added.
* LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-decoration.html: Added.
* LayoutTests/svg/repaint/repaint-non-scaling-stroke-text-expected.txt: Added.
* LayoutTests/svg/repaint/repaint-non-scaling-stroke-text.html: Added.
Imported from Blink -- modified to use 'async-text-based-repaint.js'.
* LayoutTests/svg/stroke/non-scaling-stroke-gradient-text-expected.html: Added.
* LayoutTests/svg/stroke/non-scaling-stroke-gradient-text.html: Added.
* LayoutTests/svg/stroke/non-scaling-stroke-text-decoration-expected.html: Added.
* LayoutTests/svg/stroke/non-scaling-stroke-text-decoration.html: Added.
* LayoutTests/svg/stroke/non-scaling-stroke-text-expected.html: Added.
* LayoutTests/svg/stroke/non-scaling-stroke-text.html: Added.
Imported from Blink.
* LayoutTests/svg/text/non-scaling-stroke-textRendering-default-expected.svg: Added.
* LayoutTests/svg/text/non-scaling-stroke-textRendering-default.svg: Added.
* LayoutTests/svg/text/non-scaling-stroke-textRendering-geometricPrecision-expected.svg: Added.
* LayoutTests/svg/text/non-scaling-stroke-textRendering-geometricPrecision.svg: Added.
* LayoutTests/svg/zoom/page/non-scaling-stroke-textRendering-default-expected.svg: Added.
* LayoutTests/svg/zoom/page/non-scaling-stroke-textRendering-default.svg: Added.
* LayoutTests/svg/zoom/page/non-scaling-stroke-textRendering-geometricPrecision-expected.svg: Added.
* LayoutTests/svg/zoom/page/non-scaling-stroke-textRendering-geometricPrecision.svg: Added.
* LayoutTests/svg/zoom/page/text-with-non-scaling-stroke-expected.html: Added.
* LayoutTests/svg/zoom/page/text-with-non-scaling-stroke.html: Added.
New tests based on Said testcase.
* Source/WebCore/rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeScalingFactorForRenderer): Expose, needed by SVGInlineTextBox.
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): Turn lambda into exposed static function.
* Source/WebCore/rendering/svg/RenderSVGInlineText.h:
* Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::acquirePaintingResource): Handle non-scaling-stroke for text.
* LayoutTests/svg/zoom/page/text-with-non-scaling-stroke.html:
Canonical link: https://commits.webkit.org/265204@main
More information about the webkit-changes
mailing list