Chromium Code Reviews| Index: Source/core/layout/LayoutTableRow.cpp |
| diff --git a/Source/core/layout/LayoutTableRow.cpp b/Source/core/layout/LayoutTableRow.cpp |
| index 93adae4e3a52fe9d8fc78885c4e233eb403f34c1..6ae84c4cddd93443b2f33f4746ca98b19ec86efa 100644 |
| --- a/Source/core/layout/LayoutTableRow.cpp |
| +++ b/Source/core/layout/LayoutTableRow.cpp |
| @@ -105,9 +105,21 @@ const BorderValue& LayoutTableRow::borderAdjoiningEndCell(const LayoutTableCell* |
| return style()->borderEnd(); |
| } |
| +void LayoutTableRow::createAndAddAnonymousCell(LayoutObject* child, LayoutObject* beforeChild) |
| +{ |
| + LayoutTableCell* cell = LayoutTableCell::createAnonymousWithParent(this); |
| + addChild(cell, beforeChild); |
| + cell->addChild(child); |
| +} |
| + |
| void LayoutTableRow::addChild(LayoutObject* child, LayoutObject* beforeChild) |
| { |
| if (!child->isTableCell()) { |
| + if (child->style()->display() == TABLE_CELL) { |
| + createAndAddAnonymousCell(child, beforeChild); |
|
esprehn
2015/08/17 17:58:54
This doesn't feel like a good idea, does the input
rhogan
2015/08/17 18:16:57
We don't ignore it anymore (see below in LayoutThe
esprehn
2015/08/17 18:27:08
Yeah I don't think that's a good idea, it means th
|
| + return; |
| + } |
| + |
| LayoutObject* last = beforeChild; |
| if (!last) |
| last = lastCell(); |
| @@ -133,9 +145,7 @@ void LayoutTableRow::addChild(LayoutObject* child, LayoutObject* beforeChild) |
| return; |
| } |
| - LayoutTableCell* cell = LayoutTableCell::createAnonymousWithParent(this); |
| - addChild(cell, beforeChild); |
| - cell->addChild(child); |
| + createAndAddAnonymousCell(child, beforeChild); |
| return; |
| } |