Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1376)

Unified Diff: Source/core/rendering/RenderTableCell.cpp

Issue 197283025: Use new is*Element() helper functions more in rendering code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderTable.cpp ('k') | Source/core/rendering/RenderTableCol.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTableCell.cpp
diff --git a/Source/core/rendering/RenderTableCell.cpp b/Source/core/rendering/RenderTableCell.cpp
index e33032a80302afe9369836f8112134d7c8d2ce0a..b465f0eabe0b86fdde164ed68f239936633b6b87 100644
--- a/Source/core/rendering/RenderTableCell.cpp
+++ b/Source/core/rendering/RenderTableCell.cpp
@@ -75,16 +75,16 @@ void RenderTableCell::willBeRemovedFromTree()
unsigned RenderTableCell::parseColSpanFromDOM() const
{
ASSERT(node());
- if (node()->hasTagName(tdTag) || node()->hasTagName(thTag))
- return min<unsigned>(toHTMLTableCellElement(node())->colSpan(), maxColumnIndex);
+ if (isHTMLTableCellElement(*node()))
+ return min<unsigned>(toHTMLTableCellElement(*node()).colSpan(), maxColumnIndex);
return 1;
}
unsigned RenderTableCell::parseRowSpanFromDOM() const
{
ASSERT(node());
- if (node()->hasTagName(tdTag) || node()->hasTagName(thTag))
- return min<unsigned>(toHTMLTableCellElement(node())->rowSpan(), maxRowIndex);
+ if (isHTMLTableCellElement(*node()))
+ return min<unsigned>(toHTMLTableCellElement(*node()).rowSpan(), maxRowIndex);
return 1;
}
@@ -99,7 +99,7 @@ void RenderTableCell::updateColAndRowSpanFlags()
void RenderTableCell::colSpanOrRowSpanChanged()
{
ASSERT(node());
- ASSERT(node()->hasTagName(tdTag) || node()->hasTagName(thTag));
+ ASSERT(isHTMLTableCellElement(*node()));
updateColAndRowSpanFlags();
« no previous file with comments | « Source/core/rendering/RenderTable.cpp ('k') | Source/core/rendering/RenderTableCol.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698