[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

kov at webkit.org kov at webkit.org
Thu Apr 8 01:08:42 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 06e28deaba1bc031610d82e432ccba6114974e3d
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 14 23:08:46 2010 +0000

            Reviewed by Oliver Hunter.
    
            [GTK] couple fixes for signal emissions, and property notifications
            https://bugs.webkit.org/show_bug.cgi?id=33428
    
            Do not emit signals and property notifications for error
            pages. The notifications are not really useful for anything, you
            can get them back by overriding the error pages, and it avoids a
            number of hacks.
    
            * WebCoreSupport/FrameLoaderClientGtk.cpp:
            (WebKit::FrameLoaderClient::FrameLoaderClient):
            (WebKit::FrameLoaderClient::dispatchDidFinishLoad):
            (WebKit::FrameLoaderClient::dispatchDidReceiveIcon):
            (WebKit::FrameLoaderClient::dispatchDidStartProvisionalLoad):
            (WebKit::FrameLoaderClient::dispatchDidReceiveTitle):
            (WebKit::FrameLoaderClient::dispatchDidCommitLoad):
            (WebKit::FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
            (WebKit::FrameLoaderClient::dispatchDidFailLoad):
            * WebCoreSupport/FrameLoaderClientGtk.h:
            * tests/testloading.c:
            (load_error_status_changed_cb):
            (test_loading_error):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index d9732ee..7f9f8eb 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,29 @@
+2010-01-14  Gustavo Noronha Silva  <gns at gnome.org>
+
+        Reviewed by Oliver Hunter.
+
+        [GTK] couple fixes for signal emissions, and property notifications
+        https://bugs.webkit.org/show_bug.cgi?id=33428
+
+        Do not emit signals and property notifications for error
+        pages. The notifications are not really useful for anything, you
+        can get them back by overriding the error pages, and it avoids a
+        number of hacks.
+
+        * WebCoreSupport/FrameLoaderClientGtk.cpp:
+        (WebKit::FrameLoaderClient::FrameLoaderClient):
+        (WebKit::FrameLoaderClient::dispatchDidFinishLoad):
+        (WebKit::FrameLoaderClient::dispatchDidReceiveIcon):
+        (WebKit::FrameLoaderClient::dispatchDidStartProvisionalLoad):
+        (WebKit::FrameLoaderClient::dispatchDidReceiveTitle):
+        (WebKit::FrameLoaderClient::dispatchDidCommitLoad):
+        (WebKit::FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
+        (WebKit::FrameLoaderClient::dispatchDidFailLoad):
+        * WebCoreSupport/FrameLoaderClientGtk.h:
+        * tests/testloading.c:
+        (load_error_status_changed_cb):
+        (test_loading_error):
+
 2010-01-14  Martin Robinson  <martin.james.robinson at gmail.com>
 
         Reviewed by Xan Lopez.
@@ -37,7 +63,7 @@
         (webkit_web_view_set_tooltip_text): Added, new private API.
         (webkit_web_view_query_tooltip): Added
 
-2010-01-12  Gustavo Noronha Silva  <gns at gnome.org>
+2010-01-09  Gustavo Noronha Silva  <gns at gnome.org>
 
         Reviewed by Xan Lopez.
 
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 4d53501..8f1bec2 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -77,6 +77,7 @@ namespace WebKit {
 FrameLoaderClient::FrameLoaderClient(WebKitWebFrame* frame)
     : m_frame(frame)
     , m_policyDecision(0)
+    , m_loadingErrorPage(false)
     , m_pluginView(0)
     , m_hasSentResponseToPlugin(false)
 {
@@ -568,6 +569,11 @@ bool FrameLoaderClient::hasWebView() const
 
 void FrameLoaderClient::dispatchDidFinishLoad()
 {
+    if (m_loadingErrorPage) {
+        m_loadingErrorPage = false;
+        return;
+    }
+
     loadDone(m_frame, true);
 }
 
@@ -703,6 +709,9 @@ void FrameLoaderClient::dispatchWillClose()
 
 void FrameLoaderClient::dispatchDidReceiveIcon()
 {
+    if (m_loadingErrorPage)
+        return;
+
     WebKitWebView* webView = getViewFromFrame(m_frame);
 
     // Avoid reporting favicons for non-main frames.
@@ -715,11 +724,17 @@ void FrameLoaderClient::dispatchDidReceiveIcon()
 
 void FrameLoaderClient::dispatchDidStartProvisionalLoad()
 {
+    if (m_loadingErrorPage)
+        return;
+
     notifyStatus(m_frame, WEBKIT_LOAD_PROVISIONAL);
 }
 
 void FrameLoaderClient::dispatchDidReceiveTitle(const String& title)
 {
+    if (m_loadingErrorPage)
+        return;
+
     WebKitWebFramePrivate* priv = m_frame->priv;
     g_free(priv->title);
     priv->title = g_strdup(title.utf8().data());
@@ -736,6 +751,9 @@ void FrameLoaderClient::dispatchDidReceiveTitle(const String& title)
 
 void FrameLoaderClient::dispatchDidCommitLoad()
 {
+    if (m_loadingErrorPage)
+        return;
+
     /* Update the URI once first data has been received.
      * This means the URI is valid and successfully identify the page that's going to be loaded.
      */
@@ -776,6 +794,9 @@ void FrameLoaderClient::dispatchDidFirstLayout()
 
 void FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout()
 {
+    if (m_loadingErrorPage)
+        return;
+
     notifyStatus(m_frame, WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT);
 }
 
@@ -937,6 +958,9 @@ void FrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& erro
 
 void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
 {
+    if (m_loadingErrorPage)
+        return;
+
     notifyStatus(m_frame, WEBKIT_LOAD_FAILED);
 
     WebKitWebView* webView = getViewFromFrame(m_frame);
@@ -956,6 +980,8 @@ void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
         return;
     }
 
+    m_loadingErrorPage = true;
+
     String content;
     gchar* fileContent = 0;
     gchar* errorURI = g_filename_to_uri(DATA_DIR"/webkit-1.0/resources/error.html", NULL, NULL);
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
index cace770..b364873 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
@@ -184,6 +184,8 @@ namespace WebKit {
         WebCore::ResourceResponse m_response;
         WebKitWebPolicyDecision* m_policyDecision;
 
+        bool m_loadingErrorPage;
+
         // Plugin view to redirect data to
         WebCore::PluginView* m_pluginView;
         bool m_hasSentResponseToPlugin;
diff --git a/WebKit/gtk/tests/testloading.c b/WebKit/gtk/tests/testloading.c
index cb800c3..f6f1f2e 100644
--- a/WebKit/gtk/tests/testloading.c
+++ b/WebKit/gtk/tests/testloading.c
@@ -171,8 +171,7 @@ static void load_error_status_changed_cb(GObject* object, GParamSpec* pspec, Web
 
     switch(status) {
     case WEBKIT_LOAD_PROVISIONAL:
-        /* We are going to go through here twice, so don't assert
-         * anything */
+        g_assert(!fixture->has_been_provisional);
         fixture->has_been_provisional = TRUE;
         break;
     case WEBKIT_LOAD_COMMITTED:
@@ -183,8 +182,6 @@ static void load_error_status_changed_cb(GObject* object, GParamSpec* pspec, Web
         g_assert(fixture->has_been_provisional);
         g_assert(fixture->has_been_load_error);
         g_assert(fixture->has_been_failed);
-        /* We are checking that only one FINISHED is received in the
-           whole cycle, so assert it's FALSE */
         g_assert(!fixture->has_been_finished);
         fixture->has_been_finished = TRUE;
         g_main_loop_quit(fixture->loop);
@@ -221,6 +218,12 @@ static void test_loading_error(WebLoadingFixture* fixture, gconstpointer data)
     g_free(uri_string);
 
     g_main_loop_run(fixture->loop);
+
+    g_assert(fixture->has_been_provisional);
+    g_assert(fixture->has_been_committed);
+    g_assert(fixture->has_been_load_error);
+    g_assert(fixture->has_been_failed);
+    g_assert(fixture->has_been_finished);
 }
 
 /* Cancelled load */
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index bd8dbb9..051c461 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -2428,6 +2428,14 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
     *
     * Connect to "notify::load-status" to monitor loading.
     *
+    * Some versions of WebKitGTK+ emitted this signal for the default
+    * error page, while loading it. This behavior was considered bad,
+    * because it was essentially exposing an implementation
+    * detail. From 1.1.19 onwards this signal is no longer emitted for
+    * the default error pages, but keep in mind that if you override
+    * the error pages by using webkit_web_frame_load_alternate_string()
+    * the signals will be emitted.
+    *
     * Since: 1.1.7
     */
     g_object_class_install_property(objectClass, PROP_LOAD_STATUS,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list