Index: Source/core/dom/Text.cpp |
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp |
index 71ce46fafe31b261b867f458704327e75b04cf5b..b1e281b63a97dd9e7a62a85b67703fc2c8670312 100644 |
--- a/Source/core/dom/Text.cpp |
+++ b/Source/core/dom/Text.cpp |
@@ -33,6 +33,7 @@ |
#include "core/dom/NodeTraversal.h" |
#include "core/dom/shadow/ShadowRoot.h" |
#include "core/events/ScopedEventQueue.h" |
+#include "core/html/HTMLTableCellElement.h" |
#include "core/layout/LayoutText.h" |
#include "core/layout/LayoutTextCombine.h" |
#include "core/layout/svg/LayoutSVGInlineText.h" |
@@ -244,8 +245,11 @@ static inline bool hasGeneratedAnonymousTableCells(const LayoutObject& parent) |
LayoutObject* child = parent.slowFirstChild(); |
if (!child || !child->isAnonymous()) |
return false; |
- if (child->isTableCell()) |
- return true; |
+ if (child->isTableCell()) { |
+ LayoutObject* firstChild = child->slowFirstChild(); |
+ bool childIsTableCellWithAlternativeDisplayStyle = firstChild && firstChild->node() && isHTMLTableCellElement(firstChild->node()); |
esprehn
2015/07/22 19:12:51
This variable name is hard to read, I think you ju
|
+ return !childIsTableCellWithAlternativeDisplayStyle; |
esprehn
2015/07/22 19:12:51
Where is this in the spec? The tag name should hav
|
+ } |
if (child->isTableSection() || child->isTableRow()) |
return hasGeneratedAnonymousTableCells(*child); |
return false; |