mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Remove StyleRelations.
They're unused now. We can add them back if needed. MozReview-Commit-ID: 92Y2Na0ZbVn
This commit is contained in:
parent
d3c8844549
commit
6d6c80e79b
3 changed files with 1 additions and 36 deletions
|
@ -5,19 +5,6 @@
|
|||
use attr::CaseSensitivity;
|
||||
use bloom::BloomFilter;
|
||||
|
||||
bitflags! {
|
||||
/// Set of flags that determine the different kind of elements affected by
|
||||
/// the selector matching process.
|
||||
///
|
||||
/// This is used to implement efficient sharing.
|
||||
#[derive(Default)]
|
||||
pub flags StyleRelations: usize {
|
||||
/// Whether this element is affected by presentational hints. This is
|
||||
/// computed externally (that is, in Servo).
|
||||
const AFFECTED_BY_PRESENTATIONAL_HINTS = 1 << 0,
|
||||
}
|
||||
}
|
||||
|
||||
/// What kind of selector matching mode we should use.
|
||||
///
|
||||
/// There are two modes of selector matching. The difference is only noticeable
|
||||
|
@ -87,9 +74,6 @@ impl QuirksMode {
|
|||
/// transient data that applies to only a single selector.
|
||||
#[derive(Clone)]
|
||||
pub struct MatchingContext<'a> {
|
||||
/// Output that records certains relations between elements noticed during
|
||||
/// matching (and also extended after matching).
|
||||
pub relations: StyleRelations,
|
||||
/// Input with the matching mode we should use when matching selectors.
|
||||
pub matching_mode: MatchingMode,
|
||||
/// Input with the bloom filter used to fast-reject selectors.
|
||||
|
@ -114,7 +98,6 @@ impl<'a> MatchingContext<'a> {
|
|||
-> Self
|
||||
{
|
||||
Self {
|
||||
relations: StyleRelations::empty(),
|
||||
matching_mode: matching_mode,
|
||||
bloom_filter: bloom_filter,
|
||||
visited_handling: VisitedHandlingMode::AllLinksUnvisited,
|
||||
|
@ -132,7 +115,6 @@ impl<'a> MatchingContext<'a> {
|
|||
-> Self
|
||||
{
|
||||
Self {
|
||||
relations: StyleRelations::empty(),
|
||||
matching_mode: matching_mode,
|
||||
bloom_filter: bloom_filter,
|
||||
visited_handling: visited_handling,
|
||||
|
|
|
@ -714,8 +714,6 @@ fn matches_simple_selector<E, F>(
|
|||
matches_last_child(element, flags_setter)
|
||||
}
|
||||
Component::Root => {
|
||||
// We never share styles with an element with no parent, so no point
|
||||
// in creating a new StyleRelation.
|
||||
element.is_root()
|
||||
}
|
||||
Component::Empty => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue