Changeset 183983 in webkit
- Timestamp:
- May 7, 2015, 11:32:26 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac/fast/text/systemFont-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/mac/fast/text/systemFont.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/mac/FontCacheMac.mm (modified) (2 diffs)
-
Source/WebCore/platform/spi/mac/NSFontSPI.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r183982 r183983 1 2015-05-07 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r183895. 4 https://bugs.webkit.org/show_bug.cgi?id=144786 5 6 Many tests became flaky (Requested by ap on #webkit). 7 8 Reverted changeset: 9 10 "Expose more font weights for -apple-system" 11 https://bugs.webkit.org/show_bug.cgi?id=144707 12 http://trac.webkit.org/changeset/183895 13 1 14 2015-05-07 Martin Robinson <mrobinson@igalia.com> 2 15 -
trunk/LayoutTests/platform/mac/fast/text/systemFont-expected.txt
r183895 r183983 1 layer at (0,0) size 785x2 1981 layer at (0,0) size 785x2036 2 2 RenderView at (0,0) size 785x600 3 layer at (0,0) size 785x2 1984 RenderBlock {HTML} at (0,0) size 785x2 1985 RenderBody {BODY} at (8,8) size 769x2 1823 layer at (0,0) size 785x2036 4 RenderBlock {HTML} at (0,0) size 785x2036 5 RenderBody {BODY} at (8,8) size 769x2020 6 6 RenderBlock {DIV} at (0,0) size 769x897 7 7 RenderBlock {DIV} at (0,0) size 769x28 … … 79 79 text run at (0,0) width 756: "This is a test for -apple-" 80 80 text run at (0,85) width 373: "system font" 81 RenderBlock {DIV} at (0,1738) size 769x162 82 RenderBlock {DIV} at (0,0) size 769x18 83 RenderText {#text} at (0,0) size 302x18 84 text run at (0,0) width 302: "This is a font weight test for -apple-system font" 85 RenderBlock {DIV} at (0,18) size 769x18 86 RenderText {#text} at (0,0) size 316x18 87 text run at (0,0) width 316: "This is a font weight test for -apple-system font" 88 RenderBlock {DIV} at (0,36) size 769x18 89 RenderText {#text} at (0,0) size 335x18 90 text run at (0,0) width 335: "This is a font weight test for -apple-system font" 91 RenderBlock {DIV} at (0,54) size 769x18 92 RenderText {#text} at (0,0) size 350x18 93 text run at (0,0) width 350: "This is a font weight test for -apple-system font" 94 RenderBlock {DIV} at (0,72) size 769x18 95 RenderText {#text} at (0,0) size 362x18 96 text run at (0,0) width 362: "This is a font weight test for -apple-system font" 97 RenderBlock {DIV} at (0,90) size 769x18 98 RenderText {#text} at (0,0) size 374x18 99 text run at (0,0) width 374: "This is a font weight test for -apple-system font" 100 RenderBlock {DIV} at (0,108) size 769x18 101 RenderText {#text} at (0,0) size 374x18 102 text run at (0,0) width 374: "This is a font weight test for -apple-system font" 103 RenderBlock {DIV} at (0,126) size 769x18 104 RenderText {#text} at (0,0) size 396x18 105 text run at (0,0) width 396: "This is a font weight test for -apple-system font" 106 RenderBlock {DIV} at (0,144) size 769x18 107 RenderText {#text} at (0,0) size 396x18 108 text run at (0,0) width 396: "This is a font weight test for -apple-system font" 109 RenderBlock {DIV} at (0,1900) size 769x282 81 RenderBlock {DIV} at (0,1738) size 769x282 110 82 RenderBlock {DIV} at (0,0) size 769x56 111 83 RenderText {#text} at (0,0) size 644x56 -
trunk/LayoutTests/platform/mac/fast/text/systemFont.html
r183895 r183983 25 25 </div> 26 26 <div> 27 <div style="font-family: -apple-system; font-weight: 100">This is a font weight test for -apple-system font</div>28 <div style="font-family: -apple-system; font-weight: 200">This is a font weight test for -apple-system font</div>29 <div style="font-family: -apple-system; font-weight: 300">This is a font weight test for -apple-system font</div>30 <div style="font-family: -apple-system; font-weight: 400">This is a font weight test for -apple-system font</div>31 <div style="font-family: -apple-system; font-weight: 500">This is a font weight test for -apple-system font</div>32 <div style="font-family: -apple-system; font-weight: 600">This is a font weight test for -apple-system font</div>33 <div style="font-family: -apple-system; font-weight: 700">This is a font weight test for -apple-system font</div>34 <div style="font-family: -apple-system; font-weight: 800">This is a font weight test for -apple-system font</div>35 <div style="font-family: -apple-system; font-weight: 900">This is a font weight test for -apple-system font</div>36 </div>37 <div>38 27 <div style="font-family: -apple-system-monospaced-numbers; font-size: 24px">This is a test for -apple-system-monospaced-numbers font - 00:11:22:33</div> 39 28 <div style="font: 30.0px '-apple-system-monospaced-numbers'">This is a test for -apple-system-monospaced-numbers font - 00:11:22:33</div> -
trunk/Source/WebCore/ChangeLog
r183981 r183983 1 2015-05-07 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r183895. 4 https://bugs.webkit.org/show_bug.cgi?id=144786 5 6 Many tests became flaky (Requested by ap on #webkit). 7 8 Reverted changeset: 9 10 "Expose more font weights for -apple-system" 11 https://bugs.webkit.org/show_bug.cgi?id=144707 12 http://trac.webkit.org/changeset/183895 13 1 14 2015-05-07 Hyungwook Lee <hyungwook.lee@navercorp.com> 2 15 -
trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm
r183895 r183983 204 204 } 205 205 206 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000207 static CGFloat toNSFontWeight(FontWeight fontWeight)208 {209 static CGFloat nsFontWeights[] = {210 NSFontWeightUltraLight, // Values between ultra-light and thin are swapped.211 NSFontWeightThin,212 NSFontWeightLight,213 NSFontWeightRegular,214 NSFontWeightMedium,215 NSFontWeightSemibold,216 NSFontWeightBold,217 NSFontWeightHeavy,218 NSFontWeightBlack219 };220 return nsFontWeights[fontWeight];221 }222 #endif223 224 206 // Family name is somewhat of a misnomer here. We first attempt to find an exact match 225 207 // comparing the desiredFamily to the PostScript name of the installed fonts. If that fails … … 229 211 if (equalIgnoringASCIICase(family.string(), String(@"-webkit-system-font")) || equalIgnoringASCIICase(family.string(), String(@"-apple-system")) || equalIgnoringASCIICase(family.string(), String(@"-apple-system-font"))) { 230 212 // We ignore italic for system font. 231 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000232 return [NSFont systemFontOfSize:size weight:toNSFontWeight(weight)];233 #else234 213 return (weight >= FontWeight600) ? [NSFont boldSystemFontOfSize:size] : [NSFont systemFontOfSize:size]; 235 #endif236 214 } 237 215 -
trunk/Source/WebCore/platform/spi/mac/NSFontSPI.h
r183895 r183983 26 26 #if USE(APPLE_INTERNAL_SDK) 27 27 28 #import <AppKit/NSFontDescriptor_Private.h>29 28 #import <AppKit/NSFont_Private.h> 30 29 … … 34 33 + (NSFont *)findFontLike:(NSFont *)aFont forCharacter:(UInt32)c inLanguage:(id) language; 35 34 + (NSFont *)findFontLike:(NSFont *)aFont forString:(NSString *)string withRange:(NSRange)range inLanguage:(id) language; 36 37 + (NSFont *)systemFontOfSize:(CGFloat)size weight:(CGFloat)weight;38 35 @end 39 36 40 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100041 extern const CGFloat NSFontWeightUltraLight;42 extern const CGFloat NSFontWeightThin;43 extern const CGFloat NSFontWeightLight;44 extern const CGFloat NSFontWeightRegular;45 extern const CGFloat NSFontWeightMedium;46 extern const CGFloat NSFontWeightSemibold;47 extern const CGFloat NSFontWeightBold;48 extern const CGFloat NSFontWeightHeavy;49 extern const CGFloat NSFontWeightBlack;50 37 #endif 51 52 #endif
Note:
See TracChangeset
for help on using the changeset viewer.