mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update bitflags to 1.0 in every servo crate
It still needs dependencies update to remove all the other bitflags versions.
This commit is contained in:
parent
4cf2ce66fc
commit
e8e2d0a4b2
142 changed files with 1685 additions and 1635 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue