Closed Bug 1402941 Opened 7 years ago Closed 7 years ago

Add HTMLSlotElement

Categories

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

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(3 files, 1 obsolete file)

      No description provided.
Attached patch slot_parser.diffSplinter Review
Attachment #8912216 - Flags: review?(hsivonen)
Attached patch slot_dom.diff (obsolete) — Splinter Review
The element isn't enabled yet
Attachment #8912217 - Flags: review?(hsivonen)
I just want to land the code to make it easier to land other Shadow DOM stuff
Attachment #8912217 - Attachment is obsolete: true
Attachment #8912217 - Flags: review?(hsivonen)
Attachment #8912321 - Flags: review?(hsivonen)
Comment on attachment 8912321 [details] [diff] [review]
slot_dom.diff (fixed some nits)

Review of attachment 8912321 [details] [diff] [review]:
-----------------------------------------------------------------

Not saying r+ quite yet pending answer to the question about AssignedNodeOptions getting ignored. (Also, please change the comment about clang-format.)

::: dom/html/HTMLSlotElement.cpp
@@ +52,5 @@
> +
> +void
> +HTMLSlotElement::AssignedNodes(const AssignedNodesOptions& aOptions,
> +                               nsTArray<RefPtr<nsINode>>& aNodes)
> +{

Why is aOptions ignored instead of having an effect per spec?

::: parser/html/java/README.txt
@@ +86,5 @@
>  # Save.
>  cd ../.. # Back to parser/html/java/
>  make translate
>  cd ../../..
> +# XXXsmaug clang-format doesn't deal well with some macros, so you may not want to use it.

Better to guide readers to exclude specific files from clang-format than to suggest not running it at all.
Attachment #8912216 - Flags: review?(hsivonen) → review+
(In reply to Henri Sivonen (:hsivonen) from comment #6)
> Better to guide readers to exclude specific files from clang-format than to
> suggest not running it at all.

Or sections of files, rather. With // clang-format off and // clang-format on
This is just adding the basic class. It is not doing anything yet, that is why 
HTMLSlotElement::AssignedNodes is very dummy.
Note, with this patch there isn't a way to create HTMLSlotElement yet, since the constructor call is explicitly commented out.

I can remove the XXXsmaug  comment, but it has been very painful to notice after wards that clang-format totally destroyed some files.
s/destroyed/destroyed formatting of/
Blocks: 1404842
Comment on attachment 8912321 [details] [diff] [review]
slot_dom.diff (fixed some nits)

Review of attachment 8912321 [details] [diff] [review]:
-----------------------------------------------------------------

(In reply to Olli Pettay [:smaug] from comment #8)
> This is just adding the basic class. It is not doing anything yet, that is
> why 
> HTMLSlotElement::AssignedNodes is very dummy.
> Note, with this patch there isn't a way to create HTMLSlotElement yet, since
> the constructor call is explicitly commented out.

OK.

> I can remove the XXXsmaug  comment, but it has been very painful to notice
> after wards that clang-format totally destroyed some files.

I think it's good to warn readers to make a local backup commit before running ./mach clang-format, but I think it's not OK to suggest not running it at all.
Attachment #8912321 - Flags: review?(hsivonen) → review+
Attached patch slot_dom_2.diffSplinter Review
Looks like I need to add the interface to the interface list on non-stylo, since we enable webcomponents in such cases in test profiles.
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3704f4a298dc
Add HTMLSlotElement (disabled for now), r=hsivonen
https://hg.mozilla.org/mozilla-central/rev/3704f4a298dc
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
No longer blocks: shadowdom-initial-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: