[webkit-reviews] review granted: [Bug 202894] [GTK][WebInspector] Support for saving data : [Attachment 380843] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 14 00:41:13 PDT 2019


Carlos Garcia Campos <cgarcia at igalia.com> has granted Philippe Normand
<pnormand at igalia.com>'s request for review:
Bug 202894: [GTK][WebInspector] Support for saving data
https://bugs.webkit.org/show_bug.cgi?id=202894

Attachment 380843: Patch

https://bugs.webkit.org/attachment.cgi?id=380843&action=review




--- Comment #2 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 380843
  --> https://bugs.webkit.org/attachment.cgi?id=380843
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380843&action=review

> Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp:467
> +	   GTK_WINDOW(gtk_widget_get_toplevel(m_inspectorView)),
GTK_FILE_CHOOSER_ACTION_SAVE, "Save", "Cancel"));

You need to check the toplevel before using it, you can use
WebCore::widgetIsOnscreenToplevelWindow(toplevel) and pass nullptr if it
returns false.

> Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp:470
> +    gtk_file_chooser_set_do_overwrite_confirmation(chooser, true);

TRUE

> Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp:471
> +    gtk_file_chooser_set_current_name(chooser, suggestedURL.utf8().data());

This expects a name not a URL.

> Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp:479
> +	       if (!base64Decode(content, out, Base64ValidatePadding))

Do we want to decode UTF-16 here?

> Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp:486
> +	       data = content.utf8().data();

We are saving UTF-8 here.


More information about the webkit-reviews mailing list