Changeset 140557 in webkit


Ignore:
Timestamp:
Jan 23, 2013 11:13:50 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Avoid reset title for navigation within the page
https://bugs.webkit.org/show_bug.cgi?id=106908

Patch by Manuel Rego Casasnovas <Manuel Rego Casasnovas> on 2013-01-23
Reviewed by Martin Robinson.

  • WebCoreSupport/FrameLoaderClientGtk.cpp:

(WebKit::FrameLoaderClient::dispatchDidNavigateWithinPage): Call
dispatchDidCommitLoad with true as param.
(WebKit::FrameLoaderClient::dispatchDidCommitLoad): The method has been
overloaded. The default implementation (without params) simply calls
dispatchDidCommitLoad with false. The new private method with
isNavigatingWithinPage as param will avoid to reset the title for
navigation within the page.

  • WebCoreSupport/FrameLoaderClientGtk.h:

(FrameLoaderClient): Add new private method dispatchDidCommitLoad with a
boolean parameter to know if it is navigating withing the same page or
not.

Location:
trunk/Source/WebKit/gtk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/gtk/ChangeLog

    r140498 r140557  
     12013-01-23  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [GTK] Avoid reset title for navigation within the page
     4        https://bugs.webkit.org/show_bug.cgi?id=106908
     5
     6        Reviewed by Martin Robinson.
     7
     8        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     9        (WebKit::FrameLoaderClient::dispatchDidNavigateWithinPage): Call
     10        dispatchDidCommitLoad with true as param.
     11        (WebKit::FrameLoaderClient::dispatchDidCommitLoad): The method has been
     12        overloaded. The default implementation (without params) simply calls
     13        dispatchDidCommitLoad with false. The new private method with
     14        isNavigatingWithinPage as param will avoid to reset the title for
     15        navigation within the page.
     16        * WebCoreSupport/FrameLoaderClientGtk.h:
     17        (FrameLoaderClient): Add new private method dispatchDidCommitLoad with a
     18        boolean parameter to know if it is navigating withing the same page or
     19        not.
     20
    1212013-01-22  Anders Carlsson  <andersca@apple.com>
    222
  • trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r137845 r140557  
    767767    // current contract with the clients about provisional data
    768768    // sources not being '0' during the provisional load stage.
    769     dispatchDidCommitLoad();
     769    dispatchDidCommitLoad(true);
    770770    dispatchDidFinishLoad();
    771771}
     
    842842void FrameLoaderClient::dispatchDidCommitLoad()
    843843{
     844    FrameLoaderClient::dispatchDidCommitLoad(false);
     845}
     846
     847void FrameLoaderClient::dispatchDidCommitLoad(bool isNavigatingWithinPage)
     848{
    844849    if (m_loadingErrorPage)
    845850        return;
     
    853858    g_free(priv->uri);
    854859    priv->uri = g_strdup(core(m_frame)->loader()->activeDocumentLoader()->url().string().utf8().data());
    855     g_free(priv->title);
    856     priv->title = NULL;
    857860    g_object_notify(G_OBJECT(m_frame), "uri");
    858     g_object_notify(G_OBJECT(m_frame), "title");
     861    if (!isNavigatingWithinPage) {
     862        g_free(priv->title);
     863        priv->title = 0;
     864        g_object_notify(G_OBJECT(m_frame), "title");
     865    }
    859866
    860867    g_signal_emit_by_name(m_frame, "load-committed");
     
    865872        g_object_freeze_notify(G_OBJECT(webView));
    866873        g_object_notify(G_OBJECT(webView), "uri");
    867         g_object_notify(G_OBJECT(webView), "title");
    868874        g_object_thaw_notify(G_OBJECT(webView));
     875        if (!isNavigatingWithinPage)
     876            g_object_notify(G_OBJECT(webView), "title");
    869877        g_signal_emit_by_name(webView, "load-committed", m_frame);
    870878    }
  • trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h

    r137845 r140557  
    199199        WebCore::PluginView* m_pluginView;
    200200        bool m_hasSentResponseToPlugin;
     201
     202        virtual void dispatchDidCommitLoad(bool isNavigatingWithinPage);
    201203    };
    202204
Note: See TracChangeset for help on using the changeset viewer.