summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/rendering/RenderTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderTable.cpp')
-rw-r--r--Source/WebCore/rendering/RenderTable.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/Source/WebCore/rendering/RenderTable.cpp b/Source/WebCore/rendering/RenderTable.cpp
index bb90e97..69c073c 100644
--- a/Source/WebCore/rendering/RenderTable.cpp
+++ b/Source/WebCore/rendering/RenderTable.cpp
@@ -261,6 +261,18 @@ void RenderTable::computeLogicalWidth()
}
}
+void RenderTable::adjustLogicalHeightForCaption()
+{
+ ASSERT(m_caption);
+ IntRect captionRect(m_caption->x(), m_caption->y(), m_caption->width(), m_caption->height());
+
+ m_caption->setLogicalLocation(m_caption->marginStart(), logicalHeight());
+ if (!selfNeedsLayout() && m_caption->checkForRepaintDuringLayout())
+ m_caption->repaintDuringLayoutIfMoved(captionRect);
+
+ setLogicalHeight(logicalHeight() + m_caption->logicalHeight() + m_caption->marginBefore() + m_caption->marginAfter());
+}
+
void RenderTable::layout()
{
ASSERT(needsLayout());
@@ -367,14 +379,7 @@ void RenderTable::layout()
// FIXME: Collapse caption margin.
if (m_caption && m_caption->style()->captionSide() != CAPBOTTOM) {
- IntRect captionRect(m_caption->x(), m_caption->y(), m_caption->width(), m_caption->height());
-
- m_caption->setLogicalLocation(m_caption->marginStart(), logicalHeight());
- if (!selfNeedsLayout() && m_caption->checkForRepaintDuringLayout())
- m_caption->repaintDuringLayoutIfMoved(captionRect);
-
- setLogicalHeight(logicalHeight() + m_caption->logicalHeight() + m_caption->marginBefore() + m_caption->marginAfter());
-
+ adjustLogicalHeightForCaption();
if (logicalHeight() != oldTableLogicalTop) {
sectionMoved = true;
movedSectionLogicalTop = min(logicalHeight(), oldTableLogicalTop);
@@ -429,15 +434,8 @@ void RenderTable::layout()
setLogicalHeight(logicalHeight() + borderAndPaddingAfter);
- if (m_caption && m_caption->style()->captionSide() == CAPBOTTOM) {
- IntRect captionRect(m_caption->x(), m_caption->y(), m_caption->width(), m_caption->height());
-
- m_caption->setLogicalLocation(m_caption->marginStart(), logicalHeight());
- if (!selfNeedsLayout() && m_caption->checkForRepaintDuringLayout())
- m_caption->repaintDuringLayoutIfMoved(captionRect);
-
- setLogicalHeight(logicalHeight() + m_caption->logicalHeight() + m_caption->marginBefore() + m_caption->marginAfter());
- }
+ if (m_caption && m_caption->style()->captionSide() == CAPBOTTOM)
+ adjustLogicalHeightForCaption();
if (isPositioned())
computeLogicalHeight();
@@ -577,6 +575,10 @@ void RenderTable::paintObject(PaintInfo& paintInfo, int tx, int ty)
}
m_currentBorder = 0;
}
+
+ // Paint outline.
+ if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE)
+ paintOutline(paintInfo.context, tx, ty, width(), height());
}
void RenderTable::subtractCaptionRect(IntRect& rect) const