summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderTable.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
committerFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
commit5f1ab04193ad0130ca8204aadaceae083aca9881 (patch)
tree5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebCore/rendering/RenderTable.cpp
parent194315e5a908cc8ed67d597010544803eef1ac59 (diff)
downloadexternal_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2
Get WebKit r44544.
Diffstat (limited to 'WebCore/rendering/RenderTable.cpp')
-rw-r--r--WebCore/rendering/RenderTable.cpp44
1 files changed, 18 insertions, 26 deletions
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index f4b1033..ed1be3e 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -115,7 +115,6 @@ void RenderTable::addChild(RenderObject* child, RenderObject* beforeChild)
beforeChild = lastChild();
bool wrapInAnonymousSection = !child->isPositioned();
- bool isTableElement = node() && node()->hasTagName(tableTag);
if (child->isRenderBlock() && child->style()->display() == TABLE_CAPTION) {
// First caption wins.
@@ -135,44 +134,37 @@ void RenderTable::addChild(RenderObject* child, RenderObject* beforeChild)
} else if (child->isTableSection()) {
switch (child->style()->display()) {
case TABLE_HEADER_GROUP:
- if (child->isTableSection()) {
- resetSectionPointerIfNotBefore(m_head, beforeChild);
- if (!m_head) {
- m_head = static_cast<RenderTableSection*>(child);
- } else {
- resetSectionPointerIfNotBefore(m_firstBody, beforeChild);
- if (!m_firstBody)
- m_firstBody = static_cast<RenderTableSection*>(child);
- }
+ resetSectionPointerIfNotBefore(m_head, beforeChild);
+ if (!m_head) {
+ m_head = static_cast<RenderTableSection*>(child);
+ } else {
+ resetSectionPointerIfNotBefore(m_firstBody, beforeChild);
+ if (!m_firstBody)
+ m_firstBody = static_cast<RenderTableSection*>(child);
}
wrapInAnonymousSection = false;
break;
case TABLE_FOOTER_GROUP:
- if (child->isTableSection()) {
- resetSectionPointerIfNotBefore(m_foot, beforeChild);
- if (!m_foot) {
- m_foot = static_cast<RenderTableSection*>(child);
- wrapInAnonymousSection = false;
- break;
- }
+ resetSectionPointerIfNotBefore(m_foot, beforeChild);
+ if (!m_foot) {
+ m_foot = static_cast<RenderTableSection*>(child);
+ wrapInAnonymousSection = false;
+ break;
}
// Fall through.
case TABLE_ROW_GROUP:
- if (child->isTableSection()) {
- resetSectionPointerIfNotBefore(m_firstBody, beforeChild);
- if (!m_firstBody)
- m_firstBody = static_cast<RenderTableSection*>(child);
- }
+ resetSectionPointerIfNotBefore(m_firstBody, beforeChild);
+ if (!m_firstBody)
+ m_firstBody = static_cast<RenderTableSection*>(child);
wrapInAnonymousSection = false;
break;
default:
ASSERT_NOT_REACHED();
}
- } else if (child->isTableCell() || child->isTableRow()) {
+ } else if (child->isTableCell() || child->isTableRow())
+ wrapInAnonymousSection = true;
+ else
wrapInAnonymousSection = true;
- } else
- // Allow a form to just sit at the top level.
- wrapInAnonymousSection = !isTableElement || !child->node() || !(child->node()->hasTagName(formTag) && document()->isHTMLDocument());
if (!wrapInAnonymousSection) {
// If the next renderer is actually wrapped in an anonymous table section, we need to go up and find that.