48e968c392
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 |
||
---|---|---|
.. | ||
W3C-I18N | ||
W3C-SVG-1.1 | ||
W3C-SVG-1.1-SE | ||
animations | ||
as-background-image | ||
as-border-image | ||
as-image | ||
as-object | ||
batik | ||
carto.net | ||
css | ||
custom | ||
dom | ||
dynamic-updates | ||
filters | ||
fonts | ||
foreignObject | ||
hixie | ||
in-html | ||
overflow | ||
repaint | ||
stroke | ||
text | ||
transforms | ||
webarchive | ||
wicd | ||
zoom |