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