Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp

Issue 2621523002: Fix PaintInvalidationState for multicol (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698