| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/layout/compositing/CompositingInputsUpdater.h" | 6 #include "core/layout/compositing/CompositingInputsUpdater.h" |
| 7 | 7 |
| 8 #include "core/layout/LayoutBlock.h" | 8 #include "core/layout/LayoutBlock.h" |
| 9 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" | 9 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" |
| 10 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" | 10 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } else { | 52 } else { |
| 53 current = current->containingBlock(); | 53 current = current->containingBlock(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 if (current->hasLayer()) | 56 if (current->hasLayer()) |
| 57 return static_cast<const LayoutBoxModelObject*>(current)->layer(); | 57 return static_cast<const LayoutBoxModelObject*>(current)->layer(); |
| 58 // Having clip or overflow clip forces the LayoutObject to become a laye
r. | 58 // Having clip or overflow clip forces the LayoutObject to become a laye
r. |
| 59 ASSERT(!current->hasClipOrOverflowClip()); | 59 ASSERT(!current->hasClipOrOverflowClip()); |
| 60 } | 60 } |
| 61 ASSERT_NOT_REACHED(); | 61 ASSERT_NOT_REACHED(); |
| 62 return 0; | 62 return nullptr; |
| 63 } | 63 } |
| 64 | 64 |
| 65 static const DeprecatedPaintLayer* findParentLayerOnContainingBlockChain(const L
ayoutObject* object) | 65 static const DeprecatedPaintLayer* findParentLayerOnContainingBlockChain(const L
ayoutObject* object) |
| 66 { | 66 { |
| 67 for (const LayoutObject* current = object; current; current = current->conta
iningBlock()) { | 67 for (const LayoutObject* current = object; current; current = current->conta
iningBlock()) { |
| 68 if (current->hasLayer()) | 68 if (current->hasLayer()) |
| 69 return static_cast<const LayoutBoxModelObject*>(current)->layer(); | 69 return static_cast<const LayoutBoxModelObject*>(current)->layer(); |
| 70 } | 70 } |
| 71 ASSERT_NOT_REACHED(); | 71 ASSERT_NOT_REACHED(); |
| 72 return 0; | 72 return nullptr; |
| 73 } | 73 } |
| 74 | 74 |
| 75 static bool hasClippedStackingAncestor(const DeprecatedPaintLayer* layer, const
DeprecatedPaintLayer* clippingLayer) | 75 static bool hasClippedStackingAncestor(const DeprecatedPaintLayer* layer, const
DeprecatedPaintLayer* clippingLayer) |
| 76 { | 76 { |
| 77 if (layer == clippingLayer) | 77 if (layer == clippingLayer) |
| 78 return false; | 78 return false; |
| 79 const LayoutObject* clippingLayoutObject = clippingLayer->layoutObject(); | 79 const LayoutObject* clippingLayoutObject = clippingLayer->layoutObject(); |
| 80 for (const DeprecatedPaintLayer* current = layer->compositingContainer(); cu
rrent && current != clippingLayer; current = current->compositingContainer()) { | 80 for (const DeprecatedPaintLayer* current = layer->compositingContainer(); cu
rrent && current != clippingLayer; current = current->compositingContainer()) { |
| 81 if (current->layoutObject()->hasClipOrOverflowClip() && !clippingLayoutO
bject->isDescendantOf(current->layoutObject())) | 81 if (current->layoutObject()->hasClipOrOverflowClip() && !clippingLayoutO
bject->isDescendantOf(current->layoutObject())) |
| 82 return true; | 82 return true; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 188 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
| 189 ASSERT(!layer->needsCompositingInputsUpdate()); | 189 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 190 | 190 |
| 191 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) | 191 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) |
| 192 assertNeedsCompositingInputsUpdateBitsCleared(child); | 192 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 193 } | 193 } |
| 194 | 194 |
| 195 #endif | 195 #endif |
| 196 | 196 |
| 197 } // namespace blink | 197 } // namespace blink |
| OLD | NEW |