diff options
Diffstat (limited to 'Source/WebCore/loader/HistoryController.h')
-rw-r--r-- | Source/WebCore/loader/HistoryController.h | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/Source/WebCore/loader/HistoryController.h b/Source/WebCore/loader/HistoryController.h index 5d6c01cb6..3d25e289b 100644 --- a/Source/WebCore/loader/HistoryController.h +++ b/Source/WebCore/loader/HistoryController.h @@ -11,7 +11,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -27,11 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef HistoryController_h -#define HistoryController_h +#pragma once #include "FrameLoaderTypes.h" -#include "SerializedScriptValue.h" #include <wtf/Noncopyable.h> #include <wtf/RefPtr.h> #include <wtf/text/WTFString.h> @@ -41,24 +39,26 @@ namespace WebCore { class Frame; class HistoryItem; class SerializedScriptValue; -class StringWithDirection; + +struct StringWithDirection; class HistoryController { WTF_MAKE_NONCOPYABLE(HistoryController); + WTF_MAKE_FAST_ALLOCATED; public: enum HistoryUpdateType { UpdateAll, UpdateAllExceptBackForwardList }; explicit HistoryController(Frame&); ~HistoryController(); - void saveScrollPositionAndViewStateToItem(HistoryItem*); + WEBCORE_EXPORT void saveScrollPositionAndViewStateToItem(HistoryItem*); void clearScrollPositionAndViewState(); - void restoreScrollPositionAndViewState(); + WEBCORE_EXPORT void restoreScrollPositionAndViewState(); void updateBackForwardListForFragmentScroll(); void saveDocumentState(); - void saveDocumentAndScrollState(); + WEBCORE_EXPORT void saveDocumentAndScrollState(); void restoreDocumentState(); void invalidateCurrentItemCachedPage(); @@ -76,34 +76,35 @@ public: void setCurrentItem(HistoryItem*); void setCurrentItemTitle(const StringWithDirection&); bool currentItemShouldBeReplaced() const; - void replaceCurrentItem(HistoryItem*); + WEBCORE_EXPORT void replaceCurrentItem(HistoryItem*); HistoryItem* previousItem() const { return m_previousItem.get(); } + void clearPreviousItem(); HistoryItem* provisionalItem() const { return m_provisionalItem.get(); } void setProvisionalItem(HistoryItem*); - void pushState(PassRefPtr<SerializedScriptValue>, const String& title, const String& url); - void replaceState(PassRefPtr<SerializedScriptValue>, const String& title, const String& url); + void pushState(RefPtr<SerializedScriptValue>&&, const String& title, const String& url); + void replaceState(RefPtr<SerializedScriptValue>&&, const String& title, const String& url); void setDefersLoading(bool); private: friend class Page; - bool shouldStopLoadingForHistoryItem(HistoryItem*) const; - void goToItem(HistoryItem*, FrameLoadType); + bool shouldStopLoadingForHistoryItem(HistoryItem&) const; + void goToItem(HistoryItem&, FrameLoadType); - void initializeItem(HistoryItem*); - PassRefPtr<HistoryItem> createItem(); - PassRefPtr<HistoryItem> createItemTree(Frame& targetFrame, bool clipAtTarget); + void initializeItem(HistoryItem&); + Ref<HistoryItem> createItem(); + Ref<HistoryItem> createItemTree(Frame& targetFrame, bool clipAtTarget); - void recursiveSetProvisionalItem(HistoryItem*, HistoryItem*, FrameLoadType); - void recursiveGoToItem(HistoryItem*, HistoryItem*, FrameLoadType); + void recursiveSetProvisionalItem(HistoryItem&, HistoryItem*); + void recursiveGoToItem(HistoryItem&, HistoryItem*, FrameLoadType); bool isReplaceLoadTypeWithProvisionalItem(FrameLoadType); bool isReloadTypeWithProvisionalItem(FrameLoadType); void recursiveUpdateForCommit(); void recursiveUpdateForSameDocumentNavigation(); - bool itemsAreClones(HistoryItem*, HistoryItem*) const; + bool itemsAreClones(HistoryItem&, HistoryItem*) const; bool currentFramesMatchItem(HistoryItem*) const; void updateBackForwardListClippedAtTarget(bool doClip); void updateCurrentItem(); @@ -122,5 +123,3 @@ private: }; } // namespace WebCore - -#endif // HistoryController_h |