style: More ComputedValuesInner cleanup.

MozReview-Commit-ID: 8rkAP3pMEpD
This commit is contained in:
Emilio Cobos Álvarez 2017-07-18 16:47:13 +02:00
parent 07e1c6e75a
commit fe8638a618
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 34 additions and 33 deletions

View file

@ -6,7 +6,7 @@
//! a computed style needs in order for it to adhere to the CSS spec.
use app_units::Au;
use properties::{self, CascadeFlags, ComputedValuesInner};
use properties::{self, CascadeFlags, ComputedValues};
use properties::{IS_ROOT_ELEMENT, SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP, StyleBuilder};
use properties::longhands::display::computed_value::T as display;
use properties::longhands::float::computed_value::T as float;
@ -54,7 +54,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// Apply the blockification rules based on the table in CSS 2.2 section 9.7.
/// https://drafts.csswg.org/css2/visuren.html#dis-pos-flo
fn blockify_if_necessary(&mut self,
layout_parent_style: &ComputedValuesInner,
layout_parent_style: &ComputedValues,
flags: CascadeFlags) {
let mut blockify = false;
macro_rules! blockify_if {
@ -136,7 +136,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// https://lists.w3.org/Archives/Public/www-style/2017Mar/0045.html
/// https://github.com/servo/servo/issues/15754
fn adjust_for_writing_mode(&mut self,
layout_parent_style: &ComputedValuesInner) {
layout_parent_style: &ComputedValues) {
let our_writing_mode = self.style.get_inheritedbox().clone_writing_mode();
let parent_writing_mode = layout_parent_style.get_inheritedbox().clone_writing_mode();
@ -196,7 +196,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
///
/// See https://github.com/servo/servo/issues/15229
#[cfg(feature = "servo")]
fn adjust_for_alignment(&mut self, layout_parent_style: &ComputedValuesInner) {
fn adjust_for_alignment(&mut self, layout_parent_style: &ComputedValues) {
use computed_values::align_items::T as align_items;
use computed_values::align_self::T as align_self;
@ -295,7 +295,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// this type into its ::-moz-fieldset-content anonymous box.
#[cfg(feature = "gecko")]
fn adjust_for_fieldset_content(&mut self,
layout_parent_style: &ComputedValuesInner,
layout_parent_style: &ComputedValues,
flags: CascadeFlags) {
use properties::IS_FIELDSET_CONTENT;
if !flags.contains(IS_FIELDSET_CONTENT) {
@ -340,7 +340,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
}
/// Set the HAS_TEXT_DECORATION_LINES flag based on parent style.
fn adjust_for_text_decoration_lines(&mut self, layout_parent_style: &ComputedValuesInner) {
fn adjust_for_text_decoration_lines(&mut self, layout_parent_style: &ComputedValues) {
use properties::computed_value_flags::HAS_TEXT_DECORATION_LINES;
if layout_parent_style.flags.contains(HAS_TEXT_DECORATION_LINES) ||
!self.style.get_text().clone_text_decoration_line().is_empty() {
@ -349,7 +349,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
}
#[cfg(feature = "gecko")]
fn should_suppress_linebreak(&self, layout_parent_style: &ComputedValuesInner) -> bool {
fn should_suppress_linebreak(&self, layout_parent_style: &ComputedValues) -> bool {
use properties::computed_value_flags::SHOULD_SUPPRESS_LINEBREAK;
// Line break suppression should only be propagated to in-flow children.
if self.style.floated() || self.style.out_of_flow_positioned() {
@ -386,8 +386,8 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// * correct unicode-bidi.
#[cfg(feature = "gecko")]
fn adjust_for_ruby(&mut self,
layout_parent_style: &ComputedValuesInner,
default_computed_values: &'b ComputedValuesInner,
layout_parent_style: &ComputedValues,
default_computed_values: &'b ComputedValues,
flags: CascadeFlags) {
use properties::SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP;
use properties::computed_value_flags::SHOULD_SUPPRESS_LINEBREAK;
@ -431,8 +431,8 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// When comparing to Gecko, this is similar to the work done by
/// `nsStyleContext::ApplyStyleFixups`.
pub fn adjust(&mut self,
layout_parent_style: &ComputedValuesInner,
_default_computed_values: &'b ComputedValuesInner,
layout_parent_style: &ComputedValues,
_default_computed_values: &'b ComputedValues,
flags: CascadeFlags) {
#[cfg(feature = "gecko")]
{