Skip to content

Commit

Permalink
Stylo: Pass cursor's image_value to gecko.
Browse files Browse the repository at this point in the history
  • Loading branch information
cku committed May 15, 2017
1 parent c04195f commit ff5043c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions components/style/properties/gecko.mako.rs
Expand Up @@ -32,7 +32,7 @@ use gecko_bindings::bindings::Gecko_FontFamilyList_AppendGeneric;
use gecko_bindings::bindings::Gecko_FontFamilyList_AppendNamed;
use gecko_bindings::bindings::Gecko_FontFamilyList_Clear;
use gecko_bindings::bindings::Gecko_SetCursorArrayLength;
use gecko_bindings::bindings::Gecko_SetCursorImage;
use gecko_bindings::bindings::Gecko_SetCursorImageValue;
use gecko_bindings::bindings::Gecko_StyleTransition_SetUnsupportedProperty;
use gecko_bindings::bindings::Gecko_NewCSSShadowArray;
use gecko_bindings::bindings::Gecko_nsStyleFont_SetLang;
Expand Down Expand Up @@ -3995,10 +3995,11 @@ clip-path
Gecko_SetCursorArrayLength(&mut self.gecko, v.images.len());
}
for i in 0..v.images.len() {
let image = &v.images[i];
unsafe {
Gecko_SetCursorImage(&mut self.gecko.mCursorImages[i], image.url.for_ffi());
Gecko_SetCursorImageValue(&mut self.gecko.mCursorImages[i],
v.images[i].url.clone().image_value.unwrap().get());
}

// We don't need to record this struct as uncacheable, like when setting
// background-image to a url() value, since only properties in reset structs
// are re-used from the applicable declaration cache, and the Pointing struct
Expand Down
5 changes: 4 additions & 1 deletion components/style/properties/longhand/pointing.mako.rs
Expand Up @@ -131,7 +131,10 @@
let mut images = vec![];
loop {
match input.try(|input| parse_image(context, input)) {
Ok(image) => images.push(image),
Ok(mut image) => {
image.url.build_image_value();
images.push(image)
}
Err(()) => break,
}
try!(input.expect_comma());
Expand Down

0 comments on commit ff5043c

Please sign in to comment.