Move setting of some layout bits to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122256

Reviewed by Andreas Kling.
        
These bits never apply to RenderText nodes:
        
normalChildNeedsLayout
posChildNeedsLayout
needsSimplifiedNormalFlowLayout
normalChildNeedsLayout
positionedMovementLayout

The code for setting them can be moved to RenderElement.

Also separated the code paths for setting and clearing the bits and uninlined
everything that is not massively popular.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index 1bdac41..7297d82 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -326,7 +326,7 @@
                     }
                     cell->clearIntrinsicPadding();
                     cell->clearOverrideSize();
-                    cell->setChildNeedsLayout(true, MarkOnlyThis);
+                    cell->setChildNeedsLayout(MarkOnlyThis);
                     cell->layoutIfNeeded();
                 }
 
@@ -406,7 +406,7 @@
     }
 
     statePusher.pop();
-    setNeedsLayout(false);
+    clearNeedsLayout();
 }
 
 void RenderTableSection::distributeExtraLogicalHeightToPercentRows(int& extraLogicalHeight, int totalPercent)
@@ -566,7 +566,7 @@
                 if (!o->isText() && o->style()->logicalHeight().isPercent() && (flexAllChildren || ((o->isReplaced() || (o->isBox() && toRenderBox(o)->scrollsOverflow())) && !o->isTextControl()))) {
                     // Tables with no sections do not flex.
                     if (!o->isTable() || toRenderTable(o)->hasSections()) {
-                        o->setNeedsLayout(true, MarkOnlyThis);
+                        o->setNeedsLayout(MarkOnlyThis);
                         cellChildrenFlex = true;
                     }
                 }
@@ -582,7 +582,7 @@
                     while (box != cell) {
                         if (box->normalChildNeedsLayout())
                             break;
-                        box->setChildNeedsLayout(true, MarkOnlyThis);
+                        box->setChildNeedsLayout(MarkOnlyThis);
                         box = box->containingBlock();
                         ASSERT(box);
                         if (!box)
@@ -593,7 +593,7 @@
             }
 
             if (cellChildrenFlex) {
-                cell->setChildNeedsLayout(true, MarkOnlyThis);
+                cell->setChildNeedsLayout(MarkOnlyThis);
                 // Alignment within a cell is based off the calculated
                 // height, which becomes irrelevant once the cell has
                 // been resized based off its percentage.
@@ -615,7 +615,7 @@
             setLogicalPositionForCell(cell, c);
 
             if (!cell->needsLayout() && view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
-                cell->setChildNeedsLayout(true, MarkOnlyThis);
+                cell->setChildNeedsLayout(MarkOnlyThis);
 
             cell->layoutIfNeeded();
 
@@ -1238,7 +1238,7 @@
     }
 
     m_grid.shrinkToFit();
-    setNeedsLayout(true);
+    setNeedsLayout();
 }
 
 // FIXME: This function could be made O(1) in certain cases (like for the non-most-constrainive cells' case).