| OLD | NEW |
| 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 Loading... |
| 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); | |
| 85 for (LayoutBox* childBox = firstChildBox(); childBox; childBox = chi
ldBox->nextSiblingBox()) { | 84 for (LayoutBox* childBox = firstChildBox(); childBox; childBox = chi
ldBox->nextSiblingBox()) { |
| 86 if (!childBox->isTableCell()) | 85 if (!childBox->isTableCell()) |
| 87 continue; | 86 continue; |
| 88 childBox->setChildNeedsLayout(); | 87 childBox->setChildNeedsLayout(); |
| 89 childBox->setPreferredLogicalWidthsDirty(MarkOnlyThis); | 88 childBox->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
| 90 } | 89 } |
| 90 // Most table componenents can rely on LayoutObject::styleDidChange |
| 91 // to mark the container chain dirty. But LayoutTableSection seems |
| 92 // to never clear its dirty bit, which stops the propagation. So |
| 93 // anything under LayoutTableSection has to restart the propagation |
| 94 // at the table. |
| 95 // TODO(dgrogan): Make LayoutTableSection clear its dirty bit. |
| 96 table->setPreferredLogicalWidthsDirty(); |
| 91 } | 97 } |
| 92 } | 98 } |
| 93 } | 99 } |
| 94 | 100 |
| 95 const BorderValue& LayoutTableRow::borderAdjoiningStartCell(const LayoutTableCel
l* cell) const | 101 const BorderValue& LayoutTableRow::borderAdjoiningStartCell(const LayoutTableCel
l* cell) const |
| 96 { | 102 { |
| 97 ASSERT_UNUSED(cell, cell->isFirstOrLastCellInRow()); | 103 ASSERT_UNUSED(cell, cell->isFirstOrLastCellInRow()); |
| 98 // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality
at the cell level. | 104 // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality
at the cell level. |
| 99 return style()->borderStart(); | 105 return style()->borderStart(); |
| 100 } | 106 } |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // The cell and the row share the section's coordinate system. However | 260 // The cell and the row share the section's coordinate system. However |
| 255 // the visual overflow should be determined in the coordinate system of | 261 // the visual overflow should be determined in the coordinate system of |
| 256 // the row, that's why we shift it below. | 262 // the row, that's why we shift it below. |
| 257 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); | 263 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); |
| 258 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); | 264 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); |
| 259 | 265 |
| 260 addContentsVisualOverflow(cellVisualOverflowRect); | 266 addContentsVisualOverflow(cellVisualOverflowRect); |
| 261 } | 267 } |
| 262 | 268 |
| 263 } // namespace blink | 269 } // namespace blink |
| OLD | NEW |