diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 90092b30cd91f41aed71a82d4abb31a58b52b133..0cf46695416f95e5b3103f5bf4149f93e65c3492 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,16 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Tests that going forward within the same document does not stop loading. + + * http/tests/navigation/forward-to-fragment-fires-onload.html: Added. + * http/tests/navigation/forward-to-fragment-fires-onload-expected.txt: Added. + * http/tests/navigation/resources/forward-to-fragment-fires-onload-2.html: Added. + 2011-02-19 Adam Barth Reviewed by Daniel Bates. diff --git a/LayoutTests/http/tests/navigation/forward-to-fragment-fires-onload-expected.txt b/LayoutTests/http/tests/navigation/forward-to-fragment-fires-onload-expected.txt new file mode 100644 index 0000000000000000000000000000000000000000..52ebb173d15a5b05fb419de4ddf0441b5b0f6a35 --- /dev/null +++ b/LayoutTests/http/tests/navigation/forward-to-fragment-fires-onload-expected.txt @@ -0,0 +1,15 @@ +CONSOLE MESSAGE: line 27: Starting test. +CONSOLE MESSAGE: line 6: 1. Got to page 2. Going to #foo. +CONSOLE MESSAGE: line 22: 2. Got to page 2 #foo. Going back to start. +CONSOLE MESSAGE: line 17: 3. Got back to start. Going forward to page 2. +CONSOLE MESSAGE: line 31: 4. Got back to page 2. Immediately going forward. +CONSOLE MESSAGE: line 13: 5. Got to page 2 onload. Success. +Tests that loading is not stopped by going forward to a fragment. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/http/tests/navigation/forward-to-fragment-fires-onload.html b/LayoutTests/http/tests/navigation/forward-to-fragment-fires-onload.html new file mode 100644 index 0000000000000000000000000000000000000000..0527eb0e9b503f542a55952fe4c74395f818b153 --- /dev/null +++ b/LayoutTests/http/tests/navigation/forward-to-fragment-fires-onload.html @@ -0,0 +1,42 @@ + + + + + + + +

+
+ + + + + + diff --git a/LayoutTests/http/tests/navigation/resources/forward-to-fragment-fires-onload-2.html b/LayoutTests/http/tests/navigation/resources/forward-to-fragment-fires-onload-2.html new file mode 100644 index 0000000000000000000000000000000000000000..5bb43dcc64edad350d05a19c9ad4d5c171d43ec1 --- /dev/null +++ b/LayoutTests/http/tests/navigation/resources/forward-to-fragment-fires-onload-2.html @@ -0,0 +1,39 @@ +Page 2. + + + diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index b2e314d95960b11154c6f36bb57e4597793bbbff..d05ba25247dd7f4a89163d704974d2c4b2faa804 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,24 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Avoid stopping all loaders in goToItem for same document navigations + or pseudo-back-forward URLs. Make HistoryController::goToItem private + to force callers to go through Page::goToItem. Also add a callback to + FrameLoaderClient to let clients decide whether to stop loading first. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * loader/EmptyClients.h: + * loader/FrameLoader.h: + * loader/FrameLoaderClient.h: + * loader/HistoryController.cpp: + * loader/HistoryController.h: + * page/Page.cpp: + 2011-02-19 Adam Barth Reviewed by Daniel Bates. diff --git a/Source/WebCore/loader/EmptyClients.h b/Source/WebCore/loader/EmptyClients.h index 39913a0f7f8279b2a380692df3f7efd3ff9810d1..f8bbabb8d31d283e78490faf4f937c3fac7a6de0 100644 --- a/Source/WebCore/loader/EmptyClients.h +++ b/Source/WebCore/loader/EmptyClients.h @@ -350,6 +350,7 @@ public: virtual void updateGlobalHistory() { } virtual void updateGlobalHistoryRedirectLinks() { } virtual bool shouldGoToHistoryItem(HistoryItem*) const { return false; } + virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const { return false; } virtual void dispatchDidAddBackForwardItem(HistoryItem*) const { } virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const { }; virtual void dispatchDidChangeBackForwardIndex() const { } diff --git a/Source/WebCore/loader/FrameLoader.h b/Source/WebCore/loader/FrameLoader.h index bb605e72826ad396721e782fde07c6c41a70fa16..a9e24c45a50311c584654aeb3b9b01400d41abfe 100644 --- a/Source/WebCore/loader/FrameLoader.h +++ b/Source/WebCore/loader/FrameLoader.h @@ -128,6 +128,7 @@ public: bool canHandleRequest(const ResourceRequest&); // Also not cool. + // FIXME: We no longer need DatabasePolicy, since we always stop databases now. void stopAllLoaders(DatabasePolicy = DatabasePolicyStop, ClearProvisionalItemPolicy = ShouldClearProvisionalItem); void stopForUserCancel(bool deferCheckLoadComplete = false); diff --git a/Source/WebCore/loader/FrameLoaderClient.h b/Source/WebCore/loader/FrameLoaderClient.h index 7dda265aacea2319d04726307e272542756402c2..255540e7ab46a98285b038a592f43069d7de56f4 100644 --- a/Source/WebCore/loader/FrameLoaderClient.h +++ b/Source/WebCore/loader/FrameLoaderClient.h @@ -187,6 +187,7 @@ namespace WebCore { virtual void updateGlobalHistoryRedirectLinks() = 0; virtual bool shouldGoToHistoryItem(HistoryItem*) const = 0; + virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const = 0; virtual void dispatchDidAddBackForwardItem(HistoryItem*) const = 0; virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const = 0; virtual void dispatchDidChangeBackForwardIndex() const = 0; diff --git a/Source/WebCore/loader/HistoryController.cpp b/Source/WebCore/loader/HistoryController.cpp index 7bfe380f0b9fa8c1953c499ce264caa20fdd95e0..f6b61b0f2095376861ccdb598ab4ea741b45b039 100644 --- a/Source/WebCore/loader/HistoryController.cpp +++ b/Source/WebCore/loader/HistoryController.cpp @@ -217,6 +217,18 @@ void HistoryController::invalidateCurrentItemCachedPage() pageCache()->remove(currentItem()); } +bool HistoryController::shouldStopLoadingForHistoryItem(HistoryItem* targetItem) const +{ + if (!m_currentItem) + return false; + + // Don't abort the current load if we're navigating within the current document. + if (m_currentItem->shouldDoSameDocumentNavigationTo(targetItem)) + return false; + + return m_frame->loader()->client()->shouldStopLoadingForHistoryItem(targetItem); +} + // Main funnel for navigating to a previous location (back/forward, non-search snap-back) // This includes recursion to handle loading into framesets properly void HistoryController::goToItem(HistoryItem* targetItem, FrameLoadType type) diff --git a/Source/WebCore/loader/HistoryController.h b/Source/WebCore/loader/HistoryController.h index 9514d2f940da1bc548680c950a95c087cbf9f7de..59f11a25c933d3d7c97251b90a93b32d56b99ad4 100644 --- a/Source/WebCore/loader/HistoryController.h +++ b/Source/WebCore/loader/HistoryController.h @@ -60,8 +60,6 @@ public: void invalidateCurrentItemCachedPage(); - void goToItem(HistoryItem*, FrameLoadType); - void updateForBackForwardNavigation(); void updateForReload(); void updateForStandardLoad(HistoryUpdateType updateType = UpdateAll); @@ -85,6 +83,10 @@ public: void replaceState(PassRefPtr, const String& title, const String& url); private: + friend class Page; + bool shouldStopLoadingForHistoryItem(HistoryItem*) const; + void goToItem(HistoryItem*, FrameLoadType); + void initializeItem(HistoryItem*); PassRefPtr createItem(); PassRefPtr createItemTree(Frame* targetFrame, bool clipAtTarget); diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp index df24fbe79aaa5f6ecc8406145919d3652c9b1abc..68e83f5d1353a5235a667afcfb079cb0402ff236 100644 --- a/Source/WebCore/page/Page.cpp +++ b/Source/WebCore/page/Page.cpp @@ -331,25 +331,10 @@ void Page::goToItem(HistoryItem* item, FrameLoadType type) // stopAllLoaders may end up running onload handlers, which could cause further history traversals that may lead to the passed in HistoryItem // being deref()-ed. Make sure we can still use it with HistoryController::goToItem later. RefPtr protector(item); - - // Abort any current load unless we're navigating the current document to a new state object - HistoryItem* currentItem = m_mainFrame->loader()->history()->currentItem(); - if (!item->stateObject() || !currentItem || item->documentSequenceNumber() != currentItem->documentSequenceNumber() || item == currentItem) { - // Define what to do with any open database connections. By default we stop them and terminate the database thread. - DatabasePolicy databasePolicy = DatabasePolicyStop; - -#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->document()->url(); - const KURL& newURL = item->url(); - - if (newURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(currentURL, newURL)) - databasePolicy = DatabasePolicyContinue; -#endif - m_mainFrame->loader()->stopAllLoaders(databasePolicy); - } - + if (m_mainFrame->loader()->history()->shouldStopLoadingForHistoryItem(item)) + m_mainFrame->loader()->stopAllLoaders(); + m_mainFrame->loader()->history()->goToItem(item, type); } diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog index af1799550ce2dc545912569a8816e7c44539110a..d5ddc3f42d1749cec799b9c069a806fd81ad3522 100644 --- a/Source/WebKit/chromium/ChangeLog +++ b/Source/WebKit/chromium/ChangeLog @@ -1,3 +1,21 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Call Page::goToItem instead of HistoryController::goToItem, so that + FrameLoader::stopAllLoaders is called first. Also adds a callback in + FrameLoaderClient for checking for pseudo-back-forward URLs. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::shouldStopLoadingForHistoryItem): Added. + * src/FrameLoaderClientImpl.h: + * src/WebFrameImpl.cpp: + 2011-02-18 Dominic Mazzoni Reviewed by Dimitri Glazkov. diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp index 34c53cf0b4fef1018c6ed18e64d55f9ec113c1b6..5e727e083925c69f7a6c31032970eefc82c798e4 100644 --- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp @@ -1135,6 +1135,14 @@ bool FrameLoaderClientImpl::shouldGoToHistoryItem(HistoryItem* item) const return false; } +bool FrameLoaderClientImpl::shouldStopLoadingForHistoryItem(HistoryItem* targetItem) const +{ + // Don't stop loading for pseudo-back-forward URLs, since they will get + // translated and then pass through again. + const KURL& url = targetItem->url(); + return !url.protocolIs(backForwardNavigationScheme); +} + void FrameLoaderClientImpl::dispatchDidAddBackForwardItem(HistoryItem*) const { } diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h index 925b7593d48f2eda4ef0a4f0dc30846f2aa675e9..0bc0a91c65e982c19a4a974564d89dafe206a468 100644 --- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h +++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h @@ -138,6 +138,7 @@ public: virtual void updateGlobalHistory(); virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp index 33105dc512e07e4745320d1b634b7be3fce3c23c..cc4d137f22bda81ad2c42e3e9c9e47829a54be69 100644 --- a/Source/WebKit/chromium/src/WebFrameImpl.cpp +++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp @@ -898,8 +898,8 @@ void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item) m_frame->page()->backForward()->setCurrentItem(currentItem.get()); } - m_frame->loader()->history()->goToItem( - historyItem.get(), FrameLoadTypeIndexedBackForward); + m_frame->page()->goToItem(historyItem.get(), + FrameLoadTypeIndexedBackForward); } void WebFrameImpl::loadData(const WebData& data, diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog index 0507313783cb2765709701b4cc966273cf9f6752..de3ab83cd01d607f2f0f38e20edca6d8d6b95e83 100644 --- a/Source/WebKit/efl/ChangeLog +++ b/Source/WebKit/efl/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::shouldStopLoadingForHistoryItem): Added. + * WebCoreSupport/FrameLoaderClientEfl.h: + 2011-02-18 Gyuyoung Kim Reviewed by Kent Tamura. diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp index acbab30c04a5c0bb8049c8e8bbb8aeb190520e6b..5cc25f4c81dd206e9db22eba9500bfd4d9065cdb 100644 --- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp +++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp @@ -510,6 +510,11 @@ bool FrameLoaderClientEfl::shouldGoToHistoryItem(HistoryItem* item) const return item; } +bool FrameLoaderClientEfl::shouldStopLoadingForHistoryItem(HistoryItem* item) const +{ + return true; +} + void FrameLoaderClientEfl::didDisplayInsecureContent() { notImplemented(); diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h index 14ebc1c0a5917c9827e36531eb3da3c7fe7923f2..a4c31fa2bfe6827822483a59713996d3a5466eab 100644 --- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h +++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h @@ -164,6 +164,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient { virtual void updateGlobalHistory(); virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const; virtual void didDisplayInsecureContent(); virtual void didRunInsecureContent(SecurityOrigin*, const KURL&); diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog index e9f2f0126b74b04dc5e7e4b4bc591be087ea142f..97f01573701874716d0629e9b2f9e4b2d7c7179f 100644 --- a/Source/WebKit/gtk/ChangeLog +++ b/Source/WebKit/gtk/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClientGtk::shouldStopLoadingForHistoryItem): Added. + * WebCoreSupport/FrameLoaderClientGtk.h: + 2011-02-18 Mario Sanchez Prada Reviewed by Martin Robinson. diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 9aa242dbd72dbf6269c4552e6fc2b5976ff2cfcd..dce7f682be3087846e6b5a108a1b6e068f4e73c6 100644 --- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -808,6 +808,11 @@ bool FrameLoaderClient::shouldGoToHistoryItem(HistoryItem* item) const return item != 0; } +bool FrameLoaderClient::shouldStopLoadingForHistoryItem(HistoryItem* item) const +{ + return true; +} + void FrameLoaderClient::dispatchDidAddBackForwardItem(HistoryItem*) const { } diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h index 2e8a2dda90b86c7cd0c4c2da626ba811103f1329..0363be8060d7035f1f170ba17f327d5823dde780 100644 --- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h +++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h @@ -141,6 +141,7 @@ namespace WebKit { virtual void updateGlobalHistory(); virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; diff --git a/Source/WebKit/haiku/ChangeLog b/Source/WebKit/haiku/ChangeLog index 995743d4b214a02bb2ac8698b0219023e759e6c0..3f4f30dca8677972f5d3cfd14bd3f4a372ba8f91 100644 --- a/Source/WebKit/haiku/ChangeLog +++ b/Source/WebKit/haiku/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebCoreSupport/FrameLoaderClientHaiku.cpp: + (WebCore::FrameLoaderClientHaiku::shouldStopLoadingForHistoryItem): Added. + * WebCoreSupport/FrameLoaderClientHaiku.h: + 2011-01-26 MORITA Hajime Reviewed by Ryosuke Niwa. diff --git a/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp b/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp index 46ac489a061b938de29030daf3068e2f34df081f..280c69df1accd36b920d36873c57916e9c1ea4ed 100644 --- a/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp +++ b/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp @@ -483,6 +483,11 @@ bool FrameLoaderClientHaiku::shouldGoToHistoryItem(WebCore::HistoryItem*) const return true; } +bool FrameLoaderClientHaiku::shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const +{ + return true; +} + void FrameLoaderClientHaiku::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const { } diff --git a/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h b/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h index e54ba03e5d612c31d9fb02f2df5cfd7de94e7caa..f0e10e95e230ae48e429fc5b0f9c8ec0f79eaafe 100644 --- a/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h +++ b/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h @@ -159,6 +159,7 @@ namespace WebCore { virtual void updateGlobalHistory(); virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog index ebd19c6c5f313f70c0b92e4609b2f72bba3c6dfc..243241f08c3a8f88e5d7d8caa86e5ef16574d109 100644 --- a/Source/WebKit/mac/ChangeLog +++ b/Source/WebKit/mac/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added. + * WebCoreSupport/WebFrameLoaderClient.h: + 2011-02-16 David Hyatt Reviewed by Dan Bernstein. diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h index f29ba72d2c39e6366daadcb68eacbdaf36d4e4b3..6858f25aa1e6cc1b67fe86e24ceb5318fce9186c 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h +++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h @@ -151,6 +151,7 @@ private: virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index 648458443e60119495e63d3538528159ee77f445..29a637b11c1704bfc3b4d0c01547bf413832644d 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -937,6 +937,11 @@ bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem* item) const return [[view _policyDelegateForwarder] webView:view shouldGoToHistoryItem:webItem]; } +bool WebFrameLoaderClient::shouldStopLoadingForHistoryItem(HistoryItem* item) const +{ + return true; +} + void WebFrameLoaderClient::dispatchDidAddBackForwardItem(HistoryItem*) const { } diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog index ffba9434ddd2d8af7aa8c261c39c0009b6598311..a957a51fe9f5024a980e24512ac8096130b6d349 100644 --- a/Source/WebKit/qt/ChangeLog +++ b/Source/WebKit/qt/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::shouldStopLoadingForHistoryItem): Added. + * WebCoreSupport/FrameLoaderClientQt.h: + 2011-02-18 Fabrizio Machado Reviewed by Eric Seidel. diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 22e2ac937a01b3953279eabc08bd2f6e4633f3ed..0e0ac6e4f066b2766134b84dc0c6874f4f192eb1 100644 --- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -827,6 +827,11 @@ bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem *) const return true; } +bool FrameLoaderClientQt::shouldStopLoadingForHistoryItem(WebCore::HistoryItem *) const +{ + return true; +} + void FrameLoaderClientQt::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const { } diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h index 09a26eacfe45c93ccdfb2b662af89f877975746a..8aa4fec9498f940cbc8ab9ab9ad4d809237bf734 100644 --- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h +++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h @@ -154,6 +154,7 @@ public: virtual void updateGlobalHistory(); virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog index afc5296efbf6e0c8cc03518b5848a2ba5920f469..47b181e20840f8b49a8a16b72764eb96e7cd9000 100644 --- a/Source/WebKit/win/ChangeLog +++ b/Source/WebKit/win/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added. + * WebCoreSupport/WebFrameLoaderClient.h: + 2011-02-16 David Hyatt Reviewed by Dan Bernstein. diff --git a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp index 710fec29aa982b12a0a4dac39339df7bce07b51a..95394fde7a9719472902e0f3db6b83bd5e235949 100644 --- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp @@ -602,6 +602,11 @@ bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem*) const return true; } +bool WebFrameLoaderClient::shouldStopLoadingForHistoryItem(HistoryItem*) const +{ + return true; +} + void WebFrameLoaderClient::dispatchDidAddBackForwardItem(HistoryItem*) const { } diff --git a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h index 5fada31ea6a01e2d48fee71df83d6f1362b3e1df..9234e971cbcd8bd0ed74322728deba1d2138640e 100644 --- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h +++ b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h @@ -94,6 +94,7 @@ public: virtual void updateGlobalHistory(); virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; diff --git a/Source/WebKit/wince/ChangeLog b/Source/WebKit/wince/ChangeLog index c57d3994f2eb93e586f0fcd0c20bcfc5be18f1f5..8f776776ffa4a31a748ae0d34fef9baa5022d3e6 100644 --- a/Source/WebKit/wince/ChangeLog +++ b/Source/WebKit/wince/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebCoreSupport/FrameLoaderClientWinCE.cpp: + (WebKit::FrameLoaderClientWinCE::shouldStopLoadingForHistoryItem): Added. + * WebCoreSupport/FrameLoaderClientWinCE.h: + 2011-02-10 Luiz Agostini Reviewed by Adam Roben. diff --git a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp index 7d8f614f08e051ca8244abfac30750a361c5d91c..182fa224f1562995cfdfaa12893e73d1f92d4364 100644 --- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp +++ b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp @@ -248,6 +248,11 @@ bool FrameLoaderClientWinCE::shouldGoToHistoryItem(HistoryItem* item) const return item; } +bool FrameLoaderClientWinCE::shouldStopLoadingForHistoryItem(HistoryItem* item) const +{ + return true; +} + void FrameLoaderClientWinCE::dispatchDidAddBackForwardItem(HistoryItem*) const { } diff --git a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h index ed49d89b9613eae3db858cbee549a4baf86d60ae..f1aceb1d63910b27ac6b452204ffdda987fa951d 100644 --- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h +++ b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h @@ -135,6 +135,7 @@ public: virtual void updateGlobalHistory(); virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; diff --git a/Source/WebKit/wx/ChangeLog b/Source/WebKit/wx/ChangeLog index e809f7634e9241ccf9be29931e2099f7b90a317b..f191169a2acaecc13a79409b4f39ab1f60acd03b 100644 --- a/Source/WebKit/wx/ChangeLog +++ b/Source/WebKit/wx/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::shouldStopLoadingForHistoryItem): Added. + * WebKitSupport/FrameLoaderClientWx.h: + 2011-02-17 Kevin Ollivier [wx] Build fix after move of DocumentWriter to DocumentLoader. diff --git a/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp index 0feeb2c96aa43ac0bdbd6b84ce21039ce9b84152..bab9d6554c868d36213941f04646e30d1ed0ada4 100644 --- a/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp +++ b/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp @@ -577,6 +577,11 @@ bool FrameLoaderClientWx::shouldGoToHistoryItem(WebCore::HistoryItem*) const return true; } +bool FrameLoaderClientWx::shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const +{ + return true; +} + void FrameLoaderClientWx::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const { } diff --git a/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h index e26cbe2530a1c6817da0b3137d581436d31d6885..a36ab6393523fef885ee65e25938e5282b584e1c 100644 --- a/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h +++ b/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h @@ -160,6 +160,7 @@ namespace WebCore { virtual void updateGlobalHistory(); virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index c9160bfc533e842475908ef9ecb1b58c1ca67066..285fc32f9e7a098200175da5063ce39fcdf68329 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,18 @@ +2011-02-19 Charlie Reis + + Reviewed by Mihai Parparita. + + Ensure loading has stopped in HistoryController::goToItem + https://bugs.webkit.org/show_bug.cgi?id=54517 + + Add a FrameLoaderClient callback for whether to stop loading before goToItem. + + Test: http/tests/navigation/forward-to-fragment-fires-onload.html + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added. + * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: + 2011-02-18 Sam Weinig Reviewed by Adele Peterson. diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp index 470faef7052b7d32287850f827e22e6e92e5f55c..a592f0d20eaddaab6a3a38ed0ea39a09a80ccadf 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp @@ -866,6 +866,11 @@ bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem* item) const return shouldGoToBackForwardListItem; } +bool WebFrameLoaderClient::shouldStopLoadingForHistoryItem(HistoryItem* item) const +{ + return true; +} + void WebFrameLoaderClient::dispatchDidAddBackForwardItem(HistoryItem*) const { notImplemented(); diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h index 121ae0af2066b79be42d65f9265925333e8d13af..37b35d5222e51add9547a7baeb31a2dcf60ae5ab 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h @@ -132,6 +132,7 @@ private: virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const;