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

Side by Side Diff: third_party/WebKit/Source/core/loader/HistoryItem.h

Issue 2628683003: Add DidSaveScrollOrScaleState flag to prevent restoreScrollPositionAndViewState restore from default (Closed)
Patch Set: add test Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 long long documentSequenceNumber() const { return m_documentSequenceNumber; } 93 long long documentSequenceNumber() const { return m_documentSequenceNumber; }
94 94
95 void setScrollRestorationType(HistoryScrollRestorationType type) { 95 void setScrollRestorationType(HistoryScrollRestorationType type) {
96 m_scrollRestorationType = type; 96 m_scrollRestorationType = type;
97 } 97 }
98 HistoryScrollRestorationType scrollRestorationType() { 98 HistoryScrollRestorationType scrollRestorationType() {
99 return m_scrollRestorationType; 99 return m_scrollRestorationType;
100 } 100 }
101 101
102 void setDidSaveScrollState(bool hasSaveScrollState) {
103 m_didSaveScrollState = hasSaveScrollState;
104 }
105
106 bool didSaveScrollState() const { return m_didSaveScrollState; }
107
102 void setFormInfoFromRequest(const ResourceRequest&); 108 void setFormInfoFromRequest(const ResourceRequest&);
103 void setFormData(PassRefPtr<EncodedFormData>); 109 void setFormData(PassRefPtr<EncodedFormData>);
104 void setFormContentType(const AtomicString&); 110 void setFormContentType(const AtomicString&);
105 111
106 bool isCurrentDocument(Document*) const; 112 bool isCurrentDocument(Document*) const;
107 113
108 DECLARE_TRACE(); 114 DECLARE_TRACE();
109 115
110 private: 116 private:
111 HistoryItem(); 117 HistoryItem();
(...skipping 23 matching lines...) Expand all
135 // position should be restored when it is loaded during history traversal. 141 // position should be restored when it is loaded during history traversal.
136 HistoryScrollRestorationType m_scrollRestorationType; 142 HistoryScrollRestorationType m_scrollRestorationType;
137 143
138 // Support for HTML5 History 144 // Support for HTML5 History
139 RefPtr<SerializedScriptValue> m_stateObject; 145 RefPtr<SerializedScriptValue> m_stateObject;
140 146
141 // info used to repost form data 147 // info used to repost form data
142 RefPtr<EncodedFormData> m_formData; 148 RefPtr<EncodedFormData> m_formData;
143 AtomicString m_formContentType; 149 AtomicString m_formContentType;
144 150
151 bool m_didSaveScrollState;
majidvp 2017/02/14 20:42:17 nit: maybe move this next to scroll state related
152
145 }; // class HistoryItem 153 }; // class HistoryItem
146 154
147 } // namespace blink 155 } // namespace blink
148 156
149 #endif // HISTORYITEM_H 157 #endif // HISTORYITEM_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698