Bug 42342

Summary: Font download error for an @font-face rule invalidates other @font-face rules for the same font-family
Product: WebKit Reporter: Yuzo Fujishima <yuzo>
Component: CSSAssignee: Yuzo Fujishima <yuzo>
Severity: Normal CC: hamaji, hayato, mitz, ossy, phiw2
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Proposed fix
Patch mitz: review+

Description Yuzo Fujishima 2010-07-15 00:51:17 PDT
Assume that we have the following file and CannotBeDownloaded.ttf cannot be downloaded
while Ahem.ttf can.

As per http://lists.w3.org/Archives/Public/www-style/2010Jul/0253.html , the first rule
must remain in effect while the second rule must be ignored.

WebKit r63408 ignores both rules.

Note that if
  src: url(CannotBeDownloaded.ttf);
is replaced with
  src: local(NonExistentLocalFont);
  src: url(CannotBeDownloaded.ttf), local(Arial);
, the first rule remains in effect and WebKit renders the file properly.

@font-face {
  src: url(Ahem.ttf);
@font-face {
  src: url(CannotBeDownloaded.ttf);
  unicode-range: U+30-39;
The first @font-face rule above should remain in effect
even if the font for the second @font-face rule cannot be downloaded.
Accordingly, the following text should be shown in Ahem.
<span style="font-family:myfont">
This must be shown in Ahem.
Comment 1 Yuzo Fujishima 2010-07-15 04:47:45 PDT
Created attachment 61641 [details]
Proposed fix
Comment 2 mitz 2010-07-17 09:58:58 PDT
Comment on attachment 61641 [details]
Proposed fix

Please fill in the WebCore change log.
Comment 3 Yuzo Fujishima 2010-07-19 21:49:17 PDT
Created attachment 62032 [details]
Comment 4 Yuzo Fujishima 2010-07-19 21:52:11 PDT

Thank you for the review.
In WebCore/ChangeLog, I've added a comment to each method.

Comment 5 Yuzo Fujishima 2010-07-19 22:10:26 PDT
Committed r63719: <http://trac.webkit.org/changeset/63719>
Comment 6 Csaba Osztrogon√°c 2010-07-19 23:10:42 PDT
(In reply to comment #5)
> Committed r63719: <http://trac.webkit.org/changeset/63719>

introduced in r63719 fails on Qt bot:

Could you check it, please?
Comment 7 Yuzo Fujishima 2010-07-19 23:23:22 PDT
Committed r63722: <http://trac.webkit.org/changeset/63722>