| 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/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/FrameHost.h" | 8 #include "core/frame/FrameHost.h" |
| 9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
| 10 #include "core/layout/LayoutBlock.h" | 10 #include "core/layout/LayoutBlock.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 return static_cast<const LayoutBoxModelObject*>(current)->layer(); | 41 return static_cast<const LayoutBoxModelObject*>(current)->layer(); |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 } else { | 44 } else { |
| 45 current = current->containingBlock(); | 45 current = current->containingBlock(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 if (current->hasLayer()) | 48 if (current->hasLayer()) |
| 49 return static_cast<const LayoutBoxModelObject*>(current)->layer(); | 49 return static_cast<const LayoutBoxModelObject*>(current)->layer(); |
| 50 // Having clip or overflow clip forces the LayoutObject to become a layer, | 50 // Having clip or overflow clip forces the LayoutObject to become a layer, |
| 51 // except for contains: paint, which may apply to SVG. | 51 // except for contains: paint, which may apply to SVG, and |
| 52 // control clip, which may apply to LayoutBox subtypes. |
| 52 // SVG (other than LayoutSVGRoot) cannot have PaintLayers. | 53 // SVG (other than LayoutSVGRoot) cannot have PaintLayers. |
| 53 DCHECK(!current->hasClipRelatedProperty() || | 54 DCHECK(!current->hasClipRelatedProperty() || |
| 54 current->styleRef().containsPaint()); | 55 current->styleRef().containsPaint() || |
| 56 (current->isBox() && toLayoutBox(current)->hasControlClip())); |
| 55 } | 57 } |
| 56 ASSERT_NOT_REACHED(); | 58 ASSERT_NOT_REACHED(); |
| 57 return nullptr; | 59 return nullptr; |
| 58 } | 60 } |
| 59 | 61 |
| 60 static const PaintLayer* findParentLayerOnContainingBlockChain( | 62 static const PaintLayer* findParentLayerOnContainingBlockChain( |
| 61 const LayoutObject* object) { | 63 const LayoutObject* object) { |
| 62 for (const LayoutObject* current = object; current; | 64 for (const LayoutObject* current = object; current; |
| 63 current = current->containingBlock()) { | 65 current = current->containingBlock()) { |
| 64 if (current->hasLayer()) | 66 if (current->hasLayer()) |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 ASSERT(!layer->needsCompositingInputsUpdate()); | 274 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 273 | 275 |
| 274 for (PaintLayer* child = layer->firstChild(); child; | 276 for (PaintLayer* child = layer->firstChild(); child; |
| 275 child = child->nextSibling()) | 277 child = child->nextSibling()) |
| 276 assertNeedsCompositingInputsUpdateBitsCleared(child); | 278 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 277 } | 279 } |
| 278 | 280 |
| 279 #endif | 281 #endif |
| 280 | 282 |
| 281 } // namespace blink | 283 } // namespace blink |
| OLD | NEW |