mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #14769 - upsuper:complex-color-update, r=heycam
Update helper functions of StyleComplexColor <!-- 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 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14769) <!-- Reviewable:end -->
This commit is contained in:
commit
bbe70c7c5f
3 changed files with 12 additions and 0 deletions
|
@ -3042,6 +3042,7 @@ pub mod root {
|
||||||
pub struct StyleComplexColor {
|
pub struct StyleComplexColor {
|
||||||
pub mColor: root::nscolor,
|
pub mColor: root::nscolor,
|
||||||
pub mForegroundRatio: u8,
|
pub mForegroundRatio: u8,
|
||||||
|
pub mIsAuto: bool,
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn bindgen_test_layout_StyleComplexColor() {
|
fn bindgen_test_layout_StyleComplexColor() {
|
||||||
|
|
|
@ -3024,6 +3024,7 @@ pub mod root {
|
||||||
pub struct StyleComplexColor {
|
pub struct StyleComplexColor {
|
||||||
pub mColor: root::nscolor,
|
pub mColor: root::nscolor,
|
||||||
pub mForegroundRatio: u8,
|
pub mForegroundRatio: u8,
|
||||||
|
pub mIsAuto: bool,
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn bindgen_test_layout_StyleComplexColor() {
|
fn bindgen_test_layout_StyleComplexColor() {
|
||||||
|
|
|
@ -11,6 +11,7 @@ impl From<nscolor> for StyleComplexColor {
|
||||||
StyleComplexColor {
|
StyleComplexColor {
|
||||||
mColor: other,
|
mColor: other,
|
||||||
mForegroundRatio: 0,
|
mForegroundRatio: 0,
|
||||||
|
mIsAuto: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +21,15 @@ impl StyleComplexColor {
|
||||||
StyleComplexColor {
|
StyleComplexColor {
|
||||||
mColor: 0,
|
mColor: 0,
|
||||||
mForegroundRatio: 255,
|
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