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

@ -20,16 +20,16 @@ use smallvec::SmallVec;
#[cfg(feature = "gecko")]
/// Gets the element state relevant to the given `:dir` pseudo-class selector.
pub fn dir_selector_to_state(s: &[u16]) -> ElementState {
use element_state::{IN_LTR_STATE, IN_RTL_STATE};
use element_state::ElementState;
// Jump through some hoops to deal with our Box<[u16]> thing.
const LTR: [u16; 4] = [b'l' as u16, b't' as u16, b'r' as u16, 0];
const RTL: [u16; 4] = [b'r' as u16, b't' as u16, b'l' as u16, 0];
if LTR == *s {
IN_LTR_STATE
ElementState::IN_LTR_STATE
} else if RTL == *s {
IN_RTL_STATE
ElementState::IN_RTL_STATE
} else {
// :dir(something-random) is a valid selector, but shouldn't
// match anything.