diff options
author | Boris Chiou <boris.chiou@gmail.com> | 2017-09-13 14:26:51 +0800 |
---|---|---|
committer | Boris Chiou <boris.chiou@gmail.com> | 2017-09-13 18:05:14 +0800 |
commit | a949e2a0570e41816cd1a2fa3ed5ebd314212dda (patch) | |
tree | 79fa5a3535cceb6bf500d938ca7b45ca6af09fc7 /components/layout/webrender_helpers.rs | |
parent | cad3aff508fdf47036237ead519791f180e1ea3d (diff) | |
download | servo-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/webrender_helpers.rs')
-rw-r--r-- | components/layout/webrender_helpers.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/layout/webrender_helpers.rs b/components/layout/webrender_helpers.rs index 4bcd4f337d4..3a67aeedecd 100644 --- a/components/layout/webrender_helpers.rs +++ b/components/layout/webrender_helpers.rs @@ -200,7 +200,7 @@ impl ToFilterOps for Vec<Filter> { let mut result = Vec::with_capacity(self.len()); for filter in self.iter() { match *filter { - GenericFilter::Blur(radius) => result.push(webrender_api::FilterOp::Blur(radius.0.to_f32_px())), + GenericFilter::Blur(radius) => result.push(webrender_api::FilterOp::Blur(radius.px())), GenericFilter::Brightness(amount) => result.push(webrender_api::FilterOp::Brightness(amount.0)), GenericFilter::Contrast(amount) => result.push(webrender_api::FilterOp::Contrast(amount.0)), GenericFilter::Grayscale(amount) => result.push(webrender_api::FilterOp::Grayscale(amount.0)), |