mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Update helper functions of StyleComplexColor
This commit is contained in:
parent
b29b33c84c
commit
7d59e3bd93
3 changed files with 12 additions and 0 deletions
|
@ -11,6 +11,7 @@ impl From<nscolor> for StyleComplexColor {
|
|||
StyleComplexColor {
|
||||
mColor: other,
|
||||
mForegroundRatio: 0,
|
||||
mIsAuto: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +21,15 @@ impl StyleComplexColor {
|
|||
StyleComplexColor {
|
||||
mColor: 0,
|
||||
mForegroundRatio: 255,
|
||||
mIsAuto: false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn auto() -> Self {
|
||||
StyleComplexColor {
|
||||
mColor: 0,
|
||||
mForegroundRatio: 255,
|
||||
mIsAuto: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue