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

Unified Diff: Source/core/dom/Text.cpp

Issue 1280123004: Don't allow whitespace between elements with display:table-cell (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 4 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 | « LayoutTests/fast/table/whitespace-between-elements-with-table-cell-display-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Text.cpp
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index cbe43473484023544e5c5095819cd984c78a5cf2..77ced4244ebf32a6a75f189b6e5a36db2a9d67fd 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -248,7 +248,7 @@ static inline bool hasGeneratedAnonymousTableCells(const LayoutObject& parent)
if (child->isTableCell()) {
LayoutObject* firstChild = child->slowFirstChild();
// Ignore the anonymous table cell if it is wrapping a table cell element (e.g. because of <td style="display:block;">).
- return !firstChild || !firstChild->node() || !isHTMLTableCellElement(firstChild->node());
+ return !firstChild || !firstChild->node() || (firstChild->style()->originalDisplay() != TABLE_CELL && !isHTMLTableCellElement(firstChild->node()));
mstensho (USE GERRIT) 2015/08/25 11:24:05 I don't think this is quite right, because: <!DOC
}
if (child->isTableSection() || child->isTableRow())
return hasGeneratedAnonymousTableCells(*child);
« no previous file with comments | « LayoutTests/fast/table/whitespace-between-elements-with-table-cell-display-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698