mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Cleanup most of the Inner mess.
MozReview-Commit-ID: Ieg2GJT0yUl
This commit is contained in:
parent
b113d54987
commit
655c842d2e
13 changed files with 289 additions and 221 deletions
|
@ -11,7 +11,7 @@ use font_metrics::FontMetricsProvider;
|
|||
use media_queries::Device;
|
||||
#[cfg(feature = "gecko")]
|
||||
use properties;
|
||||
use properties::{ComputedValuesInner, StyleBuilder};
|
||||
use properties::{ComputedValues, StyleBuilder};
|
||||
use std::f32;
|
||||
use std::f64;
|
||||
use std::f64::consts::PI;
|
||||
|
@ -72,13 +72,7 @@ pub struct Context<'a> {
|
|||
pub device: &'a Device,
|
||||
|
||||
/// The style we're inheriting from.
|
||||
pub inherited_style: &'a ComputedValuesInner,
|
||||
|
||||
/// The style of the layout parent node. This will almost always be
|
||||
/// `inherited_style`, except when `display: contents` is at play, in which
|
||||
/// case it's the style of the last ancestor with a `display` value that
|
||||
/// isn't `contents`.
|
||||
pub layout_parent_style: &'a ComputedValuesInner,
|
||||
pub inherited_style: &'a ComputedValues,
|
||||
|
||||
/// Values accessed through this need to be in the properties "computed
|
||||
/// early": color, text-decoration, font-size, display, position, float,
|
||||
|
@ -115,7 +109,7 @@ impl<'a> Context<'a> {
|
|||
/// The current viewport size.
|
||||
pub fn viewport_size(&self) -> Size2D<Au> { self.device.au_viewport_size() }
|
||||
/// The style we're inheriting from.
|
||||
pub fn inherited_style(&self) -> &ComputedValuesInner { &self.inherited_style }
|
||||
pub fn inherited_style(&self) -> &ComputedValues { &self.inherited_style }
|
||||
/// The current style. Note that only "eager" properties should be accessed
|
||||
/// from here, see the comment in the member.
|
||||
pub fn style(&self) -> &StyleBuilder { &self.style }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue