mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
stylo: Store font metrics provider in thread local style context
This commit is contained in:
parent
2ea8d61fbf
commit
e402c72d0e
19 changed files with 158 additions and 35 deletions
|
@ -6,6 +6,7 @@ use cssparser::Parser;
|
|||
use euclid::size::TypedSize2D;
|
||||
use media_queries::CSSErrorReporterTest;
|
||||
use std::f32::consts::PI;
|
||||
use style::font_metrics::ServoMetricsProvider;
|
||||
use style::media_queries::{Device, MediaType};
|
||||
use style::parser::ParserContext;
|
||||
use style::properties::ComputedValues;
|
||||
|
@ -51,7 +52,7 @@ fn test_linear_gradient() {
|
|||
inherited_style: initial_style,
|
||||
layout_parent_style: initial_style,
|
||||
style: initial_style.clone(),
|
||||
font_metrics_provider: None,
|
||||
font_metrics_provider: &ServoMetricsProvider,
|
||||
};
|
||||
assert_eq!(specified::AngleOrCorner::None.to_computed_value(&specified_context),
|
||||
computed::AngleOrCorner::Angle(Angle::from_radians(PI)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue