Diff
Modified: trunk/LayoutTests/ChangeLog (201345 => 201346)
--- trunk/LayoutTests/ChangeLog 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/LayoutTests/ChangeLog 2016-05-24 20:02:31 UTC (rev 201346)
@@ -1,3 +1,20 @@
+2016-05-24 Zalan Bujtas <[email protected]>
+
+ fast/table/neighboring-cells-when-collapsed-border-changes.html is flaky.
+ https://bugs.webkit.org/show_bug.cgi?id=158009
+
+ Reviewed by David Hyatt.
+
+ RenderTable::invalidateCollapsedBorders() early returns on m_collapsedEmptyBorderIsPresent
+ which prevents us from marking neighboring cells dirty when style changes.
+ Decouple the "invalidate the collapsed borders" and the "mark the neighboring cells dirty" logic.
+
+ * fast/table/border-collapsing/cached-change-cell-border-width-expected.txt: Progression. FF agrees.
+ * fast/table/neighboring-cells-when-collapsed-border-changes.html:
+ * platform/ios-simulator-wk1/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt:
+ * platform/mac-wk1/TestExpectations:
+ * platform/mac/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt:
+
2016-05-24 Ryan Haddad <[email protected]>
Marking mathml/wbr-in-mroot-crash.html as flaky on ios-simulator-wk2
Modified: trunk/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt (201345 => 201346)
--- trunk/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/LayoutTests/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt 2016-05-24 20:02:31 UTC (rev 201346)
@@ -3,8 +3,8 @@
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
- RenderTable {TABLE} at (0,0) size 113x54 [border: (2px solid #0000FF)]
- RenderTableSection {TBODY} at (2,2) size 110x50
- RenderTableRow {TR} at (0,0) size 110x50
- RenderTableCell {TD} at (0,22) size 55x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
- RenderTableCell {TD} at (55,23) size 55x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
+ RenderTable {TABLE} at (0,0) size 114x54 [border: (2px solid #0000FF)]
+ RenderTableSection {TBODY} at (2,2) size 111x50
+ RenderTableRow {TR} at (0,0) size 111x50
+ RenderTableCell {TD} at (0,22) size 56x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (56,23) size 55x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
Modified: trunk/LayoutTests/fast/table/neighboring-cells-when-collapsed-border-changes.html (201345 => 201346)
--- trunk/LayoutTests/fast/table/neighboring-cells-when-collapsed-border-changes.html 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/LayoutTests/fast/table/neighboring-cells-when-collapsed-border-changes.html 2016-05-24 20:02:31 UTC (rev 201346)
@@ -22,7 +22,7 @@
document.body.offsetWidth;
if (window.testRunner)
testRunner.notifyDone();
-}, 10);
+}, 0);
</script>
</body>
</html>
Modified: trunk/LayoutTests/platform/ios-simulator-wk1/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt (201345 => 201346)
--- trunk/LayoutTests/platform/ios-simulator-wk1/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt 2016-05-24 20:02:31 UTC (rev 201346)
@@ -7,4 +7,4 @@
RenderTableSection {TBODY} at (2,2) size 111x50
RenderTableRow {TR} at (0,0) size 111x50
RenderTableCell {TD} at (0,22) size 56x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
- RenderTableCell {TD} at (55,23) size 56x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (56,23) size 55x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
Modified: trunk/LayoutTests/platform/mac/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt (201345 => 201346)
--- trunk/LayoutTests/platform/mac/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/LayoutTests/platform/mac/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt 2016-05-24 20:02:31 UTC (rev 201346)
@@ -3,8 +3,8 @@
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
- RenderTable {TABLE} at (0,0) size 113x54 [border: (2px solid #0000FF)]
- RenderTableSection {TBODY} at (2,2) size 110x50
- RenderTableRow {TR} at (0,0) size 110x50
+ RenderTable {TABLE} at (0,0) size 114x54 [border: (2px solid #0000FF)]
+ RenderTableSection {TBODY} at (2,2) size 111x50
+ RenderTableRow {TR} at (0,0) size 111x50
RenderTableCell {TD} at (0,22) size 56x6 [border: (2px solid #00FF00)] [r=0 c=0 rs=1 cs=1]
- RenderTableCell {TD} at (55,23) size 56x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (56,23) size 55x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (201345 => 201346)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-05-24 20:02:31 UTC (rev 201346)
@@ -220,4 +220,3 @@
webkit.org/b/157589 fast/text-autosizing/ios/text-autosizing-after-back.html [ Pass Timeout ]
-webkit.org/b/158009 fast/table/neighboring-cells-when-collapsed-border-changes.html [ Pass ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (201345 => 201346)
--- trunk/Source/WebCore/ChangeLog 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/Source/WebCore/ChangeLog 2016-05-24 20:02:31 UTC (rev 201346)
@@ -1,3 +1,23 @@
+2016-05-24 Zalan Bujtas <[email protected]>
+
+ fast/table/neighboring-cells-when-collapsed-border-changes.html is flaky.
+ https://bugs.webkit.org/show_bug.cgi?id=158009
+
+ Reviewed by David Hyatt.
+
+ RenderTable::invalidateCollapsedBorders() early returns on m_collapsedEmptyBorderIsPresent
+ which prevents us from marking neighboring cells dirty when style changes.
+ Decouple the "invalidate the collapsed borders" and the "mark the neighboring cells dirty" logic.
+
+ Covered by existing tests. (and now we agree with FF on cached-change-cell-border-width.html)
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::invalidateCollapsedBorders):
+ (WebCore::markCellDirtyWhenCollapsedBorderChanges): Deleted.
+ * rendering/RenderTableCell.cpp:
+ (WebCore::markCellDirtyWhenCollapsedBorderChanges):
+ (WebCore::RenderTableCell::styleDidChange):
+
2016-05-24 Alex Christensen <[email protected]>
Fix use-after-free after r201318
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (201345 => 201346)
--- trunk/Source/WebCore/rendering/RenderTable.cpp 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp 2016-05-24 20:02:31 UTC (rev 201346)
@@ -594,14 +594,6 @@
clearNeedsLayout();
}
-static inline void markCellDirtyWhenCollapsedBorderChanges(RenderTableCell* cell)
-{
- if (!cell)
- return;
- cell->invalidateHasEmptyCollapsedBorders();
- cell->setNeedsLayoutAndPrefWidthsRecalc();
-}
-
void RenderTable::invalidateCollapsedBorders(RenderTableCell* cellWithStyleChange)
{
m_collapsedBordersValid = false;
@@ -616,10 +608,14 @@
if (cellWithStyleChange) {
// It is enough to invalidate just the surrounding cells when cell border style changes.
cellWithStyleChange->invalidateHasEmptyCollapsedBorders();
- markCellDirtyWhenCollapsedBorderChanges(cellBelow(cellWithStyleChange));
- markCellDirtyWhenCollapsedBorderChanges(cellAbove(cellWithStyleChange));
- markCellDirtyWhenCollapsedBorderChanges(cellBefore(cellWithStyleChange));
- markCellDirtyWhenCollapsedBorderChanges(cellAfter(cellWithStyleChange));
+ if (auto* below = cellBelow(cellWithStyleChange))
+ below->invalidateHasEmptyCollapsedBorders();
+ if (auto* above = cellAbove(cellWithStyleChange))
+ above->invalidateHasEmptyCollapsedBorders();
+ if (auto* before = cellBefore(cellWithStyleChange))
+ before->invalidateHasEmptyCollapsedBorders();
+ if (auto* after = cellAfter(cellWithStyleChange))
+ after->invalidateHasEmptyCollapsedBorders();
return;
}
Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (201345 => 201346)
--- trunk/Source/WebCore/rendering/RenderTableCell.cpp 2016-05-24 20:01:50 UTC (rev 201345)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp 2016-05-24 20:02:31 UTC (rev 201346)
@@ -404,6 +404,13 @@
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 @@
// 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