| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "core/paint/BlockPaintInvalidator.h" | 5 #include "core/paint/BlockPaintInvalidator.h" |
| 6 | 6 |
| 7 #include "core/editing/DragCaret.h" | 7 #include "core/editing/DragCaret.h" |
| 8 #include "core/editing/FrameSelection.h" | 8 #include "core/editing/FrameSelection.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/layout/LayoutBlock.h" | 10 #include "core/layout/LayoutBlock.h" |
| 11 #include "core/page/Page.h" | 11 #include "core/page/Page.h" |
| 12 #include "core/paint/BoxPaintInvalidator.h" | 12 #include "core/paint/BoxPaintInvalidator.h" |
| 13 #include "core/paint/ObjectPaintInvalidator.h" | 13 #include "core/paint/ObjectPaintInvalidator.h" |
| 14 #include "core/paint/PaintInvalidator.h" | 14 #include "core/paint/PaintInvalidator.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 void BlockPaintInvalidator::clearPreviousVisualRects() { | 18 void BlockPaintInvalidator::clearPreviousVisualRects() { |
| 19 m_block.frame()->selection().clearPreviousCaretVisualRect(m_block); | 19 m_block.frame()->selection().clearPreviousCaretVisualRect(m_block); |
| 20 m_block.frame()->page()->dragCaret().clearPreviousVisualRect(m_block); | 20 m_block.frame()->page()->dragCaret().clearPreviousVisualRect(m_block); |
| 21 } | 21 } |
| 22 | 22 |
| 23 PaintInvalidationReason BlockPaintInvalidator::invalidatePaintIfNeeded( | 23 PaintInvalidationReason BlockPaintInvalidator::invalidatePaintIfNeeded( |
| 24 const PaintInvalidatorContext& context) { | 24 const PaintInvalidatorContext& context) { |
| 25 PaintInvalidationReason reason = | 25 PaintInvalidationReason reason = |
| 26 BoxPaintInvalidator(m_block, context).invalidatePaintIfNeeded(); | 26 BoxPaintInvalidator(m_block, context).invalidatePaintIfNeeded(); |
| 27 | 27 |
| 28 m_block.frame()->selection().invalidatePaintIfNeeded(m_block, context, | 28 m_block.frame()->selection().invalidatePaintIfNeeded(m_block, context); |
| 29 reason); | 29 m_block.frame()->page()->dragCaret().invalidatePaintIfNeeded(m_block, |
| 30 m_block.frame()->page()->dragCaret().invalidatePaintIfNeeded(m_block, context, | 30 context); |
| 31 reason); | |
| 32 | 31 |
| 33 return reason; | 32 return reason; |
| 34 } | 33 } |
| 35 } | 34 |
| 35 } // namespace blink |
| OLD | NEW |