WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
61646
Duplicate Fonts Put in Font Cache on Mac Due to Duplicate CGFontRefs for Same Font
https://bugs.webkit.org/show_bug.cgi?id=61646
Summary
Duplicate Fonts Put in Font Cache on Mac Due to Duplicate CGFontRefs for Same...
Michael Saboff
Reported
2011-05-27 10:14:15 PDT
Core Text has code paths that call into CGFontCreateFontsWithPath() directly, bypassing CG’s font database. This can and does (in TOT WebKit, for example) result in multiple distinct CGFont objects being created for the exact same font. See <
rdar://problem/9089228
>for details. Every time we get a new and distinct CGFontRef, we create a new FontCache entry and abandon the old one. The cache fails to find the earlier entry due to FontPlatformData::platformIsEqual() in FontPlatformDataCocoa.mm comparing the saved m_cfFont.
Attachments
Patch to only compare the CGFontRefs if needed
(1.49 KB, patch)
2011-05-27 10:20 PDT
,
Michael Saboff
hyatt
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Saboff
Comment 1
2011-05-27 10:20:40 PDT
Created
attachment 95189
[details]
Patch to only compare the CGFontRefs if needed
Michael Saboff
Comment 2
2011-05-27 10:28:54 PDT
<
rdar://problem/9515696
>
Adam Roben (:aroben)
Comment 3
2011-05-27 10:43:10 PDT
Comment on
attachment 95189
[details]
Patch to only compare the CGFontRefs if needed View in context:
https://bugs.webkit.org/attachment.cgi?id=95189&action=review
> Source/WebCore/ChangeLog:9 > + Change the platformIsEqual to just compare the m_font members if > + both are not null.
This doesn't match the code change. We compare the m_font members if either one is not null, not if both are not null.
Dave Hyatt
Comment 4
2011-05-27 10:47:54 PDT
Comment on
attachment 95189
[details]
Patch to only compare the CGFontRefs if needed r=me
Michael Saboff
Comment 5
2011-05-27 10:52:19 PDT
Committed
r87524
: <
http://trac.webkit.org/changeset/87524
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug