Bug 1380590 - Set mFallbackType to None when the fallback color of context-property is none draft
authorKuoE0 <kuoe0.tw@gmail.com>
Fri, 01 Sep 2017 17:27:02 +0800
changeset 657244 5eb6391c6250d06d5471b5b2dfdba3e21de707b9
parent 657243 2a300aa651b0f42f9da3bd71d374de5f18e0d02f
child 729403 55f7850df044ea1aec7347194e87aa5658d7a0e1
push id77495
push userbmo:kuoe0@mozilla.com
push dateFri, 01 Sep 2017 09:29:47 +0000
bugs1380590
milestone57.0a1
Bug 1380590 - Set mFallbackType to None when the fallback color of context-property is none MozReview-Commit-ID: AOu89NyLzSp
servo/components/style/properties/gecko.mako.rs
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -741,16 +741,18 @@ def set_gecko_property(ffi_name, expr):
                     *paint.mPaint.mColor.as_mut() = convert_rgba_to_nscolor(&color);
                 }
             }
         }
 
         if let Some(fallback) = fallback {
             paint.mFallbackType = nsStyleSVGFallbackType::eStyleSVGFallbackType_Color;
             paint.mFallbackColor = convert_rgba_to_nscolor(&fallback);
+        } else {
+            paint.mFallbackType = nsStyleSVGFallbackType::eStyleSVGFallbackType_None;
         }
     }
 
     #[allow(non_snake_case)]
     pub fn copy_${ident}_from(&mut self, other: &Self) {
         unsafe {
             bindings::Gecko_nsStyleSVGPaint_CopyFrom(
                 &mut ${get_gecko_property(gecko_ffi_name)},