Changeset 96770 in webkit
- Timestamp:
- Oct 5, 2011, 5:08:04 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r96765 r96770 1 2011-10-05 Simon Fraser <simon.fraser@apple.com> 2 3 In WebKitTestRunner, text has font smoothing in pixel snapshots 4 https://bugs.webkit.org/show_bug.cgi?id=69396 5 6 Reviewed by Darin Adler. 7 8 Plumb through a method on WKContext that controls whether font smoothing 9 is enabled. Since this is a global setting, such a method is more appropriate 10 than a preference. 11 12 Remove leading underscores on some WKContext functions, but keep 13 exported versions of same for binary compatibility. 14 15 * Shared/WebProcessCreationParameters.cpp: 16 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): 17 (WebKit::WebProcessCreationParameters::encode): 18 (WebKit::WebProcessCreationParameters::decode): 19 * Shared/WebProcessCreationParameters.h: 20 * UIProcess/API/C/WKContext.cpp: 21 (WKContextSetAlwaysUsesComplexTextCodePath): 22 (WKContextSetShouldUseFontSmoothing): 23 (WKContextSetAdditionalPluginsDirectory): 24 (WKContextRegisterURLSchemeAsEmptyDocument): 25 (WKContextSetHTTPPipeliningEnabled): 26 (_WKContextSetAdditionalPluginsDirectory): 27 (_WKContextRegisterURLSchemeAsEmptyDocument): 28 (_WKContextSetAlwaysUsesComplexTextCodePath): 29 (_WKContextSetHTTPPipeliningEnabled): 30 * UIProcess/API/C/WKContextPrivate.h: 31 * UIProcess/WebContext.cpp: 32 (WebKit::WebContext::WebContext): 33 (WebKit::WebContext::ensureWebProcess): 34 (WebKit::WebContext::setShouldUseFontSmoothing): 35 (WebKit::WebContext::httpPipeliningEnabled): 36 * UIProcess/WebContext.h: 37 * WebProcess/WebProcess.cpp: 38 (WebKit::WebProcess::initializeWebProcess): 39 (WebKit::WebProcess::setShouldUseFontSmoothing): 40 * WebProcess/WebProcess.h: 41 * WebProcess/WebProcess.messages.in: 42 1 43 2011-10-05 Anders Carlsson <andersca@apple.com> 2 44 -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
r95901 r96770 37 37 : shouldTrackVisitedLinks(false) 38 38 , shouldAlwaysUseComplexTextCodePath(false) 39 , shouldUseFontSmoothing(true) 39 40 , defaultRequestTimeoutInterval(INT_MAX) 40 41 #if PLATFORM(MAC) … … 61 62 encoder->encode(shouldTrackVisitedLinks); 62 63 encoder->encode(shouldAlwaysUseComplexTextCodePath); 64 encoder->encode(shouldUseFontSmoothing); 63 65 encoder->encode(iconDatabaseEnabled); 64 66 #if ENABLE(PLUGIN_PROCESS) … … 122 124 return false; 123 125 if (!decoder->decode(parameters.shouldAlwaysUseComplexTextCodePath)) 126 return false; 127 if (!decoder->decode(parameters.shouldUseFontSmoothing)) 124 128 return false; 125 129 if (!decoder->decode(parameters.iconDatabaseEnabled)) -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h
r95901 r96770 68 68 69 69 bool shouldAlwaysUseComplexTextCodePath; 70 bool shouldUseFontSmoothing; 70 71 71 72 bool iconDatabaseEnabled; -
trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp
r95901 r96770 37 37 using namespace WebKit; 38 38 39 // For binary compatibility with Safari 5.1. Should be removed eventually. 40 WK_EXPORT void _WKContextSetAdditionalPluginsDirectory(WKContextRef context, WKStringRef pluginsDirectory); 41 WK_EXPORT void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme); 42 WK_EXPORT void _WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef context, bool alwaysUseComplexTextCodePath); 43 WK_EXPORT void _WKContextSetHTTPPipeliningEnabled(WKContextRef context, bool enabled); 44 39 45 WKTypeID WKContextGetTypeID() 40 46 { … … 118 124 } 119 125 120 void _WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef contextRef, bool alwaysUseComplexTextCodePath)126 void WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef contextRef, bool alwaysUseComplexTextCodePath) 121 127 { 122 128 toImpl(contextRef)->setAlwaysUsesComplexTextCodePath(alwaysUseComplexTextCodePath); 123 129 } 124 130 125 void _WKContextSetAdditionalPluginsDirectory(WKContextRef contextRef, WKStringRef pluginsDirectory) 131 void WKContextSetShouldUseFontSmoothing(WKContextRef contextRef, bool useFontSmoothing) 132 { 133 toImpl(contextRef)->setShouldUseFontSmoothing(useFontSmoothing); 134 } 135 136 void WKContextSetAdditionalPluginsDirectory(WKContextRef contextRef, WKStringRef pluginsDirectory) 126 137 { 127 138 toImpl(contextRef)->setAdditionalPluginsDirectory(toImpl(pluginsDirectory)->string()); 128 139 } 129 140 130 void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef contextRef, WKStringRef urlScheme)141 void WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef contextRef, WKStringRef urlScheme) 131 142 { 132 143 toImpl(contextRef)->registerURLSchemeAsEmptyDocument(toImpl(urlScheme)->string()); … … 223 234 } 224 235 225 void _WKContextSetHTTPPipeliningEnabled(WKContextRef contextRef, bool enabled)236 void WKContextSetHTTPPipeliningEnabled(WKContextRef contextRef, bool enabled) 226 237 { 227 238 toImpl(contextRef)->setHTTPPipeliningEnabled(enabled); … … 243 254 } 244 255 256 // Deprecated functions. 257 void _WKContextSetAdditionalPluginsDirectory(WKContextRef context, WKStringRef pluginsDirectory) 258 { 259 WKContextSetAdditionalPluginsDirectory(context, pluginsDirectory); 260 } 261 262 void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme) 263 { 264 WKContextRegisterURLSchemeAsEmptyDocument(context, urlScheme); 265 } 266 267 void _WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef context, bool alwaysUseComplexTextCodePath) 268 { 269 WKContextSetAlwaysUsesComplexTextCodePath(context, alwaysUseComplexTextCodePath); 270 } 271 272 void _WKContextSetHTTPPipeliningEnabled(WKContextRef context, bool enabled) 273 { 274 WKContextSetHTTPPipeliningEnabled(context, enabled); 275 } -
trunk/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h
r95901 r96770 45 45 WK_EXPORT WKContextRef WKContextGetSharedThreadContext(); 46 46 47 WK_EXPORT void _WKContextSetAdditionalPluginsDirectory(WKContextRef context, WKStringRef pluginsDirectory);47 WK_EXPORT void WKContextSetAdditionalPluginsDirectory(WKContextRef context, WKStringRef pluginsDirectory); 48 48 49 WK_EXPORT void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme);49 WK_EXPORT void WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme); 50 50 51 WK_EXPORT void _WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef context, bool alwaysUseComplexTextCodePath); 51 WK_EXPORT void WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef context, bool alwaysUseComplexTextCodePath); 52 53 WK_EXPORT void WKContextSetShouldUseFontSmoothing(WKContextRef context, bool useFontSmoothing); 52 54 53 55 WK_EXPORT void WKContextRegisterURLSchemeAsSecure(WKContextRef context, WKStringRef urlScheme); … … 67 69 WK_EXPORT void WKContextEnableProcessTermination(WKContextRef context); 68 70 69 WK_EXPORT void _WKContextSetHTTPPipeliningEnabled(WKContextRef context, bool enabled);70 71 WK_EXPORT void WKContextSetHTTPPipeliningEnabled(WKContextRef context, bool enabled); 72 71 73 WK_EXPORT void WKContextWarmInitialProcess(WKContextRef context); 72 74 -
trunk/Source/WebKit2/UIProcess/WebContext.cpp
r96653 r96770 123 123 , m_visitedLinkProvider(this) 124 124 , m_alwaysUsesComplexTextCodePath(false) 125 , m_shouldUseFontSmoothing(true) 125 126 , m_cacheModel(CacheModelDocumentViewer) 126 127 , m_memorySamplerEnabled(false) … … 255 256 256 257 parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath; 258 parameters.shouldUseFontSmoothing = m_shouldUseFontSmoothing; 257 259 258 260 parameters.iconDatabaseEnabled = !iconDatabasePath().isEmpty(); … … 509 511 } 510 512 513 void WebContext::setShouldUseFontSmoothing(bool useFontSmoothing) 514 { 515 m_shouldUseFontSmoothing = useFontSmoothing; 516 sendToAllProcesses(Messages::WebProcess::SetShouldUseFontSmoothing(useFontSmoothing)); 517 } 518 511 519 void WebContext::registerURLSchemeAsEmptyDocument(const String& urlScheme) 512 520 { … … 804 812 } 805 813 806 bool WebContext::httpPipeliningEnabled() 814 bool WebContext::httpPipeliningEnabled() const 807 815 { 808 816 #if PLATFORM(MAC) -
trunk/Source/WebKit2/UIProcess/WebContext.h
r95901 r96770 114 114 115 115 void setAlwaysUsesComplexTextCodePath(bool); 116 void setShouldUseFontSmoothing(bool); 116 117 117 118 void registerURLSchemeAsEmptyDocument(const String&); … … 179 180 // Defaults to false. 180 181 void setHTTPPipeliningEnabled(bool); 181 bool httpPipeliningEnabled() ;182 bool httpPipeliningEnabled() const; 182 183 183 184 void getWebCoreStatistics(PassRefPtr<DictionaryCallback>); … … 245 246 246 247 bool m_alwaysUsesComplexTextCodePath; 248 bool m_shouldUseFontSmoothing; 247 249 248 250 Vector<pair<String, RefPtr<APIObject> > > m_pendingMessagesToPostToInjectedBundle; -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r95919 r96770 238 238 setAlwaysUsesComplexTextCodePath(true); 239 239 240 if (parameters.shouldUseFontSmoothing) 241 setShouldUseFontSmoothing(true); 242 240 243 #if USE(CFURLSTORAGESESSIONS) 241 244 WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase(parameters.uiProcessBundleIdentifier); … … 275 278 { 276 279 WebCore::Font::setCodePath(alwaysUseComplexText ? WebCore::Font::Complex : WebCore::Font::Auto); 280 } 281 282 void WebProcess::setShouldUseFontSmoothing(bool useFontSmoothing) 283 { 284 WebCore::Font::setShouldUseSmoothing(useFontSmoothing); 277 285 } 278 286 -
trunk/Source/WebKit2/WebProcess/WebProcess.h
r95919 r96770 142 142 void setDefaultRequestTimeoutInterval(double); 143 143 void setAlwaysUsesComplexTextCodePath(bool); 144 void setShouldUseFontSmoothing(bool); 144 145 void languageChanged(const String&) const; 145 146 #if PLATFORM(WIN) -
trunk/Source/WebKit2/WebProcess/WebProcess.messages.in
r94476 r96770 41 41 SetDefaultRequestTimeoutInterval(double timeoutInterval) 42 42 SetAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText) 43 SetShouldUseFontSmoothing(bool useFontSmoothing) 43 44 LanguageChanged(WTF::String language) 44 45 #if PLATFORM(WIN) -
trunk/Tools/ChangeLog
r96768 r96770 1 2011-10-05 Simon Fraser <simon.fraser@apple.com> 2 3 In WebKitTestRunner, text has font smoothing in pixel snapshots 4 https://bugs.webkit.org/show_bug.cgi?id=69396 5 6 Reviewed by Darin Adler. 7 8 Call the new WKContext method that disables font smoothing in 9 WebKitTestRunner, so that pixel snapshots don't have font smoothing 10 enabled. Remove leading underscore from a WKContext function call. 11 12 * WebKitTestRunner/TestController.cpp: 13 (WTR::TestController::resetStateToConsistentValues): 14 1 15 2011-10-05 David Levin <levin@chromium.org> 2 16 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r96645 r96770 294 294 WKContextSetInjectedBundleClient(m_context.get(), &injectedBundleClient); 295 295 296 _WKContextSetAdditionalPluginsDirectory(m_context.get(), testPluginDirectory());296 WKContextSetAdditionalPluginsDirectory(m_context.get(), testPluginDirectory()); 297 297 298 298 m_mainWebView = adoptPtr(new PlatformWebView(m_context.get(), m_pageGroup.get())); … … 392 392 WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), resetMessageBody.get()); 393 393 394 WKContextSetShouldUseFontSmoothing(TestController::shared().context(), false); 395 394 396 // FIXME: This function should also ensure that there is only one page open. 395 397
Note:
See TracChangeset
for help on using the changeset viewer.