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

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

Issue 1952133006: [css-tables] Set table and cell widths dirty when row border width changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/table/change-row-border-width-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // If border was changed, notify table. 74 // If border was changed, notify table.
75 if (parent()) { 75 if (parent()) {
76 LayoutTable* table = this->table(); 76 LayoutTable* table = this->table();
77 if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout () && oldStyle && oldStyle->border() != style()->border()) 77 if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout () && oldStyle && oldStyle->border() != style()->border())
78 table->invalidateCollapsedBorders(); 78 table->invalidateCollapsedBorders();
79 79
80 if (table && oldStyle && diff.needsFullLayout() && needsLayout() && tabl e->collapseBorders() && borderWidthChanged(oldStyle, style())) { 80 if (table && oldStyle && diff.needsFullLayout() && needsLayout() && tabl e->collapseBorders() && borderWidthChanged(oldStyle, style())) {
81 // If the border width changes on a row, we need to make sure the ce lls in the row know to lay out again. 81 // If the border width changes on a row, we need to make sure the ce lls in the row know to lay out again.
82 // This only happens when borders are collapsed, since they end up a ffecting the border sides of the cell 82 // This only happens when borders are collapsed, since they end up a ffecting the border sides of the cell
83 // itself. 83 // itself.
84 table->setPreferredLogicalWidthsDirty(MarkOnlyThis);
84 for (LayoutBox* childBox = firstChildBox(); childBox; childBox = chi ldBox->nextSiblingBox()) { 85 for (LayoutBox* childBox = firstChildBox(); childBox; childBox = chi ldBox->nextSiblingBox()) {
85 if (!childBox->isTableCell()) 86 if (!childBox->isTableCell())
86 continue; 87 continue;
87 childBox->setChildNeedsLayout(); 88 childBox->setChildNeedsLayout();
89 childBox->setPreferredLogicalWidthsDirty(MarkOnlyThis);
88 } 90 }
89 } 91 }
90 } 92 }
91 } 93 }
92 94
93 const BorderValue& LayoutTableRow::borderAdjoiningStartCell(const LayoutTableCel l* cell) const 95 const BorderValue& LayoutTableRow::borderAdjoiningStartCell(const LayoutTableCel l* cell) const
94 { 96 {
95 ASSERT_UNUSED(cell, cell->isFirstOrLastCellInRow()); 97 ASSERT_UNUSED(cell, cell->isFirstOrLastCellInRow());
96 // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level. 98 // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level.
97 return style()->borderStart(); 99 return style()->borderStart();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // The cell and the row share the section's coordinate system. However 254 // The cell and the row share the section's coordinate system. However
253 // the visual overflow should be determined in the coordinate system of 255 // the visual overflow should be determined in the coordinate system of
254 // the row, that's why we shift it below. 256 // the row, that's why we shift it below.
255 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y(); 257 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y();
256 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); 258 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference);
257 259
258 addContentsVisualOverflow(cellVisualOverflowRect); 260 addContentsVisualOverflow(cellVisualOverflowRect);
259 } 261 }
260 262
261 } // namespace blink 263 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/table/change-row-border-width-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698