Changeset 182824 in webkit
- Timestamp:
- Apr 14, 2015, 5:26:23 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm (modified) (3 diffs)
-
Source/WebKit/mac/ChangeLog (modified) (1 diff)
-
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (modified) (2 diffs)
-
Source/WebKit/mac/WebView/WebPreferences.mm (modified) (2 diffs)
-
Source/WebKit/mac/WebView/WebPreferencesPrivate.h (modified) (1 diff)
-
Source/WebKit/mac/WebView/WebView.mm (modified) (2 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/DumpRenderTree/mac/DumpRenderTree.mm (modified) (1 diff)
-
Tools/WebKitTestRunner/TestController.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r182823 r182824 1 2015-04-14 Simon Fraser <simon.fraser@apple.com> 2 3 Re-enable custom dilation for antialiased fonts 4 https://bugs.webkit.org/show_bug.cgi?id=143738 5 6 Reviewed by Tim Horton. 7 8 Enabling custom dilation for antialised fonts broke layout tests, so re-land it, 9 but disable in WebKitTestRunner and DumpRenderTree. The latter requires adding 10 a private WebKit pref. This pref defaults to YES, enabling the feature by default 11 in WK1 as we do for WK2. 12 13 * platform/graphics/cocoa/FontCascadeCocoa.mm: 14 (WebCore::dilationSizeForTextColor): 15 (WebCore::FontCascade::drawGlyphs): 16 1 17 2015-04-14 Andy Estes <aestes@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm
r182605 r182824 204 204 #endif 205 205 206 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 207 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) // Dark 216 return CGSizeMake(0.007, 0.019); 217 218 if (lightness < 0.6667) // Medium 219 return CGSizeMake(0.032, 0.032); 220 221 // Light 222 return CGSizeMake(0.0475, 0.039); 223 } 224 #endif 225 206 226 void FontCascade::drawGlyphs(GraphicsContext* context, const Font* font, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& anchorPoint) const 207 227 { … … 258 278 CGContextSetShouldSmoothFonts(cgContext, shouldSmoothFonts); 259 279 } 280 281 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 282 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 #endif 260 291 #endif 261 292 … … 375 406 376 407 #if !PLATFORM(IOS) 408 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 409 if (resetAntialiasingStyle) 410 CGContextSetFontAntialiasingStyle(cgContext, oldAntialiasingStyle); 411 #endif 412 377 413 if (changeFontSmoothing) 378 414 CGContextSetShouldSmoothFonts(cgContext, originalShouldUseFontSmoothing); -
trunk/Source/WebKit/mac/ChangeLog
r182756 r182824 1 2015-04-14 Simon Fraser <simon.fraser@apple.com> 2 3 Re-enable custom dilation for antialiased fonts 4 https://bugs.webkit.org/show_bug.cgi?id=143738 5 6 Reviewed by Tim Horton. 7 8 Enabling custom dilation for antialised fonts broke layout tests, so re-land it, 9 but disable in WebKitTestRunner and DumpRenderTree. The latter requires adding 10 a private WebKit pref. This pref defaults to YES, enabling the feature by default 11 in WK1 as we do for WK2. 12 13 * WebView/WebPreferenceKeysPrivate.h: 14 * WebView/WebPreferences.mm: 15 (+[WebPreferences initialize]): 16 (-[WebPreferences setAntialiasedFontDilationEnabled:]): 17 (-[WebPreferences antialiasedFontDilationEnabled]): 18 * WebView/WebPreferencesPrivate.h: 19 * WebView/WebView.mm: 20 (-[WebView _preferencesChanged:]): 21 1 22 2015-04-13 Brady Eidson <beidson@apple.com> 2 23 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r180570 r182824 160 160 #define WebKitPDFScaleFactorPreferenceKey @"WebKitPDFScaleFactor" 161 161 #endif 162 162 163 #define WebKitUseSiteSpecificSpoofingPreferenceKey @"WebKitUseSiteSpecificSpoofing" 163 164 #define WebKitEditableLinkBehaviorPreferenceKey @"WebKitEditableLinkBehavior" … … 168 169 #define WebKitIncrementalRenderingSuppressionTimeoutInSecondsKey @"WebKitIncrementalRenderingSuppressionTimeoutInSeconds" 169 170 #define WebKitWantsBalancedSetDefersLoadingBehaviorKey @"WebKitWantsBalancedSetDefersLoadingBehavior" 170 171 171 #define WebKitDebugFullPageZoomPreferenceKey @"WebKitDebugFullPageZoomPreferenceKey" 172 173 172 #define WebKitMinimumZoomFontSizePreferenceKey @"WebKitMinimumZoomFontSizePreferenceKey" 173 #define WebKitAntialiasedFontDilationEnabledKey @"AntialiasedFontDilationEnabled" 174 174 175 175 #if TARGET_OS_IPHONE -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r182623 r182824 418 418 @"9", WebKitMinimumLogicalFontSizePreferenceKey, 419 419 @"16", WebKitDefaultFontSizePreferenceKey, 420 @(YES), WebKitAntialiasedFontDilationEnabledKey, 420 421 @"13", WebKitDefaultFixedFontSizePreferenceKey, 421 422 @"ISO-8859-1", WebKitDefaultTextEncodingNamePreferenceKey, … … 2484 2485 } 2485 2486 2487 - (void)setAntialiasedFontDilationEnabled:(BOOL)enabled 2488 { 2489 [self _setBoolValue:enabled forKey:WebKitAntialiasedFontDilationEnabledKey]; 2490 } 2491 2492 - (BOOL)antialiasedFontDilationEnabled 2493 { 2494 return [self _boolValueForKey:WebKitAntialiasedFontDilationEnabledKey]; 2495 } 2496 2486 2497 @end 2487 2498 -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r182653 r182824 437 437 - (NSString *)mediaKeysStorageDirectory; 438 438 439 - (void)setAntialiasedFontDilationEnabled:(BOOL)flag; 440 - (BOOL)antialiasedFontDilationEnabled; 441 439 442 #if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 440 443 - (void)_setAllowCompositingLayerVisualDegradation:(BOOL)flag; -
trunk/Source/WebKit/mac/WebView/WebView.mm
r182623 r182824 2213 2213 settings.setFantasyFontFamily([preferences fantasyFontFamily]); 2214 2214 settings.setFixedFontFamily([preferences fixedFontFamily]); 2215 settings.setAntialiasedFontDilationEnabled([preferences antialiasedFontDilationEnabled]); 2215 2216 settings.setForceFTPDirectoryListings([preferences _forceFTPDirectoryListings]); 2216 2217 settings.setFTPDirectoryTemplatePath([preferences _ftpDirectoryTemplatePath]); … … 2260 2261 settings.setDNSPrefetchingEnabled([preferences isDNSPrefetchingEnabled]); 2261 2262 2262 // FIXME: Enabling accelerated compositing when WebGL is enabled causes tests to fail on Leopard which expect HW compositing to be disabled.2263 // Until we fix that, I will comment out the test (CFM)2264 2263 settings.setAcceleratedCompositingEnabled([preferences acceleratedCompositingEnabled]); 2265 2264 settings.setAcceleratedDrawingEnabled([preferences acceleratedDrawingEnabled]); -
trunk/Tools/ChangeLog
r182821 r182824 1 2015-04-14 Simon Fraser <simon.fraser@apple.com> 2 3 Re-enable custom dilation for antialiased fonts 4 https://bugs.webkit.org/show_bug.cgi?id=143738 5 6 Reviewed by Tim Horton. 7 8 Enabling custom dilation for antialised fonts broke layout tests, so re-land it, 9 but disable in WebKitTestRunner and DumpRenderTree. The latter requires adding 10 a private WebKit pref. This pref defaults to YES, enabling the feature by default 11 in WK1 as we do for WK2. 12 13 * DumpRenderTree/mac/DumpRenderTree.mm: 14 (resetWebPreferencesToConsistentValues): 15 * WebKitTestRunner/TestController.cpp: 16 (WTR::TestController::resetPreferencesToConsistentValues): 17 1 18 2015-04-14 Brent Fulgham <bfulgham@apple.com> 2 19 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r182666 r182824 857 857 [preferences setDefaultFontSize:16]; 858 858 [preferences setDefaultFixedFontSize:13]; 859 [preferences setAntialiasedFontDilationEnabled:NO]; 859 860 [preferences setMinimumFontSize:0]; 860 861 [preferences setDefaultTextEncodingName:@"ISO-8859-1"]; -
trunk/Tools/WebKitTestRunner/TestController.cpp
r182428 r182824 561 561 WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true); 562 562 WKPreferencesSetFontSmoothingLevel(preferences, kWKFontSmoothingLevelNoSubpixelAntiAliasing); 563 WKPreferencesSetAntialiasedFontDilationEnabled(preferences, false); 563 564 WKPreferencesSetXSSAuditorEnabled(preferences, false); 564 565 WKPreferencesSetWebAudioEnabled(preferences, true);
Note:
See TracChangeset
for help on using the changeset viewer.