[Webkit-unassigned] [Bug 71362] [GTK] Add support for javascript dialogs in WebKit2 GTK+ API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 12 07:34:40 PST 2011


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


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #113315|review?                     |review+
               Flag|                            |




--- Comment #3 from Martin Robinson <mrobinson at webkit.org>  2011-12-12 07:34:40 PST ---
(From update of attachment 113315)
View in context: https://bugs.webkit.org/attachment.cgi?id=113315&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:343
> +     * Emitted when JavaScript code calls <function>alert</function>. If the

alert -> window.alert

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:392
> +     * signal is not handled a message dialog with Ok and Cancel buttons and

Ok -> OK

> Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp:109
> +        htmlString = g_strdup_printf(htmlOnLoadFormat, "self.close();");
> +    else if (g_str_equal(path, "/javascript_alert")) {
> +        GOwnPtr<char> alertDialogMessage(g_strdup_printf("alert('%s')", kAlertDialogMessage));
> +        htmlString = g_strdup_printf(htmlOnLoadFormat, alertDialogMessage.get());
> +    } else if (g_str_equal(path, "/javascript_confirm")) {
> +        GOwnPtr<char> alertDialogMessage(g_strdup_printf(jsConfirmFormat, kConfirmDialogMessage));

Could you skip soup server here again and just load a string?

> Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp:247
> +    g_main_loop_run(test->m_mainLoop);

It's a bit odd that the fixture takes care of ending the main loop, but the test takes care of running it. Maybe you could add a method to the fixture like: runMainLoopUntilAlertDialog.

-- 
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