mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +01:00
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>)
This commit is contained in:
parent
cad3aff508
commit
a949e2a057
40 changed files with 502 additions and 406 deletions
|
@ -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)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue