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 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 | 1389 |
1390 const BorderValue& LayoutTable::tableEndBorderAdjoiningCell(const LayoutTableCel
l* cell) const | 1390 const BorderValue& LayoutTable::tableEndBorderAdjoiningCell(const LayoutTableCel
l* cell) const |
1391 { | 1391 { |
1392 ASSERT(cell->isFirstOrLastCellInRow()); | 1392 ASSERT(cell->isFirstOrLastCellInRow()); |
1393 if (hasSameDirectionAs(cell->row())) | 1393 if (hasSameDirectionAs(cell->row())) |
1394 return style()->borderEnd(); | 1394 return style()->borderEnd(); |
1395 | 1395 |
1396 return style()->borderStart(); | 1396 return style()->borderStart(); |
1397 } | 1397 } |
1398 | 1398 |
1399 PaintInvalidationReason LayoutTable::invalidatePaintIfNeeded(PaintInvalidationSt
ate& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContai
ner) | 1399 PaintInvalidationReason LayoutTable::invalidatePaintIfNeeded(const PaintInvalida
tionState& paintInvalidationState) |
1400 { | 1400 { |
1401 // Information of collapsed borders doesn't affect layout and are for painti
ng only. | 1401 // Information of collapsed borders doesn't affect layout and are for painti
ng only. |
1402 // Do it now instead of during painting to invalidate table cells if needed. | 1402 // Do it now instead of during painting to invalidate table cells if needed. |
1403 recalcCollapsedBordersIfNeeded(); | 1403 recalcCollapsedBordersIfNeeded(); |
1404 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState, paintInv
alidationContainer); | 1404 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
1405 } | 1405 } |
1406 | 1406 |
1407 void LayoutTable::invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& chil
dPaintInvalidationState) | 1407 void LayoutTable::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState
& childPaintInvalidationState) |
1408 { | 1408 { |
1409 // Table cells paint background from the containing column group, column, se
ction and row. | 1409 // Table cells paint background from the containing column group, column, se
ction and row. |
1410 // If background of any of them changed, we need to invalidate all affected
cells. | 1410 // If background of any of them changed, we need to invalidate all affected
cells. |
1411 // Here use shouldDoFullPaintInvalidation() as a broader condition of backgr
ound change. | 1411 // Here use shouldDoFullPaintInvalidation() as a broader condition of backgr
ound change. |
1412 for (LayoutObject* section = firstChild(); section; section = section->nextS
ibling()) { | 1412 for (LayoutObject* section = firstChild(); section; section = section->nextS
ibling()) { |
1413 if (!section->isTableSection()) | 1413 if (!section->isTableSection()) |
1414 continue; | 1414 continue; |
1415 for (LayoutTableRow* row = toLayoutTableSection(section)->firstRow(); ro
w; row = row->nextRow()) { | 1415 for (LayoutTableRow* row = toLayoutTableSection(section)->firstRow(); ro
w; row = row->nextRow()) { |
1416 for (LayoutTableCell* cell = row->firstCell(); cell; cell = cell->ne
xtCell()) { | 1416 for (LayoutTableCell* cell = row->firstCell(); cell; cell = cell->ne
xtCell()) { |
1417 ColAndColGroup colAndColGroup = colElementAtAbsoluteColumn(cell-
>absoluteColumnIndex()); | 1417 ColAndColGroup colAndColGroup = colElementAtAbsoluteColumn(cell-
>absoluteColumnIndex()); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1461 | 1461 |
1462 LayoutUnit LayoutTable::paddingRight() const | 1462 LayoutUnit LayoutTable::paddingRight() const |
1463 { | 1463 { |
1464 if (collapseBorders()) | 1464 if (collapseBorders()) |
1465 return LayoutUnit(); | 1465 return LayoutUnit(); |
1466 | 1466 |
1467 return LayoutBlock::paddingRight(); | 1467 return LayoutBlock::paddingRight(); |
1468 } | 1468 } |
1469 | 1469 |
1470 } // namespace blink | 1470 } // namespace blink |
OLD | NEW |