haikuwebkit/LayoutTests/svg/text
Chris Dumez 48e968c392 Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents
https://bugs.webkit.org/show_bug.cgi?id=227016

Reviewed by Darin Adler.

Source/WebCore:

Update Document's execCommand() / queryCommand*() to throw an InvalidStateError when the document
is not an HTML/XHTML document. This matches Blink's behavior. Firefox is even stricter and throws
for all non HTML documents (including XHTML).

Test: fast/dom/Document/document-execcommand.html

* dom/Document.cpp:
(WebCore::Document::execCommand):
(WebCore::Document::queryCommandEnabled):
(WebCore::Document::queryCommandIndeterm):
(WebCore::Document::queryCommandState):
(WebCore::Document::queryCommandSupported):
(WebCore::Document::queryCommandValue):
* dom/Document.h:

Source/WebKitLegacy/mac:

Update ObjC bindings since the WebCore API now returns ExceptionOr<> types.

* DOM/DOMDocument.mm:
(-[DOMDocument execCommand:userInterface:value:]):
(-[DOMDocument queryCommandEnabled:]):
(-[DOMDocument queryCommandIndeterm:]):
(-[DOMDocument queryCommandState:]):
(-[DOMDocument queryCommandSupported:]):
(-[DOMDocument queryCommandValue:]):

LayoutTests:

* fast/dom/Document/document-execcommand-expected.txt: Added.
* fast/dom/Document/document-execcommand.html: Added.
Add layout test coverage.

* editing/pasteboard/createMarkup-assert-expected.txt: Removed.
* editing/pasteboard/createMarkup-assert.xml: Removed.
* platform/mac/svg/text/foreignObject-repaint-expected.txt:
* platform/mac/svg/text/foreignObject-text-clipping-bug-expected.txt:
* platform/mac/svg/text/text-align-01-b-expected.txt:
* platform/mac/svg/text/text-align-02-b-expected.txt:
* platform/mac/svg/text/text-align-03-b-expected.txt:
* platform/mac/svg/text/text-align-04-b-expected.txt:
* platform/mac/svg/text/text-align-05-b-expected.txt:
* platform/mac/svg/text/text-align-06-b-expected.txt:
* platform/mac/svg/text/text-deco-01-b-expected.txt:
* platform/mac/svg/text/text-fonts-01-t-expected.txt:
* platform/mac/svg/text/text-fonts-02-t-expected.txt:
* platform/mac/svg/text/text-intro-05-t-expected.txt:
* platform/mac/svg/text/text-path-01-b-expected.txt:
* platform/mac/svg/text/text-spacing-01-b-expected.txt:
* platform/mac/svg/text/text-text-01-b-expected.txt:
* platform/mac/svg/text/text-text-03-b-expected.txt:
* platform/mac/svg/text/text-text-04-t-expected.txt:
* platform/mac/svg/text/text-text-05-t-expected.txt:
* platform/mac/svg/text/text-text-07-t-expected.txt:
* platform/mac/svg/text/text-text-08-b-expected.txt:
* platform/mac/svg/text/text-tref-01-b-expected.txt:
* platform/mac/svg/text/text-tselect-01-b-expected.txt:
* platform/mac/svg/text/text-tselect-02-f-expected.txt:
* platform/mac/svg/text/text-tspan-01-b-expected.txt:
* svg/custom/bug78838-expected.txt:
* svg/custom/bug79798-expected.txt:
* svg/custom/delete-modified-text-in-defs-crash.svg:
* svg/custom/layout-loop-expected.txt:
* svg/text/text-positioning-remove-child-crash.svg:
Rebaseline / update existing tests due to behavior change.

Canonical link: https://commits.webkit.org/238900@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-17 05:39:51 +00:00
..
resources
a-display-block-expected.txt
a-display-block.html
add-tspan-position-bug-expected.html
add-tspan-position-bug.html
alt-glpyh-on-fallback-font-crash-expected.txt
alt-glpyh-on-fallback-font-crash.svg
alt-glyph-for-surrogate-pair-expected.svg
alt-glyph-for-surrogate-pair.svg
append-text-node-to-tspan-expected.txt
append-text-node-to-tspan.html
bidi-embedded-direction-expected.txt
bidi-embedded-direction.svg
bidi-reorder-value-lists-expected.txt
bidi-reorder-value-lists.svg
bidi-text-anchor-direction-expected.txt
bidi-text-anchor-direction.svg
bidi-text-query-expected.txt
bidi-text-query.svg
bidi-tspans-expected.txt
bidi-tspans.svg
caret-in-svg-text-expected.txt
caret-in-svg-text.xhtml
clear-floats-crash-expected.txt 2010-06-11 Abhishek Arya <inferno@chromium.org> 2010-06-11 23:33:27 +00:00
clear-floats-crash.svg
ems-display-none-expected.txt
ems-display-none.svg
exs-display-none-expected.txt
exs-display-none.svg
font-bad-unitsperem-expected.txt
font-bad-unitsperem.html
font-size-below-point-five-2-expected.txt [Mac] Enable kerning, ligatures, and printer fonts 2014-12-28 03:18:29 +00:00
font-size-below-point-five-2.svg
font-size-below-point-five-expected.txt
font-size-below-point-five.svg
font-size-null-assertion-expected.txt
font-size-null-assertion.svg
font-size-too-large-crash-expected.txt
font-size-too-large-crash.svg
font-small-enlarged-minimum-larger-expected.svg
font-small-enlarged-minimum-larger.svg
font-small-enlarged-minimum-smaller-expected.svg
font-small-enlarged-minimum-smaller.svg
font-style-keyword-expected.txt
font-style-keyword.html
foreignObject-repaint.xml Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
foreignObject-text-clipping-bug.xml Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
glyphref-renderer-create-crash-expected.txt
glyphref-renderer-create-crash.html
hidpi-text-selection-rect-position-expected.html
hidpi-text-selection-rect-position.html
highcharts-assertion-expected.txt
highcharts-assertion.html
inline-text-destroy-attributes-crash-expected.txt
inline-text-destroy-attributes-crash.xhtml
kerning.svg
lengthAdjust-text-metrics-expected.txt
lengthAdjust-text-metrics.html
modify-text-node-in-tspan-expected.txt
modify-text-node-in-tspan.html
modify-tspan-position-bug-expected.html
modify-tspan-position-bug.html
monospace-text-size-in-img-expected.html
monospace-text-size-in-img.html
multichar-glyph.svg Adapt inline SVG sizing behavior to Firefox and Blink 2014-05-06 06:06:28 +00:00
non-bmp-positioning-lists-expected.svg
non-bmp-positioning-lists.svg
non-bmp-tspans-expected.svg
non-bmp-tspans.svg
offset-square-svg-font-expected.html
offset-square-svg-font.html
preserve-break-word-expected.html
preserve-break-word.html
remove-text-node-from-tspan-expected.txt
remove-text-node-from-tspan.html
remove-tspan-from-text-expected.txt
remove-tspan-from-text.html
scaled-font-expected.txt
scaled-font.svg
scaling-font-with-geometric-precision-expected.txt
scaling-font-with-geometric-precision.html
select-text-inside-non-static-position-expected.txt
select-text-inside-non-static-position.html
select-text-svgfont-expected.txt
select-text-svgfont.html
select-textLength-spacing-squeeze-1-expected.txt
select-textLength-spacing-squeeze-1.svg
select-textLength-spacing-squeeze-2-expected.txt
select-textLength-spacing-squeeze-2.svg
select-textLength-spacing-squeeze-3-expected.txt
select-textLength-spacing-squeeze-3.svg
select-textLength-spacing-squeeze-4-expected.txt
select-textLength-spacing-squeeze-4.svg
select-textLength-spacing-stretch-1-expected.txt
select-textLength-spacing-stretch-1.svg
select-textLength-spacing-stretch-2-expected.txt
select-textLength-spacing-stretch-2.svg
select-textLength-spacing-stretch-3-expected.txt
select-textLength-spacing-stretch-3.svg
select-textLength-spacing-stretch-4-expected.txt
select-textLength-spacing-stretch-4.svg
select-textLength-spacingAndGlyphs-squeeze-1-expected.txt
select-textLength-spacingAndGlyphs-squeeze-1.svg
select-textLength-spacingAndGlyphs-squeeze-2-expected.txt
select-textLength-spacingAndGlyphs-squeeze-2.svg
select-textLength-spacingAndGlyphs-squeeze-3-expected.txt
select-textLength-spacingAndGlyphs-squeeze-3.svg
select-textLength-spacingAndGlyphs-squeeze-4-expected.txt
select-textLength-spacingAndGlyphs-squeeze-4.svg
select-textLength-spacingAndGlyphs-stretch-1-expected.txt
select-textLength-spacingAndGlyphs-stretch-1.svg
select-textLength-spacingAndGlyphs-stretch-2-expected.txt
select-textLength-spacingAndGlyphs-stretch-2.svg Last test gardening after r177774 (for reals this time) 2015-03-09 05:32:06 +00:00
select-textLength-spacingAndGlyphs-stretch-3-expected.txt
select-textLength-spacingAndGlyphs-stretch-3.svg
select-textLength-spacingAndGlyphs-stretch-4-expected.txt
select-textLength-spacingAndGlyphs-stretch-4.svg
select-x-list-1-expected.txt
select-x-list-1.svg
select-x-list-2-expected.txt
select-x-list-2.svg
select-x-list-3-expected.txt
select-x-list-3.svg
select-x-list-4-expected.txt
select-x-list-4.svg
select-x-list-with-tspans-1-expected.txt Optimize baselines: svg/* 2013-11-10 08:39:42 +00:00
select-x-list-with-tspans-1.svg
select-x-list-with-tspans-2-expected.txt
select-x-list-with-tspans-2.svg
select-x-list-with-tspans-3-expected.txt
select-x-list-with-tspans-3.svg
select-x-list-with-tspans-4-expected.txt
select-x-list-with-tspans-4.svg
selection-background-color-expected.txt
selection-background-color.xhtml
selection-doubleclick-expected.txt
selection-doubleclick.svg
selection-styles.xhtml
selection-tripleclick-expected.txt
selection-tripleclick.svg
small-fonts-2-expected.txt Optimize baselines: svg/* 2013-11-10 08:39:42 +00:00
small-fonts-2.svg
small-fonts-3-expected.txt
small-fonts-3.svg
small-fonts-expected.txt
small-fonts-in-html5.html
small-fonts.svg
svg-fallback-font-crash-expected.txt
svg-fallback-font-crash.html
svg-font-hittest-expected.txt
svg-font-hittest.html
svg-rtl-text-crash-expected.txt Adapt inline SVG sizing behavior to Firefox and Blink 2014-05-06 06:06:28 +00:00
svg-rtl-text-crash.html
svg-zoom-large-value-expected.txt
svg-zoom-large-value.xhtml
text-align-01-b-expected.txt
text-align-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-align-02-b-expected.txt
text-align-02-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-align-03-b-expected.txt
text-align-03-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-align-04-b-expected.txt
text-align-04-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-align-05-b-expected.txt
text-align-05-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-align-06-b-expected.txt
text-align-06-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-altglyph-01-b-expected.txt
text-altglyph-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-assert-expected.txt
text-assert.svg
text-block-child-crash-expected.txt
text-block-child-crash.xhtml
text-deco-01-b-expected.txt
text-deco-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-default-font-size-expected.html
text-default-font-size.html
text-fill-opacity-expected.txt
text-fill-opacity.svg
text-font-anonymous-parent-expected.txt 2011-06-13 Tim Horton <timothy_horton@apple.com> 2011-06-13 17:59:28 +00:00
text-font-anonymous-parent.xhtml
text-font-invalid-expected.txt
text-font-invalid.html
text-font-uri-invalid-expected.txt
text-font-uri-invalid.svg Use testRunner instead of layoutTestController in SVG tests 2012-08-01 23:05:16 +00:00
text-fonts-01-t-expected.txt
text-fonts-01-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-fonts-02-t-expected.txt
text-fonts-02-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-gradient-positioning-expected.txt
text-gradient-positioning.svg
text-hkern-expected.txt
text-hkern-on-vertical-text-expected.txt
text-hkern-on-vertical-text.svg
text-hkern.svg
text-intro-05-t-expected.txt
text-intro-05-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-midpoint-split-bug-expected.txt
text-midpoint-split-bug.svg
text-outline-expected.svg
text-outline-rgba-expected.html
text-outline-rgba.html
text-outline.html
text-overflow-ellipsis-svgfont-kerning-ligatures.html Remove unneeded whitespace between content and <br> 2020-10-26 13:28:38 +00:00
text-overflow-ellipsis-svgfont.html Remove unneeded whitespace between content and <br> 2020-10-26 13:28:38 +00:00
text-path-01-b-expected.txt
text-path-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-path-middle-align-expected.txt
text-path-middle-align.svg
text-positioning-remove-child-crash-expected.txt
text-positioning-remove-child-crash.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-property-with-display-none-expected.txt
text-property-with-display-none.html
text-rect-precision-expected.txt
text-rect-precision.html
text-repaint-rects.xhtml
text-rescale.html
text-spacing-01-b-expected.txt
text-spacing-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-style-invalid-expected.txt
text-style-invalid.svg Use testRunner instead of layoutTestController in SVG tests 2012-08-01 23:05:16 +00:00
text-style-recalc-crash-expected.txt
text-style-recalc-crash.html
text-text-01-b-expected.txt
text-text-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-text-03-b-expected.txt
text-text-03-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-text-04-t-expected.txt
text-text-04-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-text-05-t-expected.txt
text-text-05-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-text-06-t-expected.txt
text-text-06-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-text-07-t-expected.txt
text-text-07-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-text-08-b-expected.txt
text-text-08-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-tref-01-b-expected.txt
text-tref-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-tselect-01-b-expected.txt
text-tselect-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-tselect-02-f-expected.txt
text-tselect-02-f.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-tspan-01-b-expected.txt
text-tspan-01-b.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-viewbox-rescale-expected.txt
text-viewbox-rescale.html
text-vkern-expected.txt
text-vkern-on-horizontal-text-expected.txt
text-vkern-on-horizontal-text.svg
text-vkern.svg
text-ws-01-t-expected.txt
text-ws-01-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
text-ws-02-t-expected.txt
text-ws-02-t.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
textPathBoundsBug-expected.txt Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
textPathBoundsBug.svg Document's execCommand() / queryCommand*() should throw an exception on non-HTML/XHTML documents 2021-06-17 05:39:51 +00:00
textpath-display-block-expected.txt
textpath-display-block.html
textpath-display-none-expected.html REGRESSION (r163560): Always treat SVG <tspan> and <textPath> as display inline 2014-02-19 17:58:49 +00:00
textpath-display-none.html
textpath-local-url-reference-expected.html
textpath-local-url-reference.html
textpath-outline-expected.svg
textpath-outline.svg
textpath-reference-crash-expected.txt Prevent crash in SVGDocumentExtensions::removeAllElementReferencesForTarget. 2012-06-18 02:12:17 +00:00
textpath-reference-crash.html
textpath-reference-update-expected.html
textpath-reference-update.html
textpath-referencing-text-crash-expected.txt
textpath-referencing-text-crash.svg
tpath-without-path-expected.txt
tpath-without-path.svg
tref-display-inherit-expected.txt
tref-display-inherit.html
tref-event-listener-crash-expected.txt
tref-event-listener-crash.svg
tspan-display-block-expected.txt
tspan-display-block.html
tspan-dynamic-positioning-expected.txt
tspan-dynamic-positioning.svg
tspan-getComputedTextLength-expected.txt
tspan-getComputedTextLength.svg
tspan-multiple-outline-expected.html
tspan-multiple-outline.svg
tspan-outline-2-expected.svg
tspan-outline-2.svg
tspan-outline-expected.svg
tspan-outline.html