Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp

Issue 2425873005: Don't apply clips to children of composited-scrolling elements for overlap testing. (Closed)
Patch Set: none Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/LayoutBlock.h" 9 #include "core/layout/LayoutBlock.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 ->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree); 141 ->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree);
142 updateType = ForceUpdate; 142 updateType = ForceUpdate;
143 } 143 }
144 144
145 if (updateType == ForceUpdate) { 145 if (updateType == ForceUpdate) {
146 PaintLayer::AncestorDependentCompositingInputs properties; 146 PaintLayer::AncestorDependentCompositingInputs properties;
147 PaintLayer::RareAncestorDependentCompositingInputs rareProperties; 147 PaintLayer::RareAncestorDependentCompositingInputs rareProperties;
148 148
149 if (!layer->isRootLayer()) { 149 if (!layer->isRootLayer()) {
150 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 150 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
151 properties.clippedAbsoluteBoundingBox = 151 properties.unclippedAbsoluteBoundingBox =
152 enclosingIntRect(m_geometryMap.absoluteRect( 152 enclosingIntRect(m_geometryMap.absoluteRect(
153 FloatRect(layer->boundingBoxForCompositingOverlapTest()))); 153 FloatRect(layer->boundingBoxForCompositingOverlapTest())));
154 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little 154 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little
155 // sense, but removing this code will make JSGameBench sad. 155 // sense, but removing this code will make JSGameBench sad.
156 // See https://codereview.chromium.org/13912020/ 156 // See https://codereview.chromium.org/13912020/
157 if (properties.clippedAbsoluteBoundingBox.isEmpty()) 157 if (properties.unclippedAbsoluteBoundingBox.isEmpty())
158 properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); 158 properties.unclippedAbsoluteBoundingBox.setSize(IntSize(1, 1));
159 159
160 IntRect clipRect = 160 IntRect clipRect =
161 pixelSnappedIntRect(layer->clipper() 161 pixelSnappedIntRect(layer->clipper()
162 .backgroundClipRect(ClipRectsContext( 162 .backgroundClipRect(ClipRectsContext(
163 m_rootLayer, AbsoluteClipRects)) 163 m_rootLayer, AbsoluteClipRects))
164 .rect()); 164 .rect());
165 properties.clippedAbsoluteBoundingBox =
166 properties.unclippedAbsoluteBoundingBox;
165 properties.clippedAbsoluteBoundingBox.intersect(clipRect); 167 properties.clippedAbsoluteBoundingBox.intersect(clipRect);
166 } 168 }
167 169
168 const PaintLayer* parent = layer->parent(); 170 const PaintLayer* parent = layer->parent();
169 rareProperties.opacityAncestor = 171 rareProperties.opacityAncestor =
170 parent->isTransparent() ? parent : parent->opacityAncestor(); 172 parent->isTransparent() ? parent : parent->opacityAncestor();
171 rareProperties.transformAncestor = 173 rareProperties.transformAncestor =
172 parent->transform() ? parent : parent->transformAncestor(); 174 parent->transform() ? parent : parent->transformAncestor();
173 rareProperties.filterAncestor = parent->hasFilterInducingProperty() 175 rareProperties.filterAncestor = parent->hasFilterInducingProperty()
174 ? parent 176 ? parent
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 ASSERT(!layer->needsCompositingInputsUpdate()); 278 ASSERT(!layer->needsCompositingInputsUpdate());
277 279
278 for (PaintLayer* child = layer->firstChild(); child; 280 for (PaintLayer* child = layer->firstChild(); child;
279 child = child->nextSibling()) 281 child = child->nextSibling())
280 assertNeedsCompositingInputsUpdateBitsCleared(child); 282 assertNeedsCompositingInputsUpdateBitsCleared(child);
281 } 283 }
282 284
283 #endif 285 #endif
284 286
285 } // namespace blink 287 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698