mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #17431 - emilio:restyle-hints-xbl, r=emilio
style: Cleanup after #17427, and remove extra-optimistic optimization added in #17429. This just addresses my review comments in #17427, and removes a wrong optimization I added in #17429 thinking it was correct. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17431) <!-- Reviewable:end -->
This commit is contained in:
commit
b50cf33efd
3 changed files with 5 additions and 4 deletions
|
@ -1747,8 +1747,8 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
||||||
// If this element is the shadow root of an use-element shadow
|
// If this element is the shadow root of an use-element shadow
|
||||||
// tree, according to the spec, we should not match rules
|
// tree, according to the spec, we should not match rules
|
||||||
// cross the shadow DOM boundary.
|
// cross the shadow DOM boundary.
|
||||||
e.get_local_name().as_ptr() == atom!("use").as_ptr() &&
|
e.get_local_name() == &*local_name!("use") &&
|
||||||
e.get_namespace() == &*Namespace(atom!("http://www.w3.org/2000/svg"))
|
e.get_namespace() == &*ns!("http://www.w3.org/2000/svg")
|
||||||
},
|
},
|
||||||
None => false,
|
None => false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,8 @@ use string_cache::{Atom, WeakAtom};
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! ns {
|
macro_rules! ns {
|
||||||
() => { $crate::string_cache::Namespace(atom!("")) }
|
() => { $crate::string_cache::Namespace(atom!("")) };
|
||||||
|
($s: tt) => { $crate::string_cache::Namespace(atom!($s)) };
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A Gecko namespace is just a wrapped atom.
|
/// A Gecko namespace is just a wrapped atom.
|
||||||
|
|
|
@ -333,7 +333,7 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E>
|
||||||
//
|
//
|
||||||
// Since we keep the traversal flags in terms of the flattened tree,
|
// Since we keep the traversal flags in terms of the flattened tree,
|
||||||
// we need to propagate it as appropriate.
|
// we need to propagate it as appropriate.
|
||||||
if invalidated_child && child.parent_element() != Some(self.element) {
|
if invalidated_child {
|
||||||
let mut current = child.traversal_parent();
|
let mut current = child.traversal_parent();
|
||||||
while let Some(parent) = current.take() {
|
while let Some(parent) = current.take() {
|
||||||
if parent == self.element {
|
if parent == self.element {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue