mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Remove some XBL code in the style system.
Differential Revision: https://phabricator.services.mozilla.com/D50554
This commit is contained in:
parent
854c480177
commit
5f30ecc9b1
6 changed files with 3 additions and 125 deletions
|
@ -31,9 +31,6 @@ impl Default for InvalidationMatchingData {
|
|||
/// An invalidation processor for style changes due to state and attribute
|
||||
/// changes.
|
||||
pub struct DocumentStateInvalidationProcessor<'a, E: TElement, I> {
|
||||
// TODO(emilio): We might want to just run everything for every possible
|
||||
// binding along with the document data, or just apply the XBL stuff to the
|
||||
// bound subtrees.
|
||||
rules: I,
|
||||
matching_context: MatchingContext<'a, E::Impl>,
|
||||
document_states_changed: DocumentState,
|
||||
|
|
|
@ -28,7 +28,7 @@ where
|
|||
|
||||
/// Whether the invalidation processor only cares about light-tree
|
||||
/// descendants of a given element, that is, doesn't invalidate
|
||||
/// pseudo-elements, NAC, or XBL anon content.
|
||||
/// pseudo-elements, NAC, shadow dom...
|
||||
fn light_tree_only(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
@ -455,11 +455,6 @@ where
|
|||
|
||||
let mut sibling_invalidations = InvalidationVector::new();
|
||||
for child in parent.dom_children() {
|
||||
// TODO(emilio): We handle <xbl:children> fine, because they appear
|
||||
// in selector-matching (note bug 1374247, though).
|
||||
//
|
||||
// This probably needs a shadow root check on `child` here, and
|
||||
// recursing if that's the case.
|
||||
let child = match child.as_element() {
|
||||
Some(e) => e,
|
||||
None => continue,
|
||||
|
@ -574,13 +569,6 @@ where
|
|||
any_descendant |= self.invalidate_dom_descendants_of(root.as_node(), invalidations);
|
||||
}
|
||||
|
||||
// This is needed for XBL (technically) unconditionally, because XBL
|
||||
// bindings do not block combinators in any way. However this is kinda
|
||||
// broken anyway, since we should be looking at XBL rules too.
|
||||
if let Some(anon_content) = self.element.xbl_binding_anonymous_content() {
|
||||
any_descendant |= self.invalidate_dom_descendants_of(anon_content, invalidations);
|
||||
}
|
||||
|
||||
if let Some(marker) = self.element.marker_pseudo_element() {
|
||||
any_descendant |= self.invalidate_pseudo_element_or_nac(marker, invalidations);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue