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 "core/layout/compositing/CompositingInputsUpdater.h" | 5 #include "core/layout/compositing/CompositingInputsUpdater.h" |
6 | 6 |
7 #include "core/layout/LayoutBlock.h" | 7 #include "core/layout/LayoutBlock.h" |
8 #include "core/layout/compositing/CompositedLayerMapping.h" | 8 #include "core/layout/compositing/CompositedLayerMapping.h" |
9 #include "core/layout/compositing/PaintLayerCompositor.h" | 9 #include "core/layout/compositing/PaintLayerCompositor.h" |
10 #include "core/paint/PaintLayer.h" | 10 #include "core/paint/PaintLayer.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // See https://codereview.chromium.org/13912020/ | 119 // See https://codereview.chromium.org/13912020/ |
120 if (properties.clippedAbsoluteBoundingBox.isEmpty()) | 120 if (properties.clippedAbsoluteBoundingBox.isEmpty()) |
121 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); | 121 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); |
122 | 122 |
123 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundCl
ipRect(ClipRectsContext(m_rootLayer, AbsoluteClipRects)).rect()); | 123 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundCl
ipRect(ClipRectsContext(m_rootLayer, AbsoluteClipRects)).rect()); |
124 properties.clippedAbsoluteBoundingBox.intersect(clipRect); | 124 properties.clippedAbsoluteBoundingBox.intersect(clipRect); |
125 | 125 |
126 const PaintLayer* parent = layer->parent(); | 126 const PaintLayer* parent = layer->parent(); |
127 rareProperties.opacityAncestor = parent->isTransparent() ? parent :
parent->opacityAncestor(); | 127 rareProperties.opacityAncestor = parent->isTransparent() ? parent :
parent->opacityAncestor(); |
128 rareProperties.transformAncestor = parent->hasTransformRelatedProper
ty() ? parent : parent->transformAncestor(); | 128 rareProperties.transformAncestor = parent->hasTransformRelatedProper
ty() ? parent : parent->transformAncestor(); |
129 rareProperties.filterAncestor = parent->hasFilter() ? parent : paren
t->filterAncestor(); | 129 rareProperties.filterAncestor = parent->hasFilterInducingProperty()
? parent : parent->filterAncestor(); |
130 bool layerIsFixedPosition = layer->layoutObject()->style()->position
() == FixedPosition; | 130 bool layerIsFixedPosition = layer->layoutObject()->style()->position
() == FixedPosition; |
131 rareProperties.nearestFixedPositionLayer = layerIsFixedPosition ? la
yer : parent->nearestFixedPositionLayer(); | 131 rareProperties.nearestFixedPositionLayer = layerIsFixedPosition ? la
yer : parent->nearestFixedPositionLayer(); |
132 | 132 |
133 if (info.hasAncestorWithClipRelatedProperty) { | 133 if (info.hasAncestorWithClipRelatedProperty) { |
134 const PaintLayer* parentLayerOnClippingContainerChain = findPare
ntLayerOnClippingContainerChain(layer); | 134 const PaintLayer* parentLayerOnClippingContainerChain = findPare
ntLayerOnClippingContainerChain(layer); |
135 const bool parentHasClipRelatedProperty = parentLayerOnClippingC
ontainerChain->layoutObject()->hasClipRelatedProperty(); | 135 const bool parentHasClipRelatedProperty = parentLayerOnClippingC
ontainerChain->layoutObject()->hasClipRelatedProperty(); |
136 properties.clippingContainer = parentHasClipRelatedProperty ? pa
rentLayerOnClippingContainerChain->layoutObject() : parentLayerOnClippingContain
erChain->clippingContainer(); | 136 properties.clippingContainer = parentHasClipRelatedProperty ? pa
rentLayerOnClippingContainerChain->layoutObject() : parentLayerOnClippingContain
erChain->clippingContainer(); |
137 } | 137 } |
138 | 138 |
139 if (info.lastScrollingAncestor) { | 139 if (info.lastScrollingAncestor) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 194 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
195 ASSERT(!layer->needsCompositingInputsUpdate()); | 195 ASSERT(!layer->needsCompositingInputsUpdate()); |
196 | 196 |
197 for (PaintLayer* child = layer->firstChild(); child; child = child->nextSibl
ing()) | 197 for (PaintLayer* child = layer->firstChild(); child; child = child->nextSibl
ing()) |
198 assertNeedsCompositingInputsUpdateBitsCleared(child); | 198 assertNeedsCompositingInputsUpdateBitsCleared(child); |
199 } | 199 } |
200 | 200 |
201 #endif | 201 #endif |
202 | 202 |
203 } // namespace blink | 203 } // namespace blink |
OLD | NEW |