RESOLVED FIXED Bug 96282
[Chromium] remove getFontFamilyForCharacters from PlatformSupport
https://bugs.webkit.org/show_bug.cgi?id=96282
Summary [Chromium] remove getFontFamilyForCharacters from PlatformSupport
Mark Pilgrim (Google)
Reported 2012-09-10 09:32:45 PDT
[Chromium] remove getFontFamilyForCharacters from PlatformSupport
Attachments
Patch (7.66 KB, patch)
2012-09-10 09:33 PDT, Mark Pilgrim (Google)
no flags
Patch (19.70 KB, patch)
2012-09-20 14:21 PDT, Mark Pilgrim (Google)
no flags
Patch (20.09 KB, patch)
2012-09-21 11:25 PDT, Mark Pilgrim (Google)
no flags
Patch (20.08 KB, patch)
2012-09-21 13:58 PDT, Mark Pilgrim (Google)
no flags
Mark Pilgrim (Google)
Comment 1 2012-09-10 09:33:29 PDT
WebKit Review Bot
Comment 2 2012-09-10 09:36:42 PDT
Attachment 163152 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:47: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 3 2012-09-19 10:23:56 PDT
Comment on attachment 163152 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=163152&action=review > Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:71 > + WebKit::WebFontFamily webFamily; It looks like this will break the Blackberry port. Notice that there's an implementation of PlatformSupport::getFontFamilyForCharacters in WebCore/platform/graphics/blackberry/skia/PlatformSupport.cpp
Adam Barth
Comment 4 2012-09-19 10:26:59 PDT
Comment on attachment 163152 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=163152&action=review > Source/WebCore/platform/chromium/PlatformSupport.h:105 > -#elif OS(UNIX) > - struct FontFamily { > - String name; > - bool isBold; > - bool isItalic; > - }; > - static void getFontFamilyForCharacters(const UChar*, size_t numCharacters, const char* preferredLocale, FontFamily*); > #endif Rather than inlining this function, it looks like we might need to add it to FontFamily.h and then have WebCore/platform/graphics/chromium/FontFamilyChromiumLinux.cpp and a WebCore/platform/graphics/blackberry/FontFamilyBlackberry.cpp implementation.
Mark Pilgrim (Google)
Comment 5 2012-09-20 14:21:15 PDT
WebKit Review Bot
Comment 6 2012-09-20 14:23:21 PDT
Attachment 164979 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/chromium/FontFamilyChromiumLinux.cpp:31: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 7 2012-09-20 14:36:06 PDT
Comment on attachment 164979 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164979&action=review I didn't realize that the last parameter for getFontFamilyForCharacters was the same as FontFamily from FontFamily.h. Now I'm not sure whether this is the right place to declare this function.... >> Source/WebCore/platform/graphics/chromium/FontFamilyChromiumLinux.cpp:31 >> +#include <public/linux/WebSandboxSupport.h> > > Alphabetical sorting problem. [build/include_order] [4] We use case-sensitive sorting, so lower case entries go after all the upper case entries.
Adam Barth
Comment 8 2012-09-20 14:39:40 PDT
We need to ask someone who know more about fonts on Linux where this function belongs. @tony: Do you know where we should declare getFontFamilyForCharacters?
Tony Chang
Comment 9 2012-09-20 15:05:05 PDT
getFontFamilyForCharacters is only called by FontCacheSkia.cpp, which is only used by Blackberry and Chromium Linux. Hmm, we could maybe add it as a static method of FontCache (with the appropriate #ifs). Bashi might have a better idea.
Kenichi Ishibashi
Comment 10 2012-09-20 15:44:31 PDT
(In reply to comment #9) > getFontFamilyForCharacters is only called by FontCacheSkia.cpp, which is only used by Blackberry and Chromium Linux. Hmm, we could maybe add it as a static method of FontCache (with the appropriate #ifs). > > Bashi might have a better idea. Hmm, adding it as a static method of FontCache looks better. I couldn't find more appropriate place to declare it..
Mark Pilgrim (Google)
Comment 11 2012-09-21 11:25:25 PDT
Mark Pilgrim (Google)
Comment 12 2012-09-21 11:25:53 PDT
Comment on attachment 165158 [details] Patch Moved functions to FontCache.
WebKit Review Bot
Comment 13 2012-09-21 11:28:09 PDT
Attachment 165158 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/chromium/FontCacheChromiumLinux.cpp:31: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tony Chang
Comment 14 2012-09-21 13:13:30 PDT
Comment on attachment 165158 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=165158&action=review > Source/WebCore/platform/graphics/chromium/FontCacheChromiumLinux.cpp:32 > +#include <public/linux/WebSandboxSupport.h> > +#include <public/Platform.h> Please fix sorting before landing.
Mark Pilgrim (Google)
Comment 15 2012-09-21 13:58:29 PDT
Mark Pilgrim (Google)
Comment 16 2012-09-21 13:58:55 PDT
Comment on attachment 165187 [details] Patch Style nits addressed.
WebKit Review Bot
Comment 17 2012-09-21 14:43:36 PDT
Comment on attachment 165187 [details] Patch Clearing flags on attachment: 165187 Committed r129257: <http://trac.webkit.org/changeset/129257>
WebKit Review Bot
Comment 18 2012-09-21 14:43:41 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.