mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Cleanup some media-query-related code.
This commit is contained in:
parent
1282e0d808
commit
4e6fd5693a
2 changed files with 8 additions and 8 deletions
|
@ -695,11 +695,12 @@ impl Expression {
|
||||||
self.evaluate_against(device, &value, quirks_mode)
|
self.evaluate_against(device, &value, quirks_mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn evaluate_against(&self,
|
fn evaluate_against(
|
||||||
device: &Device,
|
&self,
|
||||||
actual_value: &MediaExpressionValue,
|
device: &Device,
|
||||||
quirks_mode: QuirksMode)
|
actual_value: &MediaExpressionValue,
|
||||||
-> bool {
|
quirks_mode: QuirksMode,
|
||||||
|
) -> bool {
|
||||||
use self::MediaExpressionValue::*;
|
use self::MediaExpressionValue::*;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
|
|
||||||
|
@ -721,8 +722,7 @@ impl Expression {
|
||||||
font_metrics_provider: &provider,
|
font_metrics_provider: &provider,
|
||||||
cached_system_font: None,
|
cached_system_font: None,
|
||||||
in_media_query: true,
|
in_media_query: true,
|
||||||
// TODO: pass the correct value here.
|
quirks_mode,
|
||||||
quirks_mode: quirks_mode,
|
|
||||||
for_smil_animation: false,
|
for_smil_animation: false,
|
||||||
for_non_inherited_property: None,
|
for_non_inherited_property: None,
|
||||||
rule_cache_conditions: RefCell::new(&mut conditions),
|
rule_cache_conditions: RefCell::new(&mut conditions),
|
||||||
|
|
|
@ -265,7 +265,7 @@ impl Range<specified::Length> {
|
||||||
font_metrics_provider: &ServoMetricsProvider,
|
font_metrics_provider: &ServoMetricsProvider,
|
||||||
in_media_query: true,
|
in_media_query: true,
|
||||||
cached_system_font: None,
|
cached_system_font: None,
|
||||||
quirks_mode: quirks_mode,
|
quirks_mode,
|
||||||
for_smil_animation: false,
|
for_smil_animation: false,
|
||||||
for_non_inherited_property: None,
|
for_non_inherited_property: None,
|
||||||
rule_cache_conditions: RefCell::new(&mut conditions),
|
rule_cache_conditions: RefCell::new(&mut conditions),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue