Index: Source/core/rendering/RenderTable.cpp |
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp |
index 4df5fed0db9eebeab0289592bcc21b88987981d5..01c1695bf0cea930e02af2974dc07d45576b14f6 100644 |
--- a/Source/core/rendering/RenderTable.cpp |
+++ b/Source/core/rendering/RenderTable.cpp |
@@ -28,6 +28,7 @@ |
#include "HTMLNames.h" |
#include "core/dom/Document.h" |
+#include "core/html/HTMLTableElement.h" |
#include "core/page/FrameView.h" |
#include "core/rendering/AutoTableLayout.h" |
#include "core/rendering/FixedTableLayout.h" |
@@ -324,7 +325,7 @@ LayoutUnit RenderTable::convertStyleLogicalWidthToComputedWidth(const Length& st |
// HTML tables' width styles already include borders and paddings, but CSS tables' width styles do not. |
LayoutUnit borders = 0; |
- bool isCSSTable = !node() || !node()->hasTagName(tableTag); |
+ bool isCSSTable = !node() || !isHTMLTableElement(node()); |
if (isCSSTable && styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive() && style()->boxSizing() == CONTENT_BOX) |
borders = borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() : paddingStart() + paddingEnd()); |
@@ -341,7 +342,7 @@ LayoutUnit RenderTable::convertStyleLogicalHeightToComputedHeight(const Length& |
// HTML tables size as though CSS height includes border/padding, CSS tables do not. |
LayoutUnit borders = LayoutUnit(); |
// FIXME: We cannot apply box-sizing: content-box on <table> which other browsers allow. |
- if ((node() && node()->hasTagName(tableTag)) || style()->boxSizing() == BORDER_BOX) { |
+ if ((node() && isHTMLTableElement(node())) || style()->boxSizing() == BORDER_BOX) { |
borders = borderAndPadding; |
} |
computedLogicalHeight = styleLogicalHeight.value() - borders; |