diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-05-22 01:46:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-22 01:46:01 -0500 |
commit | b428a94326322c88da4c32e56ee753ceeffca7d1 (patch) | |
tree | 0ada03d8ed4d26bcf50e39e54df439986e3e8f97 /ports/geckolib | |
parent | 8cd4330b2afdaf6f5a1724539a25a27850d41e29 (diff) | |
parent | d06af8971dd9954c7c3217778b8d73f51a658d57 (diff) | |
download | servo-selectors-v0.18.0.tar.gz servo-selectors-v0.18.0.zip |
Auto merge of #16962 - hiikezoe:prefixed-intrinsic-size-value, r=Manishearthselectors-v0.18.0
Prefixed intrinsic size value
<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1355402
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16788
- [X] These changes do not require tests because it's for stylo
<!-- 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/16962)
<!-- Reviewable:end -->
Diffstat (limited to 'ports/geckolib')
-rw-r--r-- | ports/geckolib/glue.rs | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index c3617682dc7..8ff203e8bd8 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -1794,15 +1794,18 @@ pub extern "C" fn Servo_DeclarationBlock_SetPixelValue(declarations: value: f32) { 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::BorderWidth; + use style::values::specified::MozLength; use style::values::specified::length::{NoCalcLength, LengthOrPercentage}; let long = get_longhand_from_id!(property); let nocalc = NoCalcLength::from_px(value); let prop = match_wrap_declared! { long, - Height => nocalc.into(), - Width => nocalc.into(), + Height => Height(MozLength::LengthOrPercentageOrAuto(nocalc.into())), + Width => Width(MozLength::LengthOrPercentageOrAuto(nocalc.into())), BorderTopWidth => BorderWidth::Width(nocalc.into()), BorderRightWidth => BorderWidth::Width(nocalc.into()), BorderBottomWidth => BorderWidth::Width(nocalc.into()), @@ -1840,6 +1843,8 @@ pub extern "C" fn Servo_DeclarationBlock_SetLengthValue(declarations: unit: structs::nsCSSUnit) { 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, PhysicalLength}; use style::values::specified::length::{LengthOrPercentage, NoCalcLength}; @@ -1859,7 +1864,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetLengthValue(declarations: }; let prop = match_wrap_declared! { long, - Width => nocalc.into(), + Width => Width(MozLength::LengthOrPercentageOrAuto(nocalc.into())), FontSize => LengthOrPercentage::from(nocalc).into(), MozScriptMinSize => MozScriptMinSize(nocalc), }; @@ -1894,14 +1899,17 @@ pub extern "C" fn Servo_DeclarationBlock_SetPercentValue(declarations: property: nsCSSPropertyID, 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::specified::MozLength; use style::values::specified::length::{LengthOrPercentage, Percentage}; let long = get_longhand_from_id!(property); let pc = Percentage(value); let prop = match_wrap_declared! { long, - Height => pc.into(), - Width => pc.into(), + Height => Height(MozLength::LengthOrPercentageOrAuto(pc.into())), + Width => Width(MozLength::LengthOrPercentageOrAuto(pc.into())), MarginTop => pc.into(), MarginRight => pc.into(), MarginBottom => pc.into(), @@ -1918,14 +1926,16 @@ pub extern "C" fn Servo_DeclarationBlock_SetAutoValue(declarations: RawServoDeclarationBlockBorrowed, 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; let long = get_longhand_from_id!(property); let auto = LengthOrPercentageOrAuto::Auto; let prop = match_wrap_declared! { long, - Height => auto, - Width => auto, + Height => Height::auto(), + Width => Width::auto(), MarginTop => auto, MarginRight => auto, MarginBottom => auto, |