[webkit-changes] [WebKit/WebKit] b8b8ec: Replace Document::setContent() with setMarkupUnsafe()
Anne van Kesteren
noreply at github.com
Tue Jan 9 07:30:49 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b8b8ec28a608aafb861fdd860249b33b094aa7a1
https://github.com/WebKit/WebKit/commit/b8b8ec28a608aafb861fdd860249b33b094aa7a1
Author: Anne van Kesteren <annevk at annevk.nl>
Date: 2024-01-09 (Tue, 09 Jan 2024)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/loader/cache/CachedSVGDocument.cpp
M Source/WebCore/loader/cache/CachedSVGFont.cpp
M Source/WebCore/xml/DOMParser.cpp
M Source/WebCore/xml/XMLHttpRequest.cpp
M Source/WebCore/xml/XSLTProcessor.cpp
Log Message:
-----------
Replace Document::setContent() with setMarkupUnsafe()
https://bugs.webkit.org/show_bug.cgi?id=265318
Reviewed by Ryosuke Niwa.
Rename Document::parseMarkupUnsafe() to setMarkupUnsafe() as unlike the
public parseHTMLUnsafe() static method it does not return anything.
Merge setContent() into it to make the API somewhat clearer.
As a side effect this makes XMLHttpRequest use the fast HTML parser. To
account for that we stop doing the wellFormed() check for HTML as
document's parser will no longer be initialized and therefore that
starts returning false (whereas it used to always return true for
HTML).
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setMarkupUnsafe):
(WebCore::Document::parseHTMLUnsafe):
(WebCore::Document::parseMarkupUnsafe): Deleted.
(WebCore::Document::setContent): Deleted.
* Source/WebCore/dom/Document.h:
* Source/WebCore/loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading):
* Source/WebCore/loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::ensureCustomFontData):
* Source/WebCore/xml/DOMParser.cpp:
(WebCore::DOMParser::parseFromString):
* Source/WebCore/xml/XMLHttpRequest.cpp:
* Source/WebCore/xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
Canonical link: https://commits.webkit.org/272817@main
More information about the webkit-changes
mailing list