| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/layout/PaintInvalidationState.h" | 5 #include "core/layout/PaintInvalidationState.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/layout/LayoutInline.h" | 10 #include "core/layout/LayoutInline.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 return; | 229 return; |
| 230 } | 230 } |
| 231 | 231 |
| 232 updateForCurrentObject(parentState); | 232 updateForCurrentObject(parentState); |
| 233 } | 233 } |
| 234 | 234 |
| 235 PaintLayer& PaintInvalidationState::childPaintingLayer( | 235 PaintLayer& PaintInvalidationState::childPaintingLayer( |
| 236 const LayoutObject& child) const { | 236 const LayoutObject& child) const { |
| 237 if (child.hasLayer() && toLayoutBoxModelObject(child).hasSelfPaintingLayer()) | 237 if (child.hasLayer() && toLayoutBoxModelObject(child).hasSelfPaintingLayer()) |
| 238 return *toLayoutBoxModelObject(child).layer(); | 238 return *toLayoutBoxModelObject(child).layer(); |
| 239 // See LayoutObject::paintingLayer() for specialty of floating objects. | 239 // See LayoutObject::paintingLayer() for the special-cases of floating under |
| 240 if (child.isFloating() && !m_currentObject.isLayoutBlock()) | 240 // inline and multicolumn. |
| 241 if (child.isColumnSpanAll() || |
| 242 (child.isFloating() && !m_currentObject.isLayoutBlock())) |
| 241 return *child.paintingLayer(); | 243 return *child.paintingLayer(); |
| 242 return m_paintingLayer; | 244 return m_paintingLayer; |
| 243 } | 245 } |
| 244 | 246 |
| 245 void PaintInvalidationState::updateForCurrentObject( | 247 void PaintInvalidationState::updateForCurrentObject( |
| 246 const PaintInvalidationState& parentState) { | 248 const PaintInvalidationState& parentState) { |
| 247 if (!m_cachedOffsetsEnabled) | 249 if (!m_cachedOffsetsEnabled) |
| 248 return; | 250 return; |
| 249 | 251 |
| 250 if (m_currentObject.isLayoutView()) { | 252 if (m_currentObject.isLayoutView()) { |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 } | 640 } |
| 639 | 641 |
| 640 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking( | 642 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking( |
| 641 const LayoutObject& object, | 643 const LayoutObject& object, |
| 642 LayoutRect& rect) const { | 644 LayoutRect& rect) const { |
| 643 DCHECK(&object == &m_paintInvalidationState.currentObject()); | 645 DCHECK(&object == &m_paintInvalidationState.currentObject()); |
| 644 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); | 646 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); |
| 645 } | 647 } |
| 646 | 648 |
| 647 } // namespace blink | 649 } // namespace blink |
| OLD | NEW |