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

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: minor 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
Index: Source/core/loader/HistoryItem.h
diff --git a/Source/core/loader/HistoryItem.h b/Source/core/loader/HistoryItem.h
index 661c75ed971a836c276adbec8b4ad4abb04d36c9..829eae8dd7edeef33296d935cbb5a86c711c1a37 100644
--- a/Source/core/loader/HistoryItem.h
+++ b/Source/core/loader/HistoryItem.h
@@ -98,6 +98,9 @@ public:
void setFrameSequenceNumber(long long number) { m_frameSequenceNumber = number; }
long long frameSequenceNumber() const { return m_frameSequenceNumber; }
+ void setShouldRestoreScroll(bool shouldRestoreScroll) { m_shouldRestoreScroll = shouldRestoreScroll; }
+ bool shouldRestoreScroll() { return m_shouldRestoreScroll; }
+
void setFormInfoFromRequest(const ResourceRequest&);
void setFormData(PassRefPtr<FormData>);
void setFormContentType(const AtomicString&);
@@ -136,6 +139,10 @@ private:
// one during a history navigation.
int64_t m_frameSequenceNumber;
+ // True if history item should restore scroll position when it is restored
+ // during history traversal.
+ bool m_shouldRestoreScroll;
+
// Support for HTML5 History
RefPtr<SerializedScriptValue> m_stateObject;

Powered by Google App Engine
This is Rietveld 408576698