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 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 if (nextCell()) { | 116 if (nextCell()) { |
117 // TODO(dgrogan): Same as above re: setChildNeedsLayout vs setNeedsLayout. | 117 // TODO(dgrogan): Same as above re: setChildNeedsLayout vs setNeedsLayout. |
118 nextCell()->setNeedsLayout(LayoutInvalidationReason::TableChanged); | 118 nextCell()->setNeedsLayout(LayoutInvalidationReason::TableChanged); |
119 nextCell()->setPreferredLogicalWidthsDirty(); | 119 nextCell()->setPreferredLogicalWidthsDirty(); |
120 } | 120 } |
121 } | 121 } |
122 | 122 |
123 unsigned LayoutTableCell::parseColSpanFromDOM() const { | 123 unsigned LayoutTableCell::parseColSpanFromDOM() const { |
124 ASSERT(node()); | 124 ASSERT(node()); |
| 125 // TODO(dgrogan): HTMLTableCellElement::colSpan() already clamps to something |
| 126 // smaller than maxColumnIndex; can we just DCHECK here? |
125 if (isHTMLTableCellElement(*node())) | 127 if (isHTMLTableCellElement(*node())) |
126 return std::min<unsigned>(toHTMLTableCellElement(*node()).colSpan(), | 128 return std::min<unsigned>(toHTMLTableCellElement(*node()).colSpan(), |
127 maxColumnIndex); | 129 maxColumnIndex); |
128 return 1; | 130 return 1; |
129 } | 131 } |
130 | 132 |
131 unsigned LayoutTableCell::parseRowSpanFromDOM() const { | 133 unsigned LayoutTableCell::parseRowSpanFromDOM() const { |
132 ASSERT(node()); | 134 ASSERT(node()); |
133 if (isHTMLTableCellElement(*node())) | 135 if (isHTMLTableCellElement(*node())) |
134 return std::min<unsigned>(toHTMLTableCellElement(*node()).rowSpan(), | 136 return std::min<unsigned>(toHTMLTableCellElement(*node()).rowSpan(), |
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 cb->adjustChildDebugRect(rect); | 1483 cb->adjustChildDebugRect(rect); |
1482 | 1484 |
1483 return rect; | 1485 return rect; |
1484 } | 1486 } |
1485 | 1487 |
1486 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { | 1488 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { |
1487 r.move(0, -intrinsicPaddingBefore()); | 1489 r.move(0, -intrinsicPaddingBefore()); |
1488 } | 1490 } |
1489 | 1491 |
1490 } // namespace blink | 1492 } // namespace blink |
OLD | NEW |