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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 | 298 // If the current paint invalidation container is not a stacking context and this object is |
| 299 // a or treated as a stacking context, creating this layer may cause this ob ject and its | 299 // a stacked content, creating this layer may cause this object and its |
|
pdr.
2016/03/16 02:22:53
Nit: "... and this object is stacked content, ..."
Xianzhu
2016/03/16 18:10:24
Done.
| |
| 300 // descendants to change paint invalidation container. Therefore we must eag erly invalidate | 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. | 301 // them on the original paint invalidation container before creating the lay er. |
| 302 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted() && style Ref().isTreatedAsOrStackingContext()) { | 302 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted() && Paint LayerStackingNode::shouldStackObject(*this)) { |
| 303 const LayoutBoxModelObject& currentPaintInvalidationContainer = containe rForPaintInvalidation(); | 303 const LayoutBoxModelObject& currentPaintInvalidationContainer = containe rForPaintInvalidation(); |
| 304 if (!currentPaintInvalidationContainer.styleRef().isStackingContext()) | 304 if (!currentPaintInvalidationContainer.styleRef().isStackingContext()) |
| 305 invalidatePaintIncludingNonSelfPaintingLayerDescendants(currentPaint InvalidationContainer); | 305 invalidatePaintIncludingNonSelfPaintingLayerDescendants(currentPaint InvalidationContainer); |
| 306 } | 306 } |
| 307 | 307 |
| 308 ASSERT(!m_layer); | 308 ASSERT(!m_layer); |
| 309 m_layer = adoptPtr(new PaintLayer(this, type)); | 309 m_layer = adoptPtr(new PaintLayer(this, type)); |
| 310 setHasLayer(true); | 310 setHasLayer(true); |
| 311 m_layer->insertOnlyThisLayer(); | 311 m_layer->insertOnlyThisLayer(); |
| 312 } | 312 } |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 960 if (rootElementStyle->hasBackground()) | 960 if (rootElementStyle->hasBackground()) |
| 961 return false; | 961 return false; |
| 962 | 962 |
| 963 if (node() != document().firstBodyElement()) | 963 if (node() != document().firstBodyElement()) |
| 964 return false; | 964 return false; |
| 965 | 965 |
| 966 return true; | 966 return true; |
| 967 } | 967 } |
| 968 | 968 |
| 969 } // namespace blink | 969 } // namespace blink |
| OLD | NEW |