Index: Source/core/frame/DOMWindow.cpp |
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp |
index d377609738e090fded0b5d85d33e32f4973e0457..d7f2be0512bd60093e97737d733ec4577870d4c1 100644 |
--- a/Source/core/frame/DOMWindow.cpp |
+++ b/Source/core/frame/DOMWindow.cpp |
@@ -1386,12 +1386,8 @@ static bool scrollBehaviorFromScrollOptions(const Dictionary& scrollOptions, Scr |
return false; |
} |
-void DOMWindow::scrollBy(int x, int y, const Dictionary& scrollOptions, ExceptionState &exceptionState) const |
+void DOMWindow::scrollBy(int x, int y) const |
{ |
- ScrollBehavior scrollBehavior = ScrollBehaviorAuto; |
- if (RuntimeEnabledFeatures::cssomSmoothScrollEnabled() && !scrollBehaviorFromScrollOptions(scrollOptions, scrollBehavior, exceptionState)) |
- return; |
- |
if (!isCurrentlyDisplayedInFrame()) |
return; |
@@ -1406,12 +1402,16 @@ void DOMWindow::scrollBy(int x, int y, const Dictionary& scrollOptions, Exceptio |
view->scrollBy(scaledOffset); |
} |
-void DOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, ExceptionState& exceptionState) const |
+void DOMWindow::scrollBy(int x, int y, const Dictionary& scrollOptions, ExceptionState &exceptionState) const |
{ |
ScrollBehavior scrollBehavior = ScrollBehaviorAuto; |
- if (RuntimeEnabledFeatures::cssomSmoothScrollEnabled() && !scrollBehaviorFromScrollOptions(scrollOptions, scrollBehavior, exceptionState)) |
+ if (!scrollBehaviorFromScrollOptions(scrollOptions, scrollBehavior, exceptionState)) |
return; |
+ scrollBy(x, y); |
+} |
+void DOMWindow::scrollTo(int x, int y) const |
+{ |
if (!isCurrentlyDisplayedInFrame()) |
return; |
@@ -1426,6 +1426,14 @@ void DOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, Exceptio |
view->setScrollPosition(layoutPos); |
} |
+void DOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, ExceptionState& exceptionState) const |
+{ |
+ ScrollBehavior scrollBehavior = ScrollBehaviorAuto; |
+ if (!scrollBehaviorFromScrollOptions(scrollOptions, scrollBehavior, exceptionState)) |
+ return; |
+ scrollTo(x, y); |
+} |
+ |
void DOMWindow::moveBy(float x, float y) const |
{ |
if (!m_frame || !m_frame->isMainFrame()) |