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/FrameHost.h" |
8 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
9 #include "core/layout/LayoutBlock.h" | 10 #include "core/layout/LayoutBlock.h" |
10 #include "core/layout/LayoutView.h" | 11 #include "core/layout/LayoutView.h" |
11 #include "core/layout/compositing/CompositedLayerMapping.h" | 12 #include "core/layout/compositing/CompositedLayerMapping.h" |
12 #include "core/layout/compositing/PaintLayerCompositor.h" | 13 #include "core/layout/compositing/PaintLayerCompositor.h" |
13 #include "core/page/scrolling/RootScrollerController.h" | 14 #include "core/page/scrolling/RootScrollerController.h" |
| 15 #include "core/page/scrolling/TopDocumentRootScrollerController.h" |
14 #include "core/paint/PaintLayer.h" | 16 #include "core/paint/PaintLayer.h" |
15 #include "platform/tracing/TraceEvent.h" | 17 #include "platform/tracing/TraceEvent.h" |
16 | 18 |
17 namespace blink { | 19 namespace blink { |
18 | 20 |
19 CompositingInputsUpdater::CompositingInputsUpdater(PaintLayer* rootLayer) | 21 CompositingInputsUpdater::CompositingInputsUpdater(PaintLayer* rootLayer) |
20 : m_geometryMap(UseTransforms), m_rootLayer(rootLayer) {} | 22 : m_geometryMap(UseTransforms), m_rootLayer(rootLayer) {} |
21 | 23 |
22 CompositingInputsUpdater::~CompositingInputsUpdater() {} | 24 CompositingInputsUpdater::~CompositingInputsUpdater() {} |
23 | 25 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 234 |
233 if (layer->scrollsOverflow()) | 235 if (layer->scrollsOverflow()) |
234 info.lastScrollingAncestor = layer; | 236 info.lastScrollingAncestor = layer; |
235 | 237 |
236 if (layer->layoutObject()->hasClipRelatedProperty()) | 238 if (layer->layoutObject()->hasClipRelatedProperty()) |
237 info.hasAncestorWithClipRelatedProperty = true; | 239 info.hasAncestorWithClipRelatedProperty = true; |
238 | 240 |
239 if (layer->layoutObject()->hasClipPath()) | 241 if (layer->layoutObject()->hasClipPath()) |
240 info.hasAncestorWithClipPath = true; | 242 info.hasAncestorWithClipPath = true; |
241 | 243 |
| 244 layer->setIsGlobalRootScroller(layer == |
| 245 layer->layoutObject() |
| 246 ->document() |
| 247 .frameHost() |
| 248 ->globalRootScrollerController() |
| 249 .rootScrollerPaintLayer()); |
| 250 |
242 bool hasDescendantWithClipPath = false; | 251 bool hasDescendantWithClipPath = false; |
243 bool hasNonIsolatedDescendantWithBlendMode = false; | 252 bool hasNonIsolatedDescendantWithBlendMode = false; |
244 bool hasRootScrollerAsDescendant = false; | 253 bool hasRootScrollerAsDescendant = false; |
245 for (PaintLayer* child = layer->firstChild(); child; | 254 for (PaintLayer* child = layer->firstChild(); child; |
246 child = child->nextSibling()) { | 255 child = child->nextSibling()) { |
247 updateRecursive(child, updateType, info); | 256 updateRecursive(child, updateType, info); |
248 | 257 |
249 hasRootScrollerAsDescendant |= child->hasRootScrollerAsDescendant() || | 258 hasRootScrollerAsDescendant |= child->hasRootScrollerAsDescendant() || |
250 (child == | 259 (child == |
251 child->layoutObject() | 260 child->layoutObject() |
(...skipping 24 matching lines...) Expand all Loading... |
276 ASSERT(!layer->needsCompositingInputsUpdate()); | 285 ASSERT(!layer->needsCompositingInputsUpdate()); |
277 | 286 |
278 for (PaintLayer* child = layer->firstChild(); child; | 287 for (PaintLayer* child = layer->firstChild(); child; |
279 child = child->nextSibling()) | 288 child = child->nextSibling()) |
280 assertNeedsCompositingInputsUpdateBitsCleared(child); | 289 assertNeedsCompositingInputsUpdateBitsCleared(child); |
281 } | 290 } |
282 | 291 |
283 #endif | 292 #endif |
284 | 293 |
285 } // namespace blink | 294 } // namespace blink |
OLD | NEW |