Please sign in to comment.
style: Implement shadow part forwarding (minus invalidation).
Some of the stuff, in particular inside GeckoBindings stuff should be refactored to be less ugly and duplicate a bit less code, but the rest of the code should be landable as is. Some invalidation changes are already needed because we weren't matching with the right shadow host during invalidation (which made existing ::part() tests fail). Pending invalidation work: * Making exportparts work right on the snapshots. * Invalidating parts from descendant hosts. They're not very hard but I need to think how to best implement it: * Maybe get rid of ShadowRoot::mParts and just walk DOM descendants in the Shadow DOM. * Maybe implement a ElementHasExportPartsAttr much like HasPartAttr and use that to keep the list of elements. * Maybe invalidate :host and ::part() together in here * Maybe something else. Opinions? : https://searchfox.org/mozilla-central/rev/131338e5017bc0283d86fb73844407b9a2155c98/servo/components/style/invalidation/element/invalidator.rs#561 Differential Revision: https://phabricator.services.mozilla.com/D53730
- Loading branch information
Showing with 180 additions and 47 deletions.
- +36 −1 components/selectors/matching.rs
- +14 −0 components/selectors/tree.rs
- +5 −1 components/style/dom_apis.rs
- +22 −0 components/style/gecko/wrapper.rs
- +7 −1 components/style/invalidation/element/document_state.rs
- +10 −0 components/style/invalidation/element/element_wrapper.rs
- +24 −7 components/style/invalidation/element/invalidator.rs
- +1 −0 components/style/invalidation/element/state_and_attributes.rs
- +61 −37 components/style/rule_collector.rs