mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
implements URLValue type properties animatable
This commit is contained in:
parent
b3def4a84e
commit
4924a4832f
2 changed files with 17 additions and 4 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue