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

Unified Diff: Source/core/frame/DOMWindow.cpp

Issue 329303009: Cleanup [RuntimeEnabled] use in Window (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 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 | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698