| OLD | NEW |
| 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 PaintInvalidationCapableScrollableArea_h | 5 #ifndef PaintInvalidationCapableScrollableArea_h |
| 6 #define PaintInvalidationCapableScrollableArea_h | 6 #define PaintInvalidationCapableScrollableArea_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/geometry/LayoutRect.h" | 9 #include "platform/geometry/LayoutRect.h" |
| 10 #include "platform/scroll/ScrollableArea.h" | 10 #include "platform/scroll/ScrollableArea.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 void InvalidatePaintOfScrollControlsIfNeeded(const PaintInvalidatorContext&); | 32 void InvalidatePaintOfScrollControlsIfNeeded(const PaintInvalidatorContext&); |
| 33 | 33 |
| 34 // Should be called when the previous visual rects are no longer valid. | 34 // Should be called when the previous visual rects are no longer valid. |
| 35 void ClearPreviousVisualRects(); | 35 void ClearPreviousVisualRects(); |
| 36 | 36 |
| 37 virtual IntRect ScrollCornerAndResizerRect() const { | 37 virtual IntRect ScrollCornerAndResizerRect() const { |
| 38 return ScrollCornerRect(); | 38 return ScrollCornerRect(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void DidScrollWithScrollbar(ScrollbarPart, ScrollbarOrientation) override; | 41 void DidScrollWithScrollbar(ScrollbarPart, ScrollbarOrientation) override; |
| 42 bool ShouldUseCustomScrollbars(LayoutObject*&) const override; |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 virtual LayoutScrollbarPart* ScrollCorner() const = 0; | 45 virtual LayoutScrollbarPart* ScrollCorner() const = 0; |
| 45 virtual LayoutScrollbarPart* Resizer() const = 0; | 46 virtual LayoutScrollbarPart* Resizer() const = 0; |
| 46 | 47 |
| 47 void ScrollControlWasSetNeedsPaintInvalidation() override; | 48 void ScrollControlWasSetNeedsPaintInvalidation() override; |
| 48 | 49 |
| 49 void SetHorizontalScrollbarVisualRect(const LayoutRect&); | 50 void SetHorizontalScrollbarVisualRect(const LayoutRect&); |
| 50 void SetVerticalScrollbarVisualRect(const LayoutRect&); | 51 void SetVerticalScrollbarVisualRect(const LayoutRect&); |
| 51 void SetScrollCornerAndResizerVisualRect(const LayoutRect&); | 52 void SetScrollCornerAndResizerVisualRect(const LayoutRect&); |
| 52 | 53 |
| 53 bool horizontal_scrollbar_previously_was_overlay_; | 54 bool horizontal_scrollbar_previously_was_overlay_; |
| 54 bool vertical_scrollbar_previously_was_overlay_; | 55 bool vertical_scrollbar_previously_was_overlay_; |
| 55 LayoutRect horizontal_scrollbar_visual_rect_; | 56 LayoutRect horizontal_scrollbar_visual_rect_; |
| 56 LayoutRect vertical_scrollbar_visual_rect_; | 57 LayoutRect vertical_scrollbar_visual_rect_; |
| 57 LayoutRect scroll_corner_and_resizer_visual_rect_; | 58 LayoutRect scroll_corner_and_resizer_visual_rect_; |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 } // namespace blink | 61 } // namespace blink |
| 61 | 62 |
| 62 #endif // PaintInvalidationCapableScrollableArea_h | 63 #endif // PaintInvalidationCapableScrollableArea_h |
| OLD | NEW |