Emilio Cobos Álvarez
36ff89bd28
style: Remove HasViewportPercentage.
...
It's not needed since #18268
2017-08-29 23:51:21 +02:00
Anthony Ramine
49a5ceca9b
Derive ToAnimatedZero for Either<A, B>
2017-08-24 01:28:34 +02:00
Clément DAVID
c5fe235112
order derivable traits lists
...
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Anthony Ramine
7ee124b1ed
Derive the most trivial Animate impls
2017-08-22 19:12:47 +02:00
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
277351da35
Derive ComputeSquaredDistance
2017-08-13 13:34:04 +02:00
Anthony Ramine
51b740033b
Introduce ComputeSquaredDistance
...
This allows us to merge the former Animatable methods compute_distance and
compute_squared_distance, reducing code size.
2017-08-13 00:51:09 +02: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
9ab0b9b4ac
Introduce ToAnimatedValue 🎥
2017-06-29 14:03:15 +02:00
Anthony Ramine
6c17bb03ce
Derive ToComputedValue for Either<A, B>
2017-06-27 23:36:45 +02:00
Anthony Ramine
c9b123266d
Unconditionally compile SimpleShadow even in Servo
2017-06-23 16:26:09 +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
b83afdedc8
Upgrade cssparser to 0.15
2017-06-16 15:05:46 +02: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
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
Anthony Ramine
cb2e04acf6
Remove style::values::HasViewportPercentage reexport
2017-05-20 22:00:05 +02:00
Anthony Ramine
90bae7f802
Derive HasViewportPercentage 🍷
2017-05-20 14:48:04 +02:00
Anthony Ramine
7d66e65d94
Move some style macros into their own module, used first
2017-05-18 18:16:21 +02:00
Brian Birtles
2f07b29296
Rewrite interpolate() in terms of a more general add_weighted() function
...
Generalizing the procedure like this will allow us to re-use it for addition of
most types.
2017-05-15 12:26:21 +09:00
Michael Brennan
f7459fd848
Make no_viewport_percentage! use an absolute path for HasViewportPercentage
2017-05-11 14:24:03 +02:00
Brian Birtles
6dfc1d1aa8
Merge ComputeDistance trait into Animatable trait
2017-05-10 14:41:26 +09:00
Brian Birtles
4d25e87ac6
Rename the Interpolate trait to Animatable
2017-05-10 13:38:06 +09:00
Aaron Cunningham
f6d09a39f8
Move impl's into macro for macro-generated keyword types
...
Three keyword types are created through a macro but have some of their
impl's handled elsewhere. Since all impl's are the same, this commit
moves them into the macro to have them auto generated, for more concise
code.
2017-04-26 12:38:21 -07:00
Simon Sapin
be38c9a5a7
Consider foo
and "foo"
equal as keyframes/animation names.
2017-04-26 13:04:28 +09:00
Simon Sapin
1146921866
Keep custom-ident and string separate in animation/keyframes name.
2017-04-26 13:04:22 +09:00
Simon Sapin
4993a80074
Introduce a style::values::CustomIdent type
2017-04-26 13:02:14 +09:00
Ravi Shankar
0249270f61
Create a module for generics and make BorderRadiusSize generic
2017-04-25 17:13:41 +05:30
Ravi Shankar
76df67fc7b
Add add_impls_for_keyword_enum macro for implementing necessary traits
2017-04-13 15:27:13 +05:30
Manish Goregaokar
9dbbb97ddd
stylo: Use prefixed values in ExtremumLength
2017-04-12 12:02:12 +08:00
Xidorn Quan
0d556ddbf0
Add a predefined integer type
2017-03-17 23:07:57 +11: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
26de7c6bc4
Auto merge of #14740 - glasserc:extremum-length, r=Manishearth
...
Add support for keyword values for min-width and max-width
This is a follow-up to #14432 which got closed and can no longer be re-opened.
This PR aims to add support for keyword-values max-content, min-content, fit-content, and fill-available to the properties that use them, namely min-width, min-height, max-width, and max-height.
It's still untested because I still haven't figured out how to do that. I guess I should write or find some web page that uses these properties.
Refs #13821 .
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #13821 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- 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/14740 )
<!-- Reviewable:end -->
2017-02-24 14:08:58 -08:00
Ethan Glasser-Camp
76de979231
Implement a MinLength type
...
Implement an ExtremumLength type which contains all the enumerated
keyword values for min-width, min-height, max-width, and
max-height. Then, implement a MinLength which can be used for min-width
and min-height. So far this just maps to Gecko values.
Refs #13821 .
2017-02-23 16:28:26 -05:00
Anthony Ramine
8a8ee2888c
Remove rustc-serialize from style and style_traits
2017-02-23 21:47:23 +01:00
Nazım Can Altınova
78afe2b8d1
Box larger specified values to avoid memmove impact
2017-02-09 11:10:08 +01:00
Nazım Can Altınova
abc40f61c0
Replace NoViewportPercentage with a macro
2017-02-09 10:41:16 +01:00
Alberto Leal
09d4751054
Refactor outline-style to accept "auto" value in addition to border-style values.
...
Fixes https://github.com/servo/servo/issues/15207
2017-02-08 23:13:20 -05:00
Emilio Cobos Álvarez
f37aa12927
style: Prevent more missing docs in the values module.
2016-12-31 12:17:02 +01:00
Emilio Cobos Álvarez
277ef70d39
style: Consistently indent stuff, add a bit of documentation driving by.
2016-12-31 12:16:57 +01:00
Ravi Shankar
dee1a65a69
Use the ParserContext along with Parser in the parse function
2016-11-27 08:49:20 +05:30
Artem Biryukov
9564673b5a
Fix related to #14101
...
Add Parse trait implementation for some structures
2016-11-12 05:26:15 +03:00
Ravi Shankar
5df250bc05
Add unit structs for representing keywords: auto, none, normal
2016-11-09 13:04:24 +05:30
Ravi Shankar
f36a573d2d
Add an Either<A, B> type for sharing specified and computed CSS types
2016-11-09 13:04:17 +05:30
Ravi Shankar
6061985898
Prefer Servo-specific ToCss for all types
2016-11-07 09:14:22 +05:30
Ravi Shankar
5dbc8d02c9
Move Servo-specific ToCss to style_traits
2016-11-07 00:00:28 +05:30
Manish Goregaokar
149246e96a
style: Split values.rs into specified/computed module files
2016-07-29 18:43:42 +05:30