Move the extra logical height distribution into RenderTable as a new step in our layout algorithm
https://bugs.webkit.org/show_bug.cgi?id=81548
Reviewed by Tony Chang.
Refactoring, no expected change in behavior.
Moving the distribution step into RenderTable is needed to implement a better distribution algorithm that would
span several RenderTableSection (which is what IE and FF are doing right now).
* rendering/RenderTable.cpp:
(WebCore::RenderTable::distributeExtraLogicalHeight):
(WebCore::RenderTable::layout):
Moved the distribution step into distributeExtraLogicalHeight. While at it, changed the code to make use of the helper
methods to iterate over the sections and explicitly floor the LayoutUnit before calling distributeExtraLogicalHeight.
* rendering/RenderTable.h:
Added distributeExtraLogicalHeight.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
Changed the method signature as it doesn't handle the distribution step anymore.
* rendering/RenderTableSection.h:
Updated layoutRows signature and exposed distributeExtraLogicalHeightToRows for RenderTable use.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index 8d7dc65..0d799cb 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -520,7 +520,7 @@
return remainingExtraLogicalHeight;
}
-int RenderTableSection::layoutRows(int extraLogicalHeight)
+void RenderTableSection::layoutRows()
{
#ifndef NDEBUG
setNeedsLayoutIsForbidden(true);
@@ -538,8 +538,6 @@
m_overflowingCells.clear();
m_forceSlowPaintPathWithOverflowingCell = false;
- extraLogicalHeight = distributeExtraLogicalHeightToRows(extraLogicalHeight);
-
int hspacing = table()->hBorderSpacing();
int vspacing = table()->vBorderSpacing();
unsigned nEffCols = table()->numEffCols();
@@ -738,7 +736,6 @@
ASSERT(hasOverflowingCell == this->hasOverflowingCell());
statePusher.pop();
- return height();
}
int RenderTableSection::calcOuterBorderBefore() const