NEW
Unassigned

Status

()

Core
DOM
P3
normal
3 years ago
27 days ago

People

(Reporter: vingtetun, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Just looking at some tutos in both Chrome and Firefox and it seems like the ::content pseudo demo at http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/#toc-style-disbtributed-nodes does not work as expected in Firefox.

(This is with dom.webcomponents.enabled = true).
The demo works now with `dom.webcomponents.enabled = true`
but I can't override css rules for webcomponents with `html[dir="rtl"] webcomponent`. Vivien do you have idea?
Flags: needinfo?(21)
(In reply to Pavel Ivanov [:ivanovpavel] from comment #1)
> The demo works now with `dom.webcomponents.enabled = true`
> but I can't override css rules for webcomponents with `html[dir="rtl"]
> webcomponent`. Vivien do you have idea?

The demo vingtetun linked to does not appear to work for me. Viewing the 'Live Demo' in Chrome Canary shows how is should look.
(In reply to Pavel Ivanov [:ivanovpavel] from comment #1)
> The demo works now with `dom.webcomponents.enabled = true`
> but I can't override css rules for webcomponents with `html[dir="rtl"]
> webcomponent`. Vivien do you have idea?

Sorry Pavel I don't know. Can you open a separate bug with a testcase ?
Flags: needinfo?(21)

Comment 4

3 years ago
Sorry for the annoying question but...

Is this the same bug to address to ensure we have RTL and bidi language support as needed? For example, in changing what the directions of arrows mean for languages like Arabic, Farsi, Urdu etc? Those are on deck for 2.1 and 2.2 so I'm trying to find the best bug to track that sort of work or support.

Comment 5

3 years ago
This is not the same bug. Please file a new one.

Comment 6

3 years ago
And when filing a bug, please attach a minimal testcase which can be run on desktop FF, please.
Hey Olli,

you are right, sorry about this. I opened a Bug 1051763 for this.
See Also: → bug 1059748
Created attachment 8553462 [details] [diff] [review]
Implement shadow DOM ::content pseudo-element

In this patch:

- Add code to nsBindingManager::WalkRules to walk additional rules in shadow trees that contain an insertion point where the element or any of its ancestors are distributed because the ::content pseudo-element allows selectors to step out of a shadow root.
- Adjust the AutoAncestorPusher to keep track of ancestors that have been distributed to insertion points.
- Fix specificity calculation for selectors that include a pseudo-element per spec. [1]
- Add a precise exception for the CSS parser to allow ::content to be followed by more selectors. Spec bug filed. [2]
- Adjust SelectorMatchesTree to handle walking into the ::content pseudo-element.

[1] http://www.w3.org/TR/selectors/#specificity
[2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=27884
Assignee: nobody → wchen
Attachment #8553462 - Flags: review?(bzbarsky)
Looking at that list, this should be multiple patches, which may in fact want review from different people.
Comment on attachment 8553462 [details] [diff] [review]
Implement shadow DOM ::content pseudo-element

And most of those people should probably not be me, but some combination of dbaron and heycam.
Attachment #8553462 - Flags: review?(bzbarsky)

Comment 11

2 years ago
http://stackoverflow.com/a/27629265/2756409 This answer on the subject at Stack Overflow might help give more info on the pseudo-element and its behavior for those who end up taking this bug for review/implementation.
I just stumbled upon this today in playing around with web components. Looks like there is a patch but review missing? It would be great to dig this up and get it ready. William, are you still interested in getting this fixed?
Flags: needinfo?(wchen)
William's focused on his slots work but once that's landed can get back to this (the patch would need rebasing at a minimum).
Depends on: 1205323
Flags: needinfo?(wchen)
Assignee: wchen → nobody
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.