| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void CompositingInputsUpdater::UpdateRecursive(PaintLayer* layer, | 97 void CompositingInputsUpdater::UpdateRecursive(PaintLayer* layer, |
| 98 UpdateType update_type, | 98 UpdateType update_type, |
| 99 AncestorInfo info) { | 99 AncestorInfo info) { |
| 100 if (!layer->ChildNeedsCompositingInputsUpdate() && | 100 if (!layer->ChildNeedsCompositingInputsUpdate() && |
| 101 update_type != kForceUpdate) | 101 update_type != kForceUpdate) |
| 102 return; | 102 return; |
| 103 | 103 |
| 104 const PaintLayer* previous_overflow_layer = layer->AncestorOverflowLayer(); | 104 const PaintLayer* previous_overflow_layer = layer->AncestorOverflowLayer(); |
| 105 layer->UpdateAncestorOverflowLayer(info.last_overflow_clip_layer); | 105 layer->UpdateAncestorOverflowLayer(info.last_overflow_clip_layer); |
| 106 if (info.last_overflow_clip_layer && layer->NeedsCompositingInputsUpdate() && | 106 if (info.last_overflow_clip_layer && layer->NeedsCompositingInputsUpdate() && |
| 107 layer->GetLayoutObject().Style()->HasStickyConstrainedPosition()) { | 107 layer->GetLayoutObject().Style()->GetPosition() == EPosition::kSticky) { |
| 108 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 108 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 109 if (info.last_overflow_clip_layer != previous_overflow_layer) { | 109 if (info.last_overflow_clip_layer != previous_overflow_layer) { |
| 110 // Old ancestor scroller should no longer have these constraints. | 110 // Old ancestor scroller should no longer have these constraints. |
| 111 DCHECK(!previous_overflow_layer || | 111 DCHECK(!previous_overflow_layer || |
| 112 !previous_overflow_layer->GetScrollableArea() | 112 !previous_overflow_layer->GetScrollableArea() |
| 113 ->GetStickyConstraintsMap() | 113 ->GetStickyConstraintsMap() |
| 114 .Contains(layer)); | 114 .Contains(layer)); |
| 115 | 115 |
| 116 // If our ancestor scroller has changed and the previous one was the | 116 // If our ancestor scroller has changed and the previous one was the |
| 117 // root layer, we are no longer viewport constrained. | 117 // root layer, we are no longer viewport constrained. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 DCHECK(!layer->NeedsCompositingInputsUpdate()); | 278 DCHECK(!layer->NeedsCompositingInputsUpdate()); |
| 279 | 279 |
| 280 for (PaintLayer* child = layer->FirstChild(); child; | 280 for (PaintLayer* child = layer->FirstChild(); child; |
| 281 child = child->NextSibling()) | 281 child = child->NextSibling()) |
| 282 AssertNeedsCompositingInputsUpdateBitsCleared(child); | 282 AssertNeedsCompositingInputsUpdateBitsCleared(child); |
| 283 } | 283 } |
| 284 | 284 |
| 285 #endif | 285 #endif |
| 286 | 286 |
| 287 } // namespace blink | 287 } // namespace blink |
| OLD | NEW |