Closed Bug 1369867 Opened 7 years ago Closed 7 years ago

stylo: Figure out whether the style sharing cache interacts correctly with the flattened tree

Categories

(Core :: CSS Parsing and Computation, defect)

53 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bzbarsky, Unassigned)

References

Details

I _think_ the style sharing cache compares styles on the DOM parents of the two nodes, not the flattened tree parents, to determine whether cousin sharing is OK. That doesn't seem right.
All the Servo DOM wrapper stuff is flattened-tree aware: http://searchfox.org/mozilla-central/rev/3efd1caff252061946f0773df68bdd50de5eb756/servo/components/style/gecko/wrapper.rs#267 Does that resolve your concern?
Flags: needinfo?(bzbarsky)
Hmm. I _think_ so, if building the bloom filter on the flattened tree does the right thing...
Flags: needinfo?(bzbarsky)
(In reply to Boris Zbarsky [:bz] (if a patch has no decent message, automatic r-) from comment #2) > Hmm. I _think_ so, if building the bloom filter on the flattened tree does > the right thing... Basically, servo's view of the DOM is made up of getting parents, siblings, and children. Parents get the flattened parent, children use a StyleChildrenIterator. Siblings don't do anything special, but Gecko doesn't map siblings to the flattened tree either. So I think this is fine.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Hold on. Selector matching shouldn't happen on the flattened tree, should it? That is, if an element is in an insertion point, child combinators coming up from it should go to its DOM parent, not its insertion point...
(In reply to Boris Zbarsky [:bz] (if a patch has no decent message, automatic r-) from comment #4) > Hold on. Selector matching shouldn't happen on the flattened tree, should > it? That is, if an element is in an insertion point, child combinators > coming up from it should go to its DOM parent, not its insertion point... I didn't know that. This is true for both XBL and shadow DOM? If so, we need to fix that. It'll be a nice boost to selector matching too. Can you file a bug?
Flags: needinfo?(bzbarsky)
> This is true for both XBL and shadow DOM? Yes, at least for our shadow DOM impl. I'm pretty sure it's still true in the updated shadow DOM spec, but I have not verified this. I filed bug 1369954 with some testcases.
Flags: needinfo?(bzbarsky)
You need to log in before you can comment on or make changes to this bug.