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

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

Issue 46353003: Switch AutoscrollController to use animation system instead of timer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@gclient
Patch Set: addresses review feedback Created 7 years, 1 month 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/page/Page.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 824260a79da648b5cff28da9ad8e75a19153d487..c6c952daa282905e0192686af747a4f78118f6f2 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -38,6 +38,7 @@
#include "core/html/HTMLTextAreaElement.h"
#include "core/frame/Frame.h"
#include "core/frame/FrameView.h"
+#include "core/page/AutoscrollController.h"
#include "core/page/EventHandler.h"
#include "core/page/Page.h"
#include "core/platform/graphics/GraphicsContextStateSaver.h"
@@ -520,7 +521,7 @@ static inline bool frameElementAndViewPermitScroll(HTMLFrameElementBase* frameEl
Page* page = frameView->frame().page();
if (!page)
return false;
- return !page->autoscrollInProgress();
+ return !page->autoscrollController().autoscrollInProgress();
}
void RenderBox::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY)
@@ -577,7 +578,7 @@ void RenderBox::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignmen
}
}
- if (frame()->page()->autoscrollInProgress())
+ if (frame()->page()->autoscrollController().autoscrollInProgress())
parentBox = enclosingScrollableBox();
if (parentBox)
@@ -869,7 +870,7 @@ void RenderBox::autoscroll(const IntPoint& position)
bool RenderBox::autoscrollInProgress() const
{
- return frame() && frame()->page() && frame()->page()->autoscrollInProgress(this);
+ return frame() && frame()->page() && frame()->page()->autoscrollController().autoscrollInProgress(this);
}
// There are two kinds of renderer that can autoscroll.
@@ -990,7 +991,7 @@ void RenderBox::scrollByRecursively(const IntSize& delta, ScrollOffsetClamping c
Frame* frame = this->frame();
if (frame && frame->page())
- frame->page()->updateAutoscrollRenderer();
+ frame->page()->autoscrollController().updateAutoscrollRenderer();
}
} else if (view()->frameView()) {
// If we are here, we were called on a renderer that can be programmatically scrolled, but doesn't
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698