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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.h

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Added SimTest. Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/scroll/ScrollableArea.h
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
index 266e8048a3ea6b78a75b4b005e13d20120d74627..68d2579671eddf3506b4d3a63faa03e20cd71462 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
@@ -50,6 +50,7 @@ class LayoutBox;
class LayoutObject;
class PaintLayer;
class ProgrammaticScrollAnimator;
+class ProgrammaticScrollCoordinator;
struct ScrollAlignment;
class ScrollAnchor;
class ScrollAnimatorBase;
@@ -80,6 +81,11 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin,
// coordinate space.
virtual HostWindow* getHostWindow() const { return 0; }
+ virtual ProgrammaticScrollCoordinator* getProgrammaticScrollCoordinator()
bokan 2017/03/28 16:29:53 I don't think this should be part of this class' i
sunyunjia 2017/03/31 15:42:45 When each scrollableArea finishes its scroll, Prog
bokan 2017/03/31 20:30:46 Ah, yes...ScrollableArea is in platform. It's a bi
+ const {
+ return 0;
+ }
+
virtual ScrollResult userScroll(ScrollGranularity, const ScrollOffset&);
virtual void setScrollOffset(const ScrollOffset&,
@@ -102,7 +108,8 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin,
virtual LayoutRect scrollIntoView(const LayoutRect& rectInContent,
const ScrollAlignment& alignX,
const ScrollAlignment& alignY,
- ScrollType = ProgrammaticScroll);
+ ScrollType = ProgrammaticScroll,
+ bool isSmooth = false);
static bool scrollBehaviorFromString(const String&, ScrollBehavior&);

Powered by Google App Engine
This is Rietveld 408576698