Changeset 74283 in webkit
- Timestamp:
- Dec 17, 2010, 11:45:12 AM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r74282 r74283 1 2010-12-17 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Add API for "Always Use the Complex Text Code Path" 6 https://bugs.webkit.org/show_bug.cgi?id=51265 7 8 * Shared/WebProcessCreationParameters.cpp: 9 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize shouldAlwaysUseComplexTextCodePath. 10 (WebKit::WebProcessCreationParameters::encode): Encode shouldAlwaysUseComplexTextCodePath. 11 (WebKit::WebProcessCreationParameters::decode): Decode shouldAlwaysUseComplexTextCodePath. 12 * Shared/WebProcessCreationParameters.h: 13 * UIProcess/API/C/WKContext.cpp: 14 (_WKContextSetAlwaysUsesComplexTextCodePath): Added. 15 * UIProcess/API/C/WKContextPrivate.h: 16 * UIProcess/WebContext.cpp: 17 (WebKit::WebContext::WebContext): Initialize m_alwaysUsesComplexTextCodePath. 18 (WebKit::WebContext::ensureWebProcess): Set shouldAlwaysUseComplexTextCodePath in the creation parameters. 19 (WebKit::WebContext::setAlwaysUsesComplexTextCodePath): Added. Sets m_alwaysUsesComplexTextCodePath and 20 sends a message to the WebProcess. 21 * UIProcess/WebContext.h: 22 * WebProcess/WebProcess.cpp: 23 (WebKit::WebProcess::initializeWebProcess): Call setAlwaysUsesComplexTextCodePath() based on the creation 24 parameters. 25 (WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): Added. 26 * WebProcess/WebProcess.h: 27 * WebProcess/WebProcess.messages.in: Added SetAlwaysUsesComplexTextCodePath. 28 1 29 2010-12-17 Sam Weinig <sam@webkit.org> 2 30 -
trunk/WebKit2/Shared/WebProcessCreationParameters.cpp
r74219 r74283 32 32 WebProcessCreationParameters::WebProcessCreationParameters() 33 33 : shouldTrackVisitedLinks(false) 34 , shouldAlwaysUseComplexTextCodePath(false) 34 35 #if PLATFORM(MAC) 35 36 , nsURLCacheMemoryCapacity(0) … … 52 53 encoder->encodeEnum(cacheModel); 53 54 encoder->encode(shouldTrackVisitedLinks); 55 encoder->encode(shouldAlwaysUseComplexTextCodePath); 54 56 encoder->encode(languageCode); 55 57 #if PLATFORM(MAC) … … 83 85 if (!decoder->decode(parameters.shouldTrackVisitedLinks)) 84 86 return false; 87 if (!decoder->decode(parameters.shouldAlwaysUseComplexTextCodePath)) 88 return false; 85 89 if (!decoder->decode(parameters.languageCode)) 86 90 return false; -
trunk/WebKit2/Shared/WebProcessCreationParameters.h
r74219 r74283 66 66 bool clearApplicationCache; 67 67 68 bool shouldAlwaysUseComplexTextCodePath; 69 68 70 String languageCode; 69 71 -
trunk/WebKit2/UIProcess/API/C/WKContext.cpp
r73816 r74283 117 117 } 118 118 119 void _WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef contextRef, bool alwaysUseComplexTextCodePath) 120 { 121 toImpl(contextRef)->setAlwaysUsesComplexTextCodePath(alwaysUseComplexTextCodePath); 122 } 123 119 124 void _WKContextSetAdditionalPluginsDirectory(WKContextRef contextRef, WKStringRef pluginsDirectory) 120 125 { -
trunk/WebKit2/UIProcess/API/C/WKContextPrivate.h
r73816 r74283 49 49 WK_EXPORT void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef context, WKStringRef urlScheme); 50 50 51 WK_EXPORT void _WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef context, bool alwaysUseComplexTextCodePath); 52 51 53 WK_EXPORT void WKContextRegisterURLSchemeAsSecure(WKContextRef context, WKStringRef urlScheme); 52 54 -
trunk/WebKit2/UIProcess/WebContext.cpp
r73986 r74283 82 82 , m_injectedBundlePath(injectedBundlePath) 83 83 , m_visitedLinkProvider(this) 84 , m_alwaysUsesComplexTextCodePath(false) 84 85 , m_cacheModel(CacheModelDocumentViewer) 85 86 , m_clearResourceCachesForNewWebProcess(false) … … 172 173 copyToVector(m_schemesToSetDomainRelaxationForbiddenFor, parameters.urlSchemesForWhichDomainRelaxationIsForbidden); 173 174 175 parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath; 176 174 177 // Add any platform specific parameters 175 178 platformInitializeWebProcess(parameters); … … 307 310 308 311 m_pluginInfoStore.setAdditionalPluginsDirectories(directories); 312 } 313 314 void WebContext::setAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText) 315 { 316 m_alwaysUsesComplexTextCodePath = alwaysUseComplexText; 317 318 if (!hasValidProcess()) 319 return; 320 321 m_process->send(Messages::WebProcess::SetAlwaysUsesComplexTextCodePath(alwaysUseComplexText), 0); 309 322 } 310 323 -
trunk/WebKit2/UIProcess/WebContext.h
r73986 r74283 92 92 PluginInfoStore* pluginInfoStore() { return &m_pluginInfoStore; } 93 93 String applicationCacheDirectory(); 94 95 void setAlwaysUsesComplexTextCodePath(bool); 94 96 95 97 void registerURLSchemeAsEmptyDocument(const String&); … … 174 176 HashSet<String> m_schemesToSetDomainRelaxationForbiddenFor; 175 177 178 bool m_alwaysUsesComplexTextCodePath; 179 176 180 Vector<pair<String, RefPtr<APIObject> > > m_pendingMessagesToPostToInjectedBundle; 177 181 -
trunk/WebKit2/WebProcess/WebProcess.cpp
r74219 r74283 45 45 #include <WebCore/ApplicationCacheStorage.h> 46 46 #include <WebCore/CrossOriginPreflightResultCache.h> 47 #include <WebCore/Font.h> 47 48 #include <WebCore/Language.h> 48 49 #include <WebCore/Page.h> … … 177 178 if (parameters.clearApplicationCache) 178 179 clearApplicationCache(); 180 181 if (parameters.shouldAlwaysUseComplexTextCodePath) 182 setAlwaysUsesComplexTextCodePath(true); 179 183 } 180 184 … … 197 201 { 198 202 SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(true, urlScheme); 203 } 204 205 void WebProcess::setAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText) 206 { 207 Font::setCodePath(alwaysUseComplexText ? Font::Complex : Font::Auto); 199 208 } 200 209 -
trunk/WebKit2/WebProcess/WebProcess.h
r73796 r74283 112 112 void registerURLSchemeAsSecure(const String&) const; 113 113 void setDomainRelaxationForbiddenForURLScheme(const String&) const; 114 void setAlwaysUsesComplexTextCodePath(bool); 114 115 void languageChanged(const String&) const; 115 116 #if PLATFORM(WIN) -
trunk/WebKit2/WebProcess/WebProcess.messages.in
r74224 r74283 39 39 RegisterURLSchemeAsSecure(WTF::String scheme) 40 40 SetDomainRelaxationForbiddenForURLScheme(WTF::String scheme) 41 SetAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText) 41 42 LanguageChanged(WTF::String language) 42 43 #if PLATFORM(WIN)
Note:
See TracChangeset
for help on using the changeset viewer.