style: Add a couple FIXMEs I've noticed while working on this.

::slotted is hard.
This commit is contained in:
Emilio Cobos Álvarez 2018-01-11 15:40:02 +01:00
parent cb1a951477
commit 14661e470f
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 5 additions and 0 deletions

View file

@ -262,6 +262,8 @@ impl ElementData {
} }
let mut xbl_stylists = SmallVec::<[_; 3]>::new(); let mut xbl_stylists = SmallVec::<[_; 3]>::new();
// FIXME(emilio): This is wrong, needs to account for ::slotted rules
// that may apply to elements down the tree.
let cut_off_inheritance = let cut_off_inheritance =
element.each_applicable_non_document_style_rule_data(|data, quirks_mode| { element.each_applicable_non_document_style_rule_data(|data, quirks_mode| {
xbl_stylists.push((data, quirks_mode)) xbl_stylists.push((data, quirks_mode))

View file

@ -505,6 +505,9 @@ where
DescendantInvalidationKind::Slotted, DescendantInvalidationKind::Slotted,
); );
// FIXME(emilio): Need to handle nested slotted nodes if `element`
// is itself a <slot>.
debug_assert!( debug_assert!(
sibling_invalidations.is_empty(), sibling_invalidations.is_empty(),
"::slotted() shouldn't have sibling combinators to the right, \ "::slotted() shouldn't have sibling combinators to the right, \