| 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/BoxPaintInvalidator.h" | 5 #include "core/paint/BoxPaintInvalidator.h" |
| 6 | 6 |
| 7 #include "core/frame/Settings.h" | 7 #include "core/frame/Settings.h" |
| 8 #include "core/layout/LayoutView.h" | 8 #include "core/layout/LayoutView.h" |
| 9 #include "core/layout/compositing/CompositedLayerMapping.h" | 9 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 10 #include "core/paint/ObjectPaintInvalidator.h" | 10 #include "core/paint/ObjectPaintInvalidator.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 reason == PaintInvalidationIncremental ? m_box.borderRight() | 59 reason == PaintInvalidationIncremental ? m_box.borderRight() |
| 60 : LayoutUnit()); | 60 : LayoutUnit()); |
| 61 LayoutRect bottomDelta = computeBottomDelta( | 61 LayoutRect bottomDelta = computeBottomDelta( |
| 62 newRect.location(), oldRect.size(), newRect.size(), | 62 newRect.location(), oldRect.size(), newRect.size(), |
| 63 reason == PaintInvalidationIncremental ? m_box.borderBottom() | 63 reason == PaintInvalidationIncremental ? m_box.borderBottom() |
| 64 : LayoutUnit()); | 64 : LayoutUnit()); |
| 65 | 65 |
| 66 if (rightDelta.isEmpty() && bottomDelta.isEmpty()) | 66 if (rightDelta.isEmpty() && bottomDelta.isEmpty()) |
| 67 return false; | 67 return false; |
| 68 | 68 |
| 69 ObjectPaintInvalidator objectPaintInvalidator(m_box); | 69 ObjectPaintInvalidatorWithContext objectPaintInvalidator(m_box, m_context); |
| 70 objectPaintInvalidator.invalidatePaintUsingContainer( | 70 objectPaintInvalidator.invalidatePaintRectangleWithContext(rightDelta, |
| 71 *m_context.paintInvalidationContainer, rightDelta, reason); | 71 reason); |
| 72 objectPaintInvalidator.invalidatePaintUsingContainer( | 72 objectPaintInvalidator.invalidatePaintRectangleWithContext(bottomDelta, |
| 73 *m_context.paintInvalidationContainer, bottomDelta, reason); | 73 reason); |
| 74 return true; | 74 return true; |
| 75 } | 75 } |
| 76 | 76 |
| 77 PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason() { | 77 PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason() { |
| 78 PaintInvalidationReason reason = | 78 PaintInvalidationReason reason = |
| 79 ObjectPaintInvalidatorWithContext(m_box, m_context) | 79 ObjectPaintInvalidatorWithContext(m_box, m_context) |
| 80 .computePaintInvalidationReason(); | 80 .computePaintInvalidationReason(); |
| 81 | 81 |
| 82 if (reason != PaintInvalidationIncremental) | 82 if (reason != PaintInvalidationIncremental) |
| 83 return reason; | 83 return reason; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 if (needsToSavePreviousContentBoxSizeOrLayoutOverflowRect()) { | 320 if (needsToSavePreviousContentBoxSizeOrLayoutOverflowRect()) { |
| 321 m_box.getMutableForPainting() | 321 m_box.getMutableForPainting() |
| 322 .savePreviousContentBoxSizeAndLayoutOverflowRect(); | 322 .savePreviousContentBoxSizeAndLayoutOverflowRect(); |
| 323 } else { | 323 } else { |
| 324 m_box.getMutableForPainting() | 324 m_box.getMutableForPainting() |
| 325 .clearPreviousContentBoxSizeAndLayoutOverflowRect(); | 325 .clearPreviousContentBoxSizeAndLayoutOverflowRect(); |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 | 328 |
| 329 } // namespace blink | 329 } // namespace blink |
| OLD | NEW |