Tipowol
94f08adfc7
Update parse_length to match spec
2020-04-03 21:32:02 +02:00
Emilio Cobos Álvarez
4a31509215
style: Fix servo build.
...
This also fixes a bunch of calc handling issues and such.
Also remove tests that no longer compile and are covered by WPT.
2019-01-08 12:00:42 +01:00
Jan Andre Ikenmeyer
f1f409ffb6
Update MPL license to https (part 5)
2018-11-27 19:09:17 +01:00
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6
Format remaining files
2018-11-06 22:30:31 +01:00
Boris Chiou
535c1e3c6f
Replace Au with CSSPixelLength in CalcLengthOrPercentage.
...
We replace Au with CSSPixelLength for the length part of
computed::CalcLengthOrPercentage. Therefore, it would be easier to use
CSSPixelLength for all other LengthOrPercentage{*} types.
2017-09-13 18:10:39 +08:00
DarkDrek
a5b585a5f1
Move Percentage from length.rs to mod.rs
2017-08-08 16:44:31 +02:00
Emilio Cobos Álvarez
310be02ba8
style: Respect calc for percentages.
2017-07-14 13:43:27 +02:00
Anthony Ramine
608e7f71a2
Make computed types hold Percentage instead of bare CSSFloat
2017-06-15 16:59:03 +02:00
Anthony Ramine
00bfc6b172
Remove a lot of unused imports
2017-05-20 15:23:19 +02:00
Anthony Ramine
d0b9bd9c64
Refactor how calc() clamping is done on computed values ( fixes #15296 )
2017-05-18 10:14:59 +02:00
石博文
22f99c71b9
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.
2017-04-24 14:22:14 +08:00
Bob
f3079e8728
account for sign in double parsing
...
When sign was present during double parsing correctly jump forward the
extra character when parsing fraction and exponent.
2016-07-28 18:56:14 +01:00
Ms2ger
06a1d04ca6
Move LengthOrPercentageOrAuto to style::attr.
2016-06-06 08:54:34 +02:00
Cullen Rhodes
40acd24e8f
Report use statements that use {} with only one entry
2016-05-27 10:18:44 +01:00
Anthony Ramine
cdc7bca944
Move DOMString back to script
...
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Keith Yeung
48b2e9c055
Add parsing of double values in style attributes
2016-04-25 01:09:30 -04:00
Corey Farwell
5efbf0fa8f
Move util::str::parse_length
into 'style' component.
...
The function is only used in the 'style' component, so we'll move it
there alongside other relevant parse functions.
2016-03-24 10:45:33 -04:00
Sam Gibson
4befd2cfb0
Fixes typo in test literal
2015-12-03 14:10:25 +11:00
Sam Gibson
9668500e97
Makes setting negative values to maxLength throw an IndexSize exception
2015-12-03 14:00:59 +11:00