Closed
Bug 154755
Opened 23 years ago
Closed 22 years ago
[FIX] Require all values in CSS RGB color rules to be of the same, valid data type
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
VERIFIED
FIXED
mozilla1.2alpha
People
(Reporter: bugmail, Assigned: bzbarsky)
References
()
Details
(Keywords: css1, testcase)
Attachments
(3 files, 2 obsolete files)
923 bytes,
text/html
|
Details | |
974 bytes,
text/html
|
Details | |
4.67 KB,
patch
|
glazou
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
In strict mode, only CSS numerical RGB specifications whose three values are of
the same data type should be treated as valid. That is, three numbers, or three
percentages. Mixtures of numbers and percentages should not be treated as valid CSS.
Status: NEW → ASSIGNED
OS: MacOS X → All
Priority: -- → P2
Hardware: Macintosh → All
Target Milestone: --- → Future
Moreover, invalid data types (real numbers) should not be treated as valid
values for numberical RGB specifications. For example, color: rgb(250.5, 0, 0)
is not valid CSS and should not result in red text. (David, let me know if I
should file a separate bug about this.)
Summary: In strict mode, require all values in CSS RGB color rules to be of the same data type → In strict mode, require all values in CSS RGB color rules to be of the same, valid data type
Assignee | ||
Comment 2•23 years ago
|
||
This fixes both issues (mixed types and rgb(255.0, 0, 0))
Assignee | ||
Comment 3•23 years ago
|
||
Assignee | ||
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
I guess I'd better take this. ;)
Assignee: dbaron → bzbarsky
Status: ASSIGNED → NEW
Target Milestone: Future → mozilla1.1beta
Assignee | ||
Updated•23 years ago
|
Summary: In strict mode, require all values in CSS RGB color rules to be of the same, valid data type → [FIX]In strict mode, require all values in CSS RGB color rules to be of the same, valid data type
Should we just say "Expected an integer..." everywhere instead of saying
"Expected a number..."?
Assignee | ||
Comment 7•23 years ago
|
||
Attachment #89531 -
Attachment is obsolete: true
Do those English-language strings need to be taken out and put in some
localizable strings file?
No. Right now CSS error reporting is a DEBUG-only feature. I plan to make it
localizable before it is turned on in release builds (if ever).
I think 1.2alpha is more appropriate milestone.
Target Milestone: mozilla1.1beta → mozilla1.2alpha
Comment on attachment 89677 [details] [diff] [review]
Fix some of that error reporting to not report the reverse of what it means. ;)
r=glazman
Attachment #89677 -
Flags: review+
Reporter | ||
Comment 12•22 years ago
|
||
Can someone give this an sr?
Why should this be only for strict mode? Shouldn't we do this for all modes,
and then find out if it actually causes problems (which I somewhat doubt,
actually, with the possible exception of 0 vs. % confusion). What do WinIE and
MacIE do?
Summary: [FIX]In strict mode, require all values in CSS RGB color rules to be of the same, valid data type → [FIX]In standards mode, require all values in CSS RGB color rules to be of the same, valid data type
Assignee | ||
Comment 14•22 years ago
|
||
MacIE and WinIE behave just like we do (get it wrong in both modes). I would be
perfectly happy with doing this in both modes myself. glazou?
Comment 15•22 years ago
|
||
Be strict in all modes. I doubt any important pages are being affected by this.
Assignee | ||
Comment 16•22 years ago
|
||
Attachment #89677 -
Attachment is obsolete: true
Comment on attachment 97934 [details] [diff] [review]
So let it be written.
seriously, this should carry forward r= from the previous patch.
r=glazman anyway
Attachment #97934 -
Flags: review+
Comment on attachment 97934 [details] [diff] [review]
So let it be written.
sr=dbaron
Attachment #97934 -
Flags: superreview+
Assignee | ||
Comment 19•22 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•