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

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

Issue 2692853016: Change PaintLayer::m_layoutObject to a reference. (Closed)
Patch Set: restore inadvertantly removed null check Created 3 years, 10 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } else if (object.isColumnSpanAll() || 203 } else if (object.isColumnSpanAll() ||
204 object.isFloatingWithNonContainingBlockParent()) { 204 object.isFloatingWithNonContainingBlockParent()) {
205 // See LayoutObject::paintingLayer() for the special-cases of floating under 205 // See LayoutObject::paintingLayer() for the special-cases of floating under
206 // inline and multicolumn. 206 // inline and multicolumn.
207 context.paintingLayer = object.paintingLayer(); 207 context.paintingLayer = object.paintingLayer();
208 } 208 }
209 209
210 if (object.isLayoutBlockFlow() && toLayoutBlockFlow(object).containsFloats()) 210 if (object.isLayoutBlockFlow() && toLayoutBlockFlow(object).containsFloats())
211 context.paintingLayer->setNeedsPaintPhaseFloat(); 211 context.paintingLayer->setNeedsPaintPhaseFloat();
212 212
213 if (object == context.paintingLayer->layoutObject()) 213 if (&object == &context.paintingLayer->layoutObject())
214 return; 214 return;
215 215
216 if (object.styleRef().hasOutline()) 216 if (object.styleRef().hasOutline())
217 context.paintingLayer->setNeedsPaintPhaseDescendantOutlines(); 217 context.paintingLayer->setNeedsPaintPhaseDescendantOutlines();
218 218
219 if (object.hasBoxDecorationBackground() 219 if (object.hasBoxDecorationBackground()
220 // We also paint overflow controls in background phase. 220 // We also paint overflow controls in background phase.
221 || (object.hasOverflowClip() && 221 || (object.hasOverflowClip() &&
222 toLayoutBox(object).getScrollableArea()->hasOverflowControls())) { 222 toLayoutBox(object).getScrollableArea()->hasOverflowControls())) {
223 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); 223 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds();
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; 447 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate;
448 } 448 }
449 449
450 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 450 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
451 for (auto target : m_pendingDelayedPaintInvalidations) 451 for (auto target : m_pendingDelayedPaintInvalidations)
452 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 452 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
453 PaintInvalidationDelayedFull); 453 PaintInvalidationDelayedFull);
454 } 454 }
455 455
456 } // namespace blink 456 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698