mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Ignore case in media feature names inside media query expressions.
Media feature names are converted to lower case before being processed, making them effectively case-insensitive. Prefixes ("min-", etc.) and values are already treated in a case-insensitive manner. Bug: 1464091 Reviewed-by: heycam MozReview-Commit-ID: JUeeEQEMIi4
This commit is contained in:
parent
1f562af418
commit
9d679c9b20
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ use properties::ComputedValues;
|
|||
use servo_arc::Arc;
|
||||
use std::fmt::{self, Write};
|
||||
use std::sync::atomic::{AtomicBool, AtomicIsize, AtomicUsize, Ordering};
|
||||
use str::starts_with_ignore_ascii_case;
|
||||
use str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
|
||||
use string_cache::Atom;
|
||||
use style_traits::{CSSPixel, CssWriter, DevicePixel};
|
||||
use style_traits::{ParseError, StyleParseErrorKind, ToCss};
|
||||
|
@ -596,7 +596,7 @@ impl Expression {
|
|||
Range::Equal
|
||||
};
|
||||
|
||||
let atom = Atom::from(feature_name);
|
||||
let atom = Atom::from(string_as_ascii_lowercase(feature_name));
|
||||
match find_feature(|f| atom.as_ptr() == unsafe { *f.mName as *mut _ }) {
|
||||
Some(f) => Ok((f, range)),
|
||||
None => Err(()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue