Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Side by Side Diff: Source/core/layout/LayoutTableCell.h

Issue 1213153003: Cope with intrinsic height styled on table cells (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/table/cell-intrinsic-height-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 logicalHeightFromStyle() const 103 int logicalHeightFromStyle() const
104 { 104 {
105 int styleLogicalHeight = valueForLength(style()->logicalHeight(), 0); 105 Length height = style()->logicalHeight();
106 int styleLogicalHeight = height.isIntrinsic() ? LayoutUnit() : valueForL ength(height, LayoutUnit());
107
106 // In strict mode, box-sizing: content-box do the right thing and actual ly add in the border and padding. 108 // 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. 109 // Call computedCSSPadding* directly to avoid including implicitPadding.
108 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX) 110 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX)
109 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi ngAfter()).floor() + borderBefore() + borderAfter(); 111 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi ngAfter()).floor() + borderBefore() + borderAfter();
110 return styleLogicalHeight; 112 return styleLogicalHeight;
111 } 113 }
112 114
113 int logicalHeightForRowSizing() const 115 int logicalHeightForRowSizing() const
114 { 116 {
115 // FIXME: This function does too much work, and is very hot during table layout! 117 // 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
309 311
310 inline LayoutTableCell* LayoutTableRow::lastCell() const 312 inline LayoutTableCell* LayoutTableRow::lastCell() const
311 { 313 {
312 ASSERT(children() == virtualChildren()); 314 ASSERT(children() == virtualChildren());
313 return toLayoutTableCell(children()->lastChild()); 315 return toLayoutTableCell(children()->lastChild());
314 } 316 }
315 317
316 } // namespace blink 318 } // namespace blink
317 319
318 #endif // LayoutTableCell_h 320 #endif // LayoutTableCell_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/cell-intrinsic-height-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698