| 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, 2008, 2009, 2010, 2013 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r
ights 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // init LayoutObject attributes | 112 // init LayoutObject attributes |
| 113 setInline(false); // our object is not Inline | 113 setInline(false); // our object is not Inline |
| 114 } | 114 } |
| 115 | 115 |
| 116 LayoutTableSection::~LayoutTableSection() | 116 LayoutTableSection::~LayoutTableSection() |
| 117 { | 117 { |
| 118 } | 118 } |
| 119 | 119 |
| 120 void LayoutTableSection::styleDidChange(StyleDifference diff, const ComputedStyl
e* oldStyle) | 120 void LayoutTableSection::styleDidChange(StyleDifference diff, const ComputedStyl
e* oldStyle) |
| 121 { | 121 { |
| 122 DCHECK(style()->display() == TABLE_FOOTER_GROUP || style()->display() == TAB
LE_ROW_GROUP || style()->display() == TABLE_HEADER_GROUP); |
| 123 |
| 122 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); | 124 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); |
| 123 propagateStyleToAnonymousChildren(); | 125 propagateStyleToAnonymousChildren(); |
| 124 | 126 |
| 125 // If border was changed, notify table. | 127 if (!oldStyle) |
| 128 return; |
| 129 |
| 126 LayoutTable* table = this->table(); | 130 LayoutTable* table = this->table(); |
| 127 if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() &
& oldStyle && oldStyle->border() != style()->border()) | 131 if (!table) |
| 132 return; |
| 133 |
| 134 if (!table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyl
e->border() != style()->border()) |
| 128 table->invalidateCollapsedBorders(); | 135 table->invalidateCollapsedBorders(); |
| 129 | 136 |
| 130 if (table && oldStyle && diff.needsFullLayout() && needsLayout() && table->c
ollapseBorders() && oldStyle->border() != style()->border()) { | 137 if (LayoutTableBoxComponent::doCellsHaveDirtyWidth(*this, *table, diff, *old
Style)) |
| 131 markAllCellsWidthsDirtyAndOrNeedsLayout(MarkDirtyAndNeedsLayout); | 138 markAllCellsWidthsDirtyAndOrNeedsLayout(MarkDirtyAndNeedsLayout); |
| 132 } | |
| 133 } | 139 } |
| 134 | 140 |
| 135 void LayoutTableSection::willBeRemovedFromTree() | 141 void LayoutTableSection::willBeRemovedFromTree() |
| 136 { | 142 { |
| 137 LayoutTableBoxComponent::willBeRemovedFromTree(); | 143 LayoutTableBoxComponent::willBeRemovedFromTree(); |
| 138 | 144 |
| 139 // Preventively invalidate our cells as we may be re-inserted into | 145 // Preventively invalidate our cells as we may be re-inserted into |
| 140 // a new table which would require us to rebuild our structure. | 146 // a new table which would require us to rebuild our structure. |
| 141 setNeedsCellRecalc(); | 147 setNeedsCellRecalc(); |
| 142 } | 148 } |
| (...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 // Repeating table headers are painted once per fragmentation page/column. T
his does not go through the regular fragmentation machinery, | 1731 // Repeating table headers are painted once per fragmentation page/column. T
his does not go through the regular fragmentation machinery, |
| 1726 // so we need special code to expand the invalidation rect to contain all po
sitions of the header in all columns. | 1732 // so we need special code to expand the invalidation rect to contain all po
sitions of the header in all columns. |
| 1727 // Note that this is in flow thread coordinates, not visual coordinates. The
enclosing LayoutFlowThread will convert to visual coordinates. | 1733 // Note that this is in flow thread coordinates, not visual coordinates. The
enclosing LayoutFlowThread will convert to visual coordinates. |
| 1728 if (table()->header() == this && hasRepeatingHeaderGroup()) | 1734 if (table()->header() == this && hasRepeatingHeaderGroup()) |
| 1729 rect.setHeight(table()->logicalHeight()); | 1735 rect.setHeight(table()->logicalHeight()); |
| 1730 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec
t, flags); | 1736 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec
t, flags); |
| 1731 } | 1737 } |
| 1732 | 1738 |
| 1733 | 1739 |
| 1734 } // namespace blink | 1740 } // namespace blink |
| OLD | NEW |