Closed Bug 416088 Opened 18 years ago Closed 18 years ago

Divide by zero [@ nsColumnSetFrame::ChooseColumnStrategy]

Categories

(Core :: Layout, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla1.9beta4

People

(Reporter: jruderman, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: crash, testcase)

Crash Data

Attachments

(3 files, 1 obsolete file)

No description provided.
Attached file stack
Attached patch Patch rev. 1 (obsolete) — Splinter Review
The first part is just to make the code easier to read by having the terms in the same order for this recurring expression.
Assignee: nobody → mats.palmgren
Status: NEW → ASSIGNED
Attachment #301860 - Flags: superreview?(roc)
Attachment #301860 - Flags: review?(roc)
BTW, maybe we should enforce that column gaps are positive? That's what the CSS3 multicol draft says anyway: http://www.w3.org/TR/css3-multicol/#lsquo2
OS: Mac OS X → All
Hardware: PC → All
Attached patch Patch rev. 2Splinter Review
This patch rejects specified negative column-gap and column-width. The draft spec does not explicitly say that column-width cannot be negative, but I think the text implies it: "column width means the length of the line boxes" http://www.w3.org/TR/css3-multicol/#lsquo
Attachment #301891 - Flags: superreview?(roc)
Attachment #301891 - Flags: review?(roc)
Attachment #301891 - Flags: superreview?(roc)
Attachment #301891 - Flags: superreview+
Attachment #301891 - Flags: review?(roc)
Attachment #301891 - Flags: review+
The latest internal spec does indeed specify that column-gap and column-rule-width must be non-negative. Furthermore, column-width and column-count values must be greater than zero, so zero values should also be thrown out at parse time.
Attachment #301891 - Flags: approval1.9?
Attachment #301860 - Attachment is obsolete: true
Can we make a crash or reftest for this?
Flags: in-testsuite?
Waiting to hear on the test before approving.
schrep and damon, the usual procedure for layout crashers is to check in the testcase as a crashtest at the same time as the patch or shortly after. The testcase doesn't use scripts, so it can go in as a crashtest as-is. If you think this should get additional tests to make sure negative -moz-column-width is thrown out entirely, those should probably be part of the big CSS parsing mochitest.
Attachment #301891 - Flags: approval1.9? → approval1.9+
I added "-1px" as an invalid value for -moz-column-gap/width in property_database.js which makes the crashtest redundant. Filed bug 418036 to followup on comment 5. mozilla/layout/generic/nsColumnSetFrame.cpp 3.48 mozilla/layout/style/nsCSSParser.cpp 3.385 mozilla/layout/style/test/property_database.js 1.26 -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
Crash Signature: [@ nsColumnSetFrame::ChooseColumnStrategy]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: