Closed
Bug 352939
Opened 19 years ago
Closed 19 years ago
[reflow branch] FixedTableLayoutStrategy::ComputeColumnWidth division on zero, on spreadsheets.google.com
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: romaxa, Assigned: romaxa)
References
()
Details
Attachments
(1 file)
|
1023 bytes,
patch
|
bernd_mozilla
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Reflow branch crashes on spreadsheets.google.com in:
FixedTableLayoutStrategy.cpp:
.............................
} else if (unassignedSpace > 0) {
// The spec says to distribute extra space evenly. (That's not
// what WinIE6 does, though. It treats percentages and
// nonpercentages differently.)
>>>>> nscoord toAdd = unassignedSpace / colCount;
for (PRInt32 col = 0; col < colCount; ++col) {
nsTableColFrame *colFrame = mTableFrame->GetColFrame(col);
colFrame->SetFinalWidth(colFrame->GetFinalWidth() + toAdd);
}
.............................
| Assignee | ||
Comment 1•19 years ago
|
||
Attachment #238758 -
Flags: review?
| Assignee | ||
Updated•19 years ago
|
Version: Trunk → Other Branch
| Assignee | ||
Updated•19 years ago
|
Attachment #238758 -
Flags: review? → review?(bzbarsky)
Updated•19 years ago
|
Attachment #238758 -
Flags: review?(bzbarsky) → review?(bernd_mozilla)
Updated•19 years ago
|
Summary: [reflow_branch] FixedTableLayoutStrategy::ComputeColumnWidth division on zero, on spreadsheets.google.com → [reflowbranch] FixedTableLayoutStrategy::ComputeColumnWidth division on zero, on spreadsheets.google.com
Updated•19 years ago
|
Summary: [reflowbranch] FixedTableLayoutStrategy::ComputeColumnWidth division on zero, on spreadsheets.google.com → [reflow branch] FixedTableLayoutStrategy::ComputeColumnWidth division on zero, on spreadsheets.google.com
Comment on attachment 238758 [details] [diff] [review]
Possible fix...
I would however have written
if (!colCount)
return; // No Columns - nothing to compute
// XXX Should only add columns that have cells originating in them!
nscoord subtract = spacing * (colCount + 1);
tableWidth -= subtract;
Attachment #238758 -
Flags: review?(bernd_mozilla) → review+
we do not crash on trunk as the corresponding division is wrapped by a
for (colX = 0; colX <colCount; colX++)
Updated•19 years ago
|
Assignee: nobody → romaxa
Comment 4•19 years ago
|
||
Fixed on branch. Thanks for the patch!
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Attachment #238758 -
Flags: superreview+
You need to log in
before you can comment on or make changes to this bug.
Description
•