summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderTableCell.cpp
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-09-28 16:39:37 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:31:01 +0000
commit9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c (patch)
tree322337ad0acbc75732f916376ec6d36e7ec0e5bc /Source/WebCore/rendering/RenderTableCell.cpp
parent6882a04fb36642862b11efe514251d32070c3d65 (diff)
downloadqtwebkit-9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c.tar.gz
Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3
Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
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