Closed Bug 8191 Opened 26 years ago Closed 26 years ago

Parsing of BGCOLOR is incorrect

Categories

(Core :: Layout: Tables, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: Crysgem, Assigned: peterl-retired)

References

()

Details

Attachments

(1 file)

Apprunner Build ID: 1999061308 The color of the cells renders as a decided grey as parsed by Ancestor 4.6 and Enforcer 5.0, but a putrid... green... as extruded by the beast.
Definitely 'trivial' ;-) <table width="100%" border=1> <tr><td>What if bgcolor contains more than 6 hex characters (e.g., 7 * 'd')</td></tr> <tr bgcolor="#ddddddd"><td>#ddddddd -- ~grey ??</td></tr> <tr bgcolor="#aaaaaaa"><td>#aaaaaaa -- ~grey ??</td></tr> </table>
Whiteboard: [MAKINGTEST] - zuperdee@penguinpowered.com
Whiteboard: [MAKINGTEST] - zuperdee@penguinpowered.com
Oops... Looks like this already has a simple test case if you ask me.
Summary: [4.xP] Color in table cells incorrect → Color in table cells incorrect
[TESTCASE] The HTML 4.0 specification states that color attributes should use the format specified by sRGB. sRGB does not specify a format. HTML does, in the DTD, give a format: just six digits, prefixed by a hash. I suggest that the CSS format be used (that is the easiest to use, since we then just need to pipe the color from HTML to the CSS engine unmodified). The CSS format is a superset of the HTML format. If we use the CSS format, then colors should be specified using either three or six digits. Seven digits is invalid. Thus, what we should be doing is ignoring the colors above altogether. HTML4: http://www.w3.org/TR/REC-html40/types.html#h-6.5 HTML4 DTD: http://www.w3.org/TR/REC-html40/sgml/loosedtd.html#Color SRGB: http://www.w3.org/Graphics/Color/sRGB CSS2: http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color CURRENT BEHAVIOUR: For 1-9 digits, we act exactly like we do with CSS. Unfortunately, our CSS acts wrongly (:-/). For 10+ digits, we just display black. See test case: http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/bgcolor.html The CSS problem is covered by bug 8780. [removing 4.xP marker as this bug is also present in legacy browsers]
Summary: Color in table cells incorrect → Parsing of BGCOLOR is incorrect
Assignee: karnaze → peterl
Target Milestone: M9
Swiping this bug. I had this all working nicely once upon a time (1-9 digits were taken only in quirk mode for compatibility). Apparently someone broke this. Grrrr.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
*As a dwarf stumbling among the ruins of giants* I have no words for the Great Issues discussed herein/tofore... but the initial bug is indeed crushed, as proved by the Apprunner of 1999070808. Hail to your algorithms!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: