mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Remove unnecessary TraversalFlags::FOR_DEFAULT_STYLES.
Yay MozReview-Commit-ID: JiWTEz63AlE
This commit is contained in:
parent
d15acc219e
commit
d3c8844549
2 changed files with 2 additions and 15 deletions
|
@ -42,8 +42,6 @@ bitflags! {
|
||||||
/// Traverse and update all elements with CSS animations since
|
/// Traverse and update all elements with CSS animations since
|
||||||
/// @keyframes rules may have changed
|
/// @keyframes rules may have changed
|
||||||
const FOR_CSS_RULE_CHANGES = 0x08,
|
const FOR_CSS_RULE_CHANGES = 0x08,
|
||||||
/// Only include user agent style sheets when selector matching.
|
|
||||||
const FOR_DEFAULT_STYLES = 0x10,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,12 +65,6 @@ impl TraversalFlags {
|
||||||
pub fn for_css_rule_changes(&self) -> bool {
|
pub fn for_css_rule_changes(&self) -> bool {
|
||||||
self.contains(FOR_CSS_RULE_CHANGES)
|
self.contains(FOR_CSS_RULE_CHANGES)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns true if the traversal is to compute the default computed styles
|
|
||||||
/// for an element.
|
|
||||||
pub fn for_default_styles(&self) -> bool {
|
|
||||||
self.contains(FOR_DEFAULT_STYLES)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This structure exists to enforce that callers invoke pre_traverse, and also
|
/// This structure exists to enforce that callers invoke pre_traverse, and also
|
||||||
|
|
|
@ -113,7 +113,7 @@ use style::stylist::RuleInclusion;
|
||||||
use style::thread_state;
|
use style::thread_state;
|
||||||
use style::timer::Timer;
|
use style::timer::Timer;
|
||||||
use style::traversal::{ANIMATION_ONLY, DomTraversal, FOR_CSS_RULE_CHANGES, FOR_RECONSTRUCT};
|
use style::traversal::{ANIMATION_ONLY, DomTraversal, FOR_CSS_RULE_CHANGES, FOR_RECONSTRUCT};
|
||||||
use style::traversal::{FOR_DEFAULT_STYLES, TraversalDriver, TraversalFlags, UNSTYLED_CHILDREN_ONLY};
|
use style::traversal::{TraversalDriver, TraversalFlags, UNSTYLED_CHILDREN_ONLY};
|
||||||
use style::traversal::resolve_style;
|
use style::traversal::resolve_style;
|
||||||
use style::values::{CustomIdent, KeyframesName};
|
use style::values::{CustomIdent, KeyframesName};
|
||||||
use style::values::computed::Context;
|
use style::values::computed::Context;
|
||||||
|
@ -2797,16 +2797,11 @@ pub extern "C" fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let traversal_flags = match rule_inclusion {
|
|
||||||
RuleInclusion::All => TraversalFlags::empty(),
|
|
||||||
RuleInclusion::DefaultOnly => FOR_DEFAULT_STYLES,
|
|
||||||
};
|
|
||||||
|
|
||||||
// We don't have the style ready. Go ahead and compute it as necessary.
|
// We don't have the style ready. Go ahead and compute it as necessary.
|
||||||
let shared = create_shared_context(&global_style_data,
|
let shared = create_shared_context(&global_style_data,
|
||||||
&guard,
|
&guard,
|
||||||
&data,
|
&data,
|
||||||
traversal_flags,
|
TraversalFlags::empty(),
|
||||||
unsafe { &*snapshots });
|
unsafe { &*snapshots });
|
||||||
let mut tlc = ThreadLocalStyleContext::new(&shared);
|
let mut tlc = ThreadLocalStyleContext::new(&shared);
|
||||||
let mut context = StyleContext {
|
let mut context = StyleContext {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue