Stylo: Pass content's image_value to gecko.

This commit is contained in:
cku 2017-05-15 10:41:12 +08:00
parent f7e3c534e3
commit c04195f79e
2 changed files with 7 additions and 3 deletions

View file

@ -4160,8 +4160,11 @@ clip-path
// When we support <custom-ident> values for list-style-type this will need to be updated
array[2].set_atom_ident(style.to_css_string().into());
}
ContentItem::Url(url) => {
unsafe { bindings::Gecko_SetContentDataImage(&mut self.gecko.mContents[i], url.for_ffi()) }
ContentItem::Url(ref url) => {
unsafe {
bindings::Gecko_SetContentDataImageValue(&mut self.gecko.mContents[i],
url.image_value.clone().unwrap().get())
}
}
}
}

View file

@ -148,7 +148,8 @@
let mut content = vec![];
loop {
% if product == "gecko":
if let Ok(url) = input.try(|i| SpecifiedUrl::parse(context, i)) {
if let Ok(mut url) = input.try(|i| SpecifiedUrl::parse(context, i)) {
url.build_image_value();
content.push(ContentItem::Url(url));
continue;
}