| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| 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 } | 55 } |
| 56 ASSERT_NOT_REACHED(); | 56 NOTREACHED(); |
| 57 return nullptr; | 57 return nullptr; |
| 58 } | 58 } |
| 59 | 59 |
| 60 static const PaintLayer* findParentLayerOnContainingBlockChain( | 60 static const PaintLayer* findParentLayerOnContainingBlockChain( |
| 61 const LayoutObject* object) { | 61 const LayoutObject* object) { |
| 62 for (const LayoutObject* current = object; current; | 62 for (const LayoutObject* current = object; current; |
| 63 current = current->containingBlock()) { | 63 current = current->containingBlock()) { |
| 64 if (current->hasLayer()) | 64 if (current->hasLayer()) |
| 65 return static_cast<const LayoutBoxModelObject*>(current)->layer(); | 65 return static_cast<const LayoutBoxModelObject*>(current)->layer(); |
| 66 } | 66 } |
| 67 ASSERT_NOT_REACHED(); | 67 NOTREACHED(); |
| 68 return nullptr; | 68 return nullptr; |
| 69 } | 69 } |
| 70 | 70 |
| 71 static bool hasClippedStackingAncestor(const PaintLayer* layer, | 71 static bool hasClippedStackingAncestor(const PaintLayer* layer, |
| 72 const PaintLayer* clippingLayer) { | 72 const PaintLayer* clippingLayer) { |
| 73 if (layer == clippingLayer) | 73 if (layer == clippingLayer) |
| 74 return false; | 74 return false; |
| 75 bool foundInterveningClip = false; | 75 bool foundInterveningClip = false; |
| 76 const LayoutObject& clippingLayoutObject = clippingLayer->layoutObject(); | 76 const LayoutObject& clippingLayoutObject = clippingLayer->layoutObject(); |
| 77 for (const PaintLayer* current = layer->compositingContainer(); current; | 77 for (const PaintLayer* current = layer->compositingContainer(); current; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 ASSERT(!layer->needsCompositingInputsUpdate()); | 272 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 273 | 273 |
| 274 for (PaintLayer* child = layer->firstChild(); child; | 274 for (PaintLayer* child = layer->firstChild(); child; |
| 275 child = child->nextSibling()) | 275 child = child->nextSibling()) |
| 276 assertNeedsCompositingInputsUpdateBitsCleared(child); | 276 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 277 } | 277 } |
| 278 | 278 |
| 279 #endif | 279 #endif |
| 280 | 280 |
| 281 } // namespace blink | 281 } // namespace blink |
| OLD | NEW |