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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCol.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/LayoutTableCol.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
index b50985464debe297dc4fb1552c2fc7e08a4c8cb6..36ce08cb9b7188d09b9ff9fccdd0cbfae1b9d1ee 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
@@ -55,15 +55,12 @@ void LayoutTableCol::StyleDidChange(StyleDifference diff,
if (!table)
return;
- // TODO(dgrogan): Is the "else" necessary for correctness or just a brittle
- // optimization? The optimization would be: if the first branch is taken then
- // the next one can't be, so don't even check its condition.
- if (!table->SelfNeedsLayout() && !table->NormalChildNeedsLayout() &&
- old_style->Border() != Style()->Border()) {
- table->InvalidateCollapsedBorders();
- } else if ((old_style->LogicalWidth() != Style()->LogicalWidth()) ||
- LayoutTableBoxComponent::DoCellsHaveDirtyWidth(*this, *table, diff,
- *old_style)) {
+ LayoutTableBoxComponent::InvalidateCollapsedBordersOnStyleChange(
+ *this, *table, diff, *old_style);
+
+ if ((old_style->LogicalWidth() != Style()->LogicalWidth()) ||
+ LayoutTableBoxComponent::DoCellsHaveDirtyWidth(*this, *table, diff,
+ *old_style)) {
// TODO(dgrogan): Optimization opportunities:
// (1) Only mark cells which are affected by this col, not every cell in the
// table.
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698