[Webkit-unassigned] [Bug 23642] [GTK] Drag and drop support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 25 15:37:30 PST 2009


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





------- Comment #3 from gns at gnome.org  2009-02-25 15:37 PDT -------
(From update of attachment 27180)
> +#elif PLATFORM(GTK)
> +typedef struct _GdkPixbuf GdkPixbuf;
>  #endif

Shouldn't this be struct GdkPixbuf only? It seems to me like the typedef is an
implementation detail that should not be propagated to client code.

> +    GdkPixmap* pixmap = gdk_pixmap_new(NULL, width, height, 24);
[...]
> +    GdkPixbuf* pixbuf = gdk_pixbuf_get_from_drawable(NULL, GDK_DRAWABLE(pixmap), NULL, 0, 0, 0, 0, width, height);

I believe you should use 0 on those instead of NULL, since this is WebCore
code.

> +typedef struct _GtkSelectionData GtkSelectionData;

Same as for GdkPixbuf?

> + void DragClipboard::resetClipboard()
> + {
> +     if (image())
> +         deleteDragImage(image());
> +     setImage(NULL);

NULL -> 0

> +        GdkPixbuf* scaledImage =  gdk_pixbuf_scale_simple(image,
> +                                                imageSize.width() * scale.width(),
> +                                                imageSize.height() * scale.height(),
> +                                                GDK_INTERP_NEAREST);

This indentation looks wrong to me. Perhaps some tabs need to be converted to
spaces here, or something?

>  typedef enum
>  {
> -    WEBKIT_WEB_VIEW_TARGET_INFO_HTML = - 1,
> -    WEBKIT_WEB_VIEW_TARGET_INFO_TEXT = - 2
> +    WEBKIT_WEB_VIEW_TARGET_INFO_HTML = 1,
> +    WEBKIT_WEB_VIEW_TARGET_INFO_TEXT,
> +    WEBKIT_WEB_VIEW_TARGET_INFO_IMAGE,
> +    WEBKIT_WEB_VIEW_TARGET_INFO_URI_LIST,
> +    WEBKIT_WEB_VIEW_TARGET_INFO_NETSCAPE_URL
>  } WebKitWebViewTargetInfo;

This is weird. This probably means breaking the ABI; is this something we
should worry about? Why were these negative values used?

I believe your patch does 2 very distinct things, so you should consider
splitting it in two changes: one dealing with the clipboard, and another on top
of that, dealing with the drag/drop thing.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list