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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp

Issue 2838643003: Invalidate collapsed borders using currentColor when color changes (Closed)
Patch Set: - Created 3 years, 8 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
Index: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
index 390d419a7e79306141689d5bfded55d62b7b31f2..14dc86695534739603ece0f62b1be09ef692d49e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
@@ -476,26 +476,27 @@ void LayoutTableCell::StyleDidChange(StyleDifference diff,
LayoutBlockFlow::StyleDidChange(diff, old_style);
SetHasBoxDecorationBackground(true);
- if (Parent() && Section() && old_style &&
- Style()->Height() != old_style->Height())
+ if (!old_style)
+ return;
+
+ if (Parent() && Section() && Style()->Height() != old_style->Height())
Section()->RowLogicalHeightChanged(Row());
// Our intrinsic padding pushes us down to align with the baseline of other
// cells on the row. If our vertical-align has changed then so will the
// padding needed to align with other cells - clear it so we can recalculate
// it from scratch.
- if (old_style && Style()->VerticalAlign() != old_style->VerticalAlign())
+ if (Style()->VerticalAlign() != old_style->VerticalAlign())
ClearIntrinsicPadding();
- // If border was changed, notify table.
if (!Parent())
return;
- LayoutTable* table = this->Table();
+ LayoutTable* table = Table();
if (!table)
return;
- if (!table->SelfNeedsLayout() && !table->NormalChildNeedsLayout() &&
- old_style && old_style->Border() != Style()->Border())
- table->InvalidateCollapsedBorders();
+
+ LayoutTableBoxComponent::InvalidateCollapsedBordersOnStyleChange(
+ *this, *table, diff, *old_style);
if (LayoutTableBoxComponent::DoCellsHaveDirtyWidth(*this, *table, diff,
*old_style)) {

Powered by Google App Engine
This is Rietveld 408576698