2011-01-27 Nate Chapin <japhet@chromium.org>
authorjaphet@chromium.org <japhet@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2011 01:22:16 +0000 (01:22 +0000)
committerjaphet@chromium.org <japhet@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2011 01:22:16 +0000 (01:22 +0000)
        Reviewed by Adam Barth.

        Remove FrameLoader::url() and update callers to use
        Document::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        Refactor, no new tests.

        * WebCore.exp.in:
        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv):
        (WebCore::Document::removePendingSheet):
        * history/CachedFrame.cpp:
        (WebCore::CachedFrameBase::CachedFrameBase):
        * history/PageCache.cpp:
        (WebCore::logCanCacheFrameDecision):
        (WebCore::PageCache::canCachePageContainingThisFrame):
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::isURLAllowed):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
        * inspector/InspectorAgent.cpp:
        (WebCore::InspectorAgent::inspectedURL):
        * inspector/InspectorResourceAgent.cpp:
        (WebCore::buildObjectForFrame):
        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::replaceDocument):
        (WebCore::DocumentWriter::deprecatedFrameEncoding):
        * loader/FrameLoader.cpp:
        * loader/FrameLoader.h:
        * loader/HistoryController.cpp:
        (WebCore::HistoryController::updateForStandardLoad):
        (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
        (WebCore::HistoryController::updateForSameDocumentNavigation):
        * loader/NavigationScheduler.cpp:
        (WebCore::ScheduledHistoryNavigation::fire):
        (WebCore::NavigationScheduler::scheduleLocationChange):
        (WebCore::NavigationScheduler::scheduleRefresh):
        * page/FrameView.cpp:
        (WebCore::FrameView::updateControlTints):
        * page/Location.cpp:
        (WebCore::Location::url):
        (WebCore::Location::setProtocol):
        (WebCore::Location::setHost):
        (WebCore::Location::setHostname):
        (WebCore::Location::setPort):
        (WebCore::Location::setPathname):
        (WebCore::Location::setSearch):
        (WebCore::Location::setHash):
        (WebCore::Location::reload):
        * page/Page.cpp:
        (WebCore::Page::goToItem):
2011-01-27  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Use Document::url() instead of FrameLoader::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        * ewk/ewk_frame.cpp:
        (ewk_frame_uri_changed):
2011-01-27  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Use Document::url() instead of FrameLoader::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        * webkit/webkitwebview.cpp:
        (webkit_web_view_get_icon_uri):
2011-01-27  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Use Document::url() instead of FrameLoader::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        * WebCoreSupport/FrameLoaderClientHaiku.cpp:
        (WebCore::FrameLoaderClientHaiku::dispatchDidFinishDocumentLoad):
2011-01-27  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Use Document::url() instead of FrameLoader::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        * WebView/WebView.mm:
        (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
2011-01-27  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Use Document::url() instead of FrameLoader::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        * Api/qwebframe.cpp:
        (QWebFrame::url):
2011-01-27  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Use Document::url() instead of FrameLoader::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        * WebFrame.cpp:
        (WebFrame::url):
2011-01-27  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Use Document::url() instead of FrameLoader::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        * WebKitSupport/FrameLoaderClientWx.cpp:
        (WebCore::FrameLoaderClientWx::dispatchDidFinishDocumentLoad):
2011-01-27  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Use Document::url() instead of FrameLoader::url().
        https://bugs.webkit.org/show_bug.cgi?id=41165

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
        (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
        (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
        (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::url):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76872 268f45cc-cd09-0410-ab3c-d52691b4dbfc

35 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/dom/Document.cpp
Source/WebCore/history/CachedFrame.cpp
Source/WebCore/history/PageCache.cpp
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/inspector/InspectorAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/loader/DocumentWriter.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/loader/NavigationScheduler.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/Location.cpp
Source/WebCore/page/Page.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_frame.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/haiku/ChangeLog
Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/Api/qwebframe.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebFrame.cpp
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp

index 20b858f..cca2f1e 100644 (file)
@@ -1,3 +1,58 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Remove FrameLoader::url() and update callers to use
+        Document::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        Refactor, no new tests.
+
+        * WebCore.exp.in:
+        * dom/Document.cpp:
+        (WebCore::Document::processHttpEquiv):
+        (WebCore::Document::removePendingSheet):
+        * history/CachedFrame.cpp:
+        (WebCore::CachedFrameBase::CachedFrameBase):
+        * history/PageCache.cpp:
+        (WebCore::logCanCacheFrameDecision):
+        (WebCore::PageCache::canCachePageContainingThisFrame):
+        * html/HTMLFrameElementBase.cpp:
+        (WebCore::HTMLFrameElementBase::isURLAllowed):
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
+        * inspector/InspectorAgent.cpp:
+        (WebCore::InspectorAgent::inspectedURL):
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::buildObjectForFrame):
+        * loader/DocumentWriter.cpp:
+        (WebCore::DocumentWriter::replaceDocument):
+        (WebCore::DocumentWriter::deprecatedFrameEncoding):
+        * loader/FrameLoader.cpp:
+        * loader/FrameLoader.h:
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::updateForStandardLoad):
+        (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
+        (WebCore::HistoryController::updateForSameDocumentNavigation):
+        * loader/NavigationScheduler.cpp:
+        (WebCore::ScheduledHistoryNavigation::fire):
+        (WebCore::NavigationScheduler::scheduleLocationChange):
+        (WebCore::NavigationScheduler::scheduleRefresh):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::updateControlTints):
+        * page/Location.cpp:
+        (WebCore::Location::url):
+        (WebCore::Location::setProtocol):
+        (WebCore::Location::setHost):
+        (WebCore::Location::setHostname):
+        (WebCore::Location::setPort):
+        (WebCore::Location::setPathname):
+        (WebCore::Location::setSearch):
+        (WebCore::Location::setHash):
+        (WebCore::Location::reload):
+        * page/Page.cpp:
+        (WebCore::Page::goToItem):
+
 2011-01-27  Stephen White  <senorblanco@chromium.org>
 
         Reviewed by Darin Adler.
index 44383b3..936dc09 100644 (file)
@@ -971,7 +971,6 @@ __ZNK7WebCore11FrameLoader16outgoingReferrerEv
 __ZNK7WebCore11FrameLoader17networkingContextEv
 __ZNK7WebCore11FrameLoader20activeDocumentLoaderEv
 __ZNK7WebCore11FrameLoader27numPendingOrLoadingRequestsEb
-__ZNK7WebCore11FrameLoader3urlEv
 __ZNK7WebCore11FrameLoader8loadTypeEv
 __ZNK7WebCore11HistoryItem10visitCountEv
 __ZNK7WebCore11HistoryItem11hasChildrenEv
index ea17763..6adef26 100644 (file)
@@ -2646,7 +2646,7 @@ void Document::processHttpEquiv(const String& equiv, const String& content)
         String url;
         if (frame && parseHTTPRefresh(content, true, delay, url)) {
             if (url.isEmpty())
-                url = frame->loader()->url().string();
+                url = m_url.string();
             else
                 url = completeURL(url).string();
             frame->navigationScheduler()->scheduleRedirect(delay, url);
@@ -2927,7 +2927,7 @@ void Document::removePendingSheet()
         parser->executeScriptsWaitingForStylesheets();
 
     if (m_gotoAnchorNeededAfterStylesheetsLoad && view())
-        view()->scrollToFragment(m_frame->loader()->url());
+        view()->scrollToFragment(m_url);
 }
 
 void Document::styleSelectorChanged(StyleSelectorUpdateFlag updateFlag)
index ab6b4d6..310983b 100644 (file)
@@ -65,7 +65,7 @@ CachedFrameBase::CachedFrameBase(Frame* frame)
     , m_documentLoader(frame->loader()->documentLoader())
     , m_view(frame->view())
     , m_mousePressNode(frame->eventHandler()->mousePressNode())
-    , m_url(frame->loader()->url())
+    , m_url(frame->document()->url())
     , m_isMainFrame(!frame->tree()->parent())
 {
 }
index a5dfb1e..d57df65 100644 (file)
@@ -111,7 +111,7 @@ static bool logCanCacheFrameDecision(Frame* frame, int indentLevel)
             PCLOG("   -Frame contains plugins");
             cannotCache = true;
         }
-        if (frame->loader()->url().protocolIs("https")) {
+        if (frame->document()->url().protocolIs("https")) {
             PCLOG("   -Frame is HTTPS");
             cannotCache = true;
         }
@@ -260,7 +260,7 @@ bool PageCache::canCachePageContainingThisFrame(Frame* frame)
         // they would need to be destroyed and then recreated, and there is no way that we can recreate
         // the right NPObjects. See <rdar://problem/5197041> for more information.
         && !frame->loader()->subframeLoader()->containsPlugins()
-        && !frame->loader()->url().protocolIs("https")
+        && !frame->document()->url().protocolIs("https")
         && (!frame->domWindow() || !frame->domWindow()->hasEventListeners(eventNames().unloadEvent))
 #if ENABLE(DATABASE)
         && !frame->document()->hasOpenDatabases()
index 47465c6..cf079ea 100644 (file)
@@ -80,7 +80,7 @@ bool HTMLFrameElementBase::isURLAllowed() const
     // But we don't allow more than one.
     bool foundSelfReference = false;
     for (Frame* frame = document()->frame(); frame; frame = frame->tree()->parent()) {
-        if (equalIgnoringFragmentIdentifier(frame->loader()->url(), completeURL)) {
+        if (equalIgnoringFragmentIdentifier(frame->document()->url(), completeURL)) {
             if (foundSelfReference)
                 return false;
             foundSelfReference = true;
index 9ac5ad8..e34cd91 100644 (file)
@@ -78,7 +78,7 @@ bool HTMLPlugInImageElement::allowedToLoadFrameURL(const String& url)
     KURL completeURL = document()->completeURL(url);
     bool foundSelfReference = false;
     for (Frame* frame = document()->frame(); frame; frame = frame->tree()->parent()) {
-        if (equalIgnoringFragmentIdentifier(frame->loader()->url(), completeURL)) {
+        if (equalIgnoringFragmentIdentifier(frame->document()->url(), completeURL)) {
             if (foundSelfReference)
                 return false;
             foundSelfReference = true;
index 7640668..43eeb7a 100644 (file)
@@ -1347,7 +1347,7 @@ void InspectorAgent::setInspectorExtensionAPI(const String& source)
 
 KURL InspectorAgent::inspectedURL() const
 {
-    return m_inspectedPage->mainFrame()->loader()->url();
+    return m_inspectedPage->mainFrame()->document()->url();
 }
 
 KURL InspectorAgent::inspectedURLWithoutFragment() const
index f710f29..d6e4ccf 100644 (file)
@@ -378,7 +378,7 @@ static PassRefPtr<InspectorObject> buildObjectForFrame(Frame* frame)
             name = frame->ownerElement()->getAttribute(HTMLNames::idAttr);
         frameObject->setString("name", name);
     }
-    frameObject->setString("url", frame->loader()->url().string());
+    frameObject->setString("url", frame->document()->url().string());
     return frameObject;
 }
 
index d3dcac6..7335357 100644 (file)
@@ -67,7 +67,7 @@ DocumentWriter::DocumentWriter(Frame* frame)
 void DocumentWriter::replaceDocument(const String& source)
 {
     m_frame->loader()->stopAllLoaders();
-    begin(m_frame->loader()->url(), true, m_frame->document()->securityOrigin());
+    begin(m_frame->document()->url(), true, m_frame->document()->securityOrigin());
 
     if (!source.isNull()) {
         if (!m_receivedData) {
@@ -245,7 +245,7 @@ void DocumentWriter::setDecoder(TextResourceDecoder* decoder)
 
 String DocumentWriter::deprecatedFrameEncoding() const
 {
-    return m_frame->loader()->url().isEmpty() ? m_encoding : encoding();
+    return m_frame->document()->url().isEmpty() ? m_encoding : encoding();
 }
 
 void DocumentWriter::setDocumentWasLoadedAsPartOfNavigation()
index 8c2979a..8db743b 100644 (file)
@@ -635,12 +635,6 @@ void FrameLoader::receivedFirstData()
     m_frame->navigationScheduler()->scheduleRedirect(delay, url);
 }
 
-const KURL& FrameLoader::url() const
-{
-    ASSERT(m_frame->document());
-    return m_frame->document()->url();
-}
-
 void FrameLoader::setOutgoingReferrer(const KURL& url)
 {
     KURL outgoingReferrer(url);
index 0fe8776..3708bf8 100644 (file)
@@ -267,7 +267,6 @@ public:
 
     void frameDetached();
 
-    const KURL& url() const;
     void setOutgoingReferrer(const KURL&);
 
     void loadDone();
index 7c0fc97..7eae95e 100644 (file)
@@ -323,7 +323,7 @@ void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
         if (Page* page = m_frame->page())
             addVisitedLink(page, historyURL);
 
-        if (!frameLoader->documentLoader()->didCreateGlobalHistoryEntry() && frameLoader->documentLoader()->unreachableURL().isEmpty() && !frameLoader->url().isEmpty())
+        if (!frameLoader->documentLoader()->didCreateGlobalHistoryEntry() && frameLoader->documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())
             frameLoader->client()->updateGlobalHistoryRedirectLinks();
     }
 }
@@ -365,7 +365,7 @@ void HistoryController::updateForRedirectWithLockedBackForwardList()
         if (Page* page = m_frame->page())
             addVisitedLink(page, historyURL);
 
-        if (!m_frame->loader()->documentLoader()->didCreateGlobalHistoryEntry() && m_frame->loader()->documentLoader()->unreachableURL().isEmpty() && !m_frame->loader()->url().isEmpty())
+        if (!m_frame->loader()->documentLoader()->didCreateGlobalHistoryEntry() && m_frame->loader()->documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())
             m_frame->loader()->client()->updateGlobalHistoryRedirectLinks();
     }
 }
@@ -459,7 +459,7 @@ void HistoryController::recursiveUpdateForCommit()
 
 void HistoryController::updateForSameDocumentNavigation()
 {
-    if (m_frame->loader()->url().isEmpty())
+    if (m_frame->document()->url().isEmpty())
         return;
 
     Settings* settings = m_frame->settings();
@@ -470,7 +470,7 @@ void HistoryController::updateForSameDocumentNavigation()
     if (!page)
         return;
 
-    addVisitedLink(page, m_frame->loader()->url());
+    addVisitedLink(page, m_frame->document()->url());
 }
 
 void HistoryController::updateForFrameLoadCompleted()
index d51575b..65a4551 100644 (file)
@@ -178,11 +178,10 @@ public:
     {
         UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
 
-        FrameLoader* loader = frame->loader();
         if (!m_historySteps) {
             // Special case for go(0) from a frame -> reload only the frame
             // To follow Firefox and IE's behavior, history reload can only navigate the self frame.
-            loader->urlSelected(loader->url(), "_self", 0, lockHistory(), lockBackForwardList(), SendReferrer);
+            frame->loader()->urlSelected(frame->document()->url(), "_self", 0, lockHistory(), lockBackForwardList(), SendReferrer);
             return;
         }
         // go(i!=0) from a frame navigates into the history of the frame only,
@@ -322,7 +321,7 @@ void NavigationScheduler::scheduleLocationChange(PassRefPtr<SecurityOrigin> secu
     // If the URL we're going to navigate to is the same as the current one, except for the
     // fragment part, we don't need to schedule the location change.
     KURL parsedURL(ParsedURLString, url);
-    if (parsedURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(loader->url(), parsedURL)) {
+    if (parsedURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(m_frame->document()->url(), parsedURL)) {
         loader->changeLocation(securityOrigin, loader->completeURL(url), referrer, lockHistory, lockBackForwardList);
         return;
     }
@@ -359,7 +358,7 @@ void NavigationScheduler::scheduleRefresh()
 {
     if (!shouldScheduleNavigation())
         return;
-    const KURL& url = m_frame->loader()->url();
+    const KURL& url = m_frame->document()->url();
     if (url.isEmpty())
         return;
 
index e44ed18..ac1e2c9 100644 (file)
@@ -2093,7 +2093,7 @@ void FrameView::updateControlTints()
     // to define when controls get the tint and to call this function when that changes.
     
     // Optimize the common case where we bring a window to the front while it's still empty.
-    if (!m_frame || m_frame->loader()->url().isEmpty())
+    if (!m_frame || m_frame->document()->url().isEmpty())
         return;
 
     if ((m_frame->contentRenderer() && m_frame->contentRenderer()->theme()->supportsControlTints()) || hasCustomScrollbars())  {
index be185f9..4835a83 100644 (file)
@@ -51,7 +51,7 @@ inline const KURL& Location::url() const
 {
     ASSERT(m_frame);
 
-    const KURL& url = m_frame->loader()->url();
+    const KURL& url = m_frame->document()->url();
     if (!url.isValid())
         return blankURL(); // Use "about:blank" while the page is still loading (before we have a frame).
 
@@ -167,7 +167,7 @@ void Location::setProtocol(const String& protocol, DOMWindow* activeWindow, DOMW
 {
     if (!m_frame)
         return;
-    KURL url = m_frame->loader()->url();
+    KURL url = m_frame->document()->url();
     if (!url.setProtocol(protocol)) {
         ec = SYNTAX_ERR;
         return;
@@ -179,7 +179,7 @@ void Location::setHost(const String& host, DOMWindow* activeWindow, DOMWindow* f
 {
     if (!m_frame)
         return;
-    KURL url = m_frame->loader()->url();
+    KURL url = m_frame->document()->url();
     url.setHostAndPort(host);
     m_frame->domWindow()->setLocation(url.string(), activeWindow, firstWindow);
 }
@@ -188,7 +188,7 @@ void Location::setHostname(const String& hostname, DOMWindow* activeWindow, DOMW
 {
     if (!m_frame)
         return;
-    KURL url = m_frame->loader()->url();
+    KURL url = m_frame->document()->url();
     url.setHost(hostname);
     m_frame->domWindow()->setLocation(url.string(), activeWindow, firstWindow);
 }
@@ -197,7 +197,7 @@ void Location::setPort(const String& portString, DOMWindow* activeWindow, DOMWin
 {
     if (!m_frame)
         return;
-    KURL url = m_frame->loader()->url();
+    KURL url = m_frame->document()->url();
     int port = portString.toInt();
     if (port < 0 || port > 0xFFFF)
         url.removePort();
@@ -210,7 +210,7 @@ void Location::setPathname(const String& pathname, DOMWindow* activeWindow, DOMW
 {
     if (!m_frame)
         return;
-    KURL url = m_frame->loader()->url();
+    KURL url = m_frame->document()->url();
     url.setPath(pathname);
     m_frame->domWindow()->setLocation(url.string(), activeWindow, firstWindow);
 }
@@ -219,7 +219,7 @@ void Location::setSearch(const String& search, DOMWindow* activeWindow, DOMWindo
 {
     if (!m_frame)
         return;
-    KURL url = m_frame->loader()->url();
+    KURL url = m_frame->document()->url();
     url.setQuery(search);
     m_frame->domWindow()->setLocation(url.string(), activeWindow, firstWindow);
 }
@@ -228,7 +228,7 @@ void Location::setHash(const String& hash, DOMWindow* activeWindow, DOMWindow* f
 {
     if (!m_frame)
         return;
-    KURL url = m_frame->loader()->url();
+    KURL url = m_frame->document()->url();
     String oldFragmentIdentifier = url.fragmentIdentifier();
     String newFragmentIdentifier = hash;
     if (hash[0] == '#')
@@ -268,7 +268,7 @@ void Location::reload(DOMWindow* activeWindow)
         targetWindow->printErrorMessage(targetWindow->crossDomainAccessErrorMessage(activeWindow));
         return;
     }
-    if (protocolIsJavaScript(m_frame->loader()->url()))
+    if (protocolIsJavaScript(m_frame->document()->url()))
         return;
     m_frame->navigationScheduler()->scheduleRefresh();
 }
index 8550681..d21874e 100644 (file)
@@ -339,7 +339,7 @@ void Page::goToItem(HistoryItem* item, FrameLoadType type)
 
 #if ENABLE(DATABASE)
         // If we're navigating the history via a fragment on the same document, then we do not want to stop databases.
-        const KURL& currentURL = m_mainFrame->loader()->url();
+        const KURL& currentURL = m_mainFrame->document()->url();
         const KURL& newURL = item->url();
     
         if (newURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(currentURL, newURL))
index 5dcc5cf..17072bc 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Use Document::url() instead of FrameLoader::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_uri_changed):
+
 2011-01-14  Patrick Gansterer  <paroga@webkit.org>
 
         Unreviewed. Try to fix EFL build.
index f41caae..f26d4cf 100644 (file)
@@ -2008,7 +2008,7 @@ Eina_Bool ewk_frame_uri_changed(Evas_Object* o)
 {
     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
-    WTF::CString uri(sd->frame->loader()->url().prettyURL().utf8());
+    WTF::CString uri(sd->frame->document()->url().prettyURL().utf8());
 
     INF("uri=%s", uri.data());
     if (!uri.data()) {
index 93cf03c..afdc375 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Use Document::url() instead of FrameLoader::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_get_icon_uri):
+
 2011-01-27  Mario Sanchez Prada  <msanchez@igalia.com>
 
         Reviewed by Martin Robinson.
index 8f1a819..01dfb8e 100644 (file)
@@ -834,7 +834,7 @@ void FrameLoaderClient::dispatchDidChangeLocationWithinPage()
 {
     WebKitWebFramePrivate* priv = m_frame->priv;
     g_free(priv->uri);
-    priv->uri = g_strdup(core(m_frame)->loader()->url().prettyURL().utf8().data());
+    priv->uri = g_strdup(core(m_frame)->document()->url().prettyURL().utf8().data());
     g_object_notify(G_OBJECT(m_frame), "uri");
     WebKitWebView* webView = getViewFromFrame(m_frame);
     if (m_frame == webkit_web_view_get_main_frame(webView))
index c855507..4ff1582 100644 (file)
@@ -5051,7 +5051,7 @@ WebKitHitTestResult* webkit_web_view_get_hit_test_result(WebKitWebView* webView,
 G_CONST_RETURN gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView)
 {
     g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
-    String iconURL = iconDatabase()->iconURLForPageURL(core(webView)->mainFrame()->loader()->url().prettyURL());
+    String iconURL = iconDatabase()->iconURLForPageURL(core(webView)->mainFrame()->document()->url().prettyURL());
     webView->priv->iconURI = iconURL.utf8();
     return webView->priv->iconURI.data();
 }
index 4315bb5..fdaafef 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Use Document::url() instead of FrameLoader::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        * WebCoreSupport/FrameLoaderClientHaiku.cpp:
+        (WebCore::FrameLoaderClientHaiku::dispatchDidFinishDocumentLoad):
+
 2010-12-22  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Darin Adler.
index 48c65a1..cb597fa 100644 (file)
@@ -261,7 +261,7 @@ void FrameLoaderClientHaiku::dispatchDidFinishDocumentLoad()
 {
     if (m_webView) {
         BMessage message(LOAD_DOC_COMPLETED);
-        message.AddString("url", m_frame->loader()->url().string());
+        message.AddString("url", m_frame->document()->url().string());
         m_messenger->SendMessage(&message);
     }
 }
@@ -323,7 +323,7 @@ void FrameLoaderClientHaiku::postProgressFinishedNotification()
 {
     if (m_webView) {
         BMessage message(LOAD_DL_COMPLETED);
-        message.AddString("url", m_frame->loader()->url().string());
+        message.AddString("url", m_frame->document()->url().string());
         m_messenger->SendMessage(&message);
     }
 }
index fd8c6e3..e63de11 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Use Document::url() instead of FrameLoader::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        * WebView/WebView.mm:
+        (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
+
 2011-01-27  Dan Bernstein  <mitz@apple.com>
 
         Rubber-stamped by Anders Carlsson.
index 82e4f2c..e01877b 100644 (file)
@@ -5834,7 +5834,7 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
 
     WebFrameLoadDelegateImplementationCache* cache = &_private->frameLoadDelegateImplementations;
     if (cache->didReceiveIconForFrameFunc) {
-        Image* image = iconDatabase()->iconForPageURL(core(webFrame)->loader()->url().string(), IntSize(16, 16));
+        Image* image = iconDatabase()->iconForPageURL(core(webFrame)->document()->url().string(), IntSize(16, 16));
         if (NSImage *icon = webGetNSImage(image, NSMakeSize(16, 16)))
             CallFrameLoadDelegate(cache->didReceiveIconForFrameFunc, self, @selector(webView:didReceiveIcon:forFrame:), icon, webFrame);
     }
index 5cb9b69..c9159f8 100644 (file)
@@ -757,7 +757,7 @@ void QWebFrame::setUrl(const QUrl &url)
 
 QUrl QWebFrame::url() const
 {
-    return d->frame->loader()->url();
+    return d->frame->document()->url();
 }
 
 /*!
@@ -813,7 +813,7 @@ QUrl QWebFrame::baseUrl() const
 
 QIcon QWebFrame::icon() const
 {
-    return QWebSettings::iconForUrl(d->frame->loader()->url());
+    return QWebSettings::iconForUrl(d->frame->document()->url());
 }
 
 /*!
index 74c1713..e2e22a5 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Use Document::url() instead of FrameLoader::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        * Api/qwebframe.cpp:
+        (QWebFrame::url):
+
 2011-01-27  Robert Hogan  <robert@webkit.org>
 
         Rubber-stamped by Andreas Kling.
index 416b7a7..b92bbb3 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Use Document::url() instead of FrameLoader::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        * WebFrame.cpp:
+        (WebFrame::url):
+
 2011-01-27  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Adam Roben.
index 05ee075..0b03032 100644 (file)
@@ -703,7 +703,7 @@ KURL WebFrame::url() const
     if (!coreFrame)
         return KURL();
 
-    return coreFrame->loader()->url();
+    return coreFrame->document()->url();
 }
 
 HRESULT STDMETHODCALLTYPE WebFrame::stopLoading( void)
index 4862225..5face2c 100644 (file)
@@ -1,3 +1,13 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Use Document::url() instead of FrameLoader::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        * WebKitSupport/FrameLoaderClientWx.cpp:
+        (WebCore::FrameLoaderClientWx::dispatchDidFinishDocumentLoad):
+
 2011-01-14  Yuzo Fujishima  <yuzo@google.com>
 
         Reviewed by Antti Koivisto.
index 362c726..b690433 100644 (file)
@@ -320,7 +320,7 @@ void FrameLoaderClientWx::dispatchDidFinishDocumentLoad()
     if (m_webView) {
         wxWebViewLoadEvent wkEvent(m_webView);
         wkEvent.SetState(wxWEBVIEW_LOAD_DOC_COMPLETED);
-        wkEvent.SetURL(m_frame->loader()->url().string());
+        wkEvent.SetURL(m_frame->document()->url().string());
         m_webView->GetEventHandler()->ProcessEvent(wkEvent);
     }
 }
@@ -394,7 +394,7 @@ void FrameLoaderClientWx::postProgressFinishedNotification()
     if (m_webView) {
         wxWebViewLoadEvent wkEvent(m_webView);
         wkEvent.SetState(wxWEBVIEW_LOAD_DL_COMPLETED);
-        wkEvent.SetURL(m_frame->loader()->url().string());
+        wkEvent.SetURL(m_frame->document()->url().string());
         m_webView->GetEventHandler()->ProcessEvent(wkEvent);
     }
 }
index 537bfd6..a08b8cd 100644 (file)
@@ -1,3 +1,18 @@
+2011-01-27  Nate Chapin  <japhet@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Use Document::url() instead of FrameLoader::url().
+        https://bugs.webkit.org/show_bug.cgi?id=41165
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
+        (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
+        (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
+        (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::url):
+
 2011-01-27  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index df75978..0867d55 100644 (file)
@@ -312,7 +312,7 @@ void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage()
     webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationAnchorNavigation, userData);
 
     // Notify the UIProcess.
-    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationAnchorNavigation, m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
+    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationAnchorNavigation, m_frame->coreFrame()->document()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchDidPushStateWithinPage()
@@ -327,7 +327,7 @@ void WebFrameLoaderClient::dispatchDidPushStateWithinPage()
     webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStatePush, userData);
 
     // Notify the UIProcess.
-    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStatePush, m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
+    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStatePush, m_frame->coreFrame()->document()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchDidReplaceStateWithinPage()
@@ -342,7 +342,7 @@ void WebFrameLoaderClient::dispatchDidReplaceStateWithinPage()
     webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStateReplace, userData);
 
     // Notify the UIProcess.
-    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStateReplace, m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
+    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStateReplace, m_frame->coreFrame()->document()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchDidPopStateWithinPage()
@@ -357,7 +357,7 @@ void WebFrameLoaderClient::dispatchDidPopStateWithinPage()
     webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStatePop, userData);
 
     // Notify the UIProcess.
-    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStatePop, m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
+    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStatePop, m_frame->coreFrame()->document()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchWillClose()
index 42eacc1..c6fedbd 100644 (file)
@@ -334,7 +334,7 @@ String WebFrame::url() const
     if (!m_coreFrame)
         return String();
 
-    return m_coreFrame->loader()->url().string();
+    return m_coreFrame->document()->url().string();
 }
 
 String WebFrame::innerText() const