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

Unified Diff: Source/core/layout/LayoutObject.cpp

Issue 1124993002: Cleanup: Only need one bit (not two) to express flow thread state. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
« Source/core/layout/LayoutObject.h ('K') | « Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index e47d37408810cef6b85872776be4e307114c9f1b..c15f41661d293199bd5e76ebef2af43f102eaa95 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -265,7 +265,7 @@ bool LayoutObject::isLegend() const
return isHTMLLegendElement(node());
}
-void LayoutObject::setFlowThreadStateIncludingDescendants(FlowThreadState state)
+void LayoutObject::setIsInsideFlowThreadIncludingDescendants(bool insideFlowThread)
{
LayoutObject* next;
for (LayoutObject *object = this; object; object = next) {
@@ -275,8 +275,8 @@ void LayoutObject::setFlowThreadStateIncludingDescendants(FlowThreadState state)
continue;
}
next = object->nextInPreOrder(this);
- ASSERT(state != object->flowThreadState());
- object->setFlowThreadState(state);
+ ASSERT(insideFlowThread != object->isInsideFlowThread());
+ object->setIsInsideFlowThread(insideFlowThread);
}
}
@@ -598,7 +598,7 @@ LayoutBox* LayoutObject::enclosingScrollableBox() const
LayoutFlowThread* LayoutObject::locateFlowThreadContainingBlock() const
{
- ASSERT(flowThreadState() != NotInsideFlowThread);
+ ASSERT(isInsideFlowThread());
// See if we have the thread cached because we're in the middle of layout.
if (LayoutState* layoutState = view()->layoutState()) {
@@ -2515,7 +2515,7 @@ void LayoutObject::willBeRemovedFromTree()
void LayoutObject::removeFromLayoutFlowThread()
{
- if (flowThreadState() == NotInsideFlowThread)
+ if (!isInsideFlowThread())
return;
// Sometimes we remove the element from the flow, but it's not destroyed at that time.
@@ -2542,7 +2542,7 @@ void LayoutObject::removeFromLayoutFlowThreadRecursive(LayoutFlowThread* layoutF
if (layoutFlowThread && layoutFlowThread != this)
layoutFlowThread->flowThreadDescendantWillBeRemoved(this);
- setFlowThreadState(NotInsideFlowThread);
+ setIsInsideFlowThread(false);
RELEASE_ASSERT(!spannerPlaceholder());
}
« Source/core/layout/LayoutObject.h ('K') | « Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698