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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 LayoutTableBoxComponent::StyleDidChange(diff, old_style); 49 LayoutTableBoxComponent::StyleDidChange(diff, old_style);
50 50
51 if (!old_style) 51 if (!old_style)
52 return; 52 return;
53 53
54 LayoutTable* table = this->Table(); 54 LayoutTable* table = this->Table();
55 if (!table) 55 if (!table)
56 return; 56 return;
57 57
58 // TODO(dgrogan): Is the "else" necessary for correctness or just a brittle 58 LayoutTableBoxComponent::InvalidateCollapsedBordersOnStyleChange(
59 // optimization? The optimization would be: if the first branch is taken then 59 *this, *table, diff, *old_style);
60 // the next one can't be, so don't even check its condition. 60
61 if (!table->SelfNeedsLayout() && !table->NormalChildNeedsLayout() && 61 if ((old_style->LogicalWidth() != Style()->LogicalWidth()) ||
62 old_style->Border() != Style()->Border()) { 62 LayoutTableBoxComponent::DoCellsHaveDirtyWidth(*this, *table, diff,
63 table->InvalidateCollapsedBorders(); 63 *old_style)) {
64 } else if ((old_style->LogicalWidth() != Style()->LogicalWidth()) ||
65 LayoutTableBoxComponent::DoCellsHaveDirtyWidth(*this, *table, diff,
66 *old_style)) {
67 // TODO(dgrogan): Optimization opportunities: 64 // TODO(dgrogan): Optimization opportunities:
68 // (1) Only mark cells which are affected by this col, not every cell in the 65 // (1) Only mark cells which are affected by this col, not every cell in the
69 // table. 66 // table.
70 // (2) If only the col width changes and its border width doesn't, do the 67 // (2) If only the col width changes and its border width doesn't, do the
71 // cells need to be marked as needing layout or just given dirty 68 // cells need to be marked as needing layout or just given dirty
72 // widths? 69 // widths?
73 table->MarkAllCellsWidthsDirtyAndOrNeedsLayout( 70 table->MarkAllCellsWidthsDirtyAndOrNeedsLayout(
74 LayoutTable::kMarkDirtyAndNeedsLayout); 71 LayoutTable::kMarkDirtyAndNeedsLayout);
75 } 72 }
76 } 73 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 const BorderValue& LayoutTableCol::BorderAdjoiningCellAfter( 190 const BorderValue& LayoutTableCol::BorderAdjoiningCellAfter(
194 const LayoutTableCell* cell) const { 191 const LayoutTableCell* cell) const {
195 DCHECK_EQ(Table() 192 DCHECK_EQ(Table()
196 ->ColElementAtAbsoluteColumn(cell->AbsoluteColumnIndex() - 1) 193 ->ColElementAtAbsoluteColumn(cell->AbsoluteColumnIndex() - 1)
197 .InnermostColOrColGroup(), 194 .InnermostColOrColGroup(),
198 this); 195 this);
199 return Style()->BorderEnd(); 196 return Style()->BorderEnd();
200 } 197 }
201 198
202 } // namespace blink 199 } // namespace blink
OLDNEW
« 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