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 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 void RenderTableRow::willBeDestroyed() | 46 void RenderTableRow::willBeDestroyed() |
47 { | 47 { |
48 RenderTableSection* recalcSection = section(); | 48 RenderTableSection* recalcSection = section(); |
49 | 49 |
50 RenderBox::willBeDestroyed(); | 50 RenderBox::willBeDestroyed(); |
51 | 51 |
52 if (recalcSection) | 52 if (recalcSection) |
53 recalcSection->setNeedsCellRecalc(); | 53 recalcSection->setNeedsCellRecalc(); |
54 } | 54 } |
55 | 55 |
| 56 void RenderTableRow::styleWillChange(StyleDifference diff, const RenderStyle* ne
wStyle) |
| 57 { |
| 58 if (section() && style() && style()->logicalHeight() != newStyle->logicalHei
ght()) |
| 59 section()->setNeedsCellRecalc(); |
| 60 |
| 61 ASSERT(newStyle->display() == TABLE_ROW); |
| 62 |
| 63 RenderBox::styleWillChange(diff, newStyle); |
| 64 } |
| 65 |
56 void RenderTableRow::updateBeforeAndAfterContent() | 66 void RenderTableRow::updateBeforeAndAfterContent() |
57 { | 67 { |
58 if (!isAnonymous() && document()->usesBeforeAfterRules()) { | 68 if (!isAnonymous() && document()->usesBeforeAfterRules()) { |
59 children()->updateBeforeAfterContent(this, BEFORE); | 69 children()->updateBeforeAfterContent(this, BEFORE); |
60 children()->updateBeforeAfterContent(this, AFTER); | 70 children()->updateBeforeAfterContent(this, AFTER); |
61 } | 71 } |
62 } | 72 } |
63 | 73 |
64 void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* old
Style) | 74 void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* old
Style) |
65 { | 75 { |
66 ASSERT(style()->display() == TABLE_ROW); | |
67 | |
68 RenderBox::styleDidChange(diff, oldStyle); | 76 RenderBox::styleDidChange(diff, oldStyle); |
69 propagateStyleToAnonymousChildren(); | 77 propagateStyleToAnonymousChildren(); |
70 | 78 |
71 if (parent()) | 79 if (parent()) |
72 updateBeforeAndAfterContent(); | 80 updateBeforeAndAfterContent(); |
73 | 81 |
74 if (section() && oldStyle && style()->logicalHeight() != oldStyle->logicalHe
ight()) | |
75 section()->rowLogicalHeightChanged(section()->rowIndexForRenderer(this))
; | |
76 | |
77 // If border was changed, notify table. | 82 // If border was changed, notify table. |
78 if (parent()) { | 83 if (parent()) { |
79 RenderTable* table = this->table(); | 84 RenderTable* table = this->table(); |
80 if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout
() && oldStyle && oldStyle->border() != style()->border()) | 85 if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout
() && oldStyle && oldStyle->border() != style()->border()) |
81 table->invalidateCollapsedBorders(); | 86 table->invalidateCollapsedBorders(); |
82 } | 87 } |
83 } | 88 } |
84 | 89 |
85 void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild) | 90 void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild) |
86 { | 91 { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } | 241 } |
237 } | 242 } |
238 | 243 |
239 void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*) | 244 void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*) |
240 { | 245 { |
241 // FIXME: Examine cells and repaint only the rect the image paints in. | 246 // FIXME: Examine cells and repaint only the rect the image paints in. |
242 repaint(); | 247 repaint(); |
243 } | 248 } |
244 | 249 |
245 } // namespace WebCore | 250 } // namespace WebCore |
OLD | NEW |