[GTK] Assertion fails when the mouse pointer is styled with a custom cursor

https://bugs.webkit.org/show_bug.cgi?id=118905

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2013-09-05
Reviewed by Philippe Normand.

Checked that the custom cursor image and its pixbuf is valid and create a null
cursor otherwise.

* platform/gtk/CursorGtk.cpp:
(WebCore::createCustomCursor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b09f27ad
2013-09-05 Enrique Ocaña González <eocanha@igalia.com>
[GTK] Assertion fails when the mouse pointer is styled with a custom cursor
https://bugs.webkit.org/show_bug.cgi?id=118905
Reviewed by Philippe Normand.
Checked that the custom cursor image and its pixbuf is valid and create a null
cursor otherwise.
* platform/gtk/CursorGtk.cpp:
(WebCore::createCustomCursor):
2013-09-05 Praveen R Jadhav <praveen.j@samsung.com>
Precision updates in WebAudio.
......@@ -60,8 +60,12 @@ static GRefPtr<GdkCursor> createNamedCursor(CustomCursorType cursorType)
static GRefPtr<GdkCursor> createCustomCursor(Image* image, const IntPoint& hotSpot)
{
IntPoint effectiveHotSpot = determineHotSpot(image, hotSpot);
GRefPtr<GdkPixbuf> pixbuf = adoptGRef(image->getGdkPixbuf());
if (!image->nativeImageForCurrentFrame() || !pixbuf)
return 0;
IntPoint effectiveHotSpot = determineHotSpot(image, hotSpot);
return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), effectiveHotSpot.x(), effectiveHotSpot.y()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment