style: Pack LengthPercentage better.

So that it takes one pointer instead of two, and doesn't make nsStylePosition's
size blow up.

This is not as ugly as I was fearing, thankfully, though it requires a bit of
boilerplate. I think it's acceptable.

Differential Revision: https://phabricator.services.mozilla.com/D58702
This commit is contained in:
Emilio Cobos Álvarez 2020-01-13 13:23:22 +00:00
parent 4d5bd94a2b
commit 88fe64d845
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
2 changed files with 315 additions and 58 deletions

View file

@ -78,6 +78,7 @@ trivial_to_resolved_value!(computed::url::ComputedUrl);
trivial_to_resolved_value!(computed::url::ComputedImageUrl);
#[cfg(feature = "servo")]
trivial_to_resolved_value!(html5ever::Prefix);
trivial_to_resolved_value!(computed::LengthPercentage);
impl<A, B> ToResolvedValue for (A, B)
where