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

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 148473003: Begin getting rid of the recursion in the various RenderObject methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't ascend to the root object! Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index d6c298a73982a99d637007027bab4d7da285f2b1..ce7f7ad1b09b99be7bb9ca4d0021d31f3c0ead2c 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -286,14 +286,12 @@ bool RenderObject::isLegend() const
void RenderObject::setFlowThreadStateIncludingDescendants(FlowThreadState state)
{
- setFlowThreadState(state);
-
- for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
- // If the child is a fragmentation context it already updated the descendants flag accordingly.
- if (child->isRenderFlowThread())
+ for (RenderObject *object = this; object; object = object->nextInPreOrder(this)) {
+ // If object is a fragmentation context it already updated the descendants flag accordingly.
+ if (object->isRenderFlowThread())
continue;
- ASSERT(state != child->flowThreadState());
- child->setFlowThreadStateIncludingDescendants(state);
+ ASSERT(state != object->flowThreadState());
+ object->setFlowThreadState(state);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698