mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Clone the url data of paint server.
This commit is contained in:
parent
4f0f2fb13e
commit
338eeed474
1 changed files with 8 additions and 2 deletions
|
@ -475,6 +475,7 @@ def set_gecko_property(ffi_name, expr):
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
|
pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
|
||||||
use values::generics::{SVGPaint, SVGPaintKind};
|
use values::generics::{SVGPaint, SVGPaintKind};
|
||||||
|
use values::specified::url::SpecifiedUrl;
|
||||||
use self::structs::nsStyleSVGPaintType;
|
use self::structs::nsStyleSVGPaintType;
|
||||||
use self::structs::nsStyleSVGFallbackType;
|
use self::structs::nsStyleSVGFallbackType;
|
||||||
let ref paint = ${get_gecko_property(gecko_ffi_name)};
|
let ref paint = ${get_gecko_property(gecko_ffi_name)};
|
||||||
|
@ -488,8 +489,13 @@ def set_gecko_property(ffi_name, expr):
|
||||||
nsStyleSVGPaintType::eStyleSVGPaintType_ContextFill => SVGPaintKind::ContextFill,
|
nsStyleSVGPaintType::eStyleSVGPaintType_ContextFill => SVGPaintKind::ContextFill,
|
||||||
nsStyleSVGPaintType::eStyleSVGPaintType_ContextStroke => SVGPaintKind::ContextStroke,
|
nsStyleSVGPaintType::eStyleSVGPaintType_ContextStroke => SVGPaintKind::ContextStroke,
|
||||||
nsStyleSVGPaintType::eStyleSVGPaintType_Server => {
|
nsStyleSVGPaintType::eStyleSVGPaintType_Server => {
|
||||||
// FIXME (bug 1353966) this should animate
|
unsafe {
|
||||||
SVGPaintKind::None
|
SVGPaintKind::PaintServer(
|
||||||
|
SpecifiedUrl::from_url_value_data(
|
||||||
|
&(**paint.mPaint.mPaintServer.as_ref())._base
|
||||||
|
).unwrap()
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
nsStyleSVGPaintType::eStyleSVGPaintType_Color => {
|
nsStyleSVGPaintType::eStyleSVGPaintType_Color => {
|
||||||
unsafe { SVGPaintKind::Color(convert_nscolor_to_rgba(*paint.mPaint.mColor.as_ref())) }
|
unsafe { SVGPaintKind::Color(convert_nscolor_to_rgba(*paint.mPaint.mColor.as_ref())) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue