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

Side by Side Diff: Source/core/layout/LayerScrollableArea.h

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayerReflectionInfo.cpp ('k') | Source/core/layout/LayerScrollableArea.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26 matching lines...) Expand all
37 * version of this file under the LGPL, indicate your decision by 37 * version of this file under the LGPL, indicate your decision by
38 * deletingthe provisions above and replace them with the notice and 38 * deletingthe provisions above and replace them with the notice and
39 * other provisions required by the MPL or the GPL, as the case may be. 39 * other provisions required by the MPL or the GPL, as the case may be.
40 * If you do not delete the provisions above, a recipient may use your 40 * If you do not delete the provisions above, a recipient may use your
41 * version of this file under any of the LGPL, the MPL or the GPL. 41 * version of this file under any of the LGPL, the MPL or the GPL.
42 */ 42 */
43 43
44 #ifndef LayerScrollableArea_h 44 #ifndef LayerScrollableArea_h
45 #define LayerScrollableArea_h 45 #define LayerScrollableArea_h
46 46
47
48 #include "core/layout/LayerFragment.h" 47 #include "core/layout/LayerFragment.h"
49 #include "core/rendering/RenderBox.h" 48 #include "core/layout/LayoutBox.h"
50
51 #include "platform/scroll/ScrollableArea.h" 49 #include "platform/scroll/ScrollableArea.h"
52 50
53 namespace blink { 51 namespace blink {
54 52
55 enum ResizerHitTestType { 53 enum ResizerHitTestType {
56 ResizerForPointer, 54 ResizerForPointer,
57 ResizerForTouch 55 ResizerForTouch
58 }; 56 };
59 57
60 class PlatformEvent; 58 class PlatformEvent;
61 class RenderBox; 59 class LayoutBox;
62 class Layer; 60 class Layer;
63 class LayoutScrollbarPart; 61 class LayoutScrollbarPart;
64 62
65 class LayerScrollableArea final : public ScrollableArea { 63 class LayerScrollableArea final : public ScrollableArea {
66 friend class Internals; 64 friend class Internals;
67 65
68 public: 66 public:
69 // FIXME: We should pass in the RenderBox but this opens a window 67 // FIXME: We should pass in the LayoutBox but this opens a window
70 // for crashers during Layer setup (see crbug.com/368062). 68 // for crashers during Layer setup (see crbug.com/368062).
71 LayerScrollableArea(Layer&); 69 LayerScrollableArea(Layer&);
72 virtual ~LayerScrollableArea(); 70 virtual ~LayerScrollableArea();
73 71
74 bool hasHorizontalScrollbar() const { return horizontalScrollbar(); } 72 bool hasHorizontalScrollbar() const { return horizontalScrollbar(); }
75 bool hasVerticalScrollbar() const { return verticalScrollbar(); } 73 bool hasVerticalScrollbar() const { return verticalScrollbar(); }
76 74
77 virtual Scrollbar* horizontalScrollbar() const override { return m_hBar.get( ); } 75 virtual Scrollbar* horizontalScrollbar() const override { return m_hBar.get( ); }
78 virtual Scrollbar* verticalScrollbar() const override { return m_vBar.get(); } 76 virtual Scrollbar* verticalScrollbar() const override { return m_vBar.get(); }
79 77
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void updateNeedsCompositedScrolling(LCDTextMode = ConsiderLCDText); 198 void updateNeedsCompositedScrolling(LCDTextMode = ConsiderLCDText);
201 bool needsCompositedScrolling() const { return m_needsCompositedScrolling; } 199 bool needsCompositedScrolling() const { return m_needsCompositedScrolling; }
202 200
203 // These are used during compositing updates to determine if the overflow 201 // These are used during compositing updates to determine if the overflow
204 // controls need to be repositioned in the GraphicsLayer tree. 202 // controls need to be repositioned in the GraphicsLayer tree.
205 void setTopmostScrollChild(Layer*); 203 void setTopmostScrollChild(Layer*);
206 Layer* topmostScrollChild() const { ASSERT(!m_nextTopmostScrollChild); retur n m_topmostScrollChild; } 204 Layer* topmostScrollChild() const { ASSERT(!m_nextTopmostScrollChild); retur n m_topmostScrollChild; }
207 205
208 IntRect resizerCornerRect(const IntRect&, ResizerHitTestType) const; 206 IntRect resizerCornerRect(const IntRect&, ResizerHitTestType) const;
209 207
210 RenderBox& box() const; 208 LayoutBox& box() const;
211 Layer* layer() const; 209 Layer* layer() const;
212 210
213 LayoutScrollbarPart* resizer() { return m_resizer; } 211 LayoutScrollbarPart* resizer() { return m_resizer; }
214 212
215 const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrol lbarOffset; } 213 const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrol lbarOffset; }
216 void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverl ayScrollbarOffset = offset; } 214 void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverl ayScrollbarOffset = offset; }
217 215
218 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; 216 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const;
219 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; 217 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const;
220 218
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // Renderers to hold our custom scroll corner. 279 // Renderers to hold our custom scroll corner.
282 LayoutScrollbarPart* m_scrollCorner; 280 LayoutScrollbarPart* m_scrollCorner;
283 281
284 // Renderers to hold our custom resizer. 282 // Renderers to hold our custom resizer.
285 LayoutScrollbarPart* m_resizer; 283 LayoutScrollbarPart* m_resizer;
286 }; 284 };
287 285
288 } // namespace blink 286 } // namespace blink
289 287
290 #endif // LayerScrollableArea_h 288 #endif // LayerScrollableArea_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayerReflectionInfo.cpp ('k') | Source/core/layout/LayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698