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/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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 232 |
233 if (layer->scrollsOverflow()) | 233 if (layer->scrollsOverflow()) |
234 info.lastScrollingAncestor = layer; | 234 info.lastScrollingAncestor = layer; |
235 | 235 |
236 if (layer->layoutObject()->hasClipRelatedProperty()) | 236 if (layer->layoutObject()->hasClipRelatedProperty()) |
237 info.hasAncestorWithClipRelatedProperty = true; | 237 info.hasAncestorWithClipRelatedProperty = true; |
238 | 238 |
239 if (layer->layoutObject()->hasClipPath()) | 239 if (layer->layoutObject()->hasClipPath()) |
240 info.hasAncestorWithClipPath = true; | 240 info.hasAncestorWithClipPath = true; |
241 | 241 |
| 242 layer->setIsRootScroller(layer == |
| 243 layer->layoutObject() |
| 244 ->document() |
| 245 .rootScrollerController() |
| 246 ->rootScrollerPaintLayer()); |
| 247 |
242 bool hasDescendantWithClipPath = false; | 248 bool hasDescendantWithClipPath = false; |
243 bool hasNonIsolatedDescendantWithBlendMode = false; | 249 bool hasNonIsolatedDescendantWithBlendMode = false; |
244 bool hasRootScrollerAsDescendant = false; | 250 bool hasRootScrollerAsDescendant = false; |
245 for (PaintLayer* child = layer->firstChild(); child; | 251 for (PaintLayer* child = layer->firstChild(); child; |
246 child = child->nextSibling()) { | 252 child = child->nextSibling()) { |
247 updateRecursive(child, updateType, info); | 253 updateRecursive(child, updateType, info); |
248 | 254 |
249 hasRootScrollerAsDescendant |= child->hasRootScrollerAsDescendant() || | 255 hasRootScrollerAsDescendant |= |
250 (child == | 256 child->hasRootScrollerAsDescendant() || child->isRootScroller(); |
251 child->layoutObject() | |
252 ->document() | |
253 .rootScrollerController() | |
254 ->rootScrollerPaintLayer()); | |
255 hasDescendantWithClipPath |= child->hasDescendantWithClipPath() || | 257 hasDescendantWithClipPath |= child->hasDescendantWithClipPath() || |
256 child->layoutObject()->hasClipPath(); | 258 child->layoutObject()->hasClipPath(); |
257 hasNonIsolatedDescendantWithBlendMode |= | 259 hasNonIsolatedDescendantWithBlendMode |= |
258 (!child->stackingNode()->isStackingContext() && | 260 (!child->stackingNode()->isStackingContext() && |
259 child->hasNonIsolatedDescendantWithBlendMode()) || | 261 child->hasNonIsolatedDescendantWithBlendMode()) || |
260 child->layoutObject()->style()->hasBlendMode(); | 262 child->layoutObject()->style()->hasBlendMode(); |
261 } | 263 } |
262 | 264 |
263 layer->updateDescendantDependentCompositingInputs( | 265 layer->updateDescendantDependentCompositingInputs( |
264 hasDescendantWithClipPath, hasNonIsolatedDescendantWithBlendMode, | 266 hasDescendantWithClipPath, hasNonIsolatedDescendantWithBlendMode, |
(...skipping 11 matching lines...) Expand all Loading... |
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 |
OLD | NEW |