Changeset 247560 in webkit


Ignore:
Timestamp:
Jul 18, 2019 1:28:07 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] MOUSE_CURSOR_SCALE is not implemented
https://bugs.webkit.org/show_bug.cgi?id=109469

Reviewed by Darin Adler.

.:

Enable MOUSE_CURSOR_SCALE for the GTK port.

  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Use gdk_cursor_new_from_surface() instead of gdk_cursor_new_from_pixbuf() to avoid the surface to pixbuf
conversion.

  • platform/gtk/CursorGtk.cpp:

(WebCore::createCustomCursor):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r247367 r247560  
     12019-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] MOUSE_CURSOR_SCALE is not implemented
     4        https://bugs.webkit.org/show_bug.cgi?id=109469
     5
     6        Reviewed by Darin Adler.
     7
     8        Enable MOUSE_CURSOR_SCALE for the GTK port.
     9
     10        * Source/cmake/OptionsGTK.cmake:
     11
    1122019-07-11  Pablo Saavedra  <psaavedra@igalia.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r247555 r247560  
     12019-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] MOUSE_CURSOR_SCALE is not implemented
     4        https://bugs.webkit.org/show_bug.cgi?id=109469
     5
     6        Reviewed by Darin Adler.
     7
     8        Use gdk_cursor_new_from_surface() instead of gdk_cursor_new_from_pixbuf() to avoid the surface to pixbuf
     9        conversion.
     10
     11        * platform/gtk/CursorGtk.cpp:
     12        (WebCore::createCustomCursor):
     13
    1142019-07-17  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/platform/gtk/CursorGtk.cpp

    r211033 r247560  
    4343static GRefPtr<GdkCursor> createCustomCursor(Image* image, const IntPoint& hotSpot)
    4444{
    45     GRefPtr<GdkPixbuf> pixbuf = adoptGRef(image->getGdkPixbuf());
    46 
    47     if (!image->nativeImageForCurrentFrame() || !pixbuf)
    48         return 0;
     45    RefPtr<cairo_surface_t> surface = image->nativeImageForCurrentFrame();
     46    if (!surface)
     47        return nullptr;
    4948
    5049    IntPoint effectiveHotSpot = determineHotSpot(image, hotSpot);
    51     return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), effectiveHotSpot.x(), effectiveHotSpot.y()));
     50    return adoptGRef(gdk_cursor_new_from_surface(gdk_display_get_default(), surface.get(), effectiveHotSpot.x(), effectiveHotSpot.y()));
    5251}
    5352
  • trunk/Source/cmake/OptionsGTK.cmake

    r246925 r247560  
    157157WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
    158158WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
     159WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MOUSE_CURSOR_SCALE PRIVATE ON)
    159160WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION PRIVATE ON)
    160161WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
Note: See TracChangeset for help on using the changeset viewer.