Specify a cascade list consisting of the last resort font for Core Text
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.
Created attachment 101199 [details]
Committed r91209. <http://trac.webkit.org/r91209>
Comment on attachment 101199 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=101199&action=review
> +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.
> + if (m_CTFont)
> return m_CTFont.get();
Same comment here.
The following tests started failing on Chromium Mac 10.5 after this patch was landed:
In particular, fast/css/custom-font-xheight.html is also failing on Mac Leopard as well:
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.
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.
I will build on Leopard and see if I can reproduce any of the failures.