Skip to content

Commit 4ee52fc

Browse files
hjanuschkanoamr
andcommitted
Out of order streaming using <template for>
https://bugs.webkit.org/show_bug.cgi?id=318869 Reviewed by NOBODY (OOPS!). Parse processing instructions in HTML and expose their pseudo-attribute accessors behind a testable setting. Add HTMLTemplateElement.htmlFor and use <?marker>, <?start>, and <?end> processing instructions as parser insertion points for <template for>. Redirect parser output into the selected insertion point, remove replaced ranges and marker nodes, and preserve parser behavior across fragments, shadow roots, nested patches, scripts, and DOM mutations. Import the corresponding WPT coverage. Upstream commit: web-platform-tests/wpt@b89af32 Tests: imported/w3c/web-platform-tests/dom/nodes/processing-instruction-attributes.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/reflect-html-for.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-element.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-text-and-element.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-to-head.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-case-sensitive-dom-inserted.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-case-sensitive.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-empty-hash.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-foster-parenting.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-gradual-append.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-html-setters.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-ambiguous.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-outside.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-within.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invalid.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invokes-pagehide-with-end.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invokes-pagehide-without-end.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-cross-document.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-end-while-appending.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-marker-while-appending.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-start-while-appending.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-while-appending.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-multiple-cases.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-multiple.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-mutation-records.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-nested-patch.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-only-html-001.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-parsing-only.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-prepend-element.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-prepend-text.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace-children-with-element.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace-children-with-text.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-reverse.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-sanitization.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-children.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-eval.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-replace.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-scripting-nested.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow-nested.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow-root.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-style-in-head.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-style.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-superseded-by-shadowrootmode.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-supersedes-invalid-shadowrootmode.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-title.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-unclosed-content.html * LayoutTests/fast/xpath/xpath-functional-test-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/dom/nodes/MutationObserver-characterData-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/dom/nodes/processing-instruction-attributes-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/dom/nodes/processing-instruction-attributes.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/reflect-html-for-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/reflect-html-for.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-element-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-element.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-text-and-element-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-text-and-element.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-to-head-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-append-to-head.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-case-sensitive-dom-inserted-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-case-sensitive-dom-inserted.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-case-sensitive-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-case-sensitive.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-empty-hash-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-empty-hash.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-foster-parenting-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-foster-parenting.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-gradual-append-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-gradual-append.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-html-setters-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-html-setters.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-ambiguous-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-ambiguous.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-outside-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-outside.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-within-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-innerHTML-within.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invalid-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invalid.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invokes-pagehide-with-end-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invokes-pagehide-with-end.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invokes-pagehide-without-end-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-invokes-pagehide-without-end.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-cross-document-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-cross-document.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-end-while-appending-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-end-while-appending.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-marker-while-appending-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-marker-while-appending.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-start-while-appending-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-start-while-appending.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-while-appending-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-move-while-appending.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-multiple-cases-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-multiple-cases.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-multiple-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-multiple.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-mutation-records-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-mutation-records.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-nested-patch-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-nested-patch.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-only-html-001-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-only-html-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-parsing-only-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-parsing-only.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-prepend-element-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-prepend-element.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-prepend-text-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-prepend-text.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace-children-with-element-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace-children-with-element.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace-children-with-text-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace-children-with-text.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-replace.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-reverse-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-reverse.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-sanitization-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-sanitization.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-children-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-children.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-eval-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-eval.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-replace-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-script-replace.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-scripting-nested-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-scripting-nested.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow-nested-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow-nested.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow-root-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow-root.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-shadow.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-style-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-style-in-head-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-style-in-head.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-style.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-superseded-by-shadowrootmode-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-superseded-by-shadowrootmode.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-supersedes-invalid-shadowrootmode-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-supersedes-invalid-shadowrootmode.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-title-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-title.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-unclosed-content-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/template-for-unclosed-content.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-for/w3c-import.log: Added. * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_url_file=html5test-com-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_url_file=processing-instructions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_url_file=tests1-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_write_file=html5test-com-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_write_file=processing-instructions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_write_file=tests1-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_write_single_file=html5test-com-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_write_single_file=processing-instructions-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_write_single_file=tests1-expected.txt: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::updateAttributesIfNeeded): (WebCore::ProcessingInstruction::pseudoAttributeValue): (WebCore::ProcessingInstruction::hasAttributes): (WebCore::ProcessingInstruction::getAttributeNames): (WebCore::ProcessingInstruction::getAttribute): (WebCore::ProcessingInstruction::setAttribute): (WebCore::ProcessingInstruction::removeAttribute): (WebCore::ProcessingInstruction::toggleAttribute): (WebCore::ProcessingInstruction::hasAttribute): (WebCore::ProcessingInstruction::updateDataFromAttributes): (WebCore::ProcessingInstruction::checkStyleSheet): * Source/WebCore/dom/ProcessingInstruction.h: * Source/WebCore/dom/ProcessingInstruction.idl: * Source/WebCore/html/HTMLTemplateElement.cpp: (WebCore::HTMLTemplateElement::insertionTarget const): (WebCore::HTMLTemplateElement::insertionNextChild const): (WebCore::HTMLTemplateElement::prepareContentPatching): (WebCore::HTMLTemplateElement::finishParsingChildren): * Source/WebCore/html/HTMLTemplateElement.h: * Source/WebCore/html/HTMLTemplateElement.idl: * Source/WebCore/html/parser/AtomHTMLToken.h: (WebCore::AtomHTMLToken::processingInstructionTarget const): (WebCore::AtomHTMLToken::processingInstructionData const): (WebCore::AtomHTMLToken::AtomHTMLToken): * Source/WebCore/html/parser/HTMLConstructionSite.cpp: (WebCore::insert): (WebCore::HTMLConstructionSite::insertProcessingInstruction): (WebCore::HTMLConstructionSite::insertProcessingInstructionOnDocument): (WebCore::HTMLConstructionSite::insertProcessingInstructionOnHTMLHtmlElement): (WebCore::HTMLConstructionSite::insertHTMLTemplateElement): (WebCore::HTMLConstructionSite::insertTextNode): (WebCore::HTMLConstructionSite::treeScopeForCurrentNode): (WebCore::HTMLConstructionSite::containerForCurrentNode): (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode): (WebCore::registryForCurrentNode): * Source/WebCore/html/parser/HTMLConstructionSite.h: * Source/WebCore/html/parser/HTMLParserOptions.cpp: (WebCore::HTMLParserOptions::HTMLParserOptions): * Source/WebCore/html/parser/HTMLParserOptions.h: * Source/WebCore/html/parser/HTMLToken.h: (WebCore::HTMLToken::clear): (WebCore::HTMLToken::processingInstructionTarget const): (WebCore::HTMLToken::processingInstructionData const): (WebCore::HTMLToken::beginProcessingInstruction): (WebCore::HTMLToken::appendToProcessingInstructionTarget): (WebCore::HTMLToken::appendToProcessingInstructionData): * Source/WebCore/html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::emitProcessingInstruction): (WebCore::HTMLTokenizer::processToken): * Source/WebCore/html/parser/HTMLTokenizer.h: * Source/WebCore/html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processToken): (WebCore::HTMLTreeBuilder::processProcessingInstruction): (WebCore::HTMLTreeBuilder::processTokenInForeignContent): * Source/WebCore/html/parser/HTMLTreeBuilder.h: Co-authored-by: Noam Rosenthal <nrosenthal@chromium.org>
1 parent 366915d commit 4ee52fc

125 files changed

Lines changed: 4273 additions & 5313 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎LayoutTests/fast/xpath/xpath-functional-test-expected.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
[ok].//*[@id]
2828
[ok].//*[attribute::id]
2929
[ok].//blockquote/text()
30-
[ng].//blockquote/comment()
31-
[ng].//blockquote/processing-instruction()
32-
[ng].//blockquote/processing-instruction("pi")
33-
[ng].//blockquote/node()
30+
[ok].//blockquote/comment()
31+
[ok].//blockquote/processing-instruction()
32+
[ok].//blockquote/processing-instruction("pi")
33+
[ok].//blockquote/node()
3434
[ok].//blockquote/p
3535
[ok].//blockquote/*
3636
[ok].//*[child::* and preceding::font]

‎LayoutTests/imported/w3c/web-platform-tests/dom/nodes/MutationObserver-characterData-expected.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ PASS characterData Text.deleteData: simple mutation
1313
PASS characterData Text.deleteData: empty mutation
1414
PASS characterData Text.replaceData: simple mutation
1515
PASS characterData Text.replaceData: empty mutation
16-
PASS characterData ProcessingInstruction: data mutations
16+
FAIL characterData ProcessingInstruction: data mutations assert_equals: oldValue didn't match expected "?processing data?" but got "data"
1717
PASS characterData Comment: data mutations
1818
PASS Range (r70) is created
1919
PASS characterData Range.deleteContents: child and data removal mutation
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
2+
PASS Processing instruction in main parser
3+
PASS Processing instruction attribute parsing rejects unquoted attributes from html-dom
4+
PASS Processing instruction attribute mutation from html-dom
5+
PASS Processing instruction attribute parsing allows _ in attribute names from html-dom
6+
PASS Processing instruction toggleAttribute from html-dom
7+
PASS check attribute value: "=" (source: "html-dom")
8+
PASS check attribute value: "axx"" (source: "html-dom")
9+
PASS check attribute value: "axx>" (source: "html-dom")
10+
PASS check attribute value: "some<>" (source: "html-dom")
11+
PASS check attribute value: "'""'" (source: "html-dom")
12+
PASS check attribute value: "aa"aa"" (source: "html-dom")
13+
PASS Invalid attribute name: = (source: html-dom)
14+
PASS Invalid attribute name: a= (source: html-dom)
15+
PASS Invalid attribute name: =x (source: html-dom)
16+
PASS Invalid attribute name: b> (source: html-dom)
17+
PASS Invalid attribute name: > (source: html-dom)
18+
PASS Invalid attribute name: >x (source: html-dom)
19+
PASS Invalid attribute name: /x/ (source: html-dom)
20+
PASS Invalid attribute name: / (source: html-dom)
21+
PASS Invalid attribute name: x/ (source: html-dom)
22+
PASS Invalid attribute name: x (source: html-dom)
23+
PASS Invalid attribute name: x (source: html-dom)
24+
PASS Invalid attribute name: x
25+
(source: html-dom)
26+
PASS Invalid attribute name:
27+
x (source: html-dom)
28+
PASS Invalid attribute name: x\r (source: html-dom)
29+
PASS Invalid attribute name: \rx (source: html-dom)
30+
PASS Valid attribute name: $ (source: html-dom)
31+
PASS Valid attribute name: _ (source: html-dom)
32+
PASS Valid attribute name: $foo (source: html-dom)
33+
PASS Valid attribute name: _bar (source: html-dom)
34+
PASS Valid attribute name: a$b (source: html-dom)
35+
PASS Valid attribute name: a_b (source: html-dom)
36+
PASS Distinct attribute name (source: html-dom): ABC and abc
37+
PASS Distinct attribute name (source: html-dom): abC and abc
38+
PASS Distinct attribute name (source: html-dom): x123A and x123a
39+
PASS Processing instruction attributes with xml-stylesheet from html-dom
40+
PASS Processing instruction attribute parsing rejects unquoted attributes from html-parser
41+
PASS Processing instruction attribute mutation from html-parser
42+
PASS Processing instruction attribute parsing allows _ in attribute names from html-parser
43+
PASS Processing instruction toggleAttribute from html-parser
44+
PASS check attribute value: "=" (source: "html-parser")
45+
PASS check attribute value: "axx"" (source: "html-parser")
46+
PASS check attribute value: "axx>" (source: "html-parser")
47+
PASS check attribute value: "some<>" (source: "html-parser")
48+
PASS check attribute value: "'""'" (source: "html-parser")
49+
PASS check attribute value: "aa"aa"" (source: "html-parser")
50+
PASS Invalid attribute name: = (source: html-parser)
51+
PASS Invalid attribute name: a= (source: html-parser)
52+
PASS Invalid attribute name: =x (source: html-parser)
53+
PASS Invalid attribute name: b> (source: html-parser)
54+
PASS Invalid attribute name: > (source: html-parser)
55+
PASS Invalid attribute name: >x (source: html-parser)
56+
PASS Invalid attribute name: /x/ (source: html-parser)
57+
PASS Invalid attribute name: / (source: html-parser)
58+
PASS Invalid attribute name: x/ (source: html-parser)
59+
PASS Invalid attribute name: x (source: html-parser)
60+
PASS Invalid attribute name: x (source: html-parser)
61+
PASS Invalid attribute name: x
62+
(source: html-parser)
63+
PASS Invalid attribute name:
64+
x (source: html-parser)
65+
PASS Invalid attribute name: x\r (source: html-parser)
66+
PASS Invalid attribute name: \rx (source: html-parser)
67+
PASS Valid attribute name: $ (source: html-parser)
68+
PASS Valid attribute name: _ (source: html-parser)
69+
PASS Valid attribute name: $foo (source: html-parser)
70+
PASS Valid attribute name: _bar (source: html-parser)
71+
PASS Valid attribute name: a$b (source: html-parser)
72+
PASS Valid attribute name: a_b (source: html-parser)
73+
PASS Distinct attribute name (source: html-parser): ABC and abc
74+
PASS Distinct attribute name (source: html-parser): abC and abc
75+
PASS Distinct attribute name (source: html-parser): x123A and x123a
76+
PASS Processing instruction attribute parsing rejects unquoted attributes from xml-dom
77+
PASS Processing instruction attribute mutation from xml-dom
78+
PASS Processing instruction attribute parsing allows _ in attribute names from xml-dom
79+
PASS Processing instruction toggleAttribute from xml-dom
80+
PASS check attribute value: "=" (source: "xml-dom")
81+
PASS check attribute value: "axx"" (source: "xml-dom")
82+
PASS check attribute value: "axx>" (source: "xml-dom")
83+
PASS check attribute value: "some<>" (source: "xml-dom")
84+
PASS check attribute value: "'""'" (source: "xml-dom")
85+
PASS check attribute value: "aa"aa"" (source: "xml-dom")
86+
PASS Invalid attribute name: = (source: xml-dom)
87+
PASS Invalid attribute name: a= (source: xml-dom)
88+
PASS Invalid attribute name: =x (source: xml-dom)
89+
PASS Invalid attribute name: b> (source: xml-dom)
90+
PASS Invalid attribute name: > (source: xml-dom)
91+
PASS Invalid attribute name: >x (source: xml-dom)
92+
PASS Invalid attribute name: /x/ (source: xml-dom)
93+
PASS Invalid attribute name: / (source: xml-dom)
94+
PASS Invalid attribute name: x/ (source: xml-dom)
95+
PASS Invalid attribute name: x (source: xml-dom)
96+
PASS Invalid attribute name: x (source: xml-dom)
97+
PASS Invalid attribute name: x
98+
(source: xml-dom)
99+
PASS Invalid attribute name:
100+
x (source: xml-dom)
101+
PASS Invalid attribute name: x\r (source: xml-dom)
102+
PASS Invalid attribute name: \rx (source: xml-dom)
103+
PASS Valid attribute name: $ (source: xml-dom)
104+
PASS Valid attribute name: _ (source: xml-dom)
105+
PASS Valid attribute name: $foo (source: xml-dom)
106+
PASS Valid attribute name: _bar (source: xml-dom)
107+
PASS Valid attribute name: a$b (source: xml-dom)
108+
PASS Valid attribute name: a_b (source: xml-dom)
109+
PASS Distinct attribute name (source: xml-dom): ABC and abc
110+
PASS Distinct attribute name (source: xml-dom): abC and abc
111+
PASS Distinct attribute name (source: xml-dom): x123A and x123a
112+
PASS Processing instruction attributes with xml-stylesheet from xml-dom
113+
PASS Processing instruction attribute parsing rejects unquoted attributes from xml-parser
114+
PASS Processing instruction attribute mutation from xml-parser
115+
PASS Processing instruction attribute parsing allows _ in attribute names from xml-parser
116+
PASS Processing instruction toggleAttribute from xml-parser
117+
PASS check attribute value: "=" (source: "xml-parser")
118+
PASS check attribute value: "axx"" (source: "xml-parser")
119+
PASS check attribute value: "axx>" (source: "xml-parser")
120+
PASS check attribute value: "some<>" (source: "xml-parser")
121+
PASS check attribute value: "'""'" (source: "xml-parser")
122+
PASS check attribute value: "aa"aa"" (source: "xml-parser")
123+
PASS Invalid attribute name: = (source: xml-parser)
124+
PASS Invalid attribute name: a= (source: xml-parser)
125+
PASS Invalid attribute name: =x (source: xml-parser)
126+
PASS Invalid attribute name: b> (source: xml-parser)
127+
PASS Invalid attribute name: > (source: xml-parser)
128+
PASS Invalid attribute name: >x (source: xml-parser)
129+
PASS Invalid attribute name: /x/ (source: xml-parser)
130+
PASS Invalid attribute name: / (source: xml-parser)
131+
PASS Invalid attribute name: x/ (source: xml-parser)
132+
PASS Invalid attribute name: x (source: xml-parser)
133+
PASS Invalid attribute name: x (source: xml-parser)
134+
PASS Invalid attribute name: x
135+
(source: xml-parser)
136+
PASS Invalid attribute name:
137+
x (source: xml-parser)
138+
PASS Invalid attribute name: x\r (source: xml-parser)
139+
PASS Invalid attribute name: \rx (source: xml-parser)
140+
PASS Valid attribute name: $ (source: xml-parser)
141+
PASS Valid attribute name: _ (source: xml-parser)
142+
PASS Valid attribute name: $foo (source: xml-parser)
143+
PASS Valid attribute name: _bar (source: xml-parser)
144+
PASS Valid attribute name: a$b (source: xml-parser)
145+
PASS Valid attribute name: a_b (source: xml-parser)
146+
PASS Distinct attribute name (source: xml-parser): ABC and abc
147+
PASS Distinct attribute name (source: xml-parser): abC and abc
148+
PASS Distinct attribute name (source: xml-parser): x123A and x123a
149+
PASS Processing instruction attributes with xml-stylesheet from xml-parser
150+

0 commit comments

Comments
 (0)