Changeset 182605 in webkit
- Timestamp:
- Apr 9, 2015, 12:03:28 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/cocoa/FontCascadeCocoa.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r182604 r182605 1 2015-04-09 Simon Fraser <simon.fraser@apple.com> 2 3 Revert part of 182516: it broke tests 4 https://bugs.webkit.org/show_bug.cgi?id=143568 5 rdar://problem/20484578 6 7 Reviewed by Myles Maxfield. 8 9 Revert the FontCascadeCocoa parts of r182516, since it broke some CSS shapes tests. 10 11 * platform/graphics/cocoa/FontCascadeCocoa.mm: 12 (WebCore::FontCascade::drawGlyphs): 13 (WebCore::dilationSizeForTextColor): Deleted. 14 1 15 2015-04-09 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm
r182558 r182605 204 204 #endif 205 205 206 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100207 static CGSize dilationSizeForTextColor(const Color& color)208 {209 double hue;210 double saturation;211 double lightness;212 color.getHSL(hue, saturation, lightness);213 214 // These values were derived empirically, and are only experimental.215 if (lightness < 0.3333) // Dark216 return CGSizeMake(0.007, 0.019);217 218 if (lightness < 0.6667) // Medium219 return CGSizeMake(0.032, 0.032);220 221 // Light222 return CGSizeMake(0.0475, 0.039);223 }224 #endif225 226 206 void FontCascade::drawGlyphs(GraphicsContext* context, const Font* font, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& anchorPoint) const 227 207 { … … 278 258 CGContextSetShouldSmoothFonts(cgContext, shouldSmoothFonts); 279 259 } 280 281 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100282 CGFontAntialiasingStyle oldAntialiasingStyle;283 bool resetAntialiasingStyle = false;284 if (antialiasedFontDilationEnabled() && !CGContextGetShouldSmoothFonts(cgContext) && matchAntialiasedAndSmoothedFonts) {285 resetAntialiasingStyle = true;286 oldAntialiasingStyle = CGContextGetFontAntialiasingStyle(cgContext);287 CGContextSetFontAntialiasingStyle(cgContext, kCGFontAntialiasingStyleUnfilteredCustomDilation);288 CGContextSetFontDilation(cgContext, dilationSizeForTextColor(context->fillColor()));289 }290 #endif291 260 #endif 292 261 … … 406 375 407 376 #if !PLATFORM(IOS) 408 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100409 if (resetAntialiasingStyle)410 CGContextSetFontAntialiasingStyle(cgContext, oldAntialiasingStyle);411 #endif412 413 377 if (changeFontSmoothing) 414 378 CGContextSetShouldSmoothFonts(cgContext, originalShouldUseFontSmoothing);
Note:
See TracChangeset
for help on using the changeset viewer.