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

Unified Diff: Source/core/html/HTMLBodyElement.cpp

Issue 134443003: Implement CSSOM Smooth Scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/core/html/HTMLBodyElement.h ('k') | Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLBodyElement.cpp
diff --git a/Source/core/html/HTMLBodyElement.cpp b/Source/core/html/HTMLBodyElement.cpp
index 432291ae51024ba444c26b9aa5e9c765475afcff..c6d886fb97a5463e5c79f58a3c458cbcfe5d1f07 100644
--- a/Source/core/html/HTMLBodyElement.cpp
+++ b/Source/core/html/HTMLBodyElement.cpp
@@ -239,7 +239,7 @@ int HTMLBodyElement::scrollLeft()
return view ? adjustForZoom(view->scrollX(), &document) : 0;
}
-void HTMLBodyElement::setScrollLeft(int scrollLeft)
+void HTMLBodyElement::setScrollLeftInternal(int scrollLeft, ScrollBehavior scrollBehavior)
{
Document& document = this->document();
document.updateLayoutIgnorePendingStylesheets();
@@ -250,7 +250,7 @@ void HTMLBodyElement::setScrollLeft(int scrollLeft)
return;
if (render->hasOverflowClip()) {
// FIXME: Investigate how are other browsers casting to int (rounding, ceiling, ...).
- render->setScrollLeft(static_cast<int>(scrollLeft * render->style()->effectiveZoom()));
+ render->setScrollLeft(static_cast<int>(scrollLeft * render->style()->effectiveZoom()), scrollBehavior);
return;
}
if (!document.inQuirksMode())
@@ -263,7 +263,7 @@ void HTMLBodyElement::setScrollLeft(int scrollLeft)
FrameView* view = frame->view();
if (!view)
return;
- view->setScrollPosition(IntPoint(static_cast<int>(scrollLeft * frame->pageZoomFactor()), view->scrollY()));
+ view->setScrollPosition(IntPoint(static_cast<int>(scrollLeft * frame->pageZoomFactor()), view->scrollY()), scrollBehavior);
}
int HTMLBodyElement::scrollTop()
@@ -285,7 +285,7 @@ int HTMLBodyElement::scrollTop()
return view ? adjustForZoom(view->scrollY(), &document) : 0;
}
-void HTMLBodyElement::setScrollTop(int scrollTop)
+void HTMLBodyElement::setScrollTopInternal(int scrollTop, ScrollBehavior scrollBehavior)
{
Document& document = this->document();
document.updateLayoutIgnorePendingStylesheets();
@@ -296,7 +296,7 @@ void HTMLBodyElement::setScrollTop(int scrollTop)
return;
if (render->hasOverflowClip()) {
// FIXME: Investigate how are other browsers casting to int (rounding, ceiling, ...).
- render->setScrollTop(static_cast<int>(scrollTop * render->style()->effectiveZoom()));
+ render->setScrollTop(static_cast<int>(scrollTop * render->style()->effectiveZoom()), scrollBehavior);
return;
}
if (!document.inQuirksMode())
@@ -309,7 +309,7 @@ void HTMLBodyElement::setScrollTop(int scrollTop)
FrameView* view = frame->view();
if (!view)
return;
- view->setScrollPosition(IntPoint(view->scrollX(), static_cast<int>(scrollTop * frame->pageZoomFactor())));
+ view->setScrollPosition(IntPoint(view->scrollX(), static_cast<int>(scrollTop * frame->pageZoomFactor())), scrollBehavior);
}
int HTMLBodyElement::scrollHeight()
« no previous file with comments | « Source/core/html/HTMLBodyElement.h ('k') | Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698