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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // but removing this code will make JSGameBench sad. | 107 // but removing this code will make JSGameBench sad. |
108 // See https://codereview.chromium.org/13912020/ | 108 // See https://codereview.chromium.org/13912020/ |
109 if (properties.clippedAbsoluteBoundingBox.isEmpty()) | 109 if (properties.clippedAbsoluteBoundingBox.isEmpty()) |
110 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); | 110 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); |
111 | 111 |
112 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundCl
ipRect(ClipRectsContext(m_rootRenderLayer, AbsoluteClipRects)).rect()); | 112 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundCl
ipRect(ClipRectsContext(m_rootRenderLayer, AbsoluteClipRects)).rect()); |
113 properties.clippedAbsoluteBoundingBox.intersect(clipRect); | 113 properties.clippedAbsoluteBoundingBox.intersect(clipRect); |
114 | 114 |
115 const RenderLayer* parent = layer->parent(); | 115 const RenderLayer* parent = layer->parent(); |
116 properties.opacityAncestor = parent->isTransparent() ? parent : pare
nt->opacityAncestor(); | 116 properties.opacityAncestor = parent->isTransparent() ? parent : pare
nt->opacityAncestor(); |
117 properties.transformAncestor = parent->transform() ? parent : parent
->transformAncestor(); | 117 properties.transformAncestor = parent->hasTransform() ? parent : par
ent->transformAncestor(); |
118 properties.filterAncestor = parent->hasFilter() ? parent : parent->f
ilterAncestor(); | 118 properties.filterAncestor = parent->hasFilter() ? parent : parent->f
ilterAncestor(); |
119 | 119 |
120 if (info.hasAncestorWithClipOrOverflowClip) { | 120 if (info.hasAncestorWithClipOrOverflowClip) { |
121 const RenderLayer* parentLayerOnClippingContainerChain = findPar
entLayerOnClippingContainerChain(layer); | 121 const RenderLayer* parentLayerOnClippingContainerChain = findPar
entLayerOnClippingContainerChain(layer); |
122 const bool parentHasClipOrOverflowClip = parentLayerOnClippingCo
ntainerChain->renderer()->hasClipOrOverflowClip(); | 122 const bool parentHasClipOrOverflowClip = parentLayerOnClippingCo
ntainerChain->renderer()->hasClipOrOverflowClip(); |
123 properties.clippingContainer = parentHasClipOrOverflowClip ? par
entLayerOnClippingContainerChain->renderer() : parentLayerOnClippingContainerCha
in->clippingContainer(); | 123 properties.clippingContainer = parentHasClipOrOverflowClip ? par
entLayerOnClippingContainerChain->renderer() : parentLayerOnClippingContainerCha
in->clippingContainer(); |
124 } | 124 } |
125 | 125 |
126 if (info.lastScrollingAncestor) { | 126 if (info.lastScrollingAncestor) { |
127 const RenderObject* containingBlock = layer->renderer()->contain
ingBlock(); | 127 const RenderObject* containingBlock = layer->renderer()->contain
ingBlock(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 183 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
184 ASSERT(!layer->needsCompositingInputsUpdate()); | 184 ASSERT(!layer->needsCompositingInputsUpdate()); |
185 | 185 |
186 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) | 186 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) |
187 assertNeedsCompositingInputsUpdateBitsCleared(child); | 187 assertNeedsCompositingInputsUpdateBitsCleared(child); |
188 } | 188 } |
189 | 189 |
190 #endif | 190 #endif |
191 | 191 |
192 } // namespace blink | 192 } // namespace blink |
OLD | NEW |