Title: [155113] trunk/Source/WebCore
- Revision
- 155113
- Author
- [email protected]
- Date
- 2013-09-05 07:15:46 -0700 (Thu, 05 Sep 2013)
Log Message
[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 <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (155112 => 155113)
--- trunk/Source/WebCore/ChangeLog 2013-09-05 13:25:50 UTC (rev 155112)
+++ trunk/Source/WebCore/ChangeLog 2013-09-05 14:15:46 UTC (rev 155113)
@@ -1,3 +1,16 @@
+2013-09-05 Enrique Ocaña González <[email protected]>
+
+ [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 <[email protected]>
Precision updates in WebAudio.
Modified: trunk/Source/WebCore/platform/gtk/CursorGtk.cpp (155112 => 155113)
--- trunk/Source/WebCore/platform/gtk/CursorGtk.cpp 2013-09-05 13:25:50 UTC (rev 155112)
+++ trunk/Source/WebCore/platform/gtk/CursorGtk.cpp 2013-09-05 14:15:46 UTC (rev 155113)
@@ -60,8 +60,12 @@
static GRefPtr<GdkCursor> createCustomCursor(Image* image, const IntPoint& hotSpot)
{
+ GRefPtr<GdkPixbuf> pixbuf = adoptGRef(image->getGdkPixbuf());
+
+ if (!image->nativeImageForCurrentFrame() || !pixbuf)
+ return 0;
+
IntPoint effectiveHotSpot = determineHotSpot(image, hotSpot);
- GRefPtr<GdkPixbuf> pixbuf = adoptGRef(image->getGdkPixbuf());
return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), effectiveHotSpot.x(), effectiveHotSpot.y()));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes