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

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 SimTest. Created 3 years, 9 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 = ScrollBehaviorInstant) override; 59 ScrollBehavior = ScrollBehaviorInstant) override;
60 LayoutRect scrollIntoView(const LayoutRect& rectInContent, 60 LayoutRect scrollIntoView(const LayoutRect& rectInContent,
61 const ScrollAlignment& alignX, 61 const ScrollAlignment& alignX,
62 const ScrollAlignment& alignY, 62 const ScrollAlignment& alignY,
63 ScrollType = ProgrammaticScroll) override; 63 ScrollType = ProgrammaticScroll,
64 bool isSmooth = false) override;
64 IntRect visibleContentRect( 65 IntRect visibleContentRect(
65 IncludeScrollbarsInRect = ExcludeScrollbars) const override; 66 IncludeScrollbarsInRect = ExcludeScrollbars) 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;
(...skipping 11 matching lines...) Expand all
85 GraphicsLayer* layerForHorizontalScrollbar() const override; 86 GraphicsLayer* layerForHorizontalScrollbar() const override;
86 GraphicsLayer* layerForVerticalScrollbar() const override; 87 GraphicsLayer* layerForVerticalScrollbar() const override;
87 GraphicsLayer* layerForScrollCorner() const override; 88 GraphicsLayer* layerForScrollCorner() const override;
88 int horizontalScrollbarHeight( 89 int horizontalScrollbarHeight(
89 OverlayScrollbarClipBehavior = IgnoreOverlayScrollbarSize) const override; 90 OverlayScrollbarClipBehavior = IgnoreOverlayScrollbarSize) const override;
90 int verticalScrollbarWidth( 91 int verticalScrollbarWidth(
91 OverlayScrollbarClipBehavior = IgnoreOverlayScrollbarSize) const override; 92 OverlayScrollbarClipBehavior = IgnoreOverlayScrollbarSize) const override;
92 ScrollResult userScroll(ScrollGranularity, const FloatSize&) override; 93 ScrollResult userScroll(ScrollGranularity, const FloatSize&) override;
93 bool scrollAnimatorEnabled() const override; 94 bool scrollAnimatorEnabled() const override;
94 HostWindow* getHostWindow() const override; 95 HostWindow* getHostWindow() const override;
96 ProgrammaticScrollCoordinator* getProgrammaticScrollCoordinator()
97 const override;
95 void serviceScrollAnimations(double) override; 98 void serviceScrollAnimations(double) override;
96 void updateCompositorScrollAnimations() override; 99 void updateCompositorScrollAnimations() override;
97 void cancelProgrammaticScrollAnimation() override; 100 void cancelProgrammaticScrollAnimation() override;
98 ScrollBehavior scrollBehaviorStyle() const override; 101 ScrollBehavior scrollBehaviorStyle() const override;
99 Widget* getWidget() override; 102 Widget* getWidget() override;
100 void clearScrollableArea() override; 103 void clearScrollableArea() override;
101 LayoutBox* layoutBox() const override; 104 LayoutBox* layoutBox() const override;
102 FloatQuad localToVisibleContentQuad(const FloatQuad&, 105 FloatQuad localToVisibleContentQuad(const FloatQuad&,
103 const LayoutObject*, 106 const LayoutObject*,
104 unsigned = 0) const final; 107 unsigned = 0) const final;
(...skipping 28 matching lines...) Expand all
133 136
134 DEFINE_TYPE_CASTS(RootFrameViewport, 137 DEFINE_TYPE_CASTS(RootFrameViewport,
135 ScrollableArea, 138 ScrollableArea,
136 scrollableArea, 139 scrollableArea,
137 scrollableArea->isRootFrameViewport(), 140 scrollableArea->isRootFrameViewport(),
138 scrollableArea.isRootFrameViewport()); 141 scrollableArea.isRootFrameViewport());
139 142
140 } // namespace blink 143 } // namespace blink
141 144
142 #endif // RootFrameViewport_h 145 #endif // RootFrameViewport_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698