Anthony Ramine
c03f5f19ab
Introduce CommaWithSpace
...
This allows us to support stroke-dasharray the same way as comma-separated
values.
2017-06-27 23:37:48 +02:00
Anthony Ramine
17875b8a81
Introduce Separator::parse
2017-06-27 23:37:44 +02:00
Nazım Can Altınova
5362c5ee74
Bump cssparser version to 0.16.1 in toml files
2017-06-22 15:44:03 -07:00
Anthony Ramine
39e29f557e
Simplify machinery to serialise optional parts of CSS values
...
We simply implement ToCss for Option<T>, printing nothing if the value is None,
and we then use SequenceWriter to skip writing of separators around empty parts.
2017-06-21 11:17:22 +02:00
bors-servo
fc2c5b7ef4
Auto merge of #17402 - servo:derive-all-the-things, r=emilio
...
Use generics for the filter property
<!-- 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/17402 )
<!-- Reviewable:end -->
2017-06-20 06:23:17 -07: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
Jonathan Chan
26179b3660
style: Have OneOrMoreSeparated replace OneOrMoreCommaSeparated.
...
A future patch series has some values that should be separated by spaces. This
allows us to re-use the code for serialization, but the types do get a little
clunky. The separator is now indicated with an associated type.
2017-06-19 16:09:37 -07:00
Simon Sapin
316cd35767
Untry
2017-06-18 13:21:51 +02:00
Simon Sapin
b83afdedc8
Upgrade cssparser to 0.15
2017-06-16 15:05:46 +02:00
Simon Sapin
605ef8b7ec
Remove explicit dependencies on serde_derive
2017-06-16 13:58:21 +02:00
Bastien Orivel
76d8573393
Bump serde to 1.0
2017-06-16 13:31:18 +02:00
Nicolas Silva
8617320500
Bump euclid to 0.14.
2017-06-14 16:00:59 +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
Hiroyuki Ikezoe
7341574b66
Make AllowedLengthType.is_ok() returning true if parsing mode allows all numeric values.
...
Even if the type is NonNegative and the given value is a negative.
2017-06-14 09:51:54 +09:00
Hiroyuki Ikezoe
8bfed4cb3c
Move ParsingMode into style_traits.
2017-06-14 09:51:36 +09:00
Josh Matthews
27ae1ef2e7
Thread ParseError return values through CSS parsing.
2017-06-09 16:46:25 -04:00
Anthony Ramine
c8c6f3482f
Implement ToCss for str and String
2017-06-08 11:13:39 +02:00
Anthony Ramine
45e8b0e8c7
Support unit variants when deriving ToCss
2017-06-07 16:47:59 +02:00
Bastien Orivel
0a254b0306
Bump euclid to 0.13 and heapsize to 0.4
2017-06-05 19:28:39 +02:00
Manish Goregaokar
41f1c3463e
Bump cssparser to 0.13.7
2017-06-02 17:43:56 -07:00
Anthony Ramine
af3ede418b
Refactor BorderRadius and move it to the border modules
...
BorderRadius now parses itself reusing Rect<T>.
2017-05-28 14:36:37 +02:00
bors-servo
4f0b24ac0c
Auto merge of #16960 - servo:derive-all-the-things, r=emilio
...
Derive HasViewportPercentage 🍷
<!-- 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/16960 )
<!-- Reviewable:end -->
2017-05-20 11:34:36 -05:00
Anthony Ramine
90bae7f802
Derive HasViewportPercentage 🍷
2017-05-20 14:48:04 +02:00
Manish Goregaokar
2230332f46
Update app_units to 0.4.1
2017-05-19 20:33:02 -07:00
bors-servo
0b3fd8de76
Auto merge of #16067 - Wafflespeanut:grid, r=nox,Wafflespeanut
...
Stylo: Add support for grid-template-{rows,columns}
This has the implementation of grid's `<track-list>` nightmare.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15311
<!-- Either: -->
- [x] There are tests for these changes
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/16067 )
<!-- Reviewable:end -->
2017-05-18 17:09:15 -05:00
Ravi Shankar
81b4e64dfc
Add parsing/serialization for repeat() function
2017-05-18 21:56:38 +05:30
Anthony Ramine
d0b9bd9c64
Refactor how calc() clamping is done on computed values ( fixes #15296 )
2017-05-18 10:14:59 +02:00
Manish Goregaokar
1b9bac7e66
Bump cssparser to 0.13.3
2017-05-11 12:50:40 -07:00
KuoE0
285ff8214e
Make stylo support moz-prefixed cursor values.
...
MozReview-Commit-ID: AfV0recnoXw
2017-05-05 10:46:35 +08:00
Simon Sapin
11cef135e7
Update to cssparser 0.13
2017-04-25 01:45:33 +02:00
Cameron McCormack
10f2d3c38e
style: Add support for property value aliases.
...
For keyword-typed properties with aliases but no extra_specified values,
the storage of the specified and computed values could be the same,
since value aliases are resolved at parse time. But to prevent
computed_value::T::parse from recognizing these aliases, we keep the
specified and computed value types distinct.
2017-04-17 11:24:21 +10:00
Anthony Ramine
dfbd89860a
Don't reject out of bound calc() values at parsing-time
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1355014
2017-04-12 14:07:38 +02:00
Anthony Ramine
12d46e7d01
Rename AllowedNumericType to AllowedLengthType
2017-04-12 13:58:38 +02:00
Xidorn Quan
da901bd2dc
Update cssparser in Cargo.toml.
2017-04-07 16:07:37 +10:00
Pyfisch
480f59c880
Implement serialization for transform functions.
...
Preserve more information from transform function parsing.
Preserve angle unit while parsing.
Simplify SpecifiedMatrix.
Use the write! macro for formatting with a helper called Css.
Implement ToCss for &T if T implements ToCss.
Add some tests and update others.
closes #15194
2017-04-04 19:04:19 +02:00
Emilio Cobos Álvarez
a5436e9091
style: Add <keyword>::from_ident helper to avoid tokenizing the same value multiple times.
2017-03-26 18:12:02 +02:00
Simon Sapin
288ef97055
Update cssparser for https://github.com/servo/rust-cssparser/pull/123
2017-02-28 17:16:36 +01:00
Simon Sapin
33ef6f78e5
Update to cssparser 0.11
2017-02-26 11:09:53 +01:00
Simon Sapin
0f2d000a23
Borrow input to match_ignore_ascii_case!
...
In cssparser version 0.11, this macro will stop implicitly borrowing its
own input.
2017-02-26 10:40:09 +01:00
bors-servo
f9f55789b8
Auto merge of #15712 - nox:rustc-serialize, r=metajack
...
Remove rustc-serialize from style and style_traits
<!-- 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/15712 )
<!-- Reviewable:end -->
2017-02-23 19:19:34 -08:00
Glenn Watson
30ff2f8f0d
Introduce CSSPixel as a replacement for ViewportPx and PagePx.
2017-02-24 06:58:10 +10:00
Anthony Ramine
8a8ee2888c
Remove rustc-serialize from style and style_traits
2017-02-23 21:47:23 +01:00
Glenn Watson
0af27a3434
Rename ScreenPx to DeviceIndependentPixel.
2017-02-22 14:37:24 +10:00
Anthony Ramine
fe3f4ff0c2
Update serde to 0.9 ( fixes #15325 )
2017-02-18 21:09:46 +01:00
Simon Sapin
c3cad2d6c7
Update cssparser to 0.9
2017-02-15 12:42:14 +01:00
Emilio Cobos Álvarez
0c102e2350
style: Unbox a bunch of color properties.
...
This builds on https://github.com/servo/rust-cssparser/pull/118 .
2017-02-14 20:18:31 +01:00
Nazım Can Altınova
78afe2b8d1
Box larger specified values to avoid memmove impact
2017-02-09 11:10:08 +01:00
Simon Sapin
9ec8418d8c
Rename CommaSeparated to OneOrMoreCommaSeparated, reflecting its behavior.
2017-02-03 13:15:53 +01:00
Simon Sapin
4bcae573b3
Macroize @font-face descriptor definitions
2017-02-02 18:32:02 +01:00
Ms2ger
14fe337866
Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23).
2017-01-24 11:02:51 +01:00