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, 2007, 2009, 2013 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 Length styleOrColLogicalWidth() const | 93 Length styleOrColLogicalWidth() const |
| 94 { | 94 { |
| 95 Length styleWidth = style()->logicalWidth(); | 95 Length styleWidth = style()->logicalWidth(); |
| 96 if (!styleWidth.isAuto()) | 96 if (!styleWidth.isAuto()) |
| 97 return styleWidth; | 97 return styleWidth; |
| 98 if (LayoutTableCol* firstColumn = table()->colElement(col())) | 98 if (LayoutTableCol* firstColumn = table()->colElement(col())) |
| 99 return logicalWidthFromColumns(firstColumn, styleWidth); | 99 return logicalWidthFromColumns(firstColumn, styleWidth); |
| 100 return styleWidth; | 100 return styleWidth; |
| 101 } | 101 } |
| 102 | 102 |
| 103 int computeLogicalHeightFromCellStyle(const Length& height) const | |
| 104 { | |
| 105 if (height.isIntrinsic()) | |
| 106 return computeIntrinsicLogicalContentHeightUsing(height, logicalHeig ht() - borderAndPaddingLogicalHeight(), borderAndPaddingLogicalHeight()); | |
| 107 return valueForLength(height, 0); | |
| 108 } | |
| 109 | |
| 103 int logicalHeightFromStyle() const | 110 int logicalHeightFromStyle() const |
| 104 { | 111 { |
| 105 int styleLogicalHeight = valueForLength(style()->logicalHeight(), 0); | 112 int styleLogicalHeight = computeLogicalHeightFromCellStyle(style()->logi calHeight()); |
|
mstensho (USE GERRIT)
2015/07/07 07:11:39
Any reason why we shouldn't just treat intrinsic v
rhogan
2015/07/07 18:40:02
Sure, but we treat them this way when they're set
| |
| 106 // In strict mode, box-sizing: content-box do the right thing and actual ly add in the border and padding. | 113 // In strict mode, box-sizing: content-box do the right thing and actual ly add in the border and padding. |
| 107 // Call computedCSSPadding* directly to avoid including implicitPadding. | 114 // Call computedCSSPadding* directly to avoid including implicitPadding. |
| 108 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX) | 115 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX) |
| 109 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi ngAfter()).floor() + borderBefore() + borderAfter(); | 116 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi ngAfter()).floor() + borderBefore() + borderAfter(); |
| 110 return styleLogicalHeight; | 117 return styleLogicalHeight; |
| 111 } | 118 } |
| 112 | 119 |
| 113 int logicalHeightForRowSizing() const | 120 int logicalHeightForRowSizing() const |
| 114 { | 121 { |
| 115 // FIXME: This function does too much work, and is very hot during table layout! | 122 // FIXME: This function does too much work, and is very hot during table layout! |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 | 316 |
| 310 inline LayoutTableCell* LayoutTableRow::lastCell() const | 317 inline LayoutTableCell* LayoutTableRow::lastCell() const |
| 311 { | 318 { |
| 312 ASSERT(children() == virtualChildren()); | 319 ASSERT(children() == virtualChildren()); |
| 313 return toLayoutTableCell(children()->lastChild()); | 320 return toLayoutTableCell(children()->lastChild()); |
| 314 } | 321 } |
| 315 | 322 |
| 316 } // namespace blink | 323 } // namespace blink |
| 317 | 324 |
| 318 #endif // LayoutTableCell_h | 325 #endif // LayoutTableCell_h |
| OLD | NEW |