mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Change nscolor to StyleComplexColor.
Bug: 1467622 Reviewed-by: xidorn MozReview-Commit-ID: 1bbQzOoOuBe
This commit is contained in:
parent
6f9b47be25
commit
a76f5393d4
4 changed files with 15 additions and 13 deletions
|
@ -667,14 +667,14 @@ def set_gecko_property(ffi_name, expr):
|
|||
SVGPaintKind::Color(color) => {
|
||||
paint.mType = nsStyleSVGPaintType::eStyleSVGPaintType_Color;
|
||||
unsafe {
|
||||
*paint.mPaint.mColor.as_mut() = convert_rgba_to_nscolor(&color);
|
||||
*paint.mPaint.mColor.as_mut() = color.into();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
paint.mFallbackType = match fallback {
|
||||
Some(Either::First(color)) => {
|
||||
paint.mFallbackColor = convert_rgba_to_nscolor(&color);
|
||||
paint.mFallbackColor = color.into();
|
||||
nsStyleSVGFallbackType::eStyleSVGFallbackType_Color
|
||||
},
|
||||
Some(Either::Second(_)) => {
|
||||
|
@ -709,7 +709,7 @@ def set_gecko_property(ffi_name, expr):
|
|||
|
||||
let fallback = match paint.mFallbackType {
|
||||
nsStyleSVGFallbackType::eStyleSVGFallbackType_Color => {
|
||||
Some(Either::First(convert_nscolor_to_rgba(paint.mFallbackColor)))
|
||||
Some(Either::First(paint.mFallbackColor.into()))
|
||||
},
|
||||
nsStyleSVGFallbackType::eStyleSVGFallbackType_None => {
|
||||
Some(Either::Second(None_))
|
||||
|
@ -728,7 +728,8 @@ def set_gecko_property(ffi_name, expr):
|
|||
})
|
||||
}
|
||||
nsStyleSVGPaintType::eStyleSVGPaintType_Color => {
|
||||
unsafe { SVGPaintKind::Color(convert_nscolor_to_rgba(*paint.mPaint.mColor.as_ref())) }
|
||||
let col = unsafe { *paint.mPaint.mColor.as_ref() };
|
||||
SVGPaintKind::Color(col.into())
|
||||
}
|
||||
};
|
||||
SVGPaint {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue