| 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/FrameHost.h" |
| 9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
| 10 #include "core/layout/LayoutBlock.h" | 10 #include "core/layout/LayoutBlock.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, | 95 void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, |
| 96 UpdateType updateType, | 96 UpdateType updateType, |
| 97 AncestorInfo info) { | 97 AncestorInfo info) { |
| 98 if (!layer->childNeedsCompositingInputsUpdate() && updateType != ForceUpdate) | 98 if (!layer->childNeedsCompositingInputsUpdate() && updateType != ForceUpdate) |
| 99 return; | 99 return; |
| 100 | 100 |
| 101 const PaintLayer* previousOverflowLayer = layer->ancestorOverflowLayer(); | 101 const PaintLayer* previousOverflowLayer = layer->ancestorOverflowLayer(); |
| 102 layer->updateAncestorOverflowLayer(info.lastOverflowClipLayer); | 102 layer->updateAncestorOverflowLayer(info.lastOverflowClipLayer); |
| 103 if (info.lastOverflowClipLayer && layer->needsCompositingInputsUpdate() && | 103 if (info.lastOverflowClipLayer && layer->needsCompositingInputsUpdate() && |
| 104 layer->layoutObject()->style()->position() == StickyPosition) { | 104 layer->layoutObject()->style()->position() == StickyPosition) { |
| 105 if (info.lastOverflowClipLayer != previousOverflowLayer) { | 105 if (info.lastOverflowClipLayer != previousOverflowLayer && |
| 106 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 106 // Old ancestor scroller should no longer have these constraints. | 107 // Old ancestor scroller should no longer have these constraints. |
| 107 ASSERT(!previousOverflowLayer || | 108 ASSERT(!previousOverflowLayer || |
| 108 !previousOverflowLayer->getScrollableArea() | 109 !previousOverflowLayer->getScrollableArea() |
| 109 ->stickyConstraintsMap() | 110 ->stickyConstraintsMap() |
| 110 .contains(layer)); | 111 .contains(layer)); |
| 111 | 112 |
| 112 if (info.lastOverflowClipLayer->isRootLayer()) | 113 if (info.lastOverflowClipLayer->isRootLayer()) |
| 113 layer->layoutObject() | 114 layer->layoutObject() |
| 114 ->view() | 115 ->view() |
| 115 ->frameView() | 116 ->frameView() |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 ASSERT(!layer->needsCompositingInputsUpdate()); | 257 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 257 | 258 |
| 258 for (PaintLayer* child = layer->firstChild(); child; | 259 for (PaintLayer* child = layer->firstChild(); child; |
| 259 child = child->nextSibling()) | 260 child = child->nextSibling()) |
| 260 assertNeedsCompositingInputsUpdateBitsCleared(child); | 261 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 261 } | 262 } |
| 262 | 263 |
| 263 #endif | 264 #endif |
| 264 | 265 |
| 265 } // namespace blink | 266 } // namespace blink |
| OLD | NEW |