mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Properly set default direction of prefixed linear gradients
The default linear gradient direction is `to bottom`. This correspondes to `top` keyword in prefixed linear gradients. We should preserve the default value.
This commit is contained in:
parent
19cbea23a8
commit
a0c1eb5109
3 changed files with 17 additions and 7 deletions
|
@ -78,10 +78,13 @@ pub type ColorStop = GenericColorStop<RGBA, LengthOrPercentage>;
|
|||
pub type MozImageRect = GenericMozImageRect<NumberOrPercentage, ComputedUrl>;
|
||||
|
||||
impl GenericLineDirection for LineDirection {
|
||||
fn points_downwards(&self) -> bool {
|
||||
fn points_downwards(&self, compat_mode: CompatMode) -> bool {
|
||||
match *self {
|
||||
LineDirection::Angle(angle) => angle.radians() == PI,
|
||||
LineDirection::Vertical(Y::Bottom) => true,
|
||||
LineDirection::Vertical(Y::Bottom)
|
||||
if compat_mode == CompatMode::Modern => true,
|
||||
LineDirection::Vertical(Y::Top)
|
||||
if compat_mode != CompatMode::Modern => true,
|
||||
LineDirection::Corner(..) => false,
|
||||
#[cfg(feature = "gecko")]
|
||||
LineDirection::MozPosition(_, _) => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue