Closed
Bug 1404864
Opened 7 years ago
Closed 7 years ago
ensure HTMLInputElement.form works per spec in Shadow DOM
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: heycam, Assigned: smaug)
References
Details
Attachments
(1 file, 1 obsolete file)
12.22 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Comment 1•7 years ago
|
||
Cameron, which spec do you refer to? Can you attach URL on the bug?
Flags: needinfo?(cam)
Reporter | ||
Comment 2•7 years ago
|
||
I don't know that there is currently a problem. In bug 1404180 comment 6 smaug asked me to file this bug to make sure we get the behavior right.
That bug was about associating form control elements with <form>s, so the stuff that happens in nsGenericHTMLElement::UpdateFormOwner. I think, although it's not exactly clear to me, that only <form> elements in the same shadow tree should be considered.
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#association-of-controls-and-forms
We should also verify that we have the correct behavior for <fieldset> association, in nsGenericHTMLElement::UpdateFieldSet, when shadow trees are involved.
Flags: needinfo?(cam)
Updated•7 years ago
|
Priority: -- → P2
Comment 3•7 years ago
|
||
https://github.com/w3c/webcomponents/issues/196
So, we don't want to cross shadow tree boundaries when finding a form owner.
Updated•7 years ago
|
Assignee: nobody → jjong
Assignee | ||
Comment 4•7 years ago
|
||
remote: View your changes here:
remote: https://hg.mozilla.org/try/rev/eb1f4921a27daa8027f70808f2d1b81b11e97075
remote: https://hg.mozilla.org/try/rev/7f53d74a3588e714bca7fb5c2fc908ff8eda6399
remote:
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7f53d74a3588e714bca7fb5c2fc908ff8eda6399
remote: recorded changegroup in replication log in 0.103s
Assignee | ||
Comment 5•7 years ago
|
||
Looks like there is a wpt test which passes with this change,
TEST-UNEXPECTED-PASS | /shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/test-007.html | A_04_01_07_T02
So mozilla-central/testing/web-platform/meta/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/test-007.html.ini could be removed
Comment 6•7 years ago
|
||
Comment on attachment 8975124 [details] [diff] [review]
form_attribute_in_shadow_dom.diff
Review of attachment 8975124 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/html/nsGenericHTMLElement.cpp
@@ +2134,3 @@
>
> nsAutoString formId;
> + DocumentOrShadowRoot* docOrShadow = GetUncomposedDocOrConnectedShadowRoot();
Nit: you could just assert non-null docOrShadow here instead? Not sure the assertion is very useful anyway, we'll crash immediately below.
Attachment #8975124 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 7•7 years ago
|
||
yeah, the assertion isn't too useful. I guess I should just remove it.
Assignee | ||
Comment 8•7 years ago
|
||
Attachment #8975124 -
Attachment is obsolete: true
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/69256fdf60d6
ensure HTMLInputElement.form works per spec in Shadow DOM, r=peterv
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/11077 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Upstream PR merged
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•