From d8969e244736f64fd552ee3ffa5be82165df29f0 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 2 May 2016 14:43:46 +1000 Subject: [PATCH] Support {background,outline}-color in geckolib. --- ports/geckolib/properties.mako.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index 90f74f9eb15..683eab3c0d6 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -476,11 +476,13 @@ fn static_assert() { <%self:impl_trait style_struct_name="Outline" - skip_longhands="outline-style" + skip_longhands="outline-color outline-style" skip_additionals="*"> <% impl_keyword("outline_style", "mOutlineStyle", border_style_keyword, need_clone=True) %> + <% impl_color("outline_color", "mOutlineColor", color_flags_ffi_name="mOutlineStyle") %> + fn outline_has_nonzero_width(&self) -> bool { self.gecko.mCachedOutlineWidth != 0 } @@ -546,6 +548,12 @@ fn static_assert() { +<%self:impl_trait style_struct_name="Background" skip_longhands="background-color" skip_additionals="*"> + + <% impl_color("background_color", "mBackgroundColor") %> + + + <%self:impl_trait style_struct_name="Text" skip_longhands="text-decoration-color" skip_additionals="*">