Bug 64747 - Specify a cascade list consisting of the last resort font for Core Text
Summary: Specify a cascade list consisting of the last resort font for Core Text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 13:38 PDT by mitz
Modified: 2011-07-18 16:57 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.21 KB, patch)
2011-07-18 13:45 PDT, mitz
sam: review+
Details | Formatted Diff | Diff
actual result for broken-ideograph-small-caps on Chromium Mac 10.5 (16.64 KB, image/png)
2011-07-18 16:20 PDT, Ryosuke Niwa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2011-07-18 13:38:37 PDT
Specify a cascade list consisting of the last resort font for Core Text
Comment 1 mitz 2011-07-18 13:40:29 PDT
This would prevent Core Text from uselessly going through its longer default cascade list. WebKit never uses the results of Core Text’s fallback logic anyway.
Comment 2 mitz 2011-07-18 13:45:34 PDT
Created attachment 101199 [details]
Patch
Comment 3 mitz 2011-07-18 14:11:42 PDT
Committed r91209. <http://trac.webkit.org/r91209>
Comment 4 Darin Adler 2011-07-18 14:36:28 PDT
Comment on attachment 101199 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=101199&action=review

> Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:183
> +static CTFontDescriptorRef cascadeToLastResortFontDescriptor()
> +{
> +    static CTFontDescriptorRef descriptor;
> +    if (descriptor)
> +        return descriptor;

I like writing the two-function form of this sort of thing rather than the early return version.

> Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:198
> +    if (m_CTFont)
>          return m_CTFont.get();

Same comment here.
Comment 5 Ryosuke Niwa 2011-07-18 16:19:04 PDT
The following tests started failing on Chromium Mac 10.5 after this patch was landed:
fast/blockflow/broken-ideograph-small-caps.html
fast/blockflow/broken-ideographic-font.html
fast/css/custom-font-xheight.html

In particular, fast/css/custom-font-xheight.html is also failing on Mac Leopard as well:
http://build.webkit.org/results/Leopard%20Intel%20Release%20(Tests)/r91215%20(34147)/results.html
Comment 6 Ryosuke Niwa 2011-07-18 16:20:39 PDT
Created attachment 101230 [details]
actual result for broken-ideograph-small-caps on Chromium Mac 10.5

Looking at the actual result for broken-ideograph-small-caps, something is going wrong here.
Comment 7 Ryosuke Niwa 2011-07-18 16:22:23 PDT
The blame list is http://trac.webkit.org/log/trunk/?rev=91211&stop_rev=91204&limit=100&verbose=on

but http://trac.webkit.org/changeset/91205 is only applicable to plugin according to jamesr.
Comment 8 mitz 2011-07-18 16:57:24 PDT
I will build on Leopard and see if I can reproduce any of the failures.