Chromium Code Reviews| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 288 if (newStyleIsViewportConstained && layer()) | 288 if (newStyleIsViewportConstained && layer()) |
| 289 frameView->addViewportConstrainedObject(this); | 289 frameView->addViewportConstrainedObject(this); |
| 290 else | 290 else |
| 291 frameView->removeViewportConstrainedObject(this); | 291 frameView->removeViewportConstrainedObject(this); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 | 295 |
| 296 void LayoutBoxModelObject::createLayer(PaintLayerType type) | 296 void LayoutBoxModelObject::createLayer(PaintLayerType type) |
| 297 { | 297 { |
| 298 // If the current paint invalidation container is not a stacking context and this object is | |
| 299 // stacked content, creating this layer may cause this object and its | |
| 300 // descendants to change paint invalidation container. Therefore we must eag erly invalidate | |
| 301 // them on the original paint invalidation container before creating the lay er. | |
| 302 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted() && style Ref().isStacked()) { | |
| 303 const LayoutBoxModelObject& currentPaintInvalidationContainer = containe rForPaintInvalidation(); | |
| 304 if (!currentPaintInvalidationContainer.styleRef().isStackingContext()) | |
| 305 invalidatePaintIncludingNonSelfPaintingLayerDescendants(currentPaint InvalidationContainer); | |
| 306 } | |
| 307 | |
|
Xianzhu
2016/04/08 18:08:48
This is moved into PaintLayer::insertOnlyThisLayer
pdr.
2016/04/08 19:46:07
Is this safe to move? The comment says that we mus
Xianzhu
2016/04/08 21:30:55
You're right. Thanks for scheduling the dry-run. I
| |
| 308 ASSERT(!m_layer); | 298 ASSERT(!m_layer); |
| 309 m_layer = adoptPtr(new PaintLayer(this, type)); | 299 m_layer = adoptPtr(new PaintLayer(this, type)); |
| 310 setHasLayer(true); | 300 setHasLayer(true); |
| 311 m_layer->insertOnlyThisLayer(); | 301 m_layer->insertOnlyThisLayer(); |
| 312 } | 302 } |
| 313 | 303 |
| 314 void LayoutBoxModelObject::destroyLayer() | 304 void LayoutBoxModelObject::destroyLayer() |
| 315 { | 305 { |
| 316 setHasLayer(false); | 306 setHasLayer(false); |
| 317 m_layer = nullptr; | 307 m_layer = nullptr; |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 969 if (rootElementStyle->hasBackground()) | 959 if (rootElementStyle->hasBackground()) |
| 970 return false; | 960 return false; |
| 971 | 961 |
| 972 if (node() != document().firstBodyElement()) | 962 if (node() != document().firstBodyElement()) |
| 973 return false; | 963 return false; |
| 974 | 964 |
| 975 return true; | 965 return true; |
| 976 } | 966 } |
| 977 | 967 |
| 978 } // namespace blink | 968 } // namespace blink |
| OLD | NEW |