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

Unified Diff: Source/core/dom/Element.cpp

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Build fix Created 5 years, 6 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 | « no previous file | Source/core/frame/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index d46c3733e5e6d7cae08c11b749ad60b93d48d4e9..f55b908a0f10051217cea48c90813516afe8afaa 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -874,7 +874,7 @@ void Element::scrollFrameBy(const ScrollToOptions& scrollToOptions)
double newScaledLeft = left * frame->pageZoomFactor() + view->scrollPositionDouble().x();
double newScaledTop = top * frame->pageZoomFactor() + view->scrollPositionDouble().y();
- view->setScrollPosition(DoublePoint(newScaledLeft, newScaledTop), scrollBehavior);
+ view->setScrollPosition(DoublePoint(newScaledLeft, newScaledTop), ProgrammaticScroll, scrollBehavior);
}
void Element::scrollFrameTo(const ScrollToOptions& scrollToOptions)
@@ -894,7 +894,7 @@ void Element::scrollFrameTo(const ScrollToOptions& scrollToOptions)
scaledLeft = ScrollableArea::normalizeNonFiniteScroll(scrollToOptions.left()) * frame->pageZoomFactor();
if (scrollToOptions.hasTop())
scaledTop = ScrollableArea::normalizeNonFiniteScroll(scrollToOptions.top()) * frame->pageZoomFactor();
- view->setScrollPosition(DoublePoint(scaledLeft, scaledTop), scrollBehavior);
+ view->setScrollPosition(DoublePoint(scaledLeft, scaledTop), ProgrammaticScroll, scrollBehavior);
}
void Element::incrementProxyCount()
« no previous file with comments | « no previous file | Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698