mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Kill side keywords from style::values::specified::image
This commit is contained in:
parent
1c54758ad6
commit
f2aaba685b
6 changed files with 31 additions and 33 deletions
|
@ -194,7 +194,8 @@ impl nsStyleImage {
|
|||
use gecko_bindings::structs::nsStyleCoord;
|
||||
use values::computed::{AngleOrCorner, GradientKind, GradientShape, LengthOrKeyword};
|
||||
use values::computed::LengthOrPercentageOrKeyword;
|
||||
use values::specified::{HorizontalDirection, SizeKeyword, VerticalDirection};
|
||||
use values::specified::SizeKeyword;
|
||||
use values::specified::position::{X, Y};
|
||||
|
||||
let stop_count = gradient.items.len();
|
||||
if stop_count >= ::std::u32::MAX as usize {
|
||||
|
@ -222,12 +223,12 @@ impl nsStyleImage {
|
|||
},
|
||||
AngleOrCorner::Corner(horiz, vert) => {
|
||||
let percent_x = match horiz {
|
||||
HorizontalDirection::Left => 0.0,
|
||||
HorizontalDirection::Right => 1.0,
|
||||
X::Left => 0.0,
|
||||
X::Right => 1.0,
|
||||
};
|
||||
let percent_y = match vert {
|
||||
VerticalDirection::Top => 0.0,
|
||||
VerticalDirection::Bottom => 1.0,
|
||||
Y::Top => 0.0,
|
||||
Y::Bottom => 1.0,
|
||||
};
|
||||
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue