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

Unified Diff: Source/core/paint/DeprecatedPaintLayerStackingNode.cpp

Issue 1176503002: Rename isNormalFlowOnly to something meaningful (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nittified! Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerStackingNode.h ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DeprecatedPaintLayerStackingNode.cpp
diff --git a/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp b/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp
index 25b2fbac73fb1aaaeabe3d35e7233def7d6abb35..dc91285c87b74b38fc4add8f6036dee6be90c336 100644
--- a/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp
+++ b/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp
@@ -55,7 +55,7 @@
namespace blink {
// FIXME: This should not require DeprecatedPaintLayer. There is currently a cycle where
-// in order to determine if we shoulBeNormalFlowOnly() we have to ask the paint
+// in order to determine if we shoulBeTreatedAsStackingContextForPainting() we have to ask the paint
// layer about some of its state.
DeprecatedPaintLayerStackingNode::DeprecatedPaintLayerStackingNode(DeprecatedPaintLayer* layer)
: m_layer(layer)
@@ -65,7 +65,7 @@ DeprecatedPaintLayerStackingNode::DeprecatedPaintLayerStackingNode(DeprecatedPai
, m_stackingParent(0)
#endif
{
- m_isNormalFlowOnly = shouldBeNormalFlowOnly();
+ m_isTreatedAsStackingContextForPainting = shouldBeTreatedAsStackingContextForPainting();
// Non-stacking contexts should have empty z-order lists. As this is already the case,
// there is no need to dirty / recompute these lists.
@@ -186,7 +186,7 @@ void DeprecatedPaintLayerStackingNode::updateNormalFlowList()
ASSERT(m_layerListMutationAllowed);
for (DeprecatedPaintLayer* child = layer()->firstChild(); child; child = child->nextSibling()) {
- if (child->stackingNode()->isNormalFlowOnly() && (!layer()->reflectionInfo() || layer()->reflectionInfo()->reflectionLayer() != child)) {
+ if (!child->stackingNode()->isTreatedAsStackingContextForPainting() && (!layer()->reflectionInfo() || layer()->reflectionInfo()->reflectionLayer() != child)) {
if (!m_normalFlowList)
m_normalFlowList = adoptPtr(new Vector<DeprecatedPaintLayerStackingNode*>);
m_normalFlowList->append(child->stackingNode());
@@ -205,7 +205,7 @@ void DeprecatedPaintLayerStackingNode::collectLayers(OwnPtr<Vector<DeprecatedPai
if (layer()->isInTopLayer())
return;
- if (!isNormalFlowOnly()) {
+ if (isTreatedAsStackingContextForPainting()) {
OwnPtr<Vector<DeprecatedPaintLayerStackingNode*>>& buffer = (zIndex() >= 0) ? posBuffer : negBuffer;
if (!buffer)
buffer = adoptPtr(new Vector<DeprecatedPaintLayerStackingNode*>);
@@ -295,20 +295,13 @@ void DeprecatedPaintLayerStackingNode::updateStackingNodesAfterStyleChange(const
clearZOrderLists();
}
-// FIXME: Rename shouldBeNormalFlowOnly to something more accurate now that CSS
-// 2.1 defines the term "normal flow".
-bool DeprecatedPaintLayerStackingNode::shouldBeNormalFlowOnly() const
+void DeprecatedPaintLayerStackingNode::updateIsTreatedAsStackingContextForPainting()
{
- return !isStackingContext() && !layoutObject()->isPositioned();
-}
-
-void DeprecatedPaintLayerStackingNode::updateIsNormalFlowOnly()
-{
- bool isNormalFlowOnly = shouldBeNormalFlowOnly();
- if (isNormalFlowOnly == this->isNormalFlowOnly())
+ bool isTreatedAsStackingContextForPainting = shouldBeTreatedAsStackingContextForPainting();
+ if (isTreatedAsStackingContextForPainting == this->isTreatedAsStackingContextForPainting())
return;
- m_isNormalFlowOnly = isNormalFlowOnly;
+ m_isTreatedAsStackingContextForPainting = isTreatedAsStackingContextForPainting;
if (DeprecatedPaintLayer* p = layer()->parent())
p->stackingNode()->dirtyNormalFlowList();
dirtyStackingContextZOrderLists();
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerStackingNode.h ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698