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

Side by Side Diff: Source/core/rendering/RenderLayerScrollableArea.h

Issue 134443003: Implement CSSOM Smooth Scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 virtual IntSize contentsSize() const OVERRIDE; 98 virtual IntSize contentsSize() const OVERRIDE;
99 virtual IntSize overhangAmount() const OVERRIDE; 99 virtual IntSize overhangAmount() const OVERRIDE;
100 virtual IntPoint lastKnownMousePosition() const OVERRIDE; 100 virtual IntPoint lastKnownMousePosition() const OVERRIDE;
101 virtual bool shouldSuspendScrollAnimations() const OVERRIDE; 101 virtual bool shouldSuspendScrollAnimations() const OVERRIDE;
102 virtual bool scrollbarsCanBeActive() const OVERRIDE; 102 virtual bool scrollbarsCanBeActive() const OVERRIDE;
103 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; 103 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
104 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE; 104 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE;
105 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; 105 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE;
106 virtual int pageStep(ScrollbarOrientation) const OVERRIDE; 106 virtual int pageStep(ScrollbarOrientation) const OVERRIDE;
107 107
108 virtual void registerForAnimation() OVERRIDE;
109 virtual void deregisterForAnimation() OVERRIDE;
110 virtual bool scheduleAnimation() OVERRIDE;
111
108 int scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x (); } 112 int scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x (); }
109 int scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin(). y(); } 113 int scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin(). y(); }
110 114
111 IntSize scrollOffset() const { return m_scrollOffset; } 115 IntSize scrollOffset() const { return m_scrollOffset; }
112 116
113 // FIXME: We shouldn't allow access to m_overflowRect outside this class. 117 // FIXME: We shouldn't allow access to m_overflowRect outside this class.
114 LayoutRect overflowRect() const { return m_overflowRect; } 118 LayoutRect overflowRect() const { return m_overflowRect; }
115 119
116 void scrollToOffset(const IntSize& scrollOffset, ScrollOffsetClamping = Scro llOffsetUnclamped); 120 void scrollToOffset(const IntSize& scrollOffset, ScrollOffsetClamping = Scro llOffsetUnclamped, ScrollBehavior = ScrollBehaviorInstant);
117 void scrollToXOffset(int x, ScrollOffsetClamping clamp = ScrollOffsetUnclamp ed) { scrollToOffset(IntSize(x, scrollYOffset()), clamp); } 121 void scrollToXOffset(int x, ScrollOffsetClamping clamp = ScrollOffsetUnclamp ed, ScrollBehavior scrollBehavior = ScrollBehaviorInstant)
118 void scrollToYOffset(int y, ScrollOffsetClamping clamp = ScrollOffsetUnclamp ed) { scrollToOffset(IntSize(scrollXOffset(), y), clamp); } 122 {
123 scrollToOffset(IntSize(x, scrollYOffset()), clamp, scrollBehavior);
124 }
125 void scrollToYOffset(int y, ScrollOffsetClamping clamp = ScrollOffsetUnclamp ed, ScrollBehavior scrollBehavior = ScrollBehaviorInstant)
126 {
127 scrollToOffset(IntSize(scrollXOffset(), y), clamp, scrollBehavior);
128 }
119 129
120 void updateAfterLayout(); 130 void updateAfterLayout();
121 void updateAfterStyleChange(const RenderStyle*); 131 void updateAfterStyleChange(const RenderStyle*);
122 void updateAfterOverflowRecalc(); 132 void updateAfterOverflowRecalc();
123 133
124 virtual bool updateAfterCompositingChange() OVERRIDE; 134 virtual bool updateAfterCompositingChange() OVERRIDE;
125 135
126 bool hasScrollbar() const { return m_hBar || m_vBar; } 136 bool hasScrollbar() const { return m_hBar || m_vBar; }
127 137
128 // FIXME: This should be removed. 138 // FIXME: This should be removed.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Renderers to hold our custom scroll corner. 256 // Renderers to hold our custom scroll corner.
247 RenderScrollbarPart* m_scrollCorner; 257 RenderScrollbarPart* m_scrollCorner;
248 258
249 // Renderers to hold our custom resizer. 259 // Renderers to hold our custom resizer.
250 RenderScrollbarPart* m_resizer; 260 RenderScrollbarPart* m_resizer;
251 }; 261 };
252 262
253 } // Namespace WebCore 263 } // Namespace WebCore
254 264
255 #endif // RenderLayerScrollableArea_h 265 #endif // RenderLayerScrollableArea_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698