mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Convert gecko's currentcolor to servo one.
This commit is contained in:
parent
4665d6dd15
commit
95994bd710
1 changed files with 10 additions and 1 deletions
|
@ -48,11 +48,20 @@ impl nsCSSShadowItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn extract_color(&self) -> Color {
|
||||||
|
if self.mHasColor {
|
||||||
|
Color::rgba(convert_nscolor_to_rgba(self.mColor))
|
||||||
|
} else {
|
||||||
|
Color::currentcolor()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Gets a simple shadow from this item.
|
/// Gets a simple shadow from this item.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extract_simple_shadow(&self) -> SimpleShadow {
|
fn extract_simple_shadow(&self) -> SimpleShadow {
|
||||||
SimpleShadow {
|
SimpleShadow {
|
||||||
color: Color::rgba(convert_nscolor_to_rgba(self.mColor)),
|
color: self.extract_color(),
|
||||||
horizontal: Au(self.mXOffset),
|
horizontal: Au(self.mXOffset),
|
||||||
vertical: Au(self.mYOffset),
|
vertical: Au(self.mYOffset),
|
||||||
blur: Au(self.mRadius).into(),
|
blur: Au(self.mRadius).into(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue