style: Use Rust lengths for margin / padding / inset.

Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.

This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.

I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.

Differential Revision: https://phabricator.services.mozilla.com/D17739
This commit is contained in:
Emilio Cobos Álvarez 2019-01-26 11:00:44 +01:00
parent 13e12d23f3
commit 8dad956513
5 changed files with 64 additions and 64 deletions

View file

@ -457,6 +457,7 @@ impl IsZeroLength for LengthPercentage {
#[derive(
Animate, Clone, ComputeSquaredDistance, Copy, MallocSizeOf, PartialEq, ToAnimatedZero, ToCss,
)]
#[repr(C, u8)]
pub enum LengthPercentageOrAuto {
LengthPercentage(LengthPercentage),
Auto,