mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Make style system support mozmm unit and compute it correctly.
MozReview-Commit-ID: hCUs8xuNd1
This commit is contained in:
parent
fc1e4e95ed
commit
507c90d40b
3 changed files with 63 additions and 3 deletions
|
@ -1539,7 +1539,7 @@ 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::values::specified::length::{AbsoluteLength, FontRelativeLength};
|
||||
use style::values::specified::length::{AbsoluteLength, FontRelativeLength, PhysicalLength};
|
||||
use style::values::specified::length::{LengthOrPercentage, NoCalcLength};
|
||||
|
||||
let long = get_longhand_from_id!(property);
|
||||
|
@ -1550,6 +1550,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetLengthValue(declarations:
|
|||
structs::nsCSSUnit::eCSSUnit_Inch => NoCalcLength::Absolute(AbsoluteLength::In(value)),
|
||||
structs::nsCSSUnit::eCSSUnit_Centimeter => NoCalcLength::Absolute(AbsoluteLength::Cm(value)),
|
||||
structs::nsCSSUnit::eCSSUnit_Millimeter => NoCalcLength::Absolute(AbsoluteLength::Mm(value)),
|
||||
structs::nsCSSUnit::eCSSUnit_PhysicalMillimeter => NoCalcLength::Physical(PhysicalLength(value)),
|
||||
structs::nsCSSUnit::eCSSUnit_Point => NoCalcLength::Absolute(AbsoluteLength::Pt(value)),
|
||||
structs::nsCSSUnit::eCSSUnit_Pica => NoCalcLength::Absolute(AbsoluteLength::Pc(value)),
|
||||
structs::nsCSSUnit::eCSSUnit_Quarter => NoCalcLength::Absolute(AbsoluteLength::Q(value)),
|
||||
|
@ -2220,4 +2221,3 @@ pub extern "C" fn Servo_StyleSet_ResolveForDeclarations(raw_data: RawServoStyleS
|
|||
parent_style,
|
||||
declarations.clone()).into_strong()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue