Add to_computed method for CalcLengthOrPercentage

* Add to_computed method to calculate `calc()` value with parent size,
if parent container size is `None`, the result will be `None`.
* Add from_option method for `MaybeAuto`, to construct from
`Option<Au>`.
* Update some test case.
This commit is contained in:
石博文 2017-04-20 11:27:19 +08:00
parent 5062c4b117
commit 22f99c71b9
No known key found for this signature in database
GPG key ID: FC9610D6400A173C
8 changed files with 47 additions and 32 deletions

View file

@ -1,3 +0,0 @@
[calc-height-block-1.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[calc-max-height-block-1.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[calc-min-height-block-1.htm]
type: reftest
expected: FAIL