Closed
Bug 992245
Opened 9 years ago
Closed 5 years ago
[WebComponents] Implement :host pseudo class
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: vingtetun, Assigned: emilio)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-complete)
Attachments
(4 files)
4.11 KB,
patch
|
Details | Diff | Splinter Review | |
3.02 KB,
patch
|
Details | Diff | Splinter Review | |
4.07 KB,
patch
|
Details | Diff | Splinter Review | |
59 bytes,
text/x-review-board-request
|
xidorn
:
review+
|
Details |
Just looking at some tutos in both Chrome and Firefox and it seems like the :host rule demo at http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/#toc-style-host does not work as expected in Firefox. (This is with dom.webcomponents.enabled = true).
Reporter | ||
Comment 1•9 years ago
|
||
I'm mostly concerned about the ability to react to user states. Fwiw the first demo seems to not work in Firefox, while the second demo (related to handling user state, does not seems to work in both Firefox nor Chrome 35 on my laptop)
Updated•8 years ago
|
Summary: [WebComponents] :host rule does not seems to work in http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/#toc-style-host → [WebComponents] Implement :host pseudo class
Comment 2•8 years ago
|
||
Assignee: nobody → wchen
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
These patch builds on top of things in bug 1082060, so that bug needs to be sorted out first.
Updated•6 years ago
|
Keywords: dev-doc-needed
Comment 6•6 years ago
|
||
Do we still need this with Shadow DOM v1?
Updated•6 years ago
|
Flags: needinfo?(btian)
Comment 8•6 years ago
|
||
(In reply to Andrew Overholt [:overholt] from comment #6) > Do we still need this with Shadow DOM v1? Yes we still need this per https://drafts.csswg.org/css-scoping/#host-selector.
Updated•6 years ago
|
Priority: P3 → P2
Updated•6 years ago
|
Blocks: shadowdom-layout
Updated•6 years ago
|
No longer blocks: shadowdom-initial-release
Assignee | ||
Updated•6 years ago
|
See Also: → https://github.com/w3c/csswg-drafts/issues/1915
Assignee | ||
Comment 9•6 years ago
|
||
This selector is not as gross as :host-context, I think (i.e., it's doable to make it fast), but I think there are spec issues to sort out. Not that they necessarily block the implementation I guess, but worth taking them into account...
![]() |
||
Updated•5 years ago
|
See Also: → https://webcompat.com/issues/4980
Assignee | ||
Comment 10•5 years ago
|
||
https://www.xfinity.com/support/articles/forward-calls-using-xfinity-mobile-app is broken with Shadow DOM because of this. At least we should implement the selector-less variant.
Comment 11•5 years ago
|
||
https://www.chromestatus.com/features seems another broken page due to this.
Assignee | ||
Comment 12•5 years ago
|
||
I added some infra for this in https://github.com/servo/servo/pull/20243. Will finish this up. I'll add support for the functional version of it in a followup bug.
Assignee: nobody → emilio
Assignee | ||
Comment 13•5 years ago
|
||
here's a basically untested try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8c1e2bfab648c820870146cbb0b38342f194932b I only checked that this fixed the size of the icons in the footer of https://www.polymer-project.org/2.0/docs/devguide/feature-overview with the shadow DOM pref enabled. Need to check cascade order and such.
Assignee | ||
Comment 14•5 years ago
|
||
It also seems to fix the XFinity stuff.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 18•5 years ago
|
||
mozreview-review |
Comment on attachment 8966020 [details] Bug 992245: Implement the non-functional :host selector. https://reviewboard.mozilla.org/r/234760/#review240460 ::: commit-message-efc15:6 (Diff revision 3) > +I didn't use the non_ts_pseudo_class_list bits because as soon as we implement > +the :host(..) bits we're going to need to special-case it anyway. Actually, I have a feeling that `:host` should probably be handled as a tree-structure pseudo-class in selector crate instead. ::: servo/components/style/stylist.rs:1956 (Diff revision 3) > + /// Also, note that other engines don't accept stuff like :host::before / > + /// :host::after, so we don't need to store pseudo rules at all. Does the spec say so? If not, probably worth a spec issue to make it clear one way or the other and have tests for it? ::: testing/web-platform/tests/css/css-scoping/host-cssom-001.html:2 (Diff revision 3) > +<!doctype html> > +<title>CSS Test: :host in CSSOM</title> Methods like matches, querySelector, etc. are defined in DOM standard. They are not part of CSSOM. CSSOM is for operating CSS, while these methods are getting elements, so they shouldn't be considered CSSOM. You probably should rename this test. ::: testing/web-platform/tests/css/css-scoping/host-descendant-invalidation.html:2 (Diff revision 3) > +<!doctype html> > +<title>CSS Test: :host is accounted for during invalidation</title> "invalidation" is not something related to the spec... Maybe some title like "element style is correctly updated for rule with :host" is better for a wpt.
Attachment #8966020 -
Flags: review?(xidorn+moz) → review+
Comment 19•5 years ago
|
||
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5a24374d10f7 Tests for non-functional :host selector. r=xidorn
Comment 20•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5a24374d10f7
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/10387 for changes under testing/web-platform/tests
Upstream PR merged
Assignee | ||
Comment 23•5 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #11) > https://www.chromestatus.com/features seems another broken page due to this. FWIW, this is the only case that these patches didn't fix, and it was because of broken feature detection in their side. As soon as I removed Element.createShadowRoot in https://bugzilla.mozilla.org/show_bug.cgi?id=1453789 this started working.
Comment 24•5 years ago
|
||
BCD was already updated; updated Firefox 61 for developers as well.
Keywords: dev-doc-needed → dev-doc-complete
Updated•4 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•