mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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:
parent
13e12d23f3
commit
8dad956513
5 changed files with 64 additions and 64 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue