mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +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
|
@ -328,8 +328,9 @@ impl nsStyleImage {
|
|||
match shape {
|
||||
EndingShape::Circle(Circle::Radius(length)) => {
|
||||
unsafe {
|
||||
(*gecko_gradient).mRadiusX.set_value(CoordDataValue::Coord(length.0));
|
||||
(*gecko_gradient).mRadiusY.set_value(CoordDataValue::Coord(length.0));
|
||||
let au = length.to_i32_au();
|
||||
(*gecko_gradient).mRadiusX.set_value(CoordDataValue::Coord(au));
|
||||
(*gecko_gradient).mRadiusY.set_value(CoordDataValue::Coord(au));
|
||||
}
|
||||
},
|
||||
EndingShape::Ellipse(Ellipse::Radii(x, y)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue