Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: de64e62a2a5041b0d59b985feba7e080993c36b8
      
https://github.com/WebKit/WebKit/commit/de64e62a2a5041b0d59b985feba7e080993c36b8
  Author: Anne van Kesteren <[email protected]>
  Date:   2024-04-11 (Thu, 11 Apr 2024)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-repeats-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-repeats.html
    A 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml-ordering-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml-ordering.html
    A 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml.html
    R 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml.tentative-expected.txt
    R 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml.tentative.html
    M 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/w3c-import.log
    M LayoutTests/tests-options.json
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/DerivedSources-input.xcfilelist
    M Source/WebCore/DerivedSources-output.xcfilelist
    M Source/WebCore/DerivedSources.make
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Element.h
    A Source/WebCore/dom/GetHTMLOptions.h
    A Source/WebCore/dom/GetHTMLOptions.idl
    M Source/WebCore/dom/InnerHTML.idl
    M Source/WebCore/dom/ShadowRoot.cpp
    M Source/WebCore/dom/ShadowRoot.h
    M Source/WebCore/dom/ShadowRoot.idl
    M Source/WebCore/dom/ShadowRootInit.h
    M Source/WebCore/dom/ShadowRootInit.idl
    M Source/WebCore/editing/MarkupAccumulator.cpp
    M Source/WebCore/editing/MarkupAccumulator.h
    M Source/WebCore/editing/markup.cpp
    M Source/WebCore/editing/markup.h
    M Source/WebCore/html/HTMLAttributeNames.in
    M Source/WebCore/html/HTMLTemplateElement.cpp
    M Source/WebCore/html/HTMLTemplateElement.idl
    M Source/WebCore/html/parser/HTMLConstructionSite.cpp
    M Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp

  Log Message:
  -----------
  Add serializable shadow roots and getHTML()
https://bugs.webkit.org/show_bug.cgi?id=271343
rdar://125513986

Reviewed by Ryosuke Niwa.

This implements https://github.com/whatwg/html/pull/10139 as amended by
https://github.com/whatwg/html/pull/10260.

This also changes the way a shadow root is serialized to avoid creating
a template element.

The API is guarded by DeclarativeShadowRootsSerializerAPIsEnabled just
in case there is a need to disable it without removing the code.

Thanks to Chris Dumez for his help with Vector<RefPtr<ShadowRoot>>.

WPT tests are synchronized up to and including this commit:
https://github.com/web-platform-tests/wpt/commit/dd2e51de9985a1c9d381607c2b314b6562545d37

This also adjusts the copyright lines to match the commit log for the
relevant files.

* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-repeats-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-repeats.html:
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml-ordering-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml-ordering.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml.tentative-expected.txt:
 Removed.
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/gethtml.tentative.html:
 Removed.
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/w3c-import.log:
* LayoutTests/tests-options.json:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::getHTML const):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/GetHTMLOptions.h: Added.
* Source/WebCore/dom/GetHTMLOptions.idl: Added.
* Source/WebCore/dom/InnerHTML.idl:
* Source/WebCore/dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::getHTML const):
(WebCore::ShadowRoot::cloneNodeInternal):
* Source/WebCore/dom/ShadowRoot.h:
* Source/WebCore/dom/ShadowRoot.idl:
* Source/WebCore/dom/ShadowRootInit.h:
* Source/WebCore/dom/ShadowRootInit.idl:
* Source/WebCore/editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::MarkupAccumulator):
(WebCore::MarkupAccumulator::shouldIncludeShadowRoots const):
(WebCore::MarkupAccumulator::includeShadowRoot const):
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
(WebCore::MarkupAccumulator::replacementElement):
* Source/WebCore/editing/MarkupAccumulator.h:
(WebCore::MarkupAccumulator::MarkupAccumulator):
* Source/WebCore/editing/markup.cpp:
(WebCore::serializeFragment):
* Source/WebCore/editing/markup.h:
(WebCore::serializeFragment):
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLTemplateElement.cpp:
(WebCore::HTMLTemplateElement::attachAsDeclarativeShadowRootIfNeeded):
* Source/WebCore/html/HTMLTemplateElement.idl:
* Source/WebCore/html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLTemplateElement):
* Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):

Canonical link: https://commits.webkit.org/277374@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to