Title: [152144] trunk/Tools
- Revision
- 152144
- Author
- d...@apple.com
- Date
- 2013-06-27 18:02:03 -0700 (Thu, 27 Jun 2013)
Log Message
[Mac] Add Mavericks system font to Test systems
https://bugs.webkit.org/show_bug.cgi?id=118109
Reviewed by Simon Fraser.
OS X Mavericks uses a different font for system controls. Tell DRT and
WKTR about them otherwise they use a fallback font. Unfortunately the
fonts are hidden (not found in the list of available fonts) so I
had to add them manually.
Even though there is only one at the moment, I implemented this
as a set so it will be easier to add new fonts if necessary.
* DumpRenderTree/mac/DumpRenderTree.mm:
(allowedFontFamilySet): Fixed typo.
(systemHiddenFontFamilySet): New method that returns the system control font.
(drt_NSFontManager_availableFonts): Merge the hidden fonts.
* WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
(WTR::allowedFontFamilySet): Fixed typo.
(WTR::systemHiddenFontFamilySet): As above.
(WTR::wtr_NSFontManager_availableFonts):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (152143 => 152144)
--- trunk/Tools/ChangeLog 2013-06-28 00:33:21 UTC (rev 152143)
+++ trunk/Tools/ChangeLog 2013-06-28 01:02:03 UTC (rev 152144)
@@ -1,3 +1,27 @@
+2013-06-26 Dean Jackson <d...@apple.com>
+
+ [Mac] Add Mavericks system font to Test systems
+ https://bugs.webkit.org/show_bug.cgi?id=118109
+
+ Reviewed by Simon Fraser.
+
+ OS X Mavericks uses a different font for system controls. Tell DRT and
+ WKTR about them otherwise they use a fallback font. Unfortunately the
+ fonts are hidden (not found in the list of available fonts) so I
+ had to add them manually.
+
+ Even though there is only one at the moment, I implemented this
+ as a set so it will be easier to add new fonts if necessary.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (allowedFontFamilySet): Fixed typo.
+ (systemHiddenFontFamilySet): New method that returns the system control font.
+ (drt_NSFontManager_availableFonts): Merge the hidden fonts.
+ * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
+ (WTR::allowedFontFamilySet): Fixed typo.
+ (WTR::systemHiddenFontFamilySet): As above.
+ (WTR::wtr_NSFontManager_availableFonts):
+
2013-06-27 Anders Carlsson <ander...@apple.com>
Get rid of the last uses of deprecatedCharactersWithNullTermination()
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (152143 => 152144)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2013-06-28 00:33:21 UTC (rev 152143)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2013-06-28 01:02:03 UTC (rev 152144)
@@ -236,7 +236,7 @@
static NSSet *allowedFontFamilySet()
{
- static NSSet *fontFamiliySet = [[NSSet setWithObjects:
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
@"Ahem",
@"Al Bayan",
@"American Typewriter",
@@ -355,9 +355,18 @@
@"Zapfino",
nil] retain];
- return fontFamiliySet;
+ return fontFamilySet;
}
+static NSSet *systemHiddenFontFamilySet()
+{
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
+ @".LucidaGrandeUI",
+ nil] retain];
+
+ return fontFamilySet;
+}
+
static IMP appKitAvailableFontFamiliesIMP;
static IMP appKitAvailableFontsIMP;
@@ -391,7 +400,11 @@
[availableFontList addObject:[fontInfo objectAtIndex:0]];
}
}
-
+
+ for (NSString *hiddenFontFamily in systemHiddenFontFamilySet()) {
+ [availableFontList addObject:hiddenFontFamily];
+ }
+
availableFonts = availableFontList;
return availableFonts;
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm (152143 => 152144)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm 2013-06-28 00:33:21 UTC (rev 152143)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm 2013-06-28 01:02:03 UTC (rev 152144)
@@ -42,7 +42,7 @@
static NSSet *allowedFontFamilySet()
{
- static NSSet *fontFamiliySet = [[NSSet setWithObjects:
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
@"Ahem",
@"Al Bayan",
@"American Typewriter",
@@ -161,9 +161,18 @@
@"Zapfino",
nil] retain];
- return fontFamiliySet;
+ return fontFamilySet;
}
+static NSSet *systemHiddenFontFamilySet()
+{
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
+ @".LucidaGrandeUI",
+ nil] retain];
+
+ return fontFamilySet;
+}
+
static IMP appKitAvailableFontFamiliesIMP;
static IMP appKitAvailableFontsIMP;
@@ -197,7 +206,11 @@
[availableFontList addObject:[fontInfo objectAtIndex:0]];
}
}
-
+
+ for (NSString *hiddenFontFamily in systemHiddenFontFamilySet()) {
+ [availableFontList addObject:hiddenFontFamily];
+ }
+
availableFonts = availableFontList;
return availableFonts;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes