| 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 | 283 // If the current paint invalidation container is not a stacking context and
this object is |
| 284 // Acquiring a PaintLayer may change the paint invalidation container. There
fore we must eagerly | 284 // a or treated as a stacking context, creating this layer may cause this ob
ject and its |
| 285 // invalidate paint for this object before creating the layer. | 285 // descendants to change paint invalidation container. Therefore we must eag
erly invalidate |
| 286 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted()) { | 286 // them on the original paint invalidation container before creating the lay
er. |
| 287 DisablePaintInvalidationStateAsserts invalidationDisabler; | 287 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted() && style
Ref().isTreatedAsOrStackingContext()) { |
| 288 DisableCompositingQueryAsserts compositingDisabler; | 288 if (const LayoutBoxModelObject* currentPaintInvalidationContainer = cont
ainerForPaintInvalidation()) { |
| 289 | 289 if (!currentPaintInvalidationContainer->styleRef().isStackingContext
()) |
| 290 // It would be more correct to call invalidatePaintIncludingNonCompositi
ngDescendants, but | 290 invalidatePaintIncludingNonSelfPaintingLayerDescendants(*current
PaintInvalidationContainer); |
| 291 // we do this instead to avoid performance issues when creating large nu
mbers of layers. | 291 } |
| 292 const LayoutBoxModelObject& paintInvalidationContainer = containerForPai
ntInvalidationOnRootedTree(); | |
| 293 invalidatePaintUsingContainer( | |
| 294 paintInvalidationContainer, | |
| 295 boundsRectForPaintInvalidation(&paintInvalidationContainer), | |
| 296 PaintInvalidationLayer); | |
| 297 } | 292 } |
| 298 | 293 |
| 299 ASSERT(!m_layer); | 294 ASSERT(!m_layer); |
| 300 m_layer = adoptPtr(new PaintLayer(this, type)); | 295 m_layer = adoptPtr(new PaintLayer(this, type)); |
| 301 setHasLayer(true); | 296 setHasLayer(true); |
| 302 m_layer->insertOnlyThisLayer(); | 297 m_layer->insertOnlyThisLayer(); |
| 303 } | 298 } |
| 304 | 299 |
| 305 void LayoutBoxModelObject::destroyLayer() | 300 void LayoutBoxModelObject::destroyLayer() |
| 306 { | 301 { |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 if (rootElementStyle->hasBackground()) | 1050 if (rootElementStyle->hasBackground()) |
| 1056 return false; | 1051 return false; |
| 1057 | 1052 |
| 1058 if (node() != document().firstBodyElement()) | 1053 if (node() != document().firstBodyElement()) |
| 1059 return false; | 1054 return false; |
| 1060 | 1055 |
| 1061 return true; | 1056 return true; |
| 1062 } | 1057 } |
| 1063 | 1058 |
| 1064 } // namespace blink | 1059 } // namespace blink |
| OLD | NEW |