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

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

Issue 2710063002: Revert of Add DidSaveScrollOrScaleState flag to prevent restoreScrollPosition... (Closed)
Patch Set: rebase update Created 3 years, 8 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ~HistoryItem(); 52 ~HistoryItem();
53 53
54 const String& UrlString() const; 54 const String& UrlString() const;
55 KURL Url() const; 55 KURL Url() const;
56 56
57 const Referrer& GetReferrer() const; 57 const Referrer& GetReferrer() const;
58 58
59 EncodedFormData* FormData(); 59 EncodedFormData* FormData();
60 const AtomicString& FormContentType() const; 60 const AtomicString& FormContentType() const;
61 61
62 void SetDidSaveScrollOrScaleState(bool did_save_scroll_or_scale_state) {
63 did_save_scroll_or_scale_state_ = did_save_scroll_or_scale_state;
64 }
65
66 bool DidSaveScrollOrScaleState() const {
67 return did_save_scroll_or_scale_state_;
68 }
69
70 const ScrollOffset& VisualViewportScrollOffset() const; 62 const ScrollOffset& VisualViewportScrollOffset() const;
71 void SetVisualViewportScrollOffset(const ScrollOffset&); 63 void SetVisualViewportScrollOffset(const ScrollOffset&);
72 const ScrollOffset& GetScrollOffset() const; 64 const ScrollOffset& GetScrollOffset() const;
73 void SetScrollOffset(const ScrollOffset&); 65 void SetScrollOffset(const ScrollOffset&);
74 66
75 float PageScaleFactor() const; 67 float PageScaleFactor() const;
76 void SetPageScaleFactor(float); 68 void SetPageScaleFactor(float);
77 69
78 Vector<String> GetReferencedFilePaths(); 70 Vector<String> GetReferencedFilePaths();
79 const Vector<String>& GetDocumentState(); 71 const Vector<String>& GetDocumentState();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ResourceRequest GenerateResourceRequest(WebCachePolicy); 104 ResourceRequest GenerateResourceRequest(WebCachePolicy);
113 105
114 DECLARE_TRACE(); 106 DECLARE_TRACE();
115 107
116 private: 108 private:
117 HistoryItem(); 109 HistoryItem();
118 110
119 String url_string_; 111 String url_string_;
120 Referrer referrer_; 112 Referrer referrer_;
121 113
122 bool did_save_scroll_or_scale_state_;
123 ScrollOffset visual_viewport_scroll_offset_; 114 ScrollOffset visual_viewport_scroll_offset_;
124 ScrollOffset scroll_offset_; 115 ScrollOffset scroll_offset_;
125 float page_scale_factor_; 116 float page_scale_factor_;
126 Vector<String> document_state_vector_; 117 Vector<String> document_state_vector_;
127 Member<DocumentState> document_state_; 118 Member<DocumentState> document_state_;
128 119
129 // If two HistoryItems have the same item sequence number, then they are 120 // If two HistoryItems have the same item sequence number, then they are
130 // clones of one another. Traversing history from one such HistoryItem to 121 // clones of one another. Traversing history from one such HistoryItem to
131 // another is a no-op. HistoryItem clones are created for parent and 122 // another is a no-op. HistoryItem clones are created for parent and
132 // sibling frames when only a subframe navigates. 123 // sibling frames when only a subframe navigates.
(...skipping 12 matching lines...) Expand all
145 RefPtr<SerializedScriptValue> state_object_; 136 RefPtr<SerializedScriptValue> state_object_;
146 137
147 // info used to repost form data 138 // info used to repost form data
148 RefPtr<EncodedFormData> form_data_; 139 RefPtr<EncodedFormData> form_data_;
149 AtomicString form_content_type_; 140 AtomicString form_content_type_;
150 }; // class HistoryItem 141 }; // class HistoryItem
151 142
152 } // namespace blink 143 } // namespace blink
153 144
154 #endif // HISTORYITEM_H 145 #endif // HISTORYITEM_H
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/loader/HistoryItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698