mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
style: Allow C++ URLValue objects to be lazily created from Rust SpecifiedUrls.
This avoids having to support storing refcounted URLValue objects in shared memory, which would be tricky. Depends on D17183 Differential Revision: https://phabricator.services.mozilla.com/D17184
This commit is contained in:
parent
b6b5ddda71
commit
7e7a9e2ec5
3 changed files with 126 additions and 26 deletions
|
@ -826,7 +826,7 @@ def set_gecko_property(ffi_name, expr):
|
|||
pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
|
||||
match v {
|
||||
UrlOrNone::Url(ref url) => {
|
||||
self.gecko.${gecko_ffi_name}.set_move(url.0.url_value.clone())
|
||||
self.gecko.${gecko_ffi_name}.set_move(url.clone_url_value())
|
||||
}
|
||||
UrlOrNone::None => {
|
||||
unsafe {
|
||||
|
@ -3783,7 +3783,7 @@ fn static_assert() {
|
|||
},
|
||||
Url(ref url) => {
|
||||
unsafe {
|
||||
bindings::Gecko_nsStyleFilter_SetURLValue(gecko_filter, url.0.url_value.get());
|
||||
bindings::Gecko_nsStyleFilter_SetURLValue(gecko_filter, url.url_value_ptr());
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -4164,7 +4164,7 @@ fn set_style_svg_path(
|
|||
% if ident == "clip_path":
|
||||
ShapeSource::ImageOrUrl(ref url) => {
|
||||
unsafe {
|
||||
bindings::Gecko_StyleShapeSource_SetURLValue(${ident}, url.0.url_value.get())
|
||||
bindings::Gecko_StyleShapeSource_SetURLValue(${ident}, url.url_value_ptr())
|
||||
}
|
||||
}
|
||||
% elif ident == "shape_outside":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue