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

@ -26200,7 +26200,7 @@ pub mod root {
"Alignment of field: " , stringify ! ( nsStyleColumn ) ,
"::" , stringify ! ( mTwipsPerPixel ) ));
}
#[repr(u32)]
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsStyleSVGPaintType {
eStyleSVGPaintType_None = 1,
@ -26209,11 +26209,19 @@ pub mod root {
eStyleSVGPaintType_ContextFill = 4,
eStyleSVGPaintType_ContextStroke = 5,
}
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsStyleSVGFallbackType {
eStyleSVGFallbackType_NotSet = 0,
eStyleSVGFallbackType_None = 1,
eStyleSVGFallbackType_Color = 2,
}
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleSVGPaint {
pub mPaint: root::nsStyleSVGPaint__bindgen_ty_1,
pub mType: root::nsStyleSVGPaintType,
pub mFallbackType: root::nsStyleSVGFallbackType,
pub mFallbackColor: root::nscolor,
}
#[repr(C)]
@ -26266,6 +26274,11 @@ pub mod root {
const _ as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( nsStyleSVGPaint ) ,
"::" , stringify ! ( mType ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsStyleSVGPaint ) ) . mFallbackType
as * const _ as usize } , 9usize , concat ! (
"Alignment of field: " , stringify ! ( nsStyleSVGPaint ) ,
"::" , stringify ! ( mFallbackType ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsStyleSVGPaint ) ) . mFallbackColor
as * const _ as usize } , 12usize , concat ! (

View file

@ -25541,7 +25541,7 @@ pub mod root {
"Alignment of field: " , stringify ! ( nsStyleColumn ) ,
"::" , stringify ! ( mTwipsPerPixel ) ));
}
#[repr(u32)]
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsStyleSVGPaintType {
eStyleSVGPaintType_None = 1,
@ -25550,11 +25550,19 @@ pub mod root {
eStyleSVGPaintType_ContextFill = 4,
eStyleSVGPaintType_ContextStroke = 5,
}
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum nsStyleSVGFallbackType {
eStyleSVGFallbackType_NotSet = 0,
eStyleSVGFallbackType_None = 1,
eStyleSVGFallbackType_Color = 2,
}
#[repr(C)]
#[derive(Debug)]
pub struct nsStyleSVGPaint {
pub mPaint: root::nsStyleSVGPaint__bindgen_ty_1,
pub mType: root::nsStyleSVGPaintType,
pub mFallbackType: root::nsStyleSVGFallbackType,
pub mFallbackColor: root::nscolor,
}
#[repr(C)]
@ -25607,6 +25615,11 @@ pub mod root {
const _ as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( nsStyleSVGPaint ) ,
"::" , stringify ! ( mType ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsStyleSVGPaint ) ) . mFallbackType
as * const _ as usize } , 9usize , concat ! (
"Alignment of field: " , stringify ! ( nsStyleSVGPaint ) ,
"::" , stringify ! ( mFallbackType ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const nsStyleSVGPaint ) ) . mFallbackColor
as * const _ as usize } , 12usize , concat ! (

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);
}
}