style: Cleanup most of the Inner mess.

MozReview-Commit-ID: Ieg2GJT0yUl
This commit is contained in:
Emilio Cobos Álvarez 2017-07-18 12:51:57 +02:00
parent b113d54987
commit 655c842d2e
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
13 changed files with 289 additions and 221 deletions

View file

@ -11,7 +11,7 @@ use euclid::{Size2D, TypedSize2D};
use font_metrics::ServoMetricsProvider;
use media_queries::MediaType;
use parser::ParserContext;
use properties::{ComputedValuesInner, StyleBuilder};
use properties::{ComputedValues, StyleBuilder};
use properties::longhands::font_size;
use selectors::parser::SelectorParseError;
use std::fmt;
@ -62,11 +62,11 @@ impl Device {
}
/// Return the default computed values for this device.
pub fn default_computed_values(&self) -> &ComputedValuesInner {
pub fn default_computed_values(&self) -> &ComputedValues{
// FIXME(bz): This isn't really right, but it's no more wrong
// than what we used to do. See
// https://github.com/servo/servo/issues/14773 for fixing it properly.
ComputedValuesInner::initial_values()
ComputedValues::initial_values()
}
/// Get the font size of the root element (for rem)
@ -231,8 +231,7 @@ impl Range<specified::Length> {
is_root_element: false,
device: device,
inherited_style: default_values,
layout_parent_style: default_values,
style: StyleBuilder::for_derived_style(default_values),
style: StyleBuilder::for_derived_style(device, default_values),
// Servo doesn't support font metrics
// A real provider will be needed here once we do; since
// ch units can exist in media queries.