This includes a `size_of` regression for a few DOM types,
due to https://github.com/rust-lang/rust/pull/58623 which replaces the
implementation of `HashMap` in the standard library to Hashbrown.
Although `size_of<HashMap>` grows, it’s not obvious how total memory usage
is going to be impacted: Hashbrown only has one `u8` instead of one `usize`
of overhead per hash table bucket for storing (part of) a hash,
and so might allocate less memory itself.
Hashbrown also typically has better run time performance:
https://github.com/rust-lang/hashbrown#performance
Still, I’ve filed https://github.com/rust-lang/hashbrown/issues/69
about potentially reducing the `size_of<HashMap>` regression.
No need to build the match body if there are no generics. This should hopefully
save some work too.
Depends on D26289
Differential Revision: https://phabricator.services.mozilla.com/D26290
Otherwise, deriving ToComputedValue and ToAnimatedValue in structs or enums with
other where clauses just doesn't work.
Differential Revision: https://phabricator.services.mozilla.com/D21859
I want to do this so that I can get rid of Either<>. The reasons for getting rid
of either are multiple:
* It doesn't generate as nice C++ code using cbindgen.
* It isn't that nice to use either from Rust.
* cbindgen has bugs with zero-sized types.
I started using this for ColorOrAuto and a few others, for now.
Differential Revision: https://phabricator.services.mozilla.com/D19844
This is the basic structure of the stuff. Following patches will fill
the gap between Gecko and Servo on value generating, and finally hook
it into InspectorUtils.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: KNLAfFBiY6e
System font keywords are not a valid value for those properties.
The newly-added #[css(skip)] would be reused by deriving algorithm of
SpecifiedValueInfo to skip them as well.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: EmnhkaA9RR5
Most of types just derive it using proc_macro directly. Some of value
types need manual impl.
In my current plan, this new trait will be used in bug 1434130 to expose
values as well.
Bug: 1455576
Reviewed-by: emilio
MozReview-Commit-ID: LI7fy45VkRw
This allows us to not generate trait bounds for field types anymore,
by excluding bounds for type parameters used only in fields annotated
with `#[animation(error)]`.
The syntax is `#[animation(no_bound(Foo, Bar))]` where `Foo` is a type
parameter for the type on which we derive things. Ideally this should
be an attribute on the type parameter but this isn't stable yet.