| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 if (layer->layoutObject()->hasClipPath()) | 240 if (layer->layoutObject()->hasClipPath()) |
| 241 info.hasAncestorWithClipPath = true; | 241 info.hasAncestorWithClipPath = true; |
| 242 | 242 |
| 243 for (PaintLayer* child = layer->firstChild(); child; | 243 for (PaintLayer* child = layer->firstChild(); child; |
| 244 child = child->nextSibling()) | 244 child = child->nextSibling()) |
| 245 updateRecursive(child, updateType, info); | 245 updateRecursive(child, updateType, info); |
| 246 | 246 |
| 247 layer->didUpdateCompositingInputs(); | 247 layer->didUpdateCompositingInputs(); |
| 248 | 248 |
| 249 m_geometryMap.popMappingsToAncestor(layer->parent()); | 249 m_geometryMap.popMappingsToAncestor(layer->parent()); |
| 250 | |
| 251 if (layer->selfPaintingStatusChanged()) { | |
| 252 layer->clearSelfPaintingStatusChanged(); | |
| 253 // If the floating object becomes non-self-painting, so some ancestor should | |
| 254 // paint it; if it becomes self-painting, it should paint itself and no | |
| 255 // ancestor should paint it. | |
| 256 if (layer->layoutObject()->isFloating()) { | |
| 257 LayoutBlockFlow::updateAncestorShouldPaintFloatingObject( | |
| 258 *layer->layoutBox()); | |
| 259 } | |
| 260 } | |
| 261 } | 250 } |
| 262 | 251 |
| 263 #if DCHECK_IS_ON() | 252 #if DCHECK_IS_ON() |
| 264 | 253 |
| 265 void CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared( | 254 void CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared( |
| 266 PaintLayer* layer) { | 255 PaintLayer* layer) { |
| 267 ASSERT(!layer->childNeedsCompositingInputsUpdate()); | 256 ASSERT(!layer->childNeedsCompositingInputsUpdate()); |
| 268 ASSERT(!layer->needsCompositingInputsUpdate()); | 257 ASSERT(!layer->needsCompositingInputsUpdate()); |
| 269 | 258 |
| 270 for (PaintLayer* child = layer->firstChild(); child; | 259 for (PaintLayer* child = layer->firstChild(); child; |
| 271 child = child->nextSibling()) | 260 child = child->nextSibling()) |
| 272 assertNeedsCompositingInputsUpdateBitsCleared(child); | 261 assertNeedsCompositingInputsUpdateBitsCleared(child); |
| 273 } | 262 } |
| 274 | 263 |
| 275 #endif | 264 #endif |
| 276 | 265 |
| 277 } // namespace blink | 266 } // namespace blink |
| OLD | NEW |