[webkit-reviews] review granted: [Bug 64767] REGRESSION(91209?): fast/css/custom-font-xheight.html is failing on Leopard : [Attachment 101259] fixes the bug for Chromium and all
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 18 20:13:22 PDT 2011
mitz at webkit.org has granted Ryosuke Niwa <rniwa at webkit.org>'s request for
review:
Bug 64767: REGRESSION(91209?): fast/css/custom-font-xheight.html is failing on
Leopard
https://bugs.webkit.org/show_bug.cgi?id=64767
Attachment 101259: fixes the bug for Chromium and all
https://bugs.webkit.org/attachment.cgi?id=101259&action=review
------- Additional Comments from mitz at webkit.org
View in context: https://bugs.webkit.org/attachment.cgi?id=101259&action=review
I have a few comments but this is OK as-is.
> Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:195
> +static bool enableFontCascadeOptimization()
The name is a little misleading, because this only controls the optimization
for web fonts (the m_font == 0 case).
> Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:198
> + static SInt32 systemVersion = 0;
No need to initialize a static to 0.
> Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:209
> +#elif defined(BUILDING_ON_SNOW_LEOPARD)
> + return true;
> +#else
> + return false;
> +#endif
We usually try to order things such that the present and future codepath comes
before the legacy codepath (as was in my change below).
> Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:223
> + else if (enableFontCascadeOptimization())
> m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(),
m_size, 0, 0));
> -#endif
> - }
> + else
> + m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(),
m_size, 0, cascadeToLastResortFontDescriptor()));
I think you can now just do something like
m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0,
enableFontCascadeOptimization() ? cascadeToLastResortFontDescriptor() : 0));
More information about the webkit-reviews
mailing list