[Webkit-unassigned] [Bug 83879] [GTK][WK2] Implement API for Geolocation permission requests in the GTK port

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 17 00:22:39 PDT 2012


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





--- Comment #15 from Carlos Garcia Campos <cgarcia at igalia.com>  2012-04-17 00:22:39 PST ---
(From update of attachment 137310)
View in context: https://bugs.webkit.org/attachment.cgi?id=137310&action=review

Looks great!

> Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:25
> +#include "WebKitPrivate.h"

This is already included by WebKitGeolocationPermissionRequestPrivate.h

> Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:52
> +    WKGeolocationPermissionRequestAllow(priv->request.get());

I wonder whether it's valid to call this twice, maybe we should return early if madeDecission is true

> Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:61
> +    WKGeolocationPermissionRequestDeny(priv->request.get());

Ditto.

> Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp:75
> +    request->priv->madeDecision = false;

Glib already initialize to 0 the instance struct when it's allocated, so this is already false.

> Tools/MiniBrowser/gtk/BrowserWindow.c:298
> +    GtkWidget *dialog = gtk_dialog_new_with_buttons("Geolocation request",
> +                                                    GTK_WINDOW(window),
> +                                                    GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
> +                                                    GTK_STOCK_OK,
> +                                                    GTK_RESPONSE_ACCEPT,
> +                                                    GTK_STOCK_CANCEL,
> +                                                    GTK_RESPONSE_REJECT,
> +                                                    NULL);
> +
> +    GtkWidget *contentArea = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
> +    GtkWidget *label = gtk_label_new("Allow geolocation request?");
> +    gtk_box_pack_start(GTK_BOX(contentArea), label, TRUE, TRUE, 6);
> +    gtk_widget_show(label);

This would probably be easier using gtk_message_dialog.

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



More information about the webkit-unassigned mailing list