Trailing whitespace ignored in font names

RESOLVED FIXED in mozilla32

Status

()

Core
CSS Parsing and Computation
--
trivial
RESOLVED FIXED
10 years ago
3 years ago

People

(Reporter: Eli Friedman, Assigned: jtd)

Tracking

Trunk
mozilla32
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

10 years ago
<!DOCTYPE html>
<style>
.a {font-family: Arial\a\9\20}
</style>
<div class="a">b</div>

This font gets recognized as Arial; however, I don't think I have a font on my system that has a name with a tab or a newline in it.

Not sure if this is a style system bug; it might be a GFX issue.
From http://www.w3.org/TR/CSS21/fonts.html#font-family-prop :
# If quoting is omitted, any whitespace characters before and after the
# font name are ignored and any sequence of whitespace characters inside
# the font name is converted to a single space.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → INVALID
I believe that the report is valid. Whitespace tokens are indeed ignored, but quoted whitespace should not be removed from the parsed value of identifiers. The spec was since updated to clarify:

# If a sequence of identifiers is given as a font family name, the computed value is the name converted to a string by joining all the identifiers in the sequence by single spaces.
Flags: needinfo?(dbaron)
Yes.
Status: RESOLVED → REOPENED
Depends on: 280443
Flags: needinfo?(dbaron)
Resolution: INVALID → ---
Did bug 280443 fix this?
(Assignee)

Comment 5

3 years ago
(In reply to David Baron [:dbaron] (UTC-7) (needinfo? for questions) from comment #4)
> Did bug 280443 fix this?

Yes, it did. :)
(Assignee)

Comment 6

3 years ago
Fixed by changes in bug 280443, reftest landed on bug 384682 includes the case noted here (i.e. trailing escaped space).
Status: REOPENED → RESOLVED
Last Resolved: 10 years ago3 years ago
Resolution: --- → FIXED
Assignee: nobody → jdaggett
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.