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

Unified Diff: third_party/WebKit/Source/web/WebHistoryItem.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md Created 4 years, 2 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: third_party/WebKit/Source/web/WebHistoryItem.cpp
diff --git a/third_party/WebKit/Source/web/WebHistoryItem.cpp b/third_party/WebKit/Source/web/WebHistoryItem.cpp
index 0a4c4024f7f84492d6e5bfdd51cd37d57b6a2d4c..5286ac4785d7b942ca73f5490c6099bc675ec51a 100644
--- a/third_party/WebKit/Source/web/WebHistoryItem.cpp
+++ b/third_party/WebKit/Source/web/WebHistoryItem.cpp
@@ -87,20 +87,22 @@ void WebHistoryItem::setTarget(const WebString& target) {
}
WebFloatPoint WebHistoryItem::visualViewportScrollOffset() const {
- return m_private->visualViewportScrollPoint();
+ ScrollOffset offset = m_private->visualViewportScrollOffset();
+ return WebFloatPoint(offset.width(), offset.height());
}
void WebHistoryItem::setVisualViewportScrollOffset(
const WebFloatPoint& scrollOffset) {
- m_private->setVisualViewportScrollPoint(scrollOffset);
+ m_private->setVisualViewportScrollOffset(toScrollOffset(scrollOffset));
}
WebPoint WebHistoryItem::scrollOffset() const {
- return m_private->scrollPoint();
+ ScrollOffset offset = m_private->scrollOffset();
+ return WebPoint(offset.width(), offset.height());
}
void WebHistoryItem::setScrollOffset(const WebPoint& scrollOffset) {
- m_private->setScrollPoint(scrollOffset);
+ m_private->setScrollOffset(ScrollOffset(scrollOffset.x, scrollOffset.y));
}
float WebHistoryItem::pageScaleFactor() const {
« no previous file with comments | « third_party/WebKit/Source/web/RotationViewportAnchor.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698