Support prefixed intrinsic size value for flex-basis.

auto() and zero() are used in the parser for flex shorthand property.
This commit is contained in:
Hiroyuki Ikezoe 2017-05-20 11:59:52 +09:00
parent 3a3bc03eb8
commit d06af8971d
4 changed files with 38 additions and 16 deletions

View file

@ -1904,14 +1904,14 @@ pub extern "C" fn Servo_DeclarationBlock_SetAutoValue(declarations:
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, MozLength};
use style::values::specified::LengthOrPercentageOrAuto;
let long = get_longhand_from_id!(property);
let auto = LengthOrPercentageOrAuto::Auto;
let prop = match_wrap_declared! { long,
Height => Height(MozLength::LengthOrPercentageOrAuto(auto)),
Width => Width(MozLength::LengthOrPercentageOrAuto(auto)),
Height => Height::auto(),
Width => Width::auto(),
MarginTop => auto,
MarginRight => auto,
MarginBottom => auto,