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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableCol.cpp

Issue 2502353003: Paint collapsed borders of a table as one display item (Closed)
Patch Set: - Created 4 years 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // TODO(dgrogan): Is the "else" necessary for correctness or just a brittle
59 // optimization? The optimization would be: if the first branch is taken then 59 // optimization? The optimization would be: if the first branch is taken then
60 // the next one can't be, so don't even check its condition. 60 // the next one can't be, so don't even check its condition.
61 if (!table->selfNeedsLayout() && !table->normalChildNeedsLayout() && 61 if (!table->selfNeedsLayout() && !table->normalChildNeedsLayout() &&
62 oldStyle->border() != style()->border()) { 62 oldStyle->border() != style()->border()) {
63 table->invalidateCollapsedBorders(); 63 table->invalidateCollapsedBorders(PaintInvalidationStyleChange);
64 } else if ((oldStyle->logicalWidth() != style()->logicalWidth()) || 64 } else if ((oldStyle->logicalWidth() != style()->logicalWidth()) ||
65 LayoutTableBoxComponent::doCellsHaveDirtyWidth(*this, *table, diff, 65 LayoutTableBoxComponent::doCellsHaveDirtyWidth(*this, *table, diff,
66 *oldStyle)) { 66 *oldStyle)) {
67 // TODO(dgrogan): Optimization opportunities: 67 // TODO(dgrogan): Optimization opportunities:
68 // (1) Only mark cells which are affected by this col, not every cell in the 68 // (1) Only mark cells which are affected by this col, not every cell in the
69 // table. 69 // table.
70 // (2) If only the col width changes and its border width doesn't, do the 70 // (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 71 // cells need to be marked as needing layout or just given dirty
72 // widths? 72 // widths?
73 table->markAllCellsWidthsDirtyAndOrNeedsLayout( 73 table->markAllCellsWidthsDirtyAndOrNeedsLayout(
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter( 193 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter(
194 const LayoutTableCell* cell) const { 194 const LayoutTableCell* cell) const {
195 DCHECK_EQ(table() 195 DCHECK_EQ(table()
196 ->colElementAtAbsoluteColumn(cell->absoluteColumnIndex() - 1) 196 ->colElementAtAbsoluteColumn(cell->absoluteColumnIndex() - 1)
197 .innermostColOrColGroup(), 197 .innermostColOrColGroup(),
198 this); 198 this);
199 return style()->borderEnd(); 199 return style()->borderEnd();
200 } 200 }
201 201
202 } // namespace blink 202 } // 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