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

Unified Diff: content/renderer/history_serialization.cc

Issue 2628683003: Add DidSaveScrollOrScaleState flag to prevent restoreScrollPositionAndViewState restore from default (Closed)
Patch Set: add dump file 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/history_serialization.cc
diff --git a/content/renderer/history_serialization.cc b/content/renderer/history_serialization.cc
index b1fae6a778f8af0d9d4bc6a55ac10f4bbd3fd729..1ec24ddc2106085b468bf42a825b9ba2e5a0fcaf 100644
--- a/content/renderer/history_serialization.cc
+++ b/content/renderer/history_serialization.cc
@@ -54,6 +54,7 @@ void GenerateFrameStateFromItem(const WebHistoryItem& item,
state->document_sequence_number =
item.documentSequenceNumber();
state->page_scale_factor = item.pageScaleFactor();
+ state->did_save_scroll_or_scale_state = item.didSaveScrollOrScaleState();
ToNullableString16Vector(item.getDocumentState(), &state->document_state);
state->http_body.http_content_type =
@@ -102,6 +103,7 @@ void RecursivelyGenerateHistoryItem(const ExplodedFrameState& state,
item.setVisualViewportScrollOffset(state.visual_viewport_scroll_offset);
item.setScrollOffset(state.scroll_offset);
item.setPageScaleFactor(state.page_scale_factor);
+ item.setDidSaveScrollOrScaleState(state.did_save_scroll_or_scale_state);
// These values are generated at WebHistoryItem construction time, and we
// only want to override those new values with old values if the old values

Powered by Google App Engine
This is Rietveld 408576698