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

Side by Side Diff: third_party/WebKit/Source/core/frame/RootFrameViewport.h

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Added web platform test. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef RootFrameViewport_h 5 #ifndef RootFrameViewport_h
6 #define RootFrameViewport_h 6 #define RootFrameViewport_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/scroll/ScrollableArea.h" 9 #include "platform/scroll/ScrollableArea.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void DidUpdateVisualViewport(); 53 void DidUpdateVisualViewport();
54 54
55 // ScrollableArea Implementation 55 // ScrollableArea Implementation
56 bool IsRootFrameViewport() const override { return true; } 56 bool IsRootFrameViewport() const override { return true; }
57 void SetScrollOffset(const ScrollOffset&, 57 void SetScrollOffset(const ScrollOffset&,
58 ScrollType, 58 ScrollType,
59 ScrollBehavior = kScrollBehaviorInstant) override; 59 ScrollBehavior = kScrollBehaviorInstant) override;
60 LayoutRect ScrollIntoView(const LayoutRect& rect_in_content, 60 LayoutRect ScrollIntoView(const LayoutRect& rect_in_content,
61 const ScrollAlignment& align_x, 61 const ScrollAlignment& align_x,
62 const ScrollAlignment& align_y, 62 const ScrollAlignment& align_y,
63 ScrollType = kProgrammaticScroll) override; 63 ScrollType = kProgrammaticScroll,
64 bool is_smooth = false) override;
64 IntRect VisibleContentRect( 65 IntRect VisibleContentRect(
65 IncludeScrollbarsInRect = kExcludeScrollbars) const override; 66 IncludeScrollbarsInRect = kExcludeScrollbars) const override;
66 bool ShouldUseIntegerScrollOffset() const override; 67 bool ShouldUseIntegerScrollOffset() const override;
67 bool IsActive() const override; 68 bool IsActive() const override;
68 int ScrollSize(ScrollbarOrientation) const override; 69 int ScrollSize(ScrollbarOrientation) const override;
69 bool IsScrollCornerVisible() const override; 70 bool IsScrollCornerVisible() const override;
70 IntRect ScrollCornerRect() const override; 71 IntRect ScrollCornerRect() const override;
71 void UpdateScrollOffset(const ScrollOffset&, ScrollType) override; 72 void UpdateScrollOffset(const ScrollOffset&, ScrollType) override;
72 IntSize ScrollOffsetInt() const override; 73 IntSize ScrollOffsetInt() const override;
73 ScrollOffset GetScrollOffset() const override; 74 ScrollOffset GetScrollOffset() const override;
74 IntSize MinimumScrollOffsetInt() const override; 75 IntSize MinimumScrollOffsetInt() const override;
75 IntSize MaximumScrollOffsetInt() const override; 76 IntSize MaximumScrollOffsetInt() const override;
76 ScrollOffset MaximumScrollOffset() const override; 77 ScrollOffset MaximumScrollOffset() const override;
77 IntSize ContentsSize() const override; 78 IntSize ContentsSize() const override;
78 bool ScrollbarsCanBeActive() const override; 79 bool ScrollbarsCanBeActive() const override;
79 IntRect ScrollableAreaBoundingBox() const override; 80 IntRect ScrollableAreaBoundingBox() const override;
80 bool UserInputScrollable(ScrollbarOrientation) const override; 81 bool UserInputScrollable(ScrollbarOrientation) const override;
81 bool ShouldPlaceVerticalScrollbarOnLeft() const override; 82 bool ShouldPlaceVerticalScrollbarOnLeft() const override;
83 bool ScheduleAnimation() override;
sunyunjia 2017/05/12 18:40:25 Not sure why this wasn't implemented. It was retur
bokan 2017/05/15 17:15:27 Acknowledged.
82 void ScrollControlWasSetNeedsPaintInvalidation() override; 84 void ScrollControlWasSetNeedsPaintInvalidation() override;
83 GraphicsLayer* LayerForContainer() const override; 85 GraphicsLayer* LayerForContainer() const override;
84 GraphicsLayer* LayerForScrolling() const override; 86 GraphicsLayer* LayerForScrolling() const override;
85 GraphicsLayer* LayerForHorizontalScrollbar() const override; 87 GraphicsLayer* LayerForHorizontalScrollbar() const override;
86 GraphicsLayer* LayerForVerticalScrollbar() const override; 88 GraphicsLayer* LayerForVerticalScrollbar() const override;
87 GraphicsLayer* LayerForScrollCorner() const override; 89 GraphicsLayer* LayerForScrollCorner() const override;
88 int HorizontalScrollbarHeight( 90 int HorizontalScrollbarHeight(
89 OverlayScrollbarClipBehavior = 91 OverlayScrollbarClipBehavior =
90 kIgnorePlatformOverlayScrollbarSize) const override; 92 kIgnorePlatformOverlayScrollbarSize) const override;
91 int VerticalScrollbarWidth( 93 int VerticalScrollbarWidth(
92 OverlayScrollbarClipBehavior = 94 OverlayScrollbarClipBehavior =
93 kIgnorePlatformOverlayScrollbarSize) const override; 95 kIgnorePlatformOverlayScrollbarSize) const override;
94 ScrollResult UserScroll(ScrollGranularity, const FloatSize&) override; 96 ScrollResult UserScroll(ScrollGranularity, const FloatSize&) override;
95 bool ScrollAnimatorEnabled() const override; 97 bool ScrollAnimatorEnabled() const override;
96 PlatformChromeClient* GetChromeClient() const override; 98 PlatformChromeClient* GetChromeClient() const override;
99 SmoothScrollSequencer* GetSmoothScrollSequencer() const override;
97 void ServiceScrollAnimations(double) override; 100 void ServiceScrollAnimations(double) override;
98 void UpdateCompositorScrollAnimations() override; 101 void UpdateCompositorScrollAnimations() override;
99 void CancelProgrammaticScrollAnimation() override; 102 void CancelProgrammaticScrollAnimation() override;
100 ScrollBehavior ScrollBehaviorStyle() const override; 103 ScrollBehavior ScrollBehaviorStyle() const override;
101 void ClearScrollableArea() override; 104 void ClearScrollableArea() override;
102 LayoutBox* GetLayoutBox() const override; 105 LayoutBox* GetLayoutBox() const override;
103 FloatQuad LocalToVisibleContentQuad(const FloatQuad&, 106 FloatQuad LocalToVisibleContentQuad(const FloatQuad&,
104 const LayoutObject*, 107 const LayoutObject*,
105 unsigned = 0) const final; 108 unsigned = 0) const final;
106 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final; 109 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final;
(...skipping 27 matching lines...) Expand all
134 137
135 DEFINE_TYPE_CASTS(RootFrameViewport, 138 DEFINE_TYPE_CASTS(RootFrameViewport,
136 ScrollableArea, 139 ScrollableArea,
137 scrollableArea, 140 scrollableArea,
138 scrollableArea->IsRootFrameViewport(), 141 scrollableArea->IsRootFrameViewport(),
139 scrollableArea.IsRootFrameViewport()); 142 scrollableArea.IsRootFrameViewport());
140 143
141 } // namespace blink 144 } // namespace blink
142 145
143 #endif // RootFrameViewport_h 146 #endif // RootFrameViewport_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/frame/RootFrameViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698