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