[Webkit-unassigned] [Bug 13139] REGRESSION: Font not inherited when font-family does not match a font.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 20 22:48:50 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=13139


hyatt at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
           Priority|P2                          |P1
            Summary|Font not inherited when     |REGRESSION: Font not
                   |font-family does not match a|inherited when font-family
                   |font.                       |does not match a font.




------- Comment #8 from hyatt at apple.com  2007-03-20 22:48 PDT -------
A couple of examples to illustrate how complicated this problem is:

<div style="font-family: sans-serif">
<div style="font-family: Monaco">
...
</div>
</div>

Clearly the author's intent with Monaco is to use a monospace font.  Using the
parent's family isn't going to yield the result the author intended, nor is
using "serif."  If the author leaves off a generic family, it's really up to
the browser to try to infer the intent of the author.  

Using the parent is just a heuristic and a poor one at that.  We choose "serif"
on the assumption that a majority of the fonts specified on the Web are
"serif", and so that maximizes the probability that we will be right.

Here's another case to mull over:

<div style="font-family:sans-serif">
<tt style="font-family:Invalid>
</tt>
</div>

Using the parent here seems clearly wrong.  If anything <tt> and <pre> should
default to monospace instead, implying that the generic family specified in the
user agent stylesheet should also play a role.

That said, your argument that other browsers all seem to employ the same
heuristic is a compelling one.  I'd like to see an investigation of some of the
test cases in all major browsers (IE6, IE7, Opera, Firefox) in order to figure
out how to proceed.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list