Changeset 155113 in webkit


Ignore:
Timestamp:
Sep 5, 2013 7:15:46 AM (11 years ago)
Author:
commit-queue@webkit.org
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 <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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r155112 r155113  
     12013-09-05  Enrique Ocaña González  <eocanha@igalia.com>
     2
     3        [GTK] Assertion fails when the mouse pointer is styled with a custom cursor
     4        https://bugs.webkit.org/show_bug.cgi?id=118905
     5
     6        Reviewed by Philippe Normand.
     7
     8        Checked that the custom cursor image and its pixbuf is valid and create a null
     9        cursor otherwise.
     10
     11        * platform/gtk/CursorGtk.cpp:
     12        (WebCore::createCustomCursor):
     13
    1142013-09-05  Praveen R Jadhav  <praveen.j@samsung.com>
    215
  • trunk/Source/WebCore/platform/gtk/CursorGtk.cpp

    r118389 r155113  
    6161static GRefPtr<GdkCursor> createCustomCursor(Image* image, const IntPoint& hotSpot)
    6262{
     63    GRefPtr<GdkPixbuf> pixbuf = adoptGRef(image->getGdkPixbuf());
     64
     65    if (!image->nativeImageForCurrentFrame() || !pixbuf)
     66        return 0;
     67
    6368    IntPoint effectiveHotSpot = determineHotSpot(image, hotSpot);
    64     GRefPtr<GdkPixbuf> pixbuf = adoptGRef(image->getGdkPixbuf());
    6569    return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), effectiveHotSpot.x(), effectiveHotSpot.y()));
    6670}
Note: See TracChangeset for help on using the changeset viewer.