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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Sequenced-smooth-scrolls only happen on main thread for now. Created 3 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
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 e3cd362d3aade216dffba643c8edd71448b780fa..0f626eef3074b24572311f13d7ae3f0f849b7cd0 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
@@ -53,6 +53,7 @@ class ProgrammaticScrollAnimator;
struct ScrollAlignment;
class ScrollAnchor;
class ScrollAnimatorBase;
+class SmoothScrollSequencer;
class CompositorAnimationTimeline;
enum IncludeScrollbarsInRect {
@@ -77,6 +78,10 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin,
virtual PlatformChromeClient* GetChromeClient() const { return 0; }
+ virtual SmoothScrollSequencer* GetSmoothScrollSequencer() const {
+ return nullptr;
+ }
+
virtual ScrollResult UserScroll(ScrollGranularity, const ScrollOffset&);
virtual void SetScrollOffset(const ScrollOffset&,
@@ -99,6 +104,7 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin,
virtual LayoutRect ScrollIntoView(const LayoutRect& rect_in_content,
const ScrollAlignment& align_x,
const ScrollAlignment& align_y,
+ bool is_smooth,
ScrollType = kProgrammaticScroll);
static bool ScrollBehaviorFromString(const String&, ScrollBehavior&);
@@ -412,7 +418,7 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin,
virtual void ScrollbarVisibilityChanged() {}
private:
- void ProgrammaticScrollHelper(const ScrollOffset&, ScrollBehavior);
+ void ProgrammaticScrollHelper(const ScrollOffset&, ScrollBehavior, bool);
void UserScrollHelper(const ScrollOffset&, ScrollBehavior);
void FadeOverlayScrollbarsTimerFired(TimerBase*);

Powered by Google App Engine
This is Rietveld 408576698