Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 1798263002: Rename isTreatedAsOrStackingContext to isStacked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Markdown, isStacked, paintAllPhasesAtomically Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698