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 |
74 if (const RenderObject* container = current->clippingContainer()) { | 77 if (const RenderObject* container = current->clippingContainer()) { |
75 if (clippingRenderer != container && !clippingRenderer->isDescendant
Of(container)) | 78 if (clippingRenderer != container && !clippingRenderer->isDescendant
Of(container)) |
76 return true; | 79 return true; |
77 } | 80 } |
78 } | 81 } |
79 return false; | 82 return false; |
80 } | 83 } |
81 | 84 |
82 void CompositingInputsUpdater::updateRecursive(RenderLayer* layer, UpdateType up
dateType, AncestorInfo info) | 85 void CompositingInputsUpdater::updateRecursive(RenderLayer* layer, UpdateType up
dateType, AncestorInfo info) |
83 { | 86 { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 182 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
180 ASSERT(!layer->needsCompositingInputsUpdate()); | 183 ASSERT(!layer->needsCompositingInputsUpdate()); |
181 | 184 |
182 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) | 185 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) |
183 assertNeedsCompositingInputsUpdateBitsCleared(child); | 186 assertNeedsCompositingInputsUpdateBitsCleared(child); |
184 } | 187 } |
185 | 188 |
186 #endif | 189 #endif |
187 | 190 |
188 } // namespace blink | 191 } // namespace blink |
OLD | NEW |