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

Unified Diff: content/renderer/history_serialization.cc

Issue 266673014: Added pinch viewport offset to page state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 6 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 | « content/public/common/page_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/history_serialization.cc
diff --git a/content/renderer/history_serialization.cc b/content/renderer/history_serialization.cc
index dd78609bc42065d0476184a1d5feddef91ef759a..56325a681e032d6b8691e07c1ef1839fffc995f4 100644
--- a/content/renderer/history_serialization.cc
+++ b/content/renderer/history_serialization.cc
@@ -7,6 +7,7 @@
#include "content/common/page_state_serialization.h"
#include "content/public/common/page_state.h"
#include "content/renderer/history_entry.h"
+#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebHTTPBody.h"
#include "third_party/WebKit/public/platform/WebPoint.h"
#include "third_party/WebKit/public/platform/WebString.h"
@@ -88,6 +89,7 @@ void GenerateFrameStateFromItem(const WebHistoryItem& item,
state->target = item.target();
if (!item.stateObject().isNull())
state->state_object = item.stateObject().toString();
+ state->pinch_viewport_scroll_offset = item.pinchViewportScrollOffset();
state->scroll_offset = item.scrollOffset();
state->item_sequence_number = item.itemSequenceNumber();
state->document_sequence_number =
@@ -131,6 +133,7 @@ void RecursivelyGenerateHistoryItem(const ExplodedFrameState& state,
WebSerializedScriptValue::fromString(state.state_object));
}
item.setDocumentState(state.document_state);
+ item.setPinchViewportScrollOffset(state.pinch_viewport_scroll_offset);
item.setScrollOffset(state.scroll_offset);
item.setPageScaleFactor(state.page_scale_factor);
« no previous file with comments | « content/public/common/page_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698