WebKit
WebKit copied to clipboard
Replace StringContext IDL extended attribute with union types
c90d2cb2a5c7fb5d85f9e8bf766cf1ca981ad68e
Replace StringContext IDL extended attribute with union types https://bugs.webkit.org/show_bug.cgi?id=273412 Reviewed by NOBODY (OOPS!). This patch replaces most usages of the StringContext IDL extended attribute, with union types and updates to the callsites to do the trusted type enforcement. Follow up patches will address HTML timer functions and the StringContext code generator changes. * Source/WebCore/dom/Document+HTML.idl: * Source/WebCore/dom/Document.cpp: (WebCore::Document::parseHTMLUnsafe): (WebCore::Document::write): (WebCore::Document::writeln): * Source/WebCore/dom/Document.h: * Source/WebCore/dom/Document.idl: * Source/WebCore/dom/Element+DOMParsing.idl: * Source/WebCore/dom/Element.cpp: (WebCore::Element::setHTMLUnsafe): (WebCore::Element::setOuterHTML): (WebCore::Element::setInnerHTML): (WebCore::Element::insertAdjacentHTML): * Source/WebCore/dom/Element.h: * Source/WebCore/dom/InnerHTML.idl: * Source/WebCore/dom/Range+DOMParsing.idl: * Source/WebCore/dom/Range.cpp: (WebCore::Range::createContextualFragment): * Source/WebCore/dom/Range.h: * Source/WebCore/dom/ShadowRoot.cpp: (WebCore::ShadowRoot::setHTMLUnsafe): (WebCore::ShadowRoot::setInnerHTML): * Source/WebCore/dom/ShadowRoot.h: * Source/WebCore/dom/TrustedType.cpp: (WebCore::trustedTypeCompliantString): * Source/WebCore/dom/TrustedType.h: * Source/WebCore/html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::srcdoc const): (WebCore::HTMLIFrameElement::setSrcdoc): * Source/WebCore/html/HTMLIFrameElement.h: * Source/WebCore/html/HTMLIFrameElement.idl: * Source/WebCore/workers/Worker.cpp: (WebCore::Worker::create): * Source/WebCore/workers/Worker.h: * Source/WebCore/workers/Worker.idl: * Source/WebCore/workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::importScripts): * Source/WebCore/workers/WorkerGlobalScope.h: * Source/WebCore/workers/WorkerGlobalScope.idl: * Source/WebCore/workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::addRegistration): * Source/WebCore/workers/service/ServiceWorkerContainer.h: * Source/WebCore/workers/service/ServiceWorkerContainer.idl: * Source/WebCore/workers/shared/SharedWorker.cpp: (WebCore::SharedWorker::create): * Source/WebCore/workers/shared/SharedWorker.h: * Source/WebCore/workers/shared/SharedWorker.idl: * Source/WebCore/xml/DOMParser.cpp: (WebCore::DOMParser::parseFromString): * Source/WebCore/xml/DOMParser.h: * Source/WebCore/xml/DOMParser.idl: * LayoutTests/imported/w3c/web-platform-tests/trusted-types/Document-write-exception-order-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/trusted-types/Document-write-exception-order.xhtml: Added. * LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.html: * LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.html:
https://github.com/WebKit/WebKit/commit/c90d2cb2a5c7fb5d85f9e8bf766cf1ca981ad68e
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/e1a760b5114676e2afaf306665f8633c5e9c88d8)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/da473c1de66b45263778bd8ba5b363915e0202e9)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/fbc68476894112477dfa154a60f1435a635daf17)
WPT export at https://github.com/web-platform-tests/wpt/pull/46185
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/fafdce6d8613ff7ae87fd9beedb32ff7b578c8d8)
Scheduled perf A/B testing.
Perf results look good!
Other than the perf aspect does this all look good to you?
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/c90d2cb2a5c7fb5d85f9e8bf766cf1ca981ad68e)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/88813b45e2f049bb62e1ca6cec73ad8c36de107d)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/59ffff3141b6bb87e600b3c60801c8d475e47525)
EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/d6774a5f3af0a50b6917aeccf624cadfdcd187c8)
Committed 279313@main (3b35a19d0a91): https://commits.webkit.org/279313@main
Reviewed commits have been landed. Closing PR #27880 and removing active labels.