Compute scriptminsize against the parent font base size

MozReview-Commit-ID: Jf35S4GzkpN
This commit is contained in:
Manish Goregaokar 2017-04-21 19:05:32 -07:00 committed by Manish Goregaokar
parent bbf292b120
commit 275e94d718
2 changed files with 44 additions and 3 deletions

View file

@ -1476,6 +1476,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetLengthValue(declarations:
value: f32,
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::{LengthOrPercentage, NoCalcLength};
@ -1496,7 +1497,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetLengthValue(declarations:
let prop = match_wrap_declared! { long,
Width => nocalc.into(),
FontSize => LengthOrPercentage::from(nocalc).into(),
MozScriptMinSize => nocalc.into(),
MozScriptMinSize => MozScriptMinSize(nocalc),
};
write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| {
decls.push(prop, Importance::Normal);