| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 41a571aff9a0c9bec59490b80bc32245ec66f04d..3ae6cedca335918ec21e4b3a6bce43b3fa931ad4 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -682,13 +682,13 @@ int Element::scrollTop()
|
| return 0;
|
| }
|
|
|
| -void Element::setScrollLeft(int newLeft)
|
| +void Element::setScrollLeftInternal(int newLeft, ScrollBehavior scrollBehavior)
|
| {
|
| document().updateLayoutIgnorePendingStylesheets();
|
|
|
| if (document().documentElement() != this) {
|
| if (RenderBox* rend = renderBox())
|
| - rend->setScrollLeft(roundf(newLeft * rend->style()->effectiveZoom()));
|
| + rend->setScrollLeft(roundf(newLeft * rend->style()->effectiveZoom()), scrollBehavior);
|
| return;
|
| }
|
|
|
| @@ -703,7 +703,7 @@ void Element::setScrollLeft(int newLeft)
|
| if (!view)
|
| return;
|
|
|
| - view->setScrollPosition(IntPoint(roundf(newLeft * frame->pageZoomFactor()), view->scrollY()));
|
| + view->setScrollPosition(IntPoint(roundf(newLeft * frame->pageZoomFactor()), view->scrollY()), scrollBehavior);
|
| }
|
| }
|
|
|
| @@ -724,17 +724,16 @@ void Element::setScrollLeft(const Dictionary& scrollOptionsHorizontal, Exception
|
| return;
|
| }
|
|
|
| - // FIXME: Use scrollBehavior to decide whether to scroll smoothly or instantly.
|
| - setScrollLeft(position);
|
| + setScrollLeft(position, scrollBehavior);
|
| }
|
|
|
| -void Element::setScrollTop(int newTop)
|
| +void Element::setScrollTopInternal(int newTop, ScrollBehavior scrollBehavior)
|
| {
|
| document().updateLayoutIgnorePendingStylesheets();
|
|
|
| if (document().documentElement() != this) {
|
| if (RenderBox* rend = renderBox())
|
| - rend->setScrollTop(roundf(newTop * rend->style()->effectiveZoom()));
|
| + rend->setScrollTop(roundf(newTop * rend->style()->effectiveZoom()), scrollBehavior);
|
| return;
|
| }
|
|
|
| @@ -749,7 +748,7 @@ void Element::setScrollTop(int newTop)
|
| if (!view)
|
| return;
|
|
|
| - view->setScrollPosition(IntPoint(view->scrollX(), roundf(newTop * frame->pageZoomFactor())));
|
| + view->setScrollPosition(IntPoint(view->scrollX(), roundf(newTop * frame->pageZoomFactor())), scrollBehavior);
|
| }
|
| }
|
|
|
| @@ -770,8 +769,7 @@ void Element::setScrollTop(const Dictionary& scrollOptionsVertical, ExceptionSta
|
| return;
|
| }
|
|
|
| - // FIXME: Use scrollBehavior to decide whether to scroll smoothly or instantly.
|
| - setScrollTop(position);
|
| + setScrollTop(position, scrollBehavior);
|
| }
|
|
|
| int Element::scrollWidth()
|
|
|