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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.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
« no previous file with comments | « third_party/WebKit/Source/web/WebHistoryItem.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 91cd54ae1ec8bff1696e166fe3112d5eb6211eea..4bd3bdce4c842217a659d4a8bbe73cdeedee763e 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -605,14 +605,15 @@ bool WebLocalFrameImpl::isFocused() const {
WebSize WebLocalFrameImpl::scrollOffset() const {
if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
- return toIntSize(scrollableArea->scrollPosition());
+ return scrollableArea->scrollOffsetInt();
return WebSize();
}
void WebLocalFrameImpl::setScrollOffset(const WebSize& offset) {
- if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
- scrollableArea->setScrollPosition(IntPoint(offset.width, offset.height),
- ProgrammaticScroll);
+ if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) {
+ scrollableArea->setScrollOffset(ScrollOffset(offset.width, offset.height),
+ ProgrammaticScroll);
+ }
}
WebSize WebLocalFrameImpl::contentsSize() const {
« no previous file with comments | « third_party/WebKit/Source/web/WebHistoryItem.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698