Set fallback type to eStyleSVGFallbackType_Color when a colour is encountered

This commit is contained in:
Robert Longson 2017-04-30 23:06:24 +01:00
parent caa66a880a
commit 8f5cb99b92
3 changed files with 30 additions and 2 deletions

View file

@ -415,6 +415,7 @@ fn color_to_nscolor_zero_currentcolor(color: Color) -> structs::nscolor {
pub fn set_${ident}(&mut self, mut v: longhands::${ident}::computed_value::T) {
use values::computed::SVGPaintKind;
use self::structs::nsStyleSVGPaintType;
use self::structs::nsStyleSVGFallbackType;
let ref mut paint = ${get_gecko_property(gecko_ffi_name)};
unsafe {
@ -443,6 +444,7 @@ fn color_to_nscolor_zero_currentcolor(color: Color) -> structs::nscolor {
}
if let Some(fallback) = fallback {
paint.mFallbackType = nsStyleSVGFallbackType::eStyleSVGFallbackType_Color;
paint.mFallbackColor = color_to_nscolor_zero_currentcolor(fallback);
}
}