Chromium Code Reviews| 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 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 | 103 |
| 104 bool LayoutTableCol::canHaveChildren() const | 104 bool LayoutTableCol::canHaveChildren() const |
| 105 { | 105 { |
| 106 // Cols cannot have children. This is actually necessary to fix a bug | 106 // Cols cannot have children. This is actually necessary to fix a bug |
| 107 // with libraries.uc.edu, which makes a <p> be a table-column. | 107 // with libraries.uc.edu, which makes a <p> be a table-column. |
| 108 return isTableColumnGroup(); | 108 return isTableColumnGroup(); |
| 109 } | 109 } |
| 110 | 110 |
| 111 LayoutRect LayoutTableCol::clippedOverflowRectForPaintInvalidation(const LayoutB oxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn validationState) const | 111 LayoutRect LayoutTableCol::clippedOverflowRectForPaintInvalidation(const LayoutB oxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn validationState) const |
| 112 { | 112 { |
| 113 // For now, just paint invalidate the whole table. | 113 // Entire table gets invalidated, instead of invalidating |
| 114 // FIXME: Find a better way to do this, e.g., need to paint invalidate all t he cells that we | 114 // every cell in the column. |
| 115 // might have propagated a background color or borders into. | 115 // This is simpler, but suboptimal. |
| 116 // FIXME: check for paintInvalidationContainer each time here? | |
| 117 | 116 |
| 118 LayoutTable* parentTable = table(); | 117 LayoutTable* table = this->table(); |
| 119 if (!parentTable) | 118 if (!table) |
| 120 return LayoutRect(); | 119 return LayoutRect(); |
| 121 return parentTable->clippedOverflowRectForPaintInvalidation(paintInvalidatio nContainer, paintInvalidationState); | 120 LayoutRect r = table->visualOverflowRect(); |
| 121 r.setLocation(LayoutPoint(0, 0)); | |
|
Xianzhu
2016/03/15 17:24:39
The correctness of this method depends on the fact
Xianzhu
2016/03/15 17:24:39
The above line should be removed. visualOverflowRe
atotic1
2016/03/15 18:50:50
Done.
atotic1
2016/03/15 18:50:51
Done.
| |
| 122 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, r, paintInvalida tionState); | |
| 123 return r; | |
| 122 } | 124 } |
| 123 | 125 |
| 124 void LayoutTableCol::imageChanged(WrappedImagePtr, const IntRect*) | 126 void LayoutTableCol::imageChanged(WrappedImagePtr, const IntRect*) |
| 125 { | 127 { |
| 126 // FIXME: Issue paint invalidation of only the rect the image paints in. | 128 // FIXME: Issue paint invalidation of only the rect the image paints in. |
| 127 setShouldDoFullPaintInvalidation(); | 129 setShouldDoFullPaintInvalidation(); |
| 128 } | 130 } |
| 129 | 131 |
| 130 void LayoutTableCol::clearPreferredLogicalWidthsDirtyBits() | 132 void LayoutTableCol::clearPreferredLogicalWidthsDirtyBits() |
| 131 { | 133 { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 return style()->borderStart(); | 190 return style()->borderStart(); |
| 189 } | 191 } |
| 190 | 192 |
| 191 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter(const LayoutTableCel l* cell) const | 193 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter(const LayoutTableCel l* cell) const |
| 192 { | 194 { |
| 193 ASSERT_UNUSED(cell, table()->colElementAtAbsoluteColumn(cell->absoluteColumn Index() - 1).innermostColOrColGroup() == this); | 195 ASSERT_UNUSED(cell, table()->colElementAtAbsoluteColumn(cell->absoluteColumn Index() - 1).innermostColOrColGroup() == this); |
| 194 return style()->borderEnd(); | 196 return style()->borderEnd(); |
| 195 } | 197 } |
| 196 | 198 |
| 197 } // namespace blink | 199 } // namespace blink |
| OLD | NEW |