| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 namespace blink { | 53 namespace blink { |
| 54 | 54 |
| 55 enum ResizerHitTestType { | 55 enum ResizerHitTestType { |
| 56 ResizerForPointer, | 56 ResizerForPointer, |
| 57 ResizerForTouch | 57 ResizerForTouch |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class PlatformEvent; | 60 class PlatformEvent; |
| 61 class RenderBox; | 61 class RenderBox; |
| 62 class Layer; | 62 class Layer; |
| 63 class RenderScrollbarPart; | 63 class LayoutScrollbarPart; |
| 64 | 64 |
| 65 class LayerScrollableArea final : public ScrollableArea { | 65 class LayerScrollableArea final : public ScrollableArea { |
| 66 friend class Internals; | 66 friend class Internals; |
| 67 | 67 |
| 68 public: | 68 public: |
| 69 // FIXME: We should pass in the RenderBox but this opens a window | 69 // FIXME: We should pass in the RenderBox but this opens a window |
| 70 // for crashers during Layer setup (see crbug.com/368062). | 70 // for crashers during Layer setup (see crbug.com/368062). |
| 71 LayerScrollableArea(Layer&); | 71 LayerScrollableArea(Layer&); |
| 72 virtual ~LayerScrollableArea(); | 72 virtual ~LayerScrollableArea(); |
| 73 | 73 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 void updateAfterLayout(); | 145 void updateAfterLayout(); |
| 146 void updateAfterStyleChange(const LayoutStyle*); | 146 void updateAfterStyleChange(const LayoutStyle*); |
| 147 void updateAfterOverflowRecalc(); | 147 void updateAfterOverflowRecalc(); |
| 148 | 148 |
| 149 virtual bool updateAfterCompositingChange() override; | 149 virtual bool updateAfterCompositingChange() override; |
| 150 | 150 |
| 151 bool hasScrollbar() const { return m_hBar || m_vBar; } | 151 bool hasScrollbar() const { return m_hBar || m_vBar; } |
| 152 | 152 |
| 153 RenderScrollbarPart* scrollCorner() const { return m_scrollCorner; } | 153 LayoutScrollbarPart* scrollCorner() const { return m_scrollCorner; } |
| 154 | 154 |
| 155 void resize(const PlatformEvent&, const LayoutSize&); | 155 void resize(const PlatformEvent&, const LayoutSize&); |
| 156 IntSize offsetFromResizeCorner(const IntPoint& absolutePoint) const; | 156 IntSize offsetFromResizeCorner(const IntPoint& absolutePoint) const; |
| 157 | 157 |
| 158 bool inResizeMode() const { return m_inResizeMode; } | 158 bool inResizeMode() const { return m_inResizeMode; } |
| 159 void setInResizeMode(bool inResizeMode) { m_inResizeMode = inResizeMode; } | 159 void setInResizeMode(bool inResizeMode) { m_inResizeMode = inResizeMode; } |
| 160 | 160 |
| 161 IntRect touchResizerCornerRect(const IntRect& bounds) const | 161 IntRect touchResizerCornerRect(const IntRect& bounds) const |
| 162 { | 162 { |
| 163 return resizerCornerRect(bounds, ResizerForTouch); | 163 return resizerCornerRect(bounds, ResizerForTouch); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // These are used during compositing updates to determine if the overflow | 203 // These are used during compositing updates to determine if the overflow |
| 204 // controls need to be repositioned in the GraphicsLayer tree. | 204 // controls need to be repositioned in the GraphicsLayer tree. |
| 205 void setTopmostScrollChild(Layer*); | 205 void setTopmostScrollChild(Layer*); |
| 206 Layer* topmostScrollChild() const { ASSERT(!m_nextTopmostScrollChild); retur
n m_topmostScrollChild; } | 206 Layer* topmostScrollChild() const { ASSERT(!m_nextTopmostScrollChild); retur
n m_topmostScrollChild; } |
| 207 | 207 |
| 208 IntRect resizerCornerRect(const IntRect&, ResizerHitTestType) const; | 208 IntRect resizerCornerRect(const IntRect&, ResizerHitTestType) const; |
| 209 | 209 |
| 210 RenderBox& box() const; | 210 RenderBox& box() const; |
| 211 Layer* layer() const; | 211 Layer* layer() const; |
| 212 | 212 |
| 213 RenderScrollbarPart* resizer() { return m_resizer; } | 213 LayoutScrollbarPart* resizer() { return m_resizer; } |
| 214 | 214 |
| 215 const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrol
lbarOffset; } | 215 const IntPoint& cachedOverlayScrollbarOffset() { return m_cachedOverlayScrol
lbarOffset; } |
| 216 void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverl
ayScrollbarOffset = offset; } | 216 void setCachedOverlayScrollbarOffset(const IntPoint& offset) { m_cachedOverl
ayScrollbarOffset = offset; } |
| 217 | 217 |
| 218 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; | 218 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; |
| 219 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; | 219 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; |
| 220 | 220 |
| 221 private: | 221 private: |
| 222 bool hasHorizontalOverflow() const; | 222 bool hasHorizontalOverflow() const; |
| 223 bool hasVerticalOverflow() const; | 223 bool hasVerticalOverflow() const; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 // This is the (scroll) offset from scrollOrigin(). | 272 // This is the (scroll) offset from scrollOrigin(). |
| 273 DoubleSize m_scrollOffset; | 273 DoubleSize m_scrollOffset; |
| 274 | 274 |
| 275 IntPoint m_cachedOverlayScrollbarOffset; | 275 IntPoint m_cachedOverlayScrollbarOffset; |
| 276 | 276 |
| 277 // For areas with overflow, we have a pair of scrollbars. | 277 // For areas with overflow, we have a pair of scrollbars. |
| 278 RefPtrWillBePersistent<Scrollbar> m_hBar; | 278 RefPtrWillBePersistent<Scrollbar> m_hBar; |
| 279 RefPtrWillBePersistent<Scrollbar> m_vBar; | 279 RefPtrWillBePersistent<Scrollbar> m_vBar; |
| 280 | 280 |
| 281 // Renderers to hold our custom scroll corner. | 281 // Renderers to hold our custom scroll corner. |
| 282 RenderScrollbarPart* m_scrollCorner; | 282 LayoutScrollbarPart* m_scrollCorner; |
| 283 | 283 |
| 284 // Renderers to hold our custom resizer. | 284 // Renderers to hold our custom resizer. |
| 285 RenderScrollbarPart* m_resizer; | 285 LayoutScrollbarPart* m_resizer; |
| 286 }; | 286 }; |
| 287 | 287 |
| 288 } // namespace blink | 288 } // namespace blink |
| 289 | 289 |
| 290 #endif // LayerScrollableArea_h | 290 #endif // LayerScrollableArea_h |
| OLD | NEW |