mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
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:
commit
dc446198a7
10 changed files with 211 additions and 192 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue