Open Bug 1712140 Opened 3 years ago Updated 7 hours ago

Implement Declarative Shadow DOM

Categories

(Core :: DOM: Core & HTML, enhancement)

Firefox 90
enhancement

Tracking

()

People

(Reporter: 709922234, Assigned: avandolder, NeedInfo)

References

(Blocks 4 open bugs)

Details

(Keywords: dev-doc-needed)

Attachments

(6 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:90.0) Gecko/20100101 Firefox/90.0

Steps to reproduce:

https://github.com/mfreed7/declarative-shadow-dom

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

Anne: Could you consider something about this?

Flags: needinfo?(annevk)

See https://github.com/mozilla/standards-positions/issues/335. We don't think this is a good idea. Performance numbers might persuade us, but we see a better future in declarative web components.

(FWIW, I'm fine with leaving this bug open so we have a central place in Bugzilla where this is captured.)

Flags: needinfo?(annevk)

Thanks, let's set the severity to N/A for now.

Severity: -- → N/A
Priority: -- → P5
Blocks: shadowdom
Status: UNCONFIRMED → NEW
Ever confirmed: true

There is an open patch for WebKit to enable Declarative Shadow DOM by default on all platforms: https://github.com/WebKit/WebKit/pull/7798.

Priority: P5 → --
See Also: → 1821269

Mosaic standards positions here have changed. Obviously not a commitment to implement, but potentially worth reevaluation, as I haven't seen the change in position (or the new proposal generally) represented in this ticket since the previous proposal was considered harmful.

*Mozilla

Blocks: 1850675
Assignee: nobody → avandolder
Keywords: dev-doc-needed
Blocks: 1676798
Duplicate of this bug: 1850675

Is it intentional that a lot of the APIs added here are not behind a pref? Even if we want to enable by default ASAP, there probably should be a runtime flag.

Flags: needinfo?(hsivonen)
Flags: needinfo?(avandolder)
Attachment #9363725 - Attachment description: Bug 1712140 - Part 5: Unblock Declarative ShadowDOM tests. r?#dom-core → Bug 1712140 - Part 6: Unblock Declarative ShadowDOM tests. r?#dom-core
Flags: needinfo?(avandolder)
Flags: needinfo?(hsivonen)
See Also: → 1867577
Pushed by avandolder@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ff3bb42f91d1
Part 1: Add Declarative ShadowDOM attributes to parser. r=dom-core,emilio,hsivonen
https://hg.mozilla.org/integration/autoland/rev/59ee434d503e
Part 2: Allow ShadowRoots to be clonable and declarative. r=webidl,emilio,saschanaz
https://hg.mozilla.org/integration/autoland/rev/4241a7241a9b
Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
https://hg.mozilla.org/integration/autoland/rev/98dd5766dd46
Part 4: Add parseHTMLUnsafe and setHTMLUnsafe methods. r=dom-core,webidl,hsivonen
https://hg.mozilla.org/integration/autoland/rev/14ebbfca2e84
Part 5: Block Declarative ShadowDOM behind feature pref. r=emilio
https://hg.mozilla.org/integration/autoland/rev/554a46ed8046
Part 6: Unblock Declarative ShadowDOM tests. r=dom-core,hsivonen

Backed out for causing wpt failures in declarative-shadow-dom-opt-in.html.

Also, this Bp-nu bustage.

Flags: needinfo?(avandolder)
Attachment #9363721 - Attachment description: Bug 1712140 - Part 1: Add Declarative ShadowDOM attributes to parser. r?#dom-core → Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r?#dom-core
Pushed by avandolder@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ffe7a6ad366
Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
https://hg.mozilla.org/integration/autoland/rev/8ae1f766f1f9
Part 2: Allow ShadowRoots to be clonable and declarative. r=webidl,emilio,saschanaz
https://hg.mozilla.org/integration/autoland/rev/b65511d17150
Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
https://hg.mozilla.org/integration/autoland/rev/4d2749962c5f
Part 4: Add parseHTMLUnsafe and setHTMLUnsafe methods. r=dom-core,webidl,hsivonen
https://hg.mozilla.org/integration/autoland/rev/8601fce480ef
Part 5: Block Declarative ShadowDOM behind feature pref. r=emilio
https://hg.mozilla.org/integration/autoland/rev/78e3a33470ae
Part 6: Unblock Declarative ShadowDOM tests. r=dom-core,hsivonen

Backed out for causing wpt failures on declarative-shadow-dom-opt-in.html.

[task 2023-12-04T20:14:28.410Z] 20:14:28     INFO - TEST-PASS | /shadow-dom/declarative/declarative-shadow-dom-opt-in.html | document.write allowed from synchronous script loaded from main document 
[task 2023-12-04T20:14:28.410Z] 20:14:28     INFO - TEST-UNEXPECTED-FAIL | /shadow-dom/declarative/declarative-shadow-dom-opt-in.html | document.write disallowed on fresh document - assert_true: Shadow root FOUND - none should be present. expected true got false
[task 2023-12-04T20:14:28.410Z] 20:14:28     INFO - assert_dsd@http://web-platform.test:8000/shadow-dom/declarative/declarative-shadow-dom-opt-in.html:49:16
[task 2023-12-04T20:14:28.410Z] 20:14:28     INFO - @http://web-platform.test:8000/shadow-dom/declarative/declarative-shadow-dom-opt-in.html:149:13
[task 2023-12-04T20:14:28.410Z] 20:14:28     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2599:25
[task 2023-12-04T20:14:28.410Z] 20:14:28     INFO - test@http://web-platform.test:8000/resources/testharness.js:628:30
[task 2023-12-04T20:14:28.410Z] 20:14:28     INFO - @http://web-platform.test:8000/shadow-dom/declarative/declarative-shadow-dom-opt-in.html:145:5
[task 2023-12-04T20:14:28.448Z] 20:14:28     INFO - TEST-OK | /shadow-dom/declarative/declarative-shadow-dom-opt-in.html | took 956ms
Flags: needinfo?(avandolder)
Flags: needinfo?(avandolder)
Pushed by avandolder@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/50828058065e
Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
https://hg.mozilla.org/integration/autoland/rev/5490dad148ef
Part 2: Allow ShadowRoots to be clonable and declarative. r=webidl,emilio,saschanaz
https://hg.mozilla.org/integration/autoland/rev/e7c5449482f9
Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
https://hg.mozilla.org/integration/autoland/rev/6f50077df42a
Part 4: Add parseHTMLUnsafe and setHTMLUnsafe methods. r=dom-core,webidl,hsivonen
https://hg.mozilla.org/integration/autoland/rev/2ed53d545d6d
Part 5: Block Declarative ShadowDOM behind feature pref. r=emilio
https://hg.mozilla.org/integration/autoland/rev/3d799b386f3e
Part 6: Unblock Declarative ShadowDOM tests. r=dom-core,hsivonen

Backed out for causing Linux related wpt failures in nsHtml5TreeBuilder.cpp.

Also these wpts.

You need to log in before you can comment on or make changes to this bug.