| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 if (newStyleIsViewportConstained && layer()) | 273 if (newStyleIsViewportConstained && layer()) |
| 274 frameView->addViewportConstrainedObject(this); | 274 frameView->addViewportConstrainedObject(this); |
| 275 else | 275 else |
| 276 frameView->removeViewportConstrainedObject(this); | 276 frameView->removeViewportConstrainedObject(this); |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 } | 279 } |
| 280 | 280 |
| 281 void LayoutBoxModelObject::createLayer(PaintLayerType type) | 281 void LayoutBoxModelObject::createLayer(PaintLayerType type) |
| 282 { | 282 { |
| 283 | |
| 284 // Acquiring a PaintLayer may change the paint invalidation container. There
fore we must eagerly | 283 // Acquiring a PaintLayer may change the paint invalidation container. There
fore we must eagerly |
| 285 // invalidate paint for this object before creating the layer. | 284 // invalidate paint for this object before creating the layer. |
| 286 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted()) { | 285 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted()) |
| 287 DisablePaintInvalidationStateAsserts invalidationDisabler; | 286 invalidatePaintIncludingNonLayerDescendants(); |
| 288 DisableCompositingQueryAsserts compositingDisabler; | |
| 289 | |
| 290 // It would be more correct to call invalidatePaintIncludingNonCompositi
ngDescendants, but | |
| 291 // we do this instead to avoid performance issues when creating large nu
mbers of layers. | |
| 292 const LayoutBoxModelObject& paintInvalidationContainer = containerForPai
ntInvalidationOnRootedTree(); | |
| 293 invalidatePaintUsingContainer( | |
| 294 paintInvalidationContainer, | |
| 295 boundsRectForPaintInvalidation(&paintInvalidationContainer), | |
| 296 PaintInvalidationLayer); | |
| 297 } | |
| 298 | 287 |
| 299 ASSERT(!m_layer); | 288 ASSERT(!m_layer); |
| 300 m_layer = adoptPtr(new PaintLayer(this, type)); | 289 m_layer = adoptPtr(new PaintLayer(this, type)); |
| 301 setHasLayer(true); | 290 setHasLayer(true); |
| 302 m_layer->insertOnlyThisLayer(); | 291 m_layer->insertOnlyThisLayer(); |
| 303 } | 292 } |
| 304 | 293 |
| 305 void LayoutBoxModelObject::destroyLayer() | 294 void LayoutBoxModelObject::destroyLayer() |
| 306 { | 295 { |
| 307 setHasLayer(false); | 296 setHasLayer(false); |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 if (rootElementStyle->hasBackground()) | 1044 if (rootElementStyle->hasBackground()) |
| 1056 return false; | 1045 return false; |
| 1057 | 1046 |
| 1058 if (node() != document().firstBodyElement()) | 1047 if (node() != document().firstBodyElement()) |
| 1059 return false; | 1048 return false; |
| 1060 | 1049 |
| 1061 return true; | 1050 return true; |
| 1062 } | 1051 } |
| 1063 | 1052 |
| 1064 } // namespace blink | 1053 } // namespace blink |
| OLD | NEW |