Closed Bug 227695 Opened 22 years ago Closed 16 years ago

Incorrect serialization of font shorthand when it's set to a system font

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 475214

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

"font: icon" is serialized as "font-family: icon; font-style: ; font-variant: ; font-weight: ; font-size: ; line-height: ; font-size-adjust: ; font-stretch: ;" which is pretty bogus...
Attached file testcase
It doesn't look like we ever serialize to the 'font' shorthand, at least from the looks of nsCSSDeclaration::ToString.
Right. And for cases when the "font" value is not a generic, that's fine -- it produces valid CSS equivalent to the original shorthand. However, due to the way we store generic-only values in the data struct (by setting blank nsCSSValues for all the other sub-properties at http://lxr.mozilla.org/seamonkey/source/content/html/style/src/nsCSSParser.cpp#5040) this case actually breaks roundtripping quite badly... The easiest solution is probably to start serializing to the font shorthand. :(
*** Bug 281388 has been marked as a duplicate of this bug. ***
Summary: Incorrect serialization of font shorthand when it's set to a generic → Incorrect serialization of font shorthand when it's set to a system font
Is this distinguishable from bug 216456 ?
> Is this distinguishable from bug 216456 ? Yes. This bug is about serialization, that bug is about computed style. They're not the same at all.
Assignee: dbaron → nobody
QA Contact: ian → style-system
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: