mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Stylo: Pass cursor's image_value to gecko.
This commit is contained in:
parent
c04195f79e
commit
ff5043c8b5
2 changed files with 8 additions and 4 deletions
|
@ -32,7 +32,7 @@ use gecko_bindings::bindings::Gecko_FontFamilyList_AppendGeneric;
|
||||||
use gecko_bindings::bindings::Gecko_FontFamilyList_AppendNamed;
|
use gecko_bindings::bindings::Gecko_FontFamilyList_AppendNamed;
|
||||||
use gecko_bindings::bindings::Gecko_FontFamilyList_Clear;
|
use gecko_bindings::bindings::Gecko_FontFamilyList_Clear;
|
||||||
use gecko_bindings::bindings::Gecko_SetCursorArrayLength;
|
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_StyleTransition_SetUnsupportedProperty;
|
||||||
use gecko_bindings::bindings::Gecko_NewCSSShadowArray;
|
use gecko_bindings::bindings::Gecko_NewCSSShadowArray;
|
||||||
use gecko_bindings::bindings::Gecko_nsStyleFont_SetLang;
|
use gecko_bindings::bindings::Gecko_nsStyleFont_SetLang;
|
||||||
|
@ -3995,10 +3995,11 @@ clip-path
|
||||||
Gecko_SetCursorArrayLength(&mut self.gecko, v.images.len());
|
Gecko_SetCursorArrayLength(&mut self.gecko, v.images.len());
|
||||||
}
|
}
|
||||||
for i in 0..v.images.len() {
|
for i in 0..v.images.len() {
|
||||||
let image = &v.images[i];
|
|
||||||
unsafe {
|
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
|
// 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
|
// background-image to a url() value, since only properties in reset structs
|
||||||
// are re-used from the applicable declaration cache, and the Pointing struct
|
// are re-used from the applicable declaration cache, and the Pointing struct
|
||||||
|
|
|
@ -131,7 +131,10 @@
|
||||||
let mut images = vec![];
|
let mut images = vec![];
|
||||||
loop {
|
loop {
|
||||||
match input.try(|input| parse_image(context, input)) {
|
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,
|
Err(()) => break,
|
||||||
}
|
}
|
||||||
try!(input.expect_comma());
|
try!(input.expect_comma());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue