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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 void invalidatePaintOfScrollControlsIfNeeded(const PaintInvalidationState&); | 30 void invalidatePaintOfScrollControlsIfNeeded(const PaintInvalidationState&); |
31 | 31 |
32 // Should be called when the previous paint invalidation rects are no longer
valid. | 32 // Should be called when the previous paint invalidation rects are no longer
valid. |
33 void clearPreviousPaintInvalidationRects(); | 33 void clearPreviousPaintInvalidationRects(); |
34 | 34 |
35 virtual IntRect scrollCornerAndResizerRect() const { return scrollCornerRect
(); } | 35 virtual IntRect scrollCornerAndResizerRect() const { return scrollCornerRect
(); } |
36 | 36 |
37 LayoutRect visualRectForScrollbarParts() const override; | 37 LayoutRect visualRectForScrollbarParts() const override; |
38 | 38 |
39 bool shouldPerformScrollAnchoring() const override; | |
40 | |
41 private: | 39 private: |
42 virtual LayoutScrollbarPart* scrollCorner() const = 0; | 40 virtual LayoutScrollbarPart* scrollCorner() const = 0; |
43 virtual LayoutScrollbarPart* resizer() const = 0; | 41 virtual LayoutScrollbarPart* resizer() const = 0; |
44 | 42 |
45 void scrollControlWasSetNeedsPaintInvalidation() override; | 43 void scrollControlWasSetNeedsPaintInvalidation() override; |
46 | 44 |
47 bool m_horizontalScrollbarPreviouslyWasOverlay; | 45 bool m_horizontalScrollbarPreviouslyWasOverlay; |
48 bool m_verticalScrollbarPreviouslyWasOverlay; | 46 bool m_verticalScrollbarPreviouslyWasOverlay; |
49 LayoutRect m_horizontalScrollbarPreviousPaintInvalidationRect; | 47 LayoutRect m_horizontalScrollbarPreviousPaintInvalidationRect; |
50 LayoutRect m_verticalScrollbarPreviousPaintInvalidationRect; | 48 LayoutRect m_verticalScrollbarPreviousPaintInvalidationRect; |
51 LayoutRect m_scrollCornerAndResizerPreviousPaintInvalidationRect; | 49 LayoutRect m_scrollCornerAndResizerPreviousPaintInvalidationRect; |
52 }; | 50 }; |
53 | 51 |
54 } // namespace blink | 52 } // namespace blink |
55 | 53 |
56 #endif // PaintInvalidationCapableScrollableArea_h | 54 #endif // PaintInvalidationCapableScrollableArea_h |
OLD | NEW |