From 7d59e3bd93915e97192b35e10d45e81b8f62ea57 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Thu, 29 Dec 2016 12:24:20 +1100 Subject: [PATCH] Update helper functions of StyleComplexColor --- components/style/gecko_bindings/structs_debug.rs | 1 + components/style/gecko_bindings/structs_release.rs | 1 + .../style/gecko_bindings/sugar/style_complex_color.rs | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/components/style/gecko_bindings/structs_debug.rs b/components/style/gecko_bindings/structs_debug.rs index f2d52e59283..322873f76a3 100644 --- a/components/style/gecko_bindings/structs_debug.rs +++ b/components/style/gecko_bindings/structs_debug.rs @@ -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() { diff --git a/components/style/gecko_bindings/structs_release.rs b/components/style/gecko_bindings/structs_release.rs index 0ff3efce55f..ca933fb3eff 100644 --- a/components/style/gecko_bindings/structs_release.rs +++ b/components/style/gecko_bindings/structs_release.rs @@ -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() { diff --git a/components/style/gecko_bindings/sugar/style_complex_color.rs b/components/style/gecko_bindings/sugar/style_complex_color.rs index 288d395b1ac..d428e6bf741 100644 --- a/components/style/gecko_bindings/sugar/style_complex_color.rs +++ b/components/style/gecko_bindings/sugar/style_complex_color.rs @@ -11,6 +11,7 @@ impl From 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, } } }