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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.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/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 bb8adbd85da00516c8f6d437adb757039ec4d2e5..368efcecccede00d86f619da0aa8d8f608d2a2b2 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()
@@ -1064,7 +1064,7 @@ void Internals::setFrameViewPosition(Document* document,
bool scrollbarsSuppressedOldValue = frameView->scrollbarsSuppressed();
frameView->setScrollbarsSuppressed(false);
- frameView->setScrollOffsetFromInternals(IntPoint(x, y));
+ frameView->updateScrollOffsetFromInternals(IntSize(x, y));
frameView->setScrollbarsSuppressed(scrollbarsSuppressedOldValue);
}
@@ -2909,18 +2909,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(
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/modules/accessibility/AXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698