Skip to content
  • mrobinson@webkit.org's avatar
    2010-09-16 Martin Robinson <mrobinson@igalia.com> · 7173b394
    mrobinson@webkit.org authored
            Reviewed by Xan Lopez.
    
            [GTK] Implement dissolveDragImageToFraction
            https://bugs.webkit.org/show_bug.cgi?id=45826
    
            * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose.
    2010-09-16  Martin Robinson  <mrobinson@igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] Implement dissolveDragImageToFraction
            https://bugs.webkit.org/show_bug.cgi?id=45826
    
            Convert the drag image from a GdkPixbuf to a Cairo surface. Not only
            might this allow code to be shared between Cairo ports it prevents a
            full data copy when the image is not resized and makes the implementation
            of dissolveDragImageToFraction more straight-forward.
    
            This feature is covered by manual-tests/drag-image.html.
    
            * page/gtk/DragControllerGtk.cpp:
            (WebCore::DragController::maxDragImageSize): Make the maximum size of the drag
            image a little smaller.
            * platform/DragImage.h: Changed the drag image type to be a cairo_surface_t*.
            * platform/gtk/DragImageGtk.cpp:
            (WebCore::dragImageSize): Reimplemented to reflect new drag image type.
            (WebCore::deleteDragImage): Ditto.
            (WebCore::scaleDragImage): Ditto.
            (WebCore::dissolveDragImageToFraction): Filled the stub of this function.
            (WebCore::createDragImageFromImage): Reimplemented to reflect new drag image type.
            * platform/gtk/GtkVersioning.h: Added definition for gtk_widget_get_realized for older GTK+s.
    2010-09-16  Martin Robinson  <mrobinson@igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] Implement dissolveDragImageToFraction
            https://bugs.webkit.org/show_bug.cgi?id=45826
    
            To support full alpha in the drag icon, changed the drag icon to be a
            GtkWindow with an RGBA colormap. Added logic to support painting the drag
            image to this window during the expose event.
    
            * WebCoreSupport/DragClientGtk.cpp:
            (WebKit::dragIconWindowExposeEventCallback): Added.
            (WebKit::DragClient::DragClient): Initialize the new drag icon window.
            (WebKit::DragClient::~DragClient): Disconnect the expose event signal.
            (WebKit::DragClient::startDrag): Resize the drag icon window the appropriate size and
            if necessary, set its colormap.
            (WebKit::DragClient::dragIconWindowExposeEvent): Added.
            * WebCoreSupport/DragClientGtk.h: Added new member and method declarations.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7173b394