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

Side by Side Diff: Source/WebCore/rendering/RenderTableCell.cpp

Issue 10349004: Revert 115573 - Move Length and CSS length computation to float (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1123/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « Source/WebCore/platform/Length.h ('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, 2008, 2009 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 tableCol = table()->nextColElement(tableCol); 136 tableCol = table()->nextColElement(tableCol);
137 // If no next <col> tag found for the span we just return what we ha ve for now. 137 // If no next <col> tag found for the span we just return what we ha ve for now.
138 if (!tableCol) 138 if (!tableCol)
139 break; 139 break;
140 } 140 }
141 141
142 // Column widths specified on <col> apply to the border box of the cell. 142 // Column widths specified on <col> apply to the border box of the cell.
143 // Percentages don't need to be handled since they're always treated thi s way (even when specified on the cells). 143 // Percentages don't need to be handled since they're always treated thi s way (even when specified on the cells).
144 // See Bugzilla bug 8126 for details. 144 // See Bugzilla bug 8126 for details.
145 if (colWidthSum.isFixed() && colWidthSum.value() > 0) 145 if (colWidthSum.isFixed() && colWidthSum.value() > 0)
146 colWidthSum = Length(max(0.0f, colWidthSum.value() - borderAndPaddin gLogicalWidth()), Fixed); 146 colWidthSum = Length(max(0, colWidthSum.value() - borderAndPaddingLo gicalWidth()), Fixed);
147 return colWidthSum; 147 return colWidthSum;
148 } 148 }
149 149
150 return w; 150 return w;
151 } 151 }
152 152
153 void RenderTableCell::computePreferredLogicalWidths() 153 void RenderTableCell::computePreferredLogicalWidths()
154 { 154 {
155 // The child cells rely on the grids up in the sections to do their computeP referredLogicalWidths work. Normally the sections are set up early, as table 155 // The child cells rely on the grids up in the sections to do their computeP referredLogicalWidths work. Normally the sections are set up early, as table
156 // cells are added, but relayout can cause the cells to be freed, leaving st ale pointers in the sections' 156 // cells are added, but relayout can cause the cells to be freed, leaving st ale pointers in the sections'
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 { 1115 {
1116 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->sty le()); 1116 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->sty le());
1117 newStyle->setDisplay(TABLE_CELL); 1117 newStyle->setDisplay(TABLE_CELL);
1118 1118
1119 RenderTableCell* newCell = new (parent->renderArena()) RenderTableCell(paren t->document() /* is anonymous */); 1119 RenderTableCell* newCell = new (parent->renderArena()) RenderTableCell(paren t->document() /* is anonymous */);
1120 newCell->setStyle(newStyle.release()); 1120 newCell->setStyle(newStyle.release());
1121 return newCell; 1121 return newCell;
1122 } 1122 }
1123 1123
1124 } // namespace WebCore 1124 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/platform/Length.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698