mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make Servo compatible with Stylo with prefers-color-scheme
support (#34423)
* Make Servo compatible with Stylo with prefer-color-scheme support Signed-off-by: Nico Burns <nico@nicoburns.com> Update imports to work with deduped version of stylo PR Signed-off-by: Nico Burns <nico@nicoburns.com> Switch back to stylo main branch Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix unit tests Signed-off-by: Nico Burns <nico@nicoburns.com> * Update text expectations Signed-off-by: Nico Burns <nico@nicoburns.com> --------- Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
parent
19a7e95a6a
commit
2dbda69534
6 changed files with 26 additions and 24 deletions
|
@ -15,6 +15,7 @@ use style::font_metrics::FontMetrics;
|
|||
use style::media_queries::{Device, MediaType};
|
||||
use style::properties::style_structs::Font;
|
||||
use style::properties::{ComputedValues, CustomDeclaration, CustomDeclarationValue, StyleBuilder};
|
||||
use style::queries::values::PrefersColorScheme;
|
||||
use style::rule_cache::RuleCacheConditions;
|
||||
use style::rule_tree::CascadeLevel;
|
||||
use style::servo::media_queries::FontMetricsProvider;
|
||||
|
@ -72,6 +73,7 @@ fn cascade(
|
|||
Scale::new(1.0),
|
||||
Box::new(DummyMetricsProvider),
|
||||
initial_style,
|
||||
PrefersColorScheme::Light,
|
||||
);
|
||||
let stylist = Stylist::new(device, QuirksMode::NoQuirks);
|
||||
let mut builder = StyleBuilder::new(stylist.device(), Some(&stylist), None, None, None, false);
|
||||
|
|
|
@ -14,6 +14,7 @@ use style::properties::style_structs::Font;
|
|||
use style::properties::{
|
||||
longhands, ComputedValues, Importance, PropertyDeclaration, PropertyDeclarationBlock,
|
||||
};
|
||||
use style::queries::values::PrefersColorScheme;
|
||||
use style::rule_tree::StyleSource;
|
||||
use style::selector_map::SelectorMap;
|
||||
use style::selector_parser::{SelectorImpl, SelectorParser};
|
||||
|
@ -256,6 +257,7 @@ fn mock_stylist() -> Stylist {
|
|||
Scale::new(1.0),
|
||||
Box::new(DummyMetricsProvider),
|
||||
initial_style,
|
||||
PrefersColorScheme::Light,
|
||||
);
|
||||
Stylist::new(device, QuirksMode::NoQuirks)
|
||||
}
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
[Should be parseable in a CSS stylesheet: '(prefers-color-scheme)']
|
||||
expected: FAIL
|
||||
|
||||
[Check that prefer-color-scheme evaluates to true in the boolean context]
|
||||
expected: FAIL
|
||||
|
||||
[Should be parseable in a CSS stylesheet: '(prefers-color-scheme: dark)']
|
||||
expected: FAIL
|
||||
|
||||
|
@ -19,12 +16,3 @@
|
|||
|
||||
[Should be parseable in JS: '(prefers-color-scheme: light)']
|
||||
expected: FAIL
|
||||
|
||||
[Should be known: '(prefers-color-scheme)']
|
||||
expected: FAIL
|
||||
|
||||
[Should be known: '(prefers-color-scheme: light)']
|
||||
expected: FAIL
|
||||
|
||||
[Should be known: '(prefers-color-scheme: dark)']
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue