зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #14769 - Update helper functions of StyleComplexColor (from upsuper:complex-color-update); r=heycam
<!-- Please describe your changes on the following line: --> The definition of `StyleComplexColor` in the Gecko side was updated in [bug 1063162](https://bugzilla.mozilla.org/show_bug.cgi?id=1063162). The helper functions need update as well. r? @Manishearth Source-Repo: https://github.com/servo/servo Source-Revision: bbe70c7c5f07a67c48523221cb5d9ba12cbb2151
This commit is contained in:
Родитель
4becda37bc
Коммит
2b9b2c6976
|
@ -3042,6 +3042,7 @@ pub mod root {
|
|||
pub struct StyleComplexColor {
|
||||
pub mColor: root::nscolor,
|
||||
pub mForegroundRatio: u8,
|
||||
pub mIsAuto: bool,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_StyleComplexColor() {
|
||||
|
|
|
@ -3024,6 +3024,7 @@ pub mod root {
|
|||
pub struct StyleComplexColor {
|
||||
pub mColor: root::nscolor,
|
||||
pub mForegroundRatio: u8,
|
||||
pub mIsAuto: bool,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_StyleComplexColor() {
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче