aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorBoris Chiou <boris.chiou@gmail.com>2017-09-13 14:26:51 +0800
committerBoris Chiou <boris.chiou@gmail.com>2017-09-13 18:05:14 +0800
commita949e2a0570e41816cd1a2fa3ed5ebd314212dda (patch)
tree79fa5a3535cceb6bf500d938ca7b45ca6af09fc7 /components/layout/construct.rs
parentcad3aff508fdf47036237ead519791f180e1ea3d (diff)
downloadservo-a949e2a0570e41816cd1a2fa3ed5ebd314212dda.tar.gz
servo-a949e2a0570e41816cd1a2fa3ed5ebd314212dda.zip
Introduce CSSPixelLength and update NonNegativeLength.
First, we define computed::CSSPixelLength which contains a CSSFloat, a pixel value, and then we replace computed::Length with CSSPixelLength. Therefore, the |ComputedValue| of NoCalcLength, AbsoluteLength, FontRelativeLength, ViewportPercentageLength, CharacterWidth, and PhysicalLength is CSSPixelLength. Besides, we drop NonNegativeAu, and replace computed::NonNegativeLength with NonNegative<computed::Length>. (i.e. NonNegative<CSSPixelLength>)
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 502f21b36f9..852f16e893e 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -14,7 +14,6 @@
#![deny(unsafe_code)]
use ServoArc;
-use app_units::Au;
use block::BlockFlow;
use context::{LayoutContext, with_thread_local_font_context};
use data::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutData};
@@ -1852,10 +1851,10 @@ impl ComputedValueUtils for ComputedValues {
!padding.padding_right.is_definitely_zero() ||
!padding.padding_bottom.is_definitely_zero() ||
!padding.padding_left.is_definitely_zero() ||
- border.border_top_width.0 != Au(0) ||
- border.border_right_width.0 != Au(0) ||
- border.border_bottom_width.0 != Au(0) ||
- border.border_left_width.0 != Au(0)
+ border.border_top_width.px() != 0. ||
+ border.border_right_width.px() != 0. ||
+ border.border_bottom_width.px() != 0. ||
+ border.border_left_width.px() != 0.
}
}