WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
22861
Turn the FontCache into a singleton
https://bugs.webkit.org/show_bug.cgi?id=22861
Summary
Turn the FontCache into a singleton
Julien Chaffraix
Reported
2008-12-14 18:52:22 PST
As discussed on the mailing list, this is part of the initial clean-up for the fontcache. Patch forthcoming.
Attachments
Proposed fix
(19.67 KB, patch)
2008-12-14 18:58 PST
,
Julien Chaffraix
no flags
Details
Formatted Diff
Diff
Same as the first version, with corrected ChangeLogs
(19.76 KB, patch)
2008-12-16 13:17 PST
,
Julien Chaffraix
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Julien Chaffraix
Comment 1
2008-12-14 18:58:34 PST
Created
attachment 26020
[details]
Proposed fix
Sam Weinig
Comment 2
2008-12-15 14:00:19 PST
Why is it a good idea to turn the FontCache into a singleton? What does this get us?
Julien Chaffraix
Comment 3
2008-12-16 02:09:18 PST
(In reply to
comment #2
)
> Why is it a good idea to turn the FontCache into a singleton? What does this > get us? >
First it makes FontCache coherent with the rest of WebCore: I have not found another class that only bears static methods inside WebCore. IMHO it is also particularly relevant to make this class close to the Cache. Then it makes it cristal clear that we are using a singleton: static methods + static HashMaps / HashList inside the .cpp sounds like a hidden singleton. Finally when you start hacking the FontCache as it is now, you have to find the different definitions mixed with the code in FontCache.cpp. Making it a real class is a first step into moving those definitons in their own files and move the static HashMaps / HashList in the header. So to answer the benefits: right now, it adds a little overhead to the compiled code. But within a few changes, we should have a more readable code.
Julien Chaffraix
Comment 4
2008-12-16 13:17:08 PST
Created
attachment 26065
[details]
Same as the first version, with corrected ChangeLogs I had forgotten to update the ChangeLog in the WebKit directory, so attached is an updated version.
Darin Adler
Comment 5
2009-01-02 10:56:14 PST
Comment on
attachment 26065
[details]
Same as the first version, with corrected ChangeLogs I'm not entirely convinced this is an improvement, but it seems OK. r=me
Julien Chaffraix
Comment 6
2009-01-12 02:52:18 PST
Landed patch in
r39823
.
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