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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2615203002: Remove multicol special-cases from invalidation and the pre-paint tree walk (Closed)
Patch Set: Cleanup comment 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
OLDNEW
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/PaintInvalidator.h" 5 #include "core/paint/PaintInvalidator.h"
6 6
7 #include "core/editing/FrameSelection.h" 7 #include "core/editing/FrameSelection.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 *context.paintInvalidationContainer, point); 192 *context.paintInvalidationContainer, point);
193 193
194 return LayoutPoint(point); 194 return LayoutPoint(point);
195 } 195 }
196 196
197 void PaintInvalidator::updatePaintingLayer(const LayoutObject& object, 197 void PaintInvalidator::updatePaintingLayer(const LayoutObject& object,
198 PaintInvalidatorContext& context) { 198 PaintInvalidatorContext& context) {
199 if (object.hasLayer() && 199 if (object.hasLayer() &&
200 toLayoutBoxModelObject(object).hasSelfPaintingLayer()) { 200 toLayoutBoxModelObject(object).hasSelfPaintingLayer()) {
201 context.paintingLayer = toLayoutBoxModelObject(object).layer(); 201 context.paintingLayer = toLayoutBoxModelObject(object).layer();
202 } else if (object.isFloating() && !object.parent()->isLayoutBlock()) { 202 } else if (object.isColumnSpanAll() ||
203 // See LayoutObject::paintingLayer() for specialty of floating objects. 203 (object.isFloating() && !object.parent()->isLayoutBlock())) {
204 // See LayoutObject::paintingLayer() for the special-cases of floating under
205 // inline and multicolumn.
204 context.paintingLayer = object.paintingLayer(); 206 context.paintingLayer = object.paintingLayer();
205 } 207 }
206 208
207 if (object.isLayoutBlockFlow() && toLayoutBlockFlow(object).containsFloats()) 209 if (object.isLayoutBlockFlow() && toLayoutBlockFlow(object).containsFloats())
208 context.paintingLayer->setNeedsPaintPhaseFloat(); 210 context.paintingLayer->setNeedsPaintPhaseFloat();
209 211
210 if (object == context.paintingLayer->layoutObject()) 212 if (object == context.paintingLayer->layoutObject())
211 return; 213 return;
212 214
213 if (object.styleRef().hasOutline()) 215 if (object.styleRef().hasOutline())
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; 453 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate;
452 } 454 }
453 455
454 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 456 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
455 for (auto target : m_pendingDelayedPaintInvalidations) 457 for (auto target : m_pendingDelayedPaintInvalidations)
456 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 458 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
457 PaintInvalidationDelayedFull); 459 PaintInvalidationDelayedFull);
458 } 460 }
459 461
460 } // namespace blink 462 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698