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/rendering/compositing/CompositingInputsUpdater.h" | 6 #include "core/rendering/compositing/CompositingInputsUpdater.h" |
7 | 7 |
8 #include "core/rendering/RenderBlock.h" | 8 #include "core/rendering/RenderBlock.h" |
9 #include "core/rendering/RenderLayer.h" | 9 #include "core/rendering/RenderLayer.h" |
10 #include "core/rendering/compositing/CompositedLayerMapping.h" | 10 #include "core/rendering/compositing/CompositedLayerMapping.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 ASSERT_NOT_REACHED(); | 64 ASSERT_NOT_REACHED(); |
65 return 0; | 65 return 0; |
66 } | 66 } |
67 | 67 |
68 static bool hasClippedStackingAncestor(const RenderLayer* layer, const RenderLay
er* clippingLayer) | 68 static bool hasClippedStackingAncestor(const RenderLayer* layer, const RenderLay
er* clippingLayer) |
69 { | 69 { |
70 if (layer == clippingLayer) | 70 if (layer == clippingLayer) |
71 return false; | 71 return false; |
72 const RenderObject* clippingRenderer = clippingLayer->renderer(); | 72 const RenderObject* clippingRenderer = clippingLayer->renderer(); |
73 for (const RenderLayer* current = layer->compositingContainer(); current &&
current != clippingLayer; current = current->compositingContainer()) { | 73 for (const RenderLayer* current = layer->compositingContainer(); current &&
current != clippingLayer; current = current->compositingContainer()) { |
74 if (current->renderer()->hasClipOrOverflowClip() && !clippingRenderer->i
sDescendantOf(current->renderer())) | |
75 return true; | |
76 | |
77 if (const RenderObject* container = current->clippingContainer()) { | 74 if (const RenderObject* container = current->clippingContainer()) { |
78 if (clippingRenderer != container && !clippingRenderer->isDescendant
Of(container)) | 75 if (clippingRenderer != container && !clippingRenderer->isDescendant
Of(container)) |
79 return true; | 76 return true; |
80 } | 77 } |
81 } | 78 } |
82 return false; | 79 return false; |
83 } | 80 } |
84 | 81 |
85 void CompositingInputsUpdater::updateRecursive(RenderLayer* layer, UpdateType up
dateType, AncestorInfo info) | 82 void CompositingInputsUpdater::updateRecursive(RenderLayer* layer, UpdateType up
dateType, AncestorInfo info) |
86 { | 83 { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 179 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
183 ASSERT(!layer->needsCompositingInputsUpdate()); | 180 ASSERT(!layer->needsCompositingInputsUpdate()); |
184 | 181 |
185 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) | 182 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) |
186 assertNeedsCompositingInputsUpdateBitsCleared(child); | 183 assertNeedsCompositingInputsUpdateBitsCleared(child); |
187 } | 184 } |
188 | 185 |
189 #endif | 186 #endif |
190 | 187 |
191 } // namespace blink | 188 } // namespace blink |
OLD | NEW |