Skip to content

Commit 30f0742

Browse files
committed
Account for latest declarative shadow trees changes
https://bugs.webkit.org/show_bug.cgi?id=263852 rdar://117655691 Reviewed by Ryosuke Niwa. As discussed in whatwg/html#5465 shadowRootMode is to be reflected as DOMString, not DOMString?. DOMParser will also no longer be extended to have a dictionary argument. The tests have been synchronized with web-platform-tests up until and including web-platform-tests/wpt#42833 which upstreamed a couple minor adjustments. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag.tentative-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.tentative.html. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.tentative-expected.txt: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/support/helpers.js: Removed. * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/support/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/w3c-import.log: * 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/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/html/HTMLTemplateElement.cpp: (WebCore::HTMLTemplateElement::shadowRootMode const): (WebCore::HTMLTemplateElement::setShadowRootMode): * Source/WebCore/html/HTMLTemplateElement.idl: * Source/WebCore/xml/DOMParser.cpp: (WebCore::DOMParser::parseFromString): * Source/WebCore/xml/DOMParser.h: * Source/WebCore/xml/DOMParser.idl: * Source/WebCore/xml/ParseFromStringOptions.h: Removed. * Source/WebCore/xml/ParseFromStringOptions.idl: Removed. Canonical link: https://commits.webkit.org/269976@main
1 parent f997f0d commit 30f0742

40 files changed

+732
-796
lines changed

LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment-expected.txt

Lines changed: 650 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
const declarativeString = `<${elementType} id=theelement>${getDeclarativeContent(mode, delegatesFocus)}
2020
<span class='lightdom'>${lightDomTextContent}</span></${elementType}>`;
2121
const wrapper = document.createElement('div');
22-
setInnerHTML(wrapper, declarativeString);
22+
wrapper.setHTMLUnsafe(declarativeString);
2323
const element = wrapper.querySelector('#theelement');
2424
return {wrapper: wrapper, element: element};
2525
}

LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative-expected.txt

Lines changed: 0 additions & 650 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
PASS Declarative Shadow DOM: Basic test
3+
PASS Declarative Shadow DOM: Feature detection
4+
PASS Shadowrootmode reflection
5+
PASS Shadowrootmode reflection, setter
6+
FAIL Declarative Shadow DOM: Fragment parser basic test undefined is not a function (near '...div.setHTMLUnsafe...')
7+
FAIL Declarative Shadow DOM: Invalid shadow root attribute div.setHTMLUnsafe is not a function. (In 'div.setHTMLUnsafe(`
8+
<div id="host">
9+
<template shadowrootmode="invalid">
10+
</template>
11+
</div>
12+
`)', 'div.setHTMLUnsafe' is undefined)
13+
FAIL Declarative Shadow DOM: Closed shadow root attribute div.setHTMLUnsafe is not a function. (In 'div.setHTMLUnsafe(`
14+
<div id="host">
15+
<template shadowrootmode="closed">
16+
</template>
17+
</div>
18+
`)', 'div.setHTMLUnsafe' is undefined)
19+
FAIL Declarative Shadow DOM: Missing closing tag div.setHTMLUnsafe is not a function. (In 'div.setHTMLUnsafe(`
20+
<div id="host">
21+
<template shadowrootmode="open">
22+
<slot id="s1" name="slot1"></slot>
23+
</div>
24+
`)', 'div.setHTMLUnsafe' is undefined)
25+
FAIL Declarative Shadow DOM: delegates focus attribute div.setHTMLUnsafe is not a function. (In 'div.setHTMLUnsafe(`
26+
<div id="host">
27+
<template shadowrootmode="open" shadowrootdelegatesfocus>
28+
</template>
29+
</div>
30+
`)', 'div.setHTMLUnsafe' is undefined)
31+
PASS Declarative Shadow DOM: Multiple roots
32+
PASS Declarative Shadow DOM: template containing declarative shadow root
33+
PASS Declarative Shadow DOM: template containing (deeply nested) declarative shadow root
34+
PASS Declarative Shadow DOM: template containing a template containing declarative shadow root
35+
PASS Declarative Shadow DOM: template containing declarative shadow root and UA shadow root
36+
PASS Declarative Shadow DOM: template containing closed declarative shadow root and UA shadow root
37+
PASS Declarative Shadow DOM: template root element
38+
Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<link rel="help" href="https://github.com/whatwg/dom/issues/831">
66
<script src="/resources/testharness.js"></script>
77
<script src="/resources/testharnessreport.js"></script>
8-
<script src="support/helpers.js"></script>
98

109
<div id="host" style="display:none">
1110
<template shadowrootmode="open">
@@ -40,14 +39,24 @@
4039
t.setAttribute('shadowrootmode','OpEn');
4140
assert_equals(t.shadowRootMode,'open','Case insensitive');
4241
t.setAttribute('shadowrootmode','INVALID');
43-
assert_equals(t.shadowRootMode,null,'Invalid values map to null');
42+
assert_equals(t.shadowRootMode,'','Invalid values map to empty string');
4443
t.removeAttribute('shadowrootmode');
45-
assert_equals(t.shadowRootMode,null,'No shadowrootmode attribute maps to null');
44+
assert_equals(t.shadowRootMode,'','No shadowrootmode attribute maps to empty string');
4645
}, 'Shadowrootmode reflection');
4746

47+
test(() => {
48+
const t = document.createElement('template');
49+
t.shadowRootMode = 'blah';
50+
assert_equals(t.shadowRootMode, '');
51+
t.getAttribute('shadowrootmode', 'blah');
52+
t.shadowRootMode = 'CLOSED';
53+
assert_equals(t.shadowRootMode, 'closed');
54+
t.getAttribute('shadowrootmode', 'CLOSED');
55+
}, 'Shadowrootmode reflection, setter');
56+
4857
test(() => {
4958
const div = document.createElement('div');
50-
setInnerHTML(div,`
59+
div.setHTMLUnsafe(`
5160
<div id="host">
5261
<template shadowrootmode="open">
5362
<slot id="s1" name="slot1"></slot>
@@ -68,7 +77,7 @@
6877

6978
test(() => {
7079
const div = document.createElement('div');
71-
setInnerHTML(div,`
80+
div.setHTMLUnsafe(`
7281
<div id="host">
7382
<template shadowrootmode="invalid">
7483
</template>
@@ -84,7 +93,7 @@
8493

8594
test(() => {
8695
const div = document.createElement('div');
87-
setInnerHTML(div,`
96+
div.setHTMLUnsafe(`
8897
<div id="host">
8998
<template shadowrootmode="closed">
9099
</template>
@@ -97,7 +106,7 @@
97106

98107
test(() => {
99108
const div = document.createElement('div');
100-
setInnerHTML(div,`
109+
div.setHTMLUnsafe(`
101110
<div id="host">
102111
<template shadowrootmode="open">
103112
<slot id="s1" name="slot1"></slot>
@@ -113,7 +122,7 @@
113122

114123
test(() => {
115124
const div = document.createElement('div');
116-
setInnerHTML(div,`
125+
div.setHTMLUnsafe(`
117126
<div id="host">
118127
<template shadowrootmode="open" shadowrootdelegatesfocus>
119128
</template>
@@ -122,7 +131,7 @@
122131
var host = div.querySelector('#host');
123132
assert_true(!!host.shadowRoot,"No shadow root found");
124133
assert_true(host.shadowRoot.delegatesFocus,"delegatesFocus should be true");
125-
setInnerHTML(div,`
134+
div.setHTMLUnsafe(`
126135
<div id="host">
127136
<template shadowrootmode="open">
128137
</template>

LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative-expected.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ PASS innerHTML on a <wbr>
106106
PASS innerHTML on template
107107
PASS innerHTML on template, with nested template content
108108
PASS innerHTML on shadowRoot
109-
PASS DOMParser
109+
PASS DOMParser (includingShadowRoots is historical)
110110
PASS createHTMLDocument with innerHTML - not supported
111111
PASS createContextualFragment - not supported
112112
PASS XMLHttpRequest - not supported
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@
101101
fragment = parser.parseFromString(content, 'text/html', {includeShadowRoots: false});
102102
assert_dsd(fragment.body,false);
103103
fragment = parser.parseFromString(content, 'text/html', {includeShadowRoots: true});
104-
assert_dsd(fragment.body,true);
105-
}, 'DOMParser');
104+
assert_dsd(fragment.body,false);
105+
}, 'DOMParser (includingShadowRoots is historical)');
106106

107107
test(() => {
108108
const doc = document.implementation.createHTMLDocument('');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</script>
1717

1818
<shadow-disabled>
19-
<template shadowrootmode="open"><span id=inside/></template>
19+
<template shadowrootmode="open"><span id=inside></span></template>
2020
</shadow-disabled>
2121

2222
<script>

LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative-expected.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
PASS Streaming Declarative Shadow DOM: template .content() should be null
3+
PASS Synchronous mutation events should not be fired during streaming declarative shadow DOM parsing
4+
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
template.setAttribute('shadowrootmode','open');
2828
assert_not_equals(template.content, null, 'Regular template should have content, even after adding shadowrootmode attribute');
2929
assert_not_equals(template.innerHTML, "", 'Regular template should have innerHTML, even after adding shadowrootmode attribute');
30-
assert_not_equals(template.getInnerHTML({includeShadowRoots: true}), "", 'Regular template should have getInnerHTML(), even after adding shadowrootmode attribute');
3130
break;
3231
default:
3332
assert_unreached('Unrecognized template');

LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.tentative-expected.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/support/helpers.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/support/w3c-import.log

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ None
1515
------------------------------------------------------------------------
1616
List of files:
1717
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/support/declarative-child-frame.html
18-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/support/helpers.js

LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/w3c-import.log

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Property values requiring vendor prefixes:
1414
None
1515
------------------------------------------------------------------------
1616
List of files:
17-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow.tentative.html
18-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction.tentative.html
19-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html
20-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html
21-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html
22-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow.tentative.html
17+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-after-attachshadow.html
18+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-parser-interaction.html
19+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html
20+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.html
21+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.html
22+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/declarative-with-disabled-shadow.html
2323
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/getinnerhtml.tentative.html
24-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag.tentative.html
25-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.tentative.html
26-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag.tentative.html
27-
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.tentative.html
24+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-before-closing-tag.html
25+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/innerhtml-on-ordinary-template.html
26+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/move-template-before-closing-tag.html
27+
/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/declarative/script-access.html

Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,20 +2176,6 @@ DeclarativeShadowDOMEnabled:
21762176
WebCore:
21772177
default: true
21782178

2179-
DeclarativeShadowDOMInDOMParserEnabled:
2180-
type: bool
2181-
status: testable
2182-
category: dom
2183-
humanReadableName: "DOMParser support for Declarative Shadow DOM"
2184-
humanReadableDescription: "Enable Declarative Shadow DOM in DOMParser"
2185-
defaultValue:
2186-
WebKitLegacy:
2187-
default: false
2188-
WebKit:
2189-
default: false
2190-
WebCore:
2191-
default: false
2192-
21932179
DeclarativeWebPush:
21942180
type: bool
21952181
status: unstable

Source/WebCore/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,6 @@ set(WebCore_NON_SVG_IDL_FILES
14631463

14641464
xml/CustomXPathNSResolver.idl
14651465
xml/DOMParser.idl
1466-
xml/ParseFromStringOptions.idl
14671466
xml/XMLHttpRequest.idl
14681467
xml/XMLHttpRequestEventTarget.idl
14691468
xml/XMLHttpRequestProgressEvent.idl

Source/WebCore/DerivedSources-input.xcfilelist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,6 @@ $(PROJECT_DIR)/worklets/WorkletGlobalScope.idl
20342034
$(PROJECT_DIR)/worklets/WorkletOptions.idl
20352035
$(PROJECT_DIR)/xml/CustomXPathNSResolver.idl
20362036
$(PROJECT_DIR)/xml/DOMParser.idl
2037-
$(PROJECT_DIR)/xml/ParseFromStringOptions.idl
20382037
$(PROJECT_DIR)/xml/XMLHttpRequest.idl
20392038
$(PROJECT_DIR)/xml/XMLHttpRequestEventTarget.idl
20402039
$(PROJECT_DIR)/xml/XMLHttpRequestProgressEvent.idl

Source/WebCore/DerivedSources-output.xcfilelist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,8 +2084,6 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPanningModelType.cpp
20842084
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPanningModelType.h
20852085
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSParentNode.cpp
20862086
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSParentNode.h
2087-
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSParseFromStringOptions.cpp
2088-
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSParseFromStringOptions.h
20892087
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPath2D.cpp
20902088
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPath2D.h
20912089
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSPayerErrorFields.cpp

Source/WebCore/DerivedSources.make

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,6 @@ JS_BINDING_IDLS := \
16841684
$(WebCore)/worklets/WorkletOptions.idl \
16851685
$(WebCore)/xml/CustomXPathNSResolver.idl \
16861686
$(WebCore)/xml/DOMParser.idl \
1687-
$(WebCore)/xml/ParseFromStringOptions.idl \
16881687
$(WebCore)/xml/XMLHttpRequest.idl \
16891688
$(WebCore)/xml/XMLHttpRequestEventTarget.idl \
16901689
$(WebCore)/xml/XMLHttpRequestProgressEvent.idl \

Source/WebCore/Sources.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3941,7 +3941,6 @@ JSPannerNode.cpp
39413941
JSPannerOptions.cpp
39423942
JSPanningModelType.cpp
39433943
JSParentNode.cpp
3944-
JSParseFromStringOptions.cpp
39453944
JSPath2D.cpp
39463945
JSPayerErrorFields.cpp
39473946
JSPaymentAddress.cpp

Source/WebCore/WebCore.xcodeproj/project.pbxproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3811,7 +3811,6 @@
38113811
9B2D8A7914997CCF00ECEF3E /* UndoStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B2D8A7814997CCF00ECEF3E /* UndoStep.h */; settings = {ATTRIBUTES = (Private, ); }; };
38123812
9B32CDA913DF7FA900F34D13 /* RenderedPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B32CDA713DF7FA900F34D13 /* RenderedPosition.h */; };
38133813
9B417064125662B3006B28FC /* ApplyBlockElementCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B417062125662B3006B28FC /* ApplyBlockElementCommand.h */; };
3814-
9B43D54F28E132FF0095509C /* ParseFromStringOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BB892FA28E12FFD00E7408F /* ParseFromStringOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
38153814
9B4F0636289F3882007831DB /* SlotAssignmentMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B4F0630289F2F08007831DB /* SlotAssignmentMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
38163815
9B50B1DE17CD4C0F0087F63C /* FormAssociatedElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B50B1DC17CD4C0F0087F63C /* FormAssociatedElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
38173816
9B532EA41BA928570038A827 /* SlotAssignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B532EA21BA928570038A827 /* SlotAssignment.h */; };
@@ -15298,8 +15297,6 @@
1529815297
9BAB6C6A12550631001626D4 /* EditingStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingStyle.h; sourceTree = "<group>"; };
1529915298
9BAB6C6B12550631001626D4 /* EditingStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditingStyle.cpp; sourceTree = "<group>"; };
1530015299
9BAF3B2312C1A39800014BF1 /* WritingDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WritingDirection.h; sourceTree = "<group>"; };
15301-
9BB892FA28E12FFD00E7408F /* ParseFromStringOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParseFromStringOptions.h; sourceTree = "<group>"; };
15302-
9BB892FB28E12FFE00E7408F /* ParseFromStringOptions.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ParseFromStringOptions.idl; sourceTree = "<group>"; };
1530315300
9BC5F9DE1D5AAD5D002B749D /* CustomElementRegistry.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CustomElementRegistry.idl; sourceTree = "<group>"; };
1530415301
9BC5F9DF1D5AAF6A002B749D /* JSCustomElementRegistryCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomElementRegistryCustom.cpp; sourceTree = "<group>"; };
1530515302
9BC6C21913CCC97B008E0337 /* HTMLTextFormControlElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTextFormControlElement.h; sourceTree = "<group>"; };
@@ -34767,8 +34764,6 @@
3476734764
1ACE53E30A8D18E70022947D /* DOMParser.idl */,
3476834765
E10B9B6B0B747599003ED890 /* NativeXPathNSResolver.cpp */,
3476934766
E10B9B6A0B747599003ED890 /* NativeXPathNSResolver.h */,
34770-
9BB892FA28E12FFD00E7408F /* ParseFromStringOptions.h */,
34771-
9BB892FB28E12FFE00E7408F /* ParseFromStringOptions.idl */,
3477234767
A833C7F60A2CF1D800D57664 /* xmlattrs.in */,
3477334768
59C28043138DC2410079B7E2 /* XMLErrors.cpp */,
3477434769
59C28044138DC2410079B7E2 /* XMLErrors.h */,
@@ -40652,7 +40647,6 @@
4065240647
CDCD41E81C3DDB0A00965D99 /* ParsedContentRange.h in Headers */,
4065340648
447958041643B49A001E0A7F /* ParsedContentType.h in Headers */,
4065440649
5C4A0FDA25C3449A00D9EE97 /* ParsedRequestRange.h in Headers */,
40655-
9B43D54F28E132FF0095509C /* ParseFromStringOptions.h in Headers */,
4065640650
536D5A23193E8E0C00CE4CAB /* ParsingUtilities.h in Headers */,
4065740651
46893B8427E8D74C002CC13D /* PartitionedSecurityOrigin.h in Headers */,
4065840652
F55B3DCA1251F12D003EF269 /* PasswordInputType.h in Headers */,

Source/WebCore/html/HTMLTemplateElement.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,12 @@ const AtomString& HTMLTemplateElement::shadowRootMode() const
9696
return closed;
9797
if (equalLettersIgnoringASCIICase(modeString, "open"_s))
9898
return open;
99-
return nullAtom();
99+
return emptyAtom();
100100
}
101101

102102
void HTMLTemplateElement::setShadowRootMode(const AtomString& value)
103103
{
104-
if (value.isNull())
105-
removeAttribute(HTMLNames::shadowrootmodeAttr);
106-
else
107-
setAttribute(HTMLNames::shadowrootmodeAttr, value);
104+
setAttribute(HTMLNames::shadowrootmodeAttr, value);
108105
}
109106

110107
void HTMLTemplateElement::setDeclarativeShadowRoot(ShadowRoot& shadowRoot)

Source/WebCore/html/HTMLTemplateElement.idl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@
3333
Exposed=Window
3434
] interface HTMLTemplateElement : HTMLElement {
3535
readonly attribute DocumentFragment content;
36-
[CEReactions=NotNeeded, EnabledBySetting=DeclarativeShadowDOMEnabled] attribute [AtomString] DOMString? shadowRootMode;
36+
[CEReactions=NotNeeded, EnabledBySetting=DeclarativeShadowDOMEnabled] attribute [AtomString] DOMString shadowRootMode;
3737
};

Source/WebCore/xml/DOMParser.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,14 @@ Ref<DOMParser> DOMParser::create(Document& contextDocument)
4444
return adoptRef(*new DOMParser(contextDocument));
4545
}
4646

47-
ExceptionOr<Ref<Document>> DOMParser::parseFromString(const String& string, const String& contentType, ParseFromStringOptions options)
47+
ExceptionOr<Ref<Document>> DOMParser::parseFromString(const String& string, const String& contentType)
4848
{
4949
if (contentType != "text/html"_s && contentType != "text/xml"_s && contentType != "application/xml"_s && contentType != "application/xhtml+xml"_s && contentType != "image/svg+xml"_s)
5050
return Exception { TypeError };
5151
auto document = DOMImplementation::createDocument(contentType, nullptr, m_settings, URL { });
5252
if (m_contextDocument)
5353
document->setContextDocument(*m_contextDocument.get());
54-
OptionSet<ParserContentPolicy> parsingOptions;
55-
if (options.includeShadowRoots && document->settings().declarativeShadowDOMInDOMParserEnabled())
56-
parsingOptions = { ParserContentPolicy::AllowScriptingContent, ParserContentPolicy::AllowPluginContent, ParserContentPolicy::AllowDeclarativeShadowDOM };
57-
else
58-
parsingOptions = { ParserContentPolicy::AllowScriptingContent, ParserContentPolicy::AllowPluginContent };
54+
OptionSet<ParserContentPolicy> parsingOptions = { ParserContentPolicy::AllowScriptingContent, ParserContentPolicy::AllowPluginContent };
5955
document->setParserContentPolicy(parsingOptions);
6056
bool usedFastPath = false;
6157
if (contentType == "text/html"_s) {

0 commit comments

Comments
 (0)