Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c12ba4857b22b617a926cf4a789f846eb95d66c8
https://github.com/WebKit/WebKit/commit/c12ba4857b22b617a926cf4a789f846eb95d66c8
Author: Karl Dubost <[email protected]>
Date: 2026-10-06 (Tue, 06 Oct 2026)
Changed paths:
M LayoutTests/fast/svg/assert-when-trying-to-construct-multiple-lines.html
M LayoutTests/fast/svg/svg-text-segment-crash.html
R LayoutTests/imported/mozilla/svg/altGlyph-01-expected.svg
R LayoutTests/imported/mozilla/svg/altGlyph-01.svg
A
LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered-expected.svg
A
LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered-ref.svg
A
LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered.svg
M
LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/w3c-import.log
M LayoutTests/platform/glib/TestExpectations
R LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png
R LayoutTests/platform/glib/svg/custom/altglyph-expected.txt
M LayoutTests/platform/glib/svg/custom/text-linking-expected.txt
M LayoutTests/platform/gtk/TestExpectations
R LayoutTests/platform/gtk/svg/custom/altglyph-expected.png
R LayoutTests/platform/gtk/svg/custom/text-linking-expected.png
R LayoutTests/platform/gtk/svg/text/text-altglyph-01-b-expected.png
M LayoutTests/platform/ios/TestExpectations
R LayoutTests/platform/ios/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt
R LayoutTests/platform/ios/svg/custom/altglyph-expected.txt
M LayoutTests/platform/ios/svg/custom/text-linking-expected.txt
R LayoutTests/platform/ios/svg/text/text-altglyph-01-b-expected.png
R LayoutTests/platform/ios/svg/text/text-altglyph-01-b-expected.txt
M LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations
R
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt
M
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/text-linking-expected.txt
R
LayoutTests/platform/mac-tahoe-wk2-pixel/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png
R LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/altglyph-expected.png
R
LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/text-linking-expected.png
R
LayoutTests/platform/mac-tahoe-wk2-pixel/svg/text/text-altglyph-01-b-expected.png
M LayoutTests/platform/mac/TestExpectations
R LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png
R LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt
R LayoutTests/platform/mac/svg/custom/altglyph-expected.png
R LayoutTests/platform/mac/svg/custom/altglyph-expected.txt
M LayoutTests/platform/mac/svg/custom/text-linking-expected.png
M LayoutTests/platform/mac/svg/custom/text-linking-expected.txt
R LayoutTests/platform/mac/svg/dom/altGlyph-dom-expected.png
R LayoutTests/platform/mac/svg/text/text-altglyph-01-b-expected.png
R LayoutTests/platform/mac/svg/text/text-altglyph-01-b-expected.txt
R LayoutTests/platform/win/svg/custom/altglyph-expected.txt
M LayoutTests/platform/win/svg/custom/text-linking-expected.txt
R
LayoutTests/platform/wpe-legacy-api/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png
R
LayoutTests/platform/wpe-legacy-api/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt
R LayoutTests/platform/wpe/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt
R LayoutTests/platform/wpe/svg/text/text-altglyph-01-b-expected.png
R LayoutTests/platform/wpe/svg/text/text-altglyph-01-b-expected.txt
R LayoutTests/svg/W3C-SVG-1.1/resources/text-altglyph-01-f.svg
R LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt
R LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b-w3c.png
R LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b.svg
R LayoutTests/svg/custom/altglyph.svg
R LayoutTests/svg/dom/altGlyph-dom-expected.txt
R LayoutTests/svg/dom/altGlyph-dom.xhtml
R LayoutTests/svg/dom/resources/altGlyph-dom.js
R LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash-expected.txt
R LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash.svg
R LayoutTests/svg/text/alt-glyph-for-surrogate-pair-expected.svg
R LayoutTests/svg/text/alt-glyph-for-surrogate-pair.svg
R LayoutTests/svg/text/glyphref-renderer-create-crash-expected.txt
R LayoutTests/svg/text/glyphref-renderer-create-crash.html
R LayoutTests/svg/text/text-altglyph-01-b-expected.txt
R LayoutTests/svg/text/text-altglyph-01-b.svg
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/rendering/svg/legacy/SVGResources.cpp
R Source/WebCore/svg/SVGAltGlyphDefElement.cpp
R Source/WebCore/svg/SVGAltGlyphDefElement.h
R Source/WebCore/svg/SVGAltGlyphElement.cpp
R Source/WebCore/svg/SVGAltGlyphElement.h
R Source/WebCore/svg/SVGAltGlyphItemElement.cpp
R Source/WebCore/svg/SVGAltGlyphItemElement.h
M Source/WebCore/svg/SVGElement.cpp
M Source/WebCore/svg/SVGFontElement.cpp
M Source/WebCore/svg/SVGFontFaceElement.cpp
R Source/WebCore/svg/SVGGlyphElement.cpp
R Source/WebCore/svg/SVGGlyphElement.h
R Source/WebCore/svg/SVGGlyphRefElement.cpp
R Source/WebCore/svg/SVGGlyphRefElement.h
R Source/WebCore/svg/SVGMissingGlyphElement.cpp
R Source/WebCore/svg/SVGMissingGlyphElement.h
M Source/WebCore/svg/SVGTRefElement.cpp
M Source/WebCore/svg/SVGTSpanElement.cpp
M Source/WebCore/svg/SVGTextElement.cpp
M Source/WebCore/svg/SVGTextPositioningElement.cpp
M Source/WebCore/svg/SVGToOTFFontConversion.cpp
M Source/WebCore/svg/svgtags.in
Log Message:
-----------
[SVG2] Remove `*Glyph*` support
https://bugs.webkit.org/show_bug.cgi?id=278868
rdar://135353569
Reviewed by Nikolas Zimmermann.
SVG 2 removed altGlyph, altGlyphDef, altGlyphItem and glyphRef, and
dropped SVG fonts with glyph and missing-glyph.
https://w3c.github.io/svgwg/svg2-draft/changes.html#text
https://w3c.github.io/svgwg/svg2-draft/changes.html#fonts
Their JavaScript interfaces were already removed in 255702@main. This
removes the six C++ classes behind them.
The only visible change is altGlyph. WebKit drew its text as a tspan.
Firefox and Chrome draw nothing. SVG 2 says an element inside text
that is not a text content child or an a element has display: none.
https://w3c.github.io/svgwg/svg2-draft/text.html#TextLayoutAlgorithm
The tag names stay in svgtags.in as SVGUnknownElement, as done for
animateColor in 276683@main. The HTML parser still needs them to fix
the case of altGlyph, altGlyphDef, altGlyphItem and glyphRef, and
missing-glyph is still a reserved custom element name.
SVG fonts keep working. The SVG to OpenType converter now finds glyph
and missing-glyph by tag name instead of by class, which selects the
same elements as before.
Tests about altGlyph itself are removed, and so is a glyphRef crash
test whose class no longer exists. Two text layout crash tests use
tspan instead of altGlyph, which ran the same renderer.
The new test is marked flaky on mac: EWS sometimes captures a blank
white snapshot, of the test or of its reference.
Tests:
imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered-expected.svg
imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered-ref.svg
imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered.svg
* LayoutTests/fast/svg/assert-when-trying-to-construct-multiple-lines.html:
* LayoutTests/fast/svg/svg-text-segment-crash.html:
* LayoutTests/imported/mozilla/svg/altGlyph-01-expected.svg: Removed.
* LayoutTests/imported/mozilla/svg/altGlyph-01.svg: Removed.
*
LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered-expected.svg:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered-ref.svg:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/text-unknown-element-not-rendered.svg:
Added.
* LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/w3c-import.log:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/glib/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png:
Removed.
* LayoutTests/platform/glib/svg/custom/altglyph-expected.txt: Removed.
* LayoutTests/platform/glib/svg/custom/text-linking-expected.txt:
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/gtk/svg/custom/altglyph-expected.png: Removed.
* LayoutTests/platform/gtk/svg/custom/text-linking-expected.png: Removed.
* LayoutTests/platform/gtk/svg/text/text-altglyph-01-b-expected.png: Removed.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/ios/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
Removed.
* LayoutTests/platform/ios/svg/custom/altglyph-expected.txt: Removed.
* LayoutTests/platform/ios/svg/custom/text-linking-expected.txt:
* LayoutTests/platform/ios/svg/text/text-altglyph-01-b-expected.png: Removed.
* LayoutTests/platform/ios/svg/text/text-altglyph-01-b-expected.txt: Removed.
* LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations:
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
Removed.
*
LayoutTests/platform/mac-tahoe-wk2-lbse-text/svg/custom/text-linking-expected.txt:
*
LayoutTests/platform/mac-tahoe-wk2-pixel/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png:
Removed.
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/altglyph-expected.png:
Removed.
*
LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/text-linking-expected.png:
Removed.
*
LayoutTests/platform/mac-tahoe-wk2-pixel/svg/text/text-altglyph-01-b-expected.png:
Removed.
* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png:
Removed.
* LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
Removed.
* LayoutTests/platform/mac/svg/custom/altglyph-expected.png: Removed.
* LayoutTests/platform/mac/svg/custom/altglyph-expected.txt: Removed.
* LayoutTests/platform/mac/svg/custom/text-linking-expected.png:
* LayoutTests/platform/mac/svg/custom/text-linking-expected.txt:
* LayoutTests/platform/mac/svg/dom/altGlyph-dom-expected.png: Removed.
* LayoutTests/platform/mac/svg/text/text-altglyph-01-b-expected.png: Removed.
* LayoutTests/platform/mac/svg/text/text-altglyph-01-b-expected.txt: Removed.
* LayoutTests/platform/win/svg/custom/altglyph-expected.txt: Removed.
* LayoutTests/platform/win/svg/custom/text-linking-expected.txt:
*
LayoutTests/platform/wpe-legacy-api/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png:
Removed.
*
LayoutTests/platform/wpe-legacy-api/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
Removed.
* LayoutTests/platform/wpe/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
Removed.
* LayoutTests/platform/wpe/svg/text/text-altglyph-01-b-expected.png: Removed.
* LayoutTests/platform/wpe/svg/text/text-altglyph-01-b-expected.txt: Removed.
* LayoutTests/svg/W3C-SVG-1.1/resources/text-altglyph-01-f.svg: Removed.
* LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt: Removed.
* LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b-w3c.png: Removed.
* LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b.svg: Removed.
* LayoutTests/svg/custom/altglyph.svg: Removed.
* LayoutTests/svg/dom/altGlyph-dom-expected.txt: Removed.
* LayoutTests/svg/dom/altGlyph-dom.xhtml: Removed.
* LayoutTests/svg/dom/resources/altGlyph-dom.js: Removed.
* LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash-expected.txt: Removed.
* LayoutTests/svg/text/alt-glpyh-on-fallback-font-crash.svg: Removed.
* LayoutTests/svg/text/alt-glyph-for-surrogate-pair-expected.svg: Removed.
* LayoutTests/svg/text/alt-glyph-for-surrogate-pair.svg: Removed.
* LayoutTests/svg/text/glyphref-renderer-create-crash-expected.txt: Removed.
* LayoutTests/svg/text/glyphref-renderer-create-crash.html: Removed.
* LayoutTests/svg/text/text-altglyph-01-b-expected.txt: Removed.
* LayoutTests/svg/text/text-altglyph-01-b.svg: Removed.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/svg/legacy/SVGResources.cpp:
(WebCore::clipperFilterMaskerTags):
(WebCore::fillAndStrokeTags):
* Source/WebCore/svg/SVGAltGlyphDefElement.cpp: Removed.
* Source/WebCore/svg/SVGAltGlyphDefElement.h: Removed.
* Source/WebCore/svg/SVGAltGlyphElement.cpp: Removed.
* Source/WebCore/svg/SVGAltGlyphElement.h: Removed.
* Source/WebCore/svg/SVGAltGlyphItemElement.cpp: Removed.
* Source/WebCore/svg/SVGAltGlyphItemElement.h: Removed.
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::isSVGLayerAwareElement):
(WebCore::SVGElement::childShouldCreateRenderer const):
* Source/WebCore/svg/SVGFontElement.cpp:
* Source/WebCore/svg/SVGFontFaceElement.cpp:
* Source/WebCore/svg/SVGGlyphElement.cpp: Removed.
* Source/WebCore/svg/SVGGlyphElement.h: Removed.
* Source/WebCore/svg/SVGGlyphRefElement.cpp: Removed.
* Source/WebCore/svg/SVGGlyphRefElement.h: Removed.
* Source/WebCore/svg/SVGMissingGlyphElement.cpp: Removed.
* Source/WebCore/svg/SVGMissingGlyphElement.h: Removed.
* Source/WebCore/svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::rendererIsNeeded):
* Source/WebCore/svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::childShouldCreateRenderer const):
(WebCore::SVGTSpanElement::rendererIsNeeded):
* Source/WebCore/svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::childShouldCreateRenderer const):
* Source/WebCore/svg/SVGTextPositioningElement.cpp:
* Source/WebCore/svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::GlyphData::GlyphData):
(WebCore::SVGToOTFFontConverter::processGlyphElement):
(WebCore::firstMissingGlyphElement):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
* Source/WebCore/svg/svgtags.in:
Canonical link: https://commits.webkit.org/322845@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications