mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Parse -moz-image-rect()
and -moz-element()
only in Gecko
This commit is contained in:
parent
709e06928a
commit
062c1872f0
5 changed files with 59 additions and 17 deletions
|
@ -9,10 +9,11 @@
|
|||
|
||||
use crate::values::computed::position::Position;
|
||||
use crate::values::computed::url::ComputedImageUrl;
|
||||
#[cfg(feature = "gecko")]
|
||||
use crate::values::computed::NumberOrPercentage;
|
||||
use crate::values::computed::{Angle, Color, Context};
|
||||
use crate::values::computed::{
|
||||
LengthPercentage, NonNegativeLength, NonNegativeLengthPercentage, NumberOrPercentage,
|
||||
ToComputedValue,
|
||||
LengthPercentage, NonNegativeLength, NonNegativeLengthPercentage, ToComputedValue,
|
||||
};
|
||||
use crate::values::generics::image::{self as generic, GradientCompatMode};
|
||||
use crate::values::specified::image::LineDirection as SpecifiedLineDirection;
|
||||
|
@ -63,8 +64,13 @@ pub type GradientItem = generic::GenericGradientItem<Color, LengthPercentage>;
|
|||
pub type ColorStop = generic::ColorStop<Color, LengthPercentage>;
|
||||
|
||||
/// Computed values for `-moz-image-rect(...)`.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub type MozImageRect = generic::MozImageRect<NumberOrPercentage, ComputedImageUrl>;
|
||||
|
||||
/// Empty enum on non-gecko
|
||||
#[cfg(not(feature = "gecko"))]
|
||||
pub type MozImageRect = crate::values::specified::image::MozImageRect;
|
||||
|
||||
impl generic::LineDirection for LineDirection {
|
||||
fn points_downwards(&self, compat_mode: GradientCompatMode) -> bool {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue