Auto merge of #19966 - emilio:bye-gecko-size, r=nox

style: Get rid of gecko_size_type.

It's a hack, should die.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19966)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-02-06 21:15:07 -05:00 committed by GitHub
commit dc446198a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 211 additions and 192 deletions

View file

@ -3133,8 +3133,6 @@ pub extern "C" fn Servo_DeclarationBlock_SetPixelValue(
) {
use style::properties::{PropertyDeclaration, LonghandId};
use style::properties::longhands::border_spacing::SpecifiedValue as BorderSpacing;
use style::properties::longhands::height::SpecifiedValue as Height;
use style::properties::longhands::width::SpecifiedValue as Width;
use style::values::specified::{BorderSideWidth, MozLength, BorderCornerRadius};
use style::values::specified::length::{NoCalcLength, NonNegativeLength, LengthOrPercentage};
@ -3142,8 +3140,8 @@ pub extern "C" fn Servo_DeclarationBlock_SetPixelValue(
let nocalc = NoCalcLength::from_px(value);
let prop = match_wrap_declared! { long,
Height => Height(MozLength::LengthOrPercentageOrAuto(nocalc.into())),
Width => Width(MozLength::LengthOrPercentageOrAuto(nocalc.into())),
Height => MozLength::LengthOrPercentageOrAuto(nocalc.into()),
Width => MozLength::LengthOrPercentageOrAuto(nocalc.into()),
BorderTopWidth => BorderSideWidth::Length(nocalc.into()),
BorderRightWidth => BorderSideWidth::Length(nocalc.into()),
BorderBottomWidth => BorderSideWidth::Length(nocalc.into()),
@ -3192,7 +3190,6 @@ pub extern "C" fn Servo_DeclarationBlock_SetLengthValue(
) {
use style::properties::{PropertyDeclaration, LonghandId};
use style::properties::longhands::_moz_script_min_size::SpecifiedValue as MozScriptMinSize;
use style::properties::longhands::width::SpecifiedValue as Width;
use style::values::specified::MozLength;
use style::values::specified::length::{AbsoluteLength, FontRelativeLength};
use style::values::specified::length::{LengthOrPercentage, NoCalcLength};
@ -3212,7 +3209,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetLengthValue(
};
let prop = match_wrap_declared! { long,
Width => Width(MozLength::LengthOrPercentageOrAuto(nocalc.into())),
Width => MozLength::LengthOrPercentageOrAuto(nocalc.into()),
FontSize => LengthOrPercentage::from(nocalc).into(),
MozScriptMinSize => MozScriptMinSize(nocalc),
};
@ -3250,8 +3247,6 @@ pub extern "C" fn Servo_DeclarationBlock_SetPercentValue(
value: f32,
) {
use style::properties::{PropertyDeclaration, LonghandId};
use style::properties::longhands::height::SpecifiedValue as Height;
use style::properties::longhands::width::SpecifiedValue as Width;
use style::values::computed::Percentage;
use style::values::specified::MozLength;
use style::values::specified::length::LengthOrPercentage;
@ -3260,8 +3255,8 @@ pub extern "C" fn Servo_DeclarationBlock_SetPercentValue(
let pc = Percentage(value);
let prop = match_wrap_declared! { long,
Height => Height(MozLength::LengthOrPercentageOrAuto(pc.into())),
Width => Width(MozLength::LengthOrPercentageOrAuto(pc.into())),
Height => MozLength::LengthOrPercentageOrAuto(pc.into()),
Width => MozLength::LengthOrPercentageOrAuto(pc.into()),
MarginTop => pc.into(),
MarginRight => pc.into(),
MarginBottom => pc.into(),
@ -3279,16 +3274,14 @@ pub extern "C" fn Servo_DeclarationBlock_SetAutoValue(
property: nsCSSPropertyID,
) {
use style::properties::{PropertyDeclaration, LonghandId};
use style::properties::longhands::height::SpecifiedValue as Height;
use style::properties::longhands::width::SpecifiedValue as Width;
use style::values::specified::LengthOrPercentageOrAuto;
use style::values::specified::{LengthOrPercentageOrAuto, MozLength};
let long = get_longhand_from_id!(property);
let auto = LengthOrPercentageOrAuto::Auto;
let prop = match_wrap_declared! { long,
Height => Height::auto(),
Width => Width::auto(),
Height => MozLength::auto(),
Width => MozLength::auto(),
MarginTop => auto,
MarginRight => auto,
MarginBottom => auto,