implements URLValue type properties animatable

This commit is contained in:
Daisuke Akatsuka 2017-07-05 13:08:12 +09:00
parent b3def4a84e
commit 4924a4832f
2 changed files with 17 additions and 4 deletions

View file

@ -668,7 +668,20 @@ def set_gecko_property(ffi_name, expr):
}
}
% if need_clone:
<% raise Exception("Do not know how to handle clone ") %>
pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
use values::specified::url::SpecifiedUrl;
use values::None_;
if self.gecko.${gecko_ffi_name}.mRawPtr.is_null() {
Either::Second(None_)
} else {
unsafe {
let ref gecko_url_value = *self.gecko.${gecko_ffi_name}.mRawPtr;
Either::First(SpecifiedUrl::from_url_value_data(&gecko_url_value._base)
.expect("${gecko_ffi_name} could not convert to SpecifiedUrl"))
}
}
}
% endif
</%def>

View file

@ -119,19 +119,19 @@ ${helpers.single_keyword("clip-rule", "nonzero evenodd",
${helpers.predefined_type("marker-start", "UrlOrNone", "Either::Second(None_)",
products="gecko",
boxed="True" if product == "gecko" else "False",
animation_value_type="none",
animation_value_type="discrete",
spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties")}
${helpers.predefined_type("marker-mid", "UrlOrNone", "Either::Second(None_)",
products="gecko",
boxed="True" if product == "gecko" else "False",
animation_value_type="none",
animation_value_type="discrete",
spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties")}
${helpers.predefined_type("marker-end", "UrlOrNone", "Either::Second(None_)",
products="gecko",
boxed="True" if product == "gecko" else "False",
animation_value_type="none",
animation_value_type="discrete",
spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties")}
<%helpers:longhand name="paint-order"