diff options
author | Iain Merrick <husky@google.com> | 2010-09-13 16:35:48 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-09-16 12:10:42 +0100 |
commit | 5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 (patch) | |
tree | ddce1aa5e3b6967a69691892e500897558ff8ab6 /WebKit/gtk | |
parent | 12bec63ec71e46baba27f0bd9bd9d8067683690a (diff) | |
download | external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.zip external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.gz external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.bz2 |
Merge WebKit at r67178 : Initial merge by git.
Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
Diffstat (limited to 'WebKit/gtk')
-rw-r--r-- | WebKit/gtk/ChangeLog | 87 | ||||
-rw-r--r-- | WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp | 6 | ||||
-rw-r--r-- | WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h | 3 | ||||
-rw-r--r-- | WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp | 14 | ||||
-rw-r--r-- | WebKit/gtk/WebCoreSupport/InspectorClientGtk.h | 3 | ||||
-rw-r--r-- | WebKit/gtk/tests/testatk.c | 78 | ||||
-rw-r--r-- | WebKit/gtk/tests/testmimehandling.c | 4 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitprivate.h | 2 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitsoupauthdialog.c | 2 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitwebview.cpp | 6 |
10 files changed, 195 insertions, 10 deletions
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog index 8098b7f..25fe4fd 100644 --- a/WebKit/gtk/ChangeLog +++ b/WebKit/gtk/ChangeLog @@ -1,3 +1,90 @@ +2010-09-08 Darin Adler <darin@apple.com> + + Reviewed by Adam Barth. + + Move functions from Frame to Editor as planned + https://bugs.webkit.org/show_bug.cgi?id=45218 + + * webkit/webkitwebview.cpp: + (webkit_web_view_set_highlight_text_matches): + (webkit_web_view_get_selected_text): + (webkit_web_view_set_editable): + Changed call sites to use editor(). + +2010-09-09 Philippe Normand <pnormand@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] testmimehandling falsely succeeds testing Ogg mime type + https://bugs.webkit.org/show_bug.cgi?id=45349 + + Make this actually test an ogg file request instead of pdf and + changed the expected result to match libsoup content-sniffing + result in the case of ogg/vorbis file. + + * tests/testmimehandling.c: + (mime_type_policy_decision_requested_cb): + (test_mime_ogg): + +2010-09-08 Mario Sanchez Prada <msanchez@igalia.com> + + Reviewed by Martin Robinson. + + [Gtk] A list item's number/bullet should not be a child of that list item + https://bugs.webkit.org/show_bug.cgi?id=45190 + + New unit test added. + + * tests/testatk.c: + (testWebkitAtkListsOfItems): New test to check ordered/unordered + list of items are properly exposed to AT technologies. + (main): + +2010-09-07 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Fix some feature guards + https://bugs.webkit.org/show_bug.cgi?id=45302 + + * webkit/webkitprivate.h: Add ENABLE(VIDEO) guards for video specific members. + +2010-09-03 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> + + Reviewed by Darin Adler. + + Add NetworkingContext to avoid layer violations + https://bugs.webkit.org/show_bug.cgi?id=42292 + + Add GTK's specific implementation of FrameNetworkingContext. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::createNetworkingContext): + * WebCoreSupport/FrameLoaderClientGtk.h: + +2010-09-03 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Dialog separators are gone in GTK+ 3.x. + + * webkit/webkitsoupauthdialog.c: + (show_auth_dialog): + +2010-09-02 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector + https://bugs.webkit.org/show_bug.cgi?id=44230 + + * WebCoreSupport/InspectorClientGtk.cpp: + (WebKit::notifyWebViewDestroyed): + (WebKit::InspectorFrontendClient::destroyInspectorWindow): + (WebKit::InspectorFrontendClient::closeWindow): + (WebKit::InspectorFrontendClient::disconnectFromBackend): + * WebCoreSupport/InspectorClientGtk.h: + 2010-08-31 Dave Hyatt <hyatt@apple.com> Reviewed by Sam Weinig. diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 2cf4f36..4b0da3d 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -32,6 +32,7 @@ #include "DocumentLoaderGtk.h" #include "FormState.h" #include "FrameLoader.h" +#include "FrameNetworkingContextGtk.h" #include "FrameView.h" #include "FrameTree.h" #include "GOwnPtr.h" @@ -1193,4 +1194,9 @@ void FrameLoaderClient::transitionToCommittedForNewPage() postCommitFrameViewSetup(m_frame, frame->view(), true); } +PassRefPtr<FrameNetworkingContext> FrameLoaderClient::createNetworkingContext() +{ + return FrameNetworkingContextGtk::create(core(m_frame)); +} + } diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h index 33e9ee5..753576b 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h @@ -181,6 +181,9 @@ namespace WebKit { virtual bool canCachePage() const; virtual void download(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&); + + virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext(); + private: WebKitWebFrame* m_frame; WebCore::ResourceResponse m_response; diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp index aedf21f..c8b42d7 100644 --- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp @@ -36,7 +36,7 @@ namespace WebKit { static void notifyWebViewDestroyed(WebKitWebView* webView, InspectorFrontendClient* inspectorFrontendClient) { - inspectorFrontendClient->destroyInspectorWindow(); + inspectorFrontendClient->destroyInspectorWindow(true); } InspectorClient::InspectorClient(WebKitWebView* webView) @@ -274,7 +274,7 @@ InspectorFrontendClient::~InspectorFrontendClient() ASSERT(!m_webInspector); } -void InspectorFrontendClient::destroyInspectorWindow() +void InspectorFrontendClient::destroyInspectorWindow(bool notifyInspectorController) { if (!m_webInspector) return; @@ -284,7 +284,8 @@ void InspectorFrontendClient::destroyInspectorWindow() g_signal_handlers_disconnect_by_func(m_inspectorWebView, (gpointer)notifyWebViewDestroyed, (gpointer)this); m_inspectorWebView = 0; - core(m_inspectedWebView)->inspectorController()->disconnectFrontend(); + if (notifyInspectorController) + core(m_inspectedWebView)->inspectorController()->disconnectFrontend(); if (m_inspectorClient) m_inspectorClient->releaseFrontendPage(); @@ -326,7 +327,12 @@ void InspectorFrontendClient::bringToFront() void InspectorFrontendClient::closeWindow() { - destroyInspectorWindow(); + destroyInspectorWindow(true); +} + +void InspectorFrontendClient::disconnectFromBackend() +{ + destroyInspectorWindow(false); } void InspectorFrontendClient::attachWindow() diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h index 8b68405..08038f6 100644 --- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h @@ -80,7 +80,7 @@ namespace WebKit { void disconnectInspectorClient() { m_inspectorClient = 0; } - void destroyInspectorWindow(); + void destroyInspectorWindow(bool notifyInspectorController); virtual WTF::String localizedStringsURL(); @@ -88,6 +88,7 @@ namespace WebKit { virtual void bringToFront(); virtual void closeWindow(); + virtual void disconnectFromBackend(); virtual void attachWindow(); virtual void detachWindow(); diff --git a/WebKit/gtk/tests/testatk.c b/WebKit/gtk/tests/testatk.c index e159f8a..9930bc2 100644 --- a/WebKit/gtk/tests/testatk.c +++ b/WebKit/gtk/tests/testatk.c @@ -46,6 +46,8 @@ static const char* contentsInTableWithHeaders = "<html><body><table><tr><th>foo< static const char* textWithAttributes = "<html><head><style>.st1 {font-family: monospace; color:rgb(120,121,122);} .st2 {text-decoration:underline; background-color:rgb(80,81,82);}</style></head><body><p style=\"font-size:14; text-align:right;\">This is the <i>first</i><b> sentence of this text.</b></p><p class=\"st1\">This sentence should have an style applied <span class=\"st2\">and this part should have another one</span>.</p><p>x<sub>1</sub><sup>2</sup>=x<sub>2</sub><sup>3</sup></p><p style=\"text-align:center;\">This sentence is the <strike>last</strike> one.</p></body></html>"; +static const char* listsOfItems = "<html><body><ul><li>text only</li><li><a href='foo'>link only</a></li><li>text and a <a href='bar'>link</a></li></ul><ol><li>text only</li><li><a href='foo'>link only</a></li><li>text and a <a href='bar'>link</a></li></ol></body></html>"; + static gboolean bail_out(GMainLoop* loop) { if (g_main_loop_is_running(loop)) @@ -843,6 +845,81 @@ static void test_webkit_atk_get_extents(void) g_object_unref(webView); } +static void testWebkitAtkListsOfItems(void) +{ + WebKitWebView* webView; + AtkObject* obj; + AtkObject* uList; + AtkObject* oList; + AtkObject* item1; + AtkObject* item2; + AtkObject* item3; + GMainLoop* loop; + + webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(webView); + GtkAllocation alloc = { 0, 0, 800, 600 }; + gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc); + webkit_web_view_load_string(webView, listsOfItems, NULL, NULL, NULL); + loop = g_main_loop_new(NULL, TRUE); + + g_timeout_add(100, (GSourceFunc)bail_out, loop); + g_main_loop_run(loop); + + obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); + g_assert(obj); + + // Unordered list + + uList = atk_object_ref_accessible_child(obj, 0); + g_assert(ATK_OBJECT(uList)); + g_assert(atk_object_get_role(uList) == ATK_ROLE_LIST); + g_assert_cmpint(atk_object_get_n_accessible_children(uList), ==, 3); + + item1 = ATK_TEXT(atk_object_ref_accessible_child(uList, 0)); + item2 = ATK_TEXT(atk_object_ref_accessible_child(uList, 1)); + item3 = ATK_TEXT(atk_object_ref_accessible_child(uList, 2)); + + g_assert_cmpint(atk_object_get_n_accessible_children(item1), ==, 0); + g_assert_cmpint(atk_object_get_n_accessible_children(item2), ==, 1); + g_assert_cmpint(atk_object_get_n_accessible_children(item3), ==, 1); + + g_assert_cmpstr(atk_text_get_text(item1, 0, -1), ==, "\342\200\242 text only"); + g_assert_cmpstr(atk_text_get_text(item2, 0, -1), ==, "\342\200\242 link only"); + g_assert_cmpstr(atk_text_get_text(item3, 0, -1), ==, "\342\200\242 text and a link"); + + g_object_unref(item1); + g_object_unref(item2); + g_object_unref(item3); + + // Ordered list + + oList = atk_object_ref_accessible_child(obj, 1); + g_assert(ATK_OBJECT(oList)); + g_assert(atk_object_get_role(oList) == ATK_ROLE_LIST); + g_assert_cmpint(atk_object_get_n_accessible_children(oList), ==, 3); + + item1 = ATK_TEXT(atk_object_ref_accessible_child(oList, 0)); + item2 = ATK_TEXT(atk_object_ref_accessible_child(oList, 1)); + item3 = ATK_TEXT(atk_object_ref_accessible_child(oList, 2)); + + g_assert_cmpstr(atk_text_get_text(item1, 0, -1), ==, "1 text only"); + g_assert_cmpstr(atk_text_get_text(item2, 0, -1), ==, "2 link only"); + g_assert_cmpstr(atk_text_get_text(item3, 0, -1), ==, "3 text and a link"); + + g_assert_cmpint(atk_object_get_n_accessible_children(item1), ==, 0); + g_assert_cmpint(atk_object_get_n_accessible_children(item2), ==, 1); + g_assert_cmpint(atk_object_get_n_accessible_children(item3), ==, 1); + + g_object_unref(item1); + g_object_unref(item2); + g_object_unref(item3); + + g_object_unref(uList); + g_object_unref(oList); + g_object_unref(webView); +} + int main(int argc, char** argv) { g_thread_init(NULL); @@ -860,6 +937,7 @@ int main(int argc, char** argv) g_test_add_func("/webkit/atk/getHeadersInTable", testWebkitAtkGetHeadersInTable); g_test_add_func("/webkit/atk/textAttributes", testWebkitAtkTextAttributes); g_test_add_func("/webkit/atk/get_extents", test_webkit_atk_get_extents); + g_test_add_func("/webkit/atk/listsOfItems", testWebkitAtkListsOfItems); return g_test_run (); } diff --git a/WebKit/gtk/tests/testmimehandling.c b/WebKit/gtk/tests/testmimehandling.c index 2ab0257..3a0eded 100644 --- a/WebKit/gtk/tests/testmimehandling.c +++ b/WebKit/gtk/tests/testmimehandling.c @@ -125,7 +125,7 @@ static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebK g_assert_cmpstr(mime_type, ==, "text/plain"); g_assert(webkit_web_view_can_show_mime_type(view, mime_type)); } else if (g_str_equal(type, "ogg")) { - g_assert_cmpstr(mime_type, ==, "audio/ogg"); + g_assert_cmpstr(mime_type, ==, "audio/x-vorbis+ogg"); g_assert(webkit_web_view_can_show_mime_type(view, mime_type)); } @@ -172,7 +172,7 @@ static void test_mime_text() static void test_mime_ogg() { - test_mime_type("pdf"); + test_mime_type("ogg"); } int main(int argc, char** argv) diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h index 92bb27d..bde5b55 100644 --- a/WebKit/gtk/webkit/webkitprivate.h +++ b/WebKit/gtk/webkit/webkitprivate.h @@ -163,7 +163,9 @@ extern "C" { gboolean disposing; gboolean usePrimaryForPaste; +#if ENABLE(VIDEO) FullscreenVideoController* fullscreenVideoController; +#endif // These are hosted here because the DataSource object is // created too late in the frame loading process. diff --git a/WebKit/gtk/webkit/webkitsoupauthdialog.c b/WebKit/gtk/webkit/webkitsoupauthdialog.c index daecc73..0cf1c23 100644 --- a/WebKit/gtk/webkit/webkitsoupauthdialog.c +++ b/WebKit/gtk/webkit/webkitsoupauthdialog.c @@ -213,7 +213,9 @@ static void show_auth_dialog(WebKitAuthData* authData, const char* login, const NULL); /* Set the dialog up with HIG properties */ +#ifdef GTK_API_VERSION_2 gtk_dialog_set_has_separator(dialog, FALSE); +#endif gtk_container_set_border_width(GTK_CONTAINER(dialog), 5); gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area(dialog)), 2); /* 2 * 5 + 2 = 12 */ gtk_container_set_border_width(GTK_CONTAINER(gtk_dialog_get_action_area(dialog)), 5); diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index 98f8e4e..480983f 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -3693,7 +3693,7 @@ void webkit_web_view_set_highlight_text_matches(WebKitWebView* webView, gboolean Frame *frame = core(webView)->mainFrame(); do { - frame->setMarkedTextMatchesAreHighlighted(shouldHighlight); + frame->editor()->setMarkedTextMatchesAreHighlighted(shouldHighlight); frame = frame->tree()->traverseNextWithWrap(false); } while (frame); } @@ -3875,7 +3875,7 @@ gchar* webkit_web_view_get_selected_text(WebKitWebView* webView) g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0); Frame* frame = core(webView)->focusController()->focusedOrMainFrame(); - return g_strdup(frame->selectedText().utf8().data()); + return g_strdup(frame->editor()->selectedText().utf8().data()); } /** @@ -3947,7 +3947,7 @@ void webkit_web_view_set_editable(WebKitWebView* webView, gboolean flag) priv->editable = flag; if (flag) { - frame->applyEditingStyleToBodyElement(); + frame->editor()->applyEditingStyleToBodyElement(); // TODO: If the WebKitWebView is made editable and the selection is empty, set it to something. //if (!webkit_web_view_get_selected_dom_range(webView)) // mainFrame->setSelectionFromNone(); |