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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: 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/core/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 36893f2e574e04b271d6414c6c5ebb07a3dce7f0..42e80d3bc4098aa5bd367ed0c790a671fceaee4a 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -235,7 +235,7 @@ void Internals::resetToConsistentState(Page* page) {
page->deprecatedLocalMainFrame()
->view()
->layoutViewportScrollableArea()
- ->setScrollPosition(IntPoint(0, 0), ProgrammaticScroll);
+ ->setScrollOffset(ScrollOffset(), ProgrammaticScroll);
overrideUserPreferredLanguages(Vector<AtomicString>());
if (!page->deprecatedLocalMainFrame()
->spellChecker()
@@ -1051,7 +1051,7 @@ void Internals::setFrameViewPosition(Document* document,
bool scrollbarsSuppressedOldValue = frameView->scrollbarsSuppressed();
frameView->setScrollbarsSuppressed(false);
- frameView->updateScrollPositionFromInternals(IntPoint(x, y));
+ frameView->updateScrollOffsetFromInternals(IntSize(x, y));
frameView->setScrollbarsSuppressed(scrollbarsSuppressedOldValue);
}
@@ -2893,18 +2893,18 @@ int Internals::visualViewportWidth() {
.width();
}
-double Internals::visualViewportScrollX() {
+float Internals::visualViewportScrollX() {
if (!frame())
return 0;
- return frame()->view()->getScrollableArea()->scrollPositionDouble().x();
+ return frame()->view()->getScrollableArea()->scrollOffset().width();
}
-double Internals::visualViewportScrollY() {
+float Internals::visualViewportScrollY() {
if (!frame())
return 0;
- return frame()->view()->getScrollableArea()->scrollPositionDouble().y();
+ return frame()->view()->getScrollableArea()->scrollOffset().height();
}
ValueIterable<int>::IterationSource* Internals::startIteration(

Powered by Google App Engine
This is Rietveld 408576698