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

Unified Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 214953004: Enable Scroll Animation for RenderLayerScrollableArea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test expectation for Mac failure Created 6 years, 8 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/rendering/RenderLayerScrollableArea.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerScrollableArea.cpp
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp
index a93e4f9d94866456285f0f7d108eb5fc933b4b53..9fd660cb56f0e1eb08dd8ffd8fdb54e6be290bed 100644
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp
@@ -49,6 +49,7 @@
#include "core/editing/FrameSelection.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Settings.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/page/EventHandler.h"
@@ -476,6 +477,20 @@ IntPoint RenderLayerScrollableArea::lastKnownMousePosition() const
return m_box->frame() ? m_box->frame()->eventHandler().lastKnownMousePosition() : IntPoint();
}
+bool RenderLayerScrollableArea::scrollAnimatorEnabled() const
+{
+ return m_box->frame()->settings() && m_box->frame()->settings()->scrollAnimatorEnabled();
+}
+
+bool RenderLayerScrollableArea::scheduleAnimation()
+{
+ if (HostWindow* window = m_box->frameView()->hostWindow()) {
+ window->scheduleAnimation();
+ return true;
+ }
+ return false;
+}
+
bool RenderLayerScrollableArea::shouldSuspendScrollAnimations() const
{
RenderView* view = m_box->view();
« no previous file with comments | « Source/core/rendering/RenderLayerScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698