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

Side by Side Diff: WebCore/rendering/FixedTableLayout.cpp

Issue 2171002: Merge 59495 - 20100514 Abhishek Arya <inferno@chromium.org>... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/375/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « WebCore/ChangeLog ('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) 2002 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org)
3 * (C) 2002 Dirk Mueller (mueller@kde.org) 3 * (C) 2002 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2003, 2006 Apple Computer, Inc. 4 * Copyright (C) 2003, 2006 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License. 9 * version 2 of the License.
10 * 10 *
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 cell->calcPrefWidths(); 159 cell->calcPrefWidths();
160 160
161 Length w = cell->styleOrColWidth(); 161 Length w = cell->styleOrColWidth();
162 int span = cell->colSpan(); 162 int span = cell->colSpan();
163 int effWidth = 0; 163 int effWidth = 0;
164 if (w.isFixed() && w.isPositive()) 164 if (w.isFixed() && w.isPositive())
165 effWidth = w.value(); 165 effWidth = w.value();
166 166
167 int usedSpan = 0; 167 int usedSpan = 0;
168 int i = 0; 168 int i = 0;
169 while (usedSpan < span) { 169 while (usedSpan < span && cCol + i < nEffCols) {
170 ASSERT(cCol + i < nEffCols);
171 int eSpan = m_table->spanOfEffCol(cCol + i); 170 int eSpan = m_table->spanOfEffCol(cCol + i);
172 // Only set if no col element has already set it. 171 // Only set if no col element has already set it.
173 if (m_width[cCol + i].isAuto() && w.type() != Auto) { 172 if (m_width[cCol + i].isAuto() && w.type() != Auto) {
174 m_width[cCol + i].setRawValue(w.type(), w.rawValue() * e Span / span); 173 m_width[cCol + i].setRawValue(w.type(), w.rawValue() * e Span / span);
175 usedWidth += effWidth * eSpan / span; 174 usedWidth += effWidth * eSpan / span;
176 } 175 }
177 usedSpan += eSpan; 176 usedSpan += eSpan;
178 i++; 177 i++;
179 } 178 }
180 cCol += i; 179 cCol += i;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 for (int i = 0; i < nEffCols; i++) { 325 for (int i = 0; i < nEffCols; i++) {
327 m_table->columnPositions()[i] = pos; 326 m_table->columnPositions()[i] = pos;
328 pos += calcWidth[i] + hspacing; 327 pos += calcWidth[i] + hspacing;
329 } 328 }
330 int colPositionsSize = m_table->columnPositions().size(); 329 int colPositionsSize = m_table->columnPositions().size();
331 if (colPositionsSize > 0) 330 if (colPositionsSize > 0)
332 m_table->columnPositions()[colPositionsSize - 1] = pos; 331 m_table->columnPositions()[colPositionsSize - 1] = pos;
333 } 332 }
334 333
335 } // namespace WebCore 334 } // namespace WebCore
OLDNEW
« no previous file with comments | « WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698