Bump bitflags to 1.0 in every servo crate

This commit is contained in:
Bastien Orivel 2017-10-30 12:15:30 +01:00
parent b6475cf433
commit 29b4eec141
131 changed files with 1591 additions and 1580 deletions

View file

@ -10,11 +10,11 @@ use atomic_refcell::AtomicRef;
use context::{QuirksMode, SharedStyleContext};
use data::ElementData;
use dom::TElement;
use element_state::{ElementState, IN_VISITED_OR_UNVISITED_STATE};
use element_state::ElementState;
use invalidation::element::element_wrapper::{ElementSnapshot, ElementWrapper};
use invalidation::element::invalidation_map::*;
use invalidation::element::invalidator::{InvalidationVector, Invalidation, InvalidationProcessor};
use invalidation::element::restyle_hints::*;
use invalidation::element::restyle_hints::RestyleHint;
use selector_map::SelectorMap;
use selector_parser::Snapshot;
use selectors::NthIndexCache;
@ -128,7 +128,7 @@ where
// force a restyle here. Matching doesn't depend on the actual visited
// state at all, so we can't look at matching results to decide what to
// do for this case.
if state_changes.intersects(IN_VISITED_OR_UNVISITED_STATE) {
if state_changes.intersects(ElementState::IN_VISITED_OR_UNVISITED_STATE) {
trace!(" > visitedness change, force subtree restyle");
// We can't just return here because there may also be attribute
// changes as well that imply additional hints.
@ -215,7 +215,7 @@ where
};
if invalidated_self {
self.data.hint.insert(RESTYLE_SELF);
self.data.hint.insert(RestyleHint::RESTYLE_SELF);
}
invalidated_self
@ -224,7 +224,7 @@ where
fn should_process_descendants(&mut self, element: E) -> bool {
if element == self.element {
return !self.data.styles.is_display_none() &&
!self.data.hint.contains(RESTYLE_DESCENDANTS)
!self.data.hint.contains(RestyleHint::RESTYLE_DESCENDANTS)
}
let data = match element.borrow_data() {
@ -233,17 +233,17 @@ where
};
!data.styles.is_display_none() &&
!data.hint.contains(RESTYLE_DESCENDANTS)
!data.hint.contains(RestyleHint::RESTYLE_DESCENDANTS)
}
fn recursion_limit_exceeded(&mut self, element: E) {
if element == self.element {
self.data.hint.insert(RESTYLE_DESCENDANTS);
self.data.hint.insert(RestyleHint::RESTYLE_DESCENDANTS);
return;
}
if let Some(mut data) = element.mutate_data() {
data.hint.insert(RESTYLE_DESCENDANTS);
data.hint.insert(RestyleHint::RESTYLE_DESCENDANTS);
}
}
@ -271,7 +271,7 @@ where
fn invalidated_self(&mut self, element: E) {
debug_assert_ne!(element, self.element);
if let Some(mut data) = element.mutate_data() {
data.hint.insert(RESTYLE_SELF);
data.hint.insert(RestyleHint::RESTYLE_SELF);
}
}
}
@ -363,7 +363,7 @@ where
return true;
}
let visited_dependent =
if dependency.state.intersects(IN_VISITED_OR_UNVISITED_STATE) {
if dependency.state.intersects(ElementState::IN_VISITED_OR_UNVISITED_STATE) {
VisitedDependent::Yes
} else {
VisitedDependent::No