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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 20 19:50:10 PDT 2007


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





------- Comment #4 from hyatt at apple.com  2007-03-20 19:50 PDT -------
The technical reason for this change had to do with fixing another bug, namely
preventing intermediate font-family declarations that get subsequently
overridden by a later rule from affecting the choice of generic family for the
font.

For example if you have the following:

.foo {
  font-family: Courier, monospace;
}

#bar {
  font-family: 'Invalid Font';
}

and then an element <div class="foo" id="bar">...</div>

Safari 2 actually sets the generic family of the div to be monospace because it
applies declarations in a forward order.  This forced us to reset the generic
family at each rule application in order to avoid accidentally mutating the
generic family.

Gecko matches in backwards order (which is harder for us to do) and so is
immune from this problem.  Therefore they didn't have to reset the generic
family to work around the above issue.

I suppose we could save off a copy of the generic family somewhere to compare
against and implicitly inherit it down the chain, but it's not clear to me that
this is supposed to be done.

Since technically the generic family is named as part of the font-family
property, and the subsequent rule overrides it completely, it's not clear that
the generic family is immune from being overridden and should somehow continue
to inherit.  That does not seem to follow given the way CSS works.


-- 
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