Title: [94368] trunk/Source/WebCore
- Revision
- 94368
- Author
- [email protected]
- Date
- 2011-09-01 17:16:30 -0700 (Thu, 01 Sep 2011)
Log Message
Fix layout test regressions from r94352.
Reviewed by Anders Carlsson.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::getFontDataForCharacters): In the custom font case (that is, when there is
not base NSFont) always get and use the best variation.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (94367 => 94368)
--- trunk/Source/WebCore/ChangeLog 2011-09-02 00:11:33 UTC (rev 94367)
+++ trunk/Source/WebCore/ChangeLog 2011-09-02 00:16:30 UTC (rev 94368)
@@ -1,3 +1,13 @@
+2011-09-01 Dan Bernstein <[email protected]>
+
+ Fix layout test regressions from r94352.
+
+ Reviewed by Anders Carlsson.
+
+ * platform/graphics/mac/FontCacheMac.mm:
+ (WebCore::FontCache::getFontDataForCharacters): In the custom font case (that is, when there is
+ not base NSFont) always get and use the best variation.
+
2011-09-01 Ryosuke Niwa <[email protected]>
Revert r94355 because it caused bunch of builds to break.
Modified: trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (94367 => 94368)
--- trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2011-09-02 00:11:33 UTC (rev 94367)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2011-09-02 00:16:30 UTC (rev 94368)
@@ -145,10 +145,10 @@
NSFontTraitMask substituteFontTraits = [fontManager traitsOfFont:substituteFont];
NSInteger substituteFontWeight = [fontManager weightOfFont:substituteFont];
- if (traits != substituteFontTraits || weight != substituteFontWeight) {
+ if (traits != substituteFontTraits || weight != substituteFontWeight || !nsFont) {
if (NSFont *bestVariation = [fontManager fontWithFamily:[substituteFont familyName] traits:traits weight:weight size:size]) {
- if (([fontManager traitsOfFont:bestVariation] != substituteFontTraits || [fontManager weightOfFont:bestVariation] != substituteFontWeight)
- && [[bestVariation coveredCharacterSet] longCharacterIsMember:character])
+ if (!nsFont || (([fontManager traitsOfFont:bestVariation] != substituteFontTraits || [fontManager weightOfFont:bestVariation] != substituteFontWeight)
+ && [[bestVariation coveredCharacterSet] longCharacterIsMember:character]))
substituteFont = bestVariation;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes