Commit graph

11 commits

Author SHA1 Message Date
Anthony Ramine
4d0bf2ddf9 Opt into field bounds for #[derive(ToComputedValue)] 2018-03-09 18:54:59 +01:00
Anthony Ramine
2efd06c12d Remove #[compute(clone)] 2018-03-09 15:45:34 +01:00
Anthony Ramine
859002a81f Opt into field bounds when deriving ToCss, instead of opting out 2018-03-08 16:33:19 +01:00
Anthony Ramine
b517bcd42b Unconditionally derive ToComputedValue as Clone for non-generics
We assume that types such as `<Self as ToComputedValue>::ToComputedValue == Self`
just construct a new value that is just a clone of the original one without any
additional code.
2018-03-03 18:41:50 +01:00
Bastien Orivel
9faa579c89 Bump syn/quote in style_derive 2018-02-12 17:08:55 +01:00
Manish Goregaokar
dcefcc3c22
Add ToComputedValue and ToCss impls 2017-11-02 14:29:58 -07:00
Anthony Ramine
735e093de7 Implement #[compute(clone)] for #[derive(ToComputedValue)] 2017-08-28 10:39:53 +02:00
Anthony Ramine
efc852f6e3 Improve handling of trait bounds when deriving fmap-like traits 2017-08-28 10:39:50 +02:00
Anthony Ramine
04ad28b564 Refactor how we handle trait bounds in style_derive
For the traits we derive which methods don't depend on associated types (i.e.
all of them but ToAnimatedValue and ToComputedValue), we now add trait bounds
for the actual field types directly, instead of bounding the type parameters.
2017-08-27 23:31:16 +02:00
Anthony Ramine
f275895028 Introduce style_derive::cg 2017-08-23 16:52:04 +02:00
Anthony Ramine
07c0456cfd Derive ToComputedValue
For now, only impls for types like in style::values::generics can be derived.

This also needed a few ToComputedValueAsSpecified impls that I would like to
replace by some #[to_computed_value(clone)] attribute, but I think it is ok
to keep it like this for now.
2017-05-21 15:31:17 +02:00