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

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

Issue 2887173002: Fix DCHECK to account for child SVG objects not having PaintLayers. (Closed)
Patch Set: none Created 3 years, 7 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 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/compositing/CompositingInputsUpdater.h" 5 #include "core/layout/compositing/CompositingInputsUpdater.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/LayoutBlock.h" 9 #include "core/layout/LayoutBlock.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 if (current->HasLayer()) 47 if (current->HasLayer())
48 return static_cast<const LayoutBoxModelObject*>(current)->Layer(); 48 return static_cast<const LayoutBoxModelObject*>(current)->Layer();
49 // Having clip or overflow clip forces the LayoutObject to become a layer, 49 // Having clip or overflow clip forces the LayoutObject to become a layer,
50 // except for contains: paint, which may apply to SVG, and 50 // except for contains: paint, which may apply to SVG, and
51 // control clip, which may apply to LayoutBox subtypes. 51 // control clip, which may apply to LayoutBox subtypes.
52 // SVG (other than LayoutSVGRoot) cannot have PaintLayers. 52 // SVG (other than LayoutSVGRoot) cannot have PaintLayers.
53 DCHECK(!current->HasClipRelatedProperty() || 53 DCHECK(!current->HasClipRelatedProperty() ||
54 current->StyleRef().ContainsPaint() || 54 current->StyleRef().ContainsPaint() ||
55 (current->IsBox() && ToLayoutBox(current)->HasControlClip())); 55 (current->IsBox() && ToLayoutBox(current)->HasControlClip()) ||
56 current->IsSVGChild());
56 } 57 }
57 NOTREACHED(); 58 NOTREACHED();
58 return nullptr; 59 return nullptr;
59 } 60 }
60 61
61 static const PaintLayer* FindParentLayerOnContainingBlockChain( 62 static const PaintLayer* FindParentLayerOnContainingBlockChain(
62 const LayoutObject* object) { 63 const LayoutObject* object) {
63 for (const LayoutObject* current = object; current; 64 for (const LayoutObject* current = object; current;
64 current = current->ContainingBlock()) { 65 current = current->ContainingBlock()) {
65 if (current->HasLayer()) 66 if (current->HasLayer())
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 DCHECK(!layer->NeedsCompositingInputsUpdate()); 286 DCHECK(!layer->NeedsCompositingInputsUpdate());
286 287
287 for (PaintLayer* child = layer->FirstChild(); child; 288 for (PaintLayer* child = layer->FirstChild(); child;
288 child = child->NextSibling()) 289 child = child->NextSibling())
289 AssertNeedsCompositingInputsUpdateBitsCleared(child); 290 AssertNeedsCompositingInputsUpdateBitsCleared(child);
290 } 291 }
291 292
292 #endif 293 #endif
293 294
294 } // namespace blink 295 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698