| 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 * | 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 setInline(false); // our object is not Inline | 48 setInline(false); // our object is not Inline |
| 49 } | 49 } |
| 50 | 50 |
| 51 void LayoutTableRow::willBeRemovedFromTree() | 51 void LayoutTableRow::willBeRemovedFromTree() |
| 52 { | 52 { |
| 53 LayoutBox::willBeRemovedFromTree(); | 53 LayoutBox::willBeRemovedFromTree(); |
| 54 | 54 |
| 55 section()->setNeedsCellRecalc(); | 55 section()->setNeedsCellRecalc(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 static bool borderWidthChanged(const LayoutStyle* oldStyle, const LayoutStyle* n
ewStyle) | 58 static bool borderWidthChanged(const ComputedStyle* oldStyle, const ComputedStyl
e* newStyle) |
| 59 { | 59 { |
| 60 return oldStyle->borderLeftWidth() != newStyle->borderLeftWidth() | 60 return oldStyle->borderLeftWidth() != newStyle->borderLeftWidth() |
| 61 || oldStyle->borderTopWidth() != newStyle->borderTopWidth() | 61 || oldStyle->borderTopWidth() != newStyle->borderTopWidth() |
| 62 || oldStyle->borderRightWidth() != newStyle->borderRightWidth() | 62 || oldStyle->borderRightWidth() != newStyle->borderRightWidth() |
| 63 || oldStyle->borderBottomWidth() != newStyle->borderBottomWidth(); | 63 || oldStyle->borderBottomWidth() != newStyle->borderBottomWidth(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void LayoutTableRow::styleDidChange(StyleDifference diff, const LayoutStyle* old
Style) | 66 void LayoutTableRow::styleDidChange(StyleDifference diff, const ComputedStyle* o
ldStyle) |
| 67 { | 67 { |
| 68 ASSERT(style()->display() == TABLE_ROW); | 68 ASSERT(style()->display() == TABLE_ROW); |
| 69 | 69 |
| 70 LayoutBox::styleDidChange(diff, oldStyle); | 70 LayoutBox::styleDidChange(diff, oldStyle); |
| 71 propagateStyleToAnonymousChildren(); | 71 propagateStyleToAnonymousChildren(); |
| 72 | 72 |
| 73 if (section() && oldStyle && style()->logicalHeight() != oldStyle->logicalHe
ight()) | 73 if (section() && oldStyle && style()->logicalHeight() != oldStyle->logicalHe
ight()) |
| 74 section()->rowLogicalHeightChanged(this); | 74 section()->rowLogicalHeightChanged(this); |
| 75 | 75 |
| 76 // If border was changed, notify table. | 76 // If border was changed, notify table. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 LayoutTableRow* LayoutTableRow::createAnonymous(Document* document) | 229 LayoutTableRow* LayoutTableRow::createAnonymous(Document* document) |
| 230 { | 230 { |
| 231 LayoutTableRow* renderer = new LayoutTableRow(0); | 231 LayoutTableRow* renderer = new LayoutTableRow(0); |
| 232 renderer->setDocumentForAnonymous(document); | 232 renderer->setDocumentForAnonymous(document); |
| 233 return renderer; | 233 return renderer; |
| 234 } | 234 } |
| 235 | 235 |
| 236 LayoutTableRow* LayoutTableRow::createAnonymousWithParentRenderer(const LayoutOb
ject* parent) | 236 LayoutTableRow* LayoutTableRow::createAnonymousWithParentRenderer(const LayoutOb
ject* parent) |
| 237 { | 237 { |
| 238 LayoutTableRow* newRow = LayoutTableRow::createAnonymous(&parent->document()
); | 238 LayoutTableRow* newRow = LayoutTableRow::createAnonymous(&parent->document()
); |
| 239 RefPtr<LayoutStyle> newStyle = LayoutStyle::createAnonymousStyleWithDisplay(
parent->styleRef(), TABLE_ROW); | 239 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parent->styleRef(), TABLE_ROW); |
| 240 newRow->setStyle(newStyle.release()); | 240 newRow->setStyle(newStyle.release()); |
| 241 return newRow; | 241 return newRow; |
| 242 } | 242 } |
| 243 | 243 |
| 244 void LayoutTableRow::addOverflowFromCell(const LayoutTableCell* cell) | 244 void LayoutTableRow::addOverflowFromCell(const LayoutTableCell* cell) |
| 245 { | 245 { |
| 246 // Non-row-spanning-cells don't create overflow (they are fully contained wi
thin this row). | 246 // Non-row-spanning-cells don't create overflow (they are fully contained wi
thin this row). |
| 247 if (cell->rowSpan() == 1) | 247 if (cell->rowSpan() == 1) |
| 248 return; | 248 return; |
| 249 | 249 |
| 250 // Cells only generates visual overflow. | 250 // Cells only generates visual overflow. |
| 251 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s
tyleRef()); | 251 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s
tyleRef()); |
| 252 | 252 |
| 253 // The cell and the row share the section's coordinate system. However | 253 // The cell and the row share the section's coordinate system. However |
| 254 // the visual overflow should be determined in the coordinate system of | 254 // the visual overflow should be determined in the coordinate system of |
| 255 // the row, that's why we shift it below. | 255 // the row, that's why we shift it below. |
| 256 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); | 256 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); |
| 257 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference); | 257 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference); |
| 258 | 258 |
| 259 addVisualOverflow(cellVisualOverflowRect); | 259 addVisualOverflow(cellVisualOverflowRect); |
| 260 } | 260 } |
| 261 | 261 |
| 262 } // namespace blink | 262 } // namespace blink |
| OLD | NEW |