| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 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() == EPosition::kSticky) { | 104 layer->layoutObject().style()->hasStickyConstrainedPosition()) { |
| 105 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 105 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 106 if (info.lastOverflowClipLayer != previousOverflowLayer) { | 106 if (info.lastOverflowClipLayer != previousOverflowLayer) { |
| 107 // Old ancestor scroller should no longer have these constraints. | 107 // Old ancestor scroller should no longer have these constraints. |
| 108 DCHECK(!previousOverflowLayer || | 108 DCHECK(!previousOverflowLayer || |
| 109 !previousOverflowLayer->getScrollableArea() | 109 !previousOverflowLayer->getScrollableArea() |
| 110 ->stickyConstraintsMap() | 110 ->stickyConstraintsMap() |
| 111 .contains(layer)); | 111 .contains(layer)); |
| 112 | 112 |
| 113 // If our ancestor scroller has changed and the previous one was the | 113 // If our ancestor scroller has changed and the previous one was the |
| 114 // root layer, we are no longer viewport constrained. | 114 // root layer, we are no longer viewport constrained. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 ASSERT(!layer->needsCompositingInputsUpdate()); | 272 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 273 | 273 |
| 274 for (PaintLayer* child = layer->firstChild(); child; | 274 for (PaintLayer* child = layer->firstChild(); child; |
| 275 child = child->nextSibling()) | 275 child = child->nextSibling()) |
| 276 assertNeedsCompositingInputsUpdateBitsCleared(child); | 276 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 277 } | 277 } |
| 278 | 278 |
| 279 #endif | 279 #endif |
| 280 | 280 |
| 281 } // namespace blink | 281 } // namespace blink |
| OLD | NEW |