summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderTableCell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderTableCell.cpp')
-rw-r--r--Source/WebCore/rendering/RenderTableCell.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/WebCore/rendering/RenderTableCell.cpp b/Source/WebCore/rendering/RenderTableCell.cpp
index efd90c18c..35e5e0b88 100644
--- a/Source/WebCore/rendering/RenderTableCell.cpp
+++ b/Source/WebCore/rendering/RenderTableCell.cpp
@@ -404,6 +404,13 @@ LayoutUnit RenderTableCell::cellBaselinePosition() const
return firstLineBaseline().valueOr(borderAndPaddingBefore() + contentLogicalHeight());
}
+static inline void markCellDirtyWhenCollapsedBorderChanges(RenderTableCell* cell)
+{
+ if (!cell)
+ return;
+ cell->setNeedsLayoutAndPrefWidthsRecalc();
+}
+
void RenderTableCell::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
ASSERT(style().display() == TABLE_CELL);
@@ -422,8 +429,15 @@ void RenderTableCell::styleDidChange(StyleDifference diff, const RenderStyle* ol
// If border was changed, notify table.
RenderTable* table = this->table();
- if (table && oldStyle && oldStyle->border() != style().border())
+ if (table && oldStyle && oldStyle->border() != style().border()) {
table->invalidateCollapsedBorders(this);
+ if (table->collapseBorders() && diff == StyleDifferenceLayout) {
+ markCellDirtyWhenCollapsedBorderChanges(table->cellBelow(this));
+ markCellDirtyWhenCollapsedBorderChanges(table->cellAbove(this));
+ markCellDirtyWhenCollapsedBorderChanges(table->cellBefore(this));
+ markCellDirtyWhenCollapsedBorderChanges(table->cellAfter(this));
+ }
+ }
}
// The following rules apply for resolving conflicts and figuring out which border