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, 2009, 2010 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 LayoutTableCell* CellBefore(const LayoutTableCell*) const; | 410 LayoutTableCell* CellBefore(const LayoutTableCell*) const; |
411 LayoutTableCell* CellAfter(const LayoutTableCell*) const; | 411 LayoutTableCell* CellAfter(const LayoutTableCell*) const; |
412 | 412 |
413 using CollapsedBorderValues = Vector<CollapsedBorderValue>; | 413 using CollapsedBorderValues = Vector<CollapsedBorderValue>; |
414 const CollapsedBorderValues& CollapsedBorders() const { | 414 const CollapsedBorderValues& CollapsedBorders() const { |
415 DCHECK(collapsed_borders_valid_); | 415 DCHECK(collapsed_borders_valid_); |
416 return collapsed_borders_; | 416 return collapsed_borders_; |
417 } | 417 } |
418 void InvalidateCollapsedBorders(); | 418 void InvalidateCollapsedBorders(); |
419 void InvalidateCollapsedBordersForAllCellsIfNeeded(); | 419 void InvalidateCollapsedBordersForAllCellsIfNeeded(); |
| 420 bool NeedsInvalidateCollapsedBordersForAllCells() const { |
| 421 return needs_invalidate_collapsed_borders_for_all_cells_; |
| 422 } |
| 423 void SetNeedsInvalidateCollapsedBordersForAllCells() { |
| 424 InvalidateCollapsedBorders(); |
| 425 needs_invalidate_collapsed_borders_for_all_cells_ = true; |
| 426 } |
420 | 427 |
421 bool HasSections() const { return Header() || Footer() || FirstBody(); } | 428 bool HasSections() const { return Header() || Footer() || FirstBody(); } |
422 | 429 |
423 void RecalcSectionsIfNeeded() const { | 430 void RecalcSectionsIfNeeded() const { |
424 if (needs_section_recalc_) | 431 if (needs_section_recalc_) |
425 RecalcSections(); | 432 RecalcSections(); |
426 } | 433 } |
427 | 434 |
428 static LayoutTable* CreateAnonymousWithParent(const LayoutObject*); | 435 static LayoutTable* CreateAnonymousWithParent(const LayoutObject*); |
429 LayoutBox* CreateAnonymousBoxWithSameTypeAs( | 436 LayoutBox* CreateAnonymousBoxWithSameTypeAs( |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 SubtreeLayoutScope&, | 535 SubtreeLayoutScope&, |
529 LayoutUnit logical_left, | 536 LayoutUnit logical_left, |
530 TableHeightChangingValue); | 537 TableHeightChangingValue); |
531 | 538 |
532 // Return the logical height based on the height, min-height and max-height | 539 // Return the logical height based on the height, min-height and max-height |
533 // properties from CSS. Will return 0 if auto. | 540 // properties from CSS. Will return 0 if auto. |
534 LayoutUnit LogicalHeightFromStyle() const; | 541 LayoutUnit LogicalHeightFromStyle() const; |
535 | 542 |
536 void DistributeExtraLogicalHeight(int extra_logical_height); | 543 void DistributeExtraLogicalHeight(int extra_logical_height); |
537 | 544 |
| 545 void InvalidateCollapsedBordersOfAffectedCells(); |
538 void RecalcCollapsedBordersIfNeeded(); | 546 void RecalcCollapsedBordersIfNeeded(); |
539 | 547 |
540 // TODO(layout-dev): All mutables in this class are lazily updated by | 548 // TODO(layout-dev): All mutables in this class are lazily updated by |
541 // recalcSections() which is called by various getter methods (e.g. | 549 // recalcSections() which is called by various getter methods (e.g. |
542 // borderBefore(), borderAfter()). | 550 // borderBefore(), borderAfter()). |
543 // They allow dirty layout even after DocumentLifecycle::LayoutClean which | 551 // They allow dirty layout even after DocumentLifecycle::LayoutClean which |
544 // seems not proper. crbug.com/538236. | 552 // seems not proper. crbug.com/538236. |
545 | 553 |
546 // Holds spans (number of absolute columns) of effective columns. | 554 // Holds spans (number of absolute columns) of effective columns. |
547 // See "absolute column index vs effective column index" in comments of | 555 // See "absolute column index vs effective column index" in comments of |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 if (first_body_) | 630 if (first_body_) |
623 return first_body_; | 631 return first_body_; |
624 return foot_; | 632 return foot_; |
625 } | 633 } |
626 | 634 |
627 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, IsTable()); | 635 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, IsTable()); |
628 | 636 |
629 } // namespace blink | 637 } // namespace blink |
630 | 638 |
631 #endif // LayoutTable_h | 639 #endif // LayoutTable_h |
OLD | NEW |