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)

Other Branch
x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: romaxa, Assigned: romaxa)

References

()

Details

Attachments

(1 file)

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); } .............................
Attached patch Possible fix...Splinter Review
Attachment #238758 - Flags: review?
Version: Trunk → Other Branch
Attachment #238758 - Flags: review? → review?(bzbarsky)
Attachment #238758 - Flags: review?(bzbarsky) → review?(bernd_mozilla)
Summary: [reflow_branch] FixedTableLayoutStrategy::ComputeColumnWidth division on zero, on spreadsheets.google.com → [reflowbranch] FixedTableLayoutStrategy::ComputeColumnWidth division on zero, on spreadsheets.google.com
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++)
Assignee: nobody → romaxa
Fixed on branch. Thanks for the patch!
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Attachment #238758 - Flags: superreview+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: