mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Move relations_are_shareable to matching.rs
It's only used there.
This commit is contained in:
parent
94d62a2afb
commit
ac8547416d
2 changed files with 11 additions and 15 deletions
|
@ -14,7 +14,6 @@ use matching::{MatchMethods, StyleSharingResult};
|
|||
use restyle_hints::{RESTYLE_DESCENDANTS, RESTYLE_SELF};
|
||||
use selector_parser::RestyleDamage;
|
||||
use selectors::Element;
|
||||
use selectors::matching::StyleRelations;
|
||||
use servo_config::opts;
|
||||
use std::mem;
|
||||
use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
|
||||
|
@ -276,17 +275,6 @@ pub trait DomTraversal<N: TNode> : Sync {
|
|||
fn create_thread_local_context(&self) -> Self::ThreadLocalContext;
|
||||
}
|
||||
|
||||
/// Determines the amount of relations where we're going to share style.
|
||||
#[inline]
|
||||
pub fn relations_are_shareable(relations: &StyleRelations) -> bool {
|
||||
use selectors::matching::*;
|
||||
!relations.intersects(AFFECTED_BY_ID_SELECTOR |
|
||||
AFFECTED_BY_PSEUDO_ELEMENTS | AFFECTED_BY_STATE |
|
||||
AFFECTED_BY_NON_COMMON_STYLE_AFFECTING_ATTRIBUTE_SELECTOR |
|
||||
AFFECTED_BY_STYLE_ATTRIBUTE |
|
||||
AFFECTED_BY_PRESENTATIONAL_HINTS)
|
||||
}
|
||||
|
||||
/// Helper for the function below.
|
||||
fn resolve_style_internal<E, F>(context: &StyleContext<E>, element: E, ensure_data: &F)
|
||||
-> Option<E>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue