Closed Bug 418036 Opened 16 years ago Closed 13 years ago

Zero is invalid for -moz-column-width

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

Details

(Keywords: css3, Whiteboard: [css3-multicol])

Attachments

(1 file)

Follow up from bug 416088 comment 5:

fantasai   2008-02-07 12:28:42 PST
The latest internal spec does indeed specify that [...] column-width and
column-count values must be greater than zero, so zero values should also be
thrown out at parse time.
Attached patch wip1Splinter Review
Should be a simple enough patch for 1.9 if we want it...

BTW, the code in nsColumnSetFrame::ChooseColumnStrategy() can probably
be simplified further if we can assert that 'availContentWidth' >= 0
or NS_INTRINSICSIZE at the top (can remove numColumns <= 0 checks etc).
Also, the "colWidth = PR_MAX(1, ..." should be necessary, we can assign
it correctly in code above instead.

Also, there's an existing bug in ParsePositiveVariant for
eCSSUnit_Integer, we should at lest fix that bit for 1.9
(to reject -moz-column-count:-1)
Assignee: nobody → mats.palmgren
Status: NEW → ASSIGNED
Whiteboard: [css3-multicol]
-count was bug 471341.
Summary: Zero is invalid for -moz-column-width/-moz-column-count → Zero is invalid for -moz-column-width
http://dev.w3.org/csswg/css3-multicol/#cw explicitly allows zero, so this is invalid.

Additionally, nothing in CSS requires open interval range restrictions; all value range restrictions in CSS are closed intervals.  This is important, because things like calc() and animation interpolation (for cubic-bezier() with values outside 0-1) require clamping to the valid range, and you can't clamp to an open interval.  So I would be opposed to a spec that requires an open interval.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
I'm confused. The computed style allows >= 0, but the spec then goes on to say

> Specified values must be greater than 0. 

Would that trigger your objection?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: