Xidorn Quan
7e92c15e00
Replace write! with to_css and write_str in some ToCss impls
2017-08-20 17:21:08 +10:00
Anthony Ramine
4ebeaa599b
Move specified and computed time values to submodules
2017-08-17 00:05:59 +02:00
Anthony Ramine
1bd12bf91a
Move specified and computed angles to submodules
2017-08-17 00:01:23 +02:00
Anthony Ramine
796a2b9632
Move specified and computed percentages to submodules
2017-08-14 02:47:43 +02:00
Fausto Núñez Alberro
14c5a1b8d3
Introduce ComputedUrl
...
Add web platform tests for computed URL styles
Mark url with no original or resolved unreachable
Update the WPT manifest for new url tests
2017-08-09 13:55:39 +02:00
DarkDrek
a5b585a5f1
Move Percentage from length.rs to mod.rs
2017-08-08 16:44:31 +02:00
bors-servo
016ea11cba
Auto merge of #17783 - BorisChiou:stylo/animation/restrictions, r=nox
...
stylo: Bug 1374233 - Clamp interpolated values for properties which need to be restricted
Some properties only accept non-negative values, or values greater than or equal to one. It is possible to produce an negative interpolated values while using negative timing functions, so we have to apply a restriction to these values to avoid getting invalid values.
For example, line-height must be non-negative, but the output progress of some timing functions (e,g. cubic-bezier(0.25, -2, 0.75, 1)) may be a negative value, so the interpolated result of line-height is also negative.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix Bug 1374233.
- [X] These changes do not require tests because we have tests in Gecko side already.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17783 )
<!-- Reviewable:end -->
2017-08-07 11:05:17 -05:00
Boris Chiou
bd0a098ef1
Bug 1374233 - Part 9: Add NonNegativeLengthOrPercentageOrNumber for stroke-{width|dasharry}.
...
Also add SVGWidth which use NonNegativeSVGLengthOrPercentage
as the LengthType for stroke-width.
MozReview-Commit-ID: 8gD0fVe2eAe
2017-08-04 14:23:24 +08:00
Boris Chiou
e72a0f126e
Bug 1374233 - Part 7: Add NonNegativeLengthOrPercentage.
...
For padding-{*} and grid-{*}-gap.
MozReview-Commit-ID: 81G0b1k6JnD
2017-08-04 14:23:21 +08:00
Boris Chiou
9d69cb2866
Bug 1374233 - Part 6: Add PositiveInteger and PositiveIntegerOrAuto for column-count.
...
column-count should be a positive integer or auto.
MozReview-Commit-ID: 9LFvrYo8De5
2017-08-04 14:23:17 +08:00
Boris Chiou
4cc97746f2
Bug 1374233 - Part 1: Add NonNegativeNumber and GreaterThanOrEqualToOneNumber.
...
NonNegativeNumber: for -moz-box-flex, flex-grow, and flex-shrink.
GreaterThanOrEqualToOneNumber: for stroke-miterlimit.
MozReview-Commit-ID: Kgbt99BPdVA
2017-08-04 14:21:21 +08:00
Xidorn Quan
35d8f98fdd
Preserve unit in specified time value
2017-08-04 09:57:46 +10:00
Xidorn Quan
ef4352d2a5
Add context-{fill,stroke}-opacity support to {fill,stroke}-opacity.
2017-08-02 10:35:18 +10:00
Xidorn Quan
7827ca6bb5
Make stroke-dasharray accept context-value.
2017-08-02 10:35:17 +10:00
Xidorn Quan
aa80859a71
Add SVGLength which accepts context-value, and use it for stroke-{width,dashoffset}.
2017-08-02 10:03:15 +10:00
Xidorn Quan
0071c7663f
Add svg mods and move SVG-related types into them.
2017-08-02 10:03:08 +10:00
bors-servo
bf16b146e8
Auto merge of #17839 - heycam:opacity-smil, r=hiro
...
style: allow out-of-range opacity values for SMIL animations
From https://bugzilla.mozilla.org/show_bug.cgi?id=1371150 .
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17839 )
<!-- Reviewable:end -->
2017-07-24 19:13:08 -07:00
Cameron McCormack
6171b5c465
style: Don't clamp Opacity values when computing them for SMIL.
2017-07-24 20:47:34 +08:00
Simon Sapin
eb98ae6e04
Update cssparser to 0.18
...
https://github.com/servo/rust-cssparser/pull/171
2017-07-24 11:39:12 +02:00
Anthony Ramine
1eb51daba6
Derive ToComputedValue for SVGPaint
2017-07-20 10:30:25 +02:00
bors-servo
2d37700cf8
Auto merge of #17731 - emilio:percentage-calc, r=nox
...
style: Respect calc for percentages.
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17731 )
<!-- Reviewable:end -->
2017-07-17 01:29:11 -07:00
Nazım Can Altınova
ade76f10b7
Convert TrackList's 'values' field to store only TrackSize.
...
It was storing both TrackSize and TrackRepeat before and TrackRepeat have to be
converted into sequence of TrackSize during serialization. Instead of doing this
in serialization process(which is hard and hacky), we converted to do this in
parsing process. We were doing this conversion in the ComputedValue conversion.
So we only had to move this process to parsing.
2017-07-14 15:55:40 -07:00
Emilio Cobos Álvarez
310be02ba8
style: Respect calc for percentages.
2017-07-14 13:43:27 +02:00
Anthony Ramine
907d629ca4
Rename ImageRect to MozImageRect
2017-07-12 11:45:15 +02:00
bors-servo
7a71035793
Auto merge of #17268 - servo:grid, r=wafflespeanut,canaltinova
...
Add support for subgrids and fix some other grid properties
This covers the `subgrid <line-name-lists>?` for `grid-template` (for gecko, and hence, stylo).
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17268 )
<!-- Reviewable:end -->
2017-07-03 17:10:25 -07:00
Ravi Shankar
9d9d99ec25
Switch to GridTemplateComponent for subgrid line names
2017-07-03 17:08:00 -07:00
Anthony Ramine
201d7e79e7
Make text-shadow and box-shadow use SimpleShadow
2017-06-28 16:28:25 +02:00
Anthony Ramine
395f6be0a6
Use the Separator trait for the filter property
2017-06-27 23:40:16 +02:00
Anthony Ramine
6f4061d4ad
Use generics for the filter property
...
This introduces an additional shadow type for drop-shadow().
2017-06-20 13:48:53 +02:00
Simon Sapin
a5bb55790f
Untry style
2017-06-18 13:18:13 +02:00
Anthony Ramine
bc9bc1d340
Rename LengthOrPercentageOrAutoOrContent to FlexBasis
2017-06-17 13:46:35 +02:00
Simon Sapin
b83afdedc8
Upgrade cssparser to 0.15
2017-06-16 15:05:46 +02:00
Hiroyuki Ikezoe
6c5915068a
AllowedNumericType.is_ok() takes ParingMode as well.
...
And it returns true if ParsingMode.allows_all_numeric_values is true regardless
of AllowedNumericType itself.
2017-06-14 09:52:06 +09:00
Anthony Ramine
8eec24cd46
Revert "Derive ToCss for MozImageRect"
...
This reverts commit fe19c3810c
.
2017-06-13 18:00:29 +02:00
Anthony Ramine
fe19c3810c
Derive ToCss for MozImageRect
2017-06-13 11:29:25 +02:00
Josh Matthews
27ae1ef2e7
Thread ParseError return values through CSS parsing.
2017-06-09 16:46:25 -04:00
Xidorn Quan
c62935577a
Add separate computed Color value.
2017-06-08 12:59:26 +10:00
Xidorn Quan
7568a19688
Merge CSSColor into Color.
2017-06-08 12:59:22 +10:00
Xidorn Quan
bf77f81ed6
Create RGBAColor for colors compute to RGBA.
2017-06-08 10:42:26 +10:00
Xidorn Quan
a7dda61158
Move specified color types into specified::color mod.
2017-06-08 10:42:19 +10:00
Xidorn Quan
6e1b36b32f
Remove unused CSSRGBA.
2017-06-08 10:42:18 +10:00
bors-servo
738483742c
Auto merge of #17209 - servo:derive-all-the-things, r=emilio
...
Introduce more generics and more deriving
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17209 )
<!-- Reviewable:end -->
2017-06-07 08:55:08 -07:00
Xidorn Quan
e659fa6c23
Serialize spread in shadow conditionally.
2017-06-07 13:32:14 +10:00
Xidorn Quan
2bd1ff0450
Move ToCss impl for Shadow types to values mod.
2017-06-07 13:32:10 +10:00
Anthony Ramine
7d09ce0495
Use generics for initial-letter
...
The former version used ComputedValueAsSpecified, which means we were storing
specified numbers and integers in the computed value.
2017-06-07 01:31:02 +02:00
Anthony Ramine
195e98e745
Use generics for scroll-snap-points-*
2017-06-06 19:27:43 +02:00
Anthony Ramine
65356b13f8
Use predefined_type for transition-property
2017-06-06 14:35:58 +02:00
Manish Goregaokar
74f3284c69
Make SVGPaint generic
2017-06-05 17:05:59 -07:00
Anthony Ramine
874885e235
Use generics for transition-timing-function 📈
2017-06-05 16:49:55 +02:00
Anthony Ramine
c4f1d647a0
Derive the most trivial ToCss implementations 🌋
...
For now, all variants get serialised as the space-separated serialisations
of their fields. Unit variants are not supported.
2017-06-04 16:17:56 +02:00