Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1283)

Unified Diff: Source/core/loader/HistoryItem.h

Issue 927213004: Accept options in history APIs to allow scroll restoration to be disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/FrameLoaderTypes.h ('k') | Source/core/loader/HistoryItem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/HistoryItem.h
diff --git a/Source/core/loader/HistoryItem.h b/Source/core/loader/HistoryItem.h
index 661c75ed971a836c276adbec8b4ad4abb04d36c9..0124836de665cbf7ea7c0800070147b0f66df0ba 100644
--- a/Source/core/loader/HistoryItem.h
+++ b/Source/core/loader/HistoryItem.h
@@ -29,6 +29,7 @@
#include "bindings/core/v8/SerializedScriptValue.h"
#include "core/CoreExport.h"
+#include "core/loader/FrameLoaderTypes.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/IntPoint.h"
#include "platform/heap/Handle.h"
@@ -98,6 +99,9 @@ public:
void setFrameSequenceNumber(long long number) { m_frameSequenceNumber = number; }
long long frameSequenceNumber() const { return m_frameSequenceNumber; }
+ void setScrollRestorationType(HistoryScrollRestorationType type) { m_scrollRestorationType = type; }
+ HistoryScrollRestorationType scrollRestorationType() { return m_scrollRestorationType; }
+
void setFormInfoFromRequest(const ResourceRequest&);
void setFormData(PassRefPtr<FormData>);
void setFormContentType(const AtomicString&);
@@ -136,6 +140,10 @@ private:
// one during a history navigation.
int64_t m_frameSequenceNumber;
+ // Type of the scroll restoration for the history item determines if scroll
+ // position should be restored when it is loaded during history traversal.
+ HistoryScrollRestorationType m_scrollRestorationType;
+
// Support for HTML5 History
RefPtr<SerializedScriptValue> m_stateObject;
« no previous file with comments | « Source/core/loader/FrameLoaderTypes.h ('k') | Source/core/loader/HistoryItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698