|
Lines 185-195
void WebProcess::platformInitializeWebPr
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm_sec1
|
| 185 |
ASSERT(String(uti.get()) == String(adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, CFSTR("text/html"), 0)).get())); |
185 |
ASSERT(String(uti.get()) == String(adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, CFSTR("text/html"), 0)).get())); |
| 186 |
} |
186 |
} |
| 187 |
|
187 |
|
| 188 |
#if !LOG_DISABLED || !RELEASE_LOG_DISABLED |
|
|
| 189 |
WebCore::initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels); |
| 190 |
WebKit::initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels); |
| 191 |
#endif |
| 192 |
|
| 193 |
WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); |
188 |
WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); |
| 194 |
setApplicationSDKVersion(parameters.uiProcessSDKVersion); |
189 |
setApplicationSDKVersion(parameters.uiProcessSDKVersion); |
| 195 |
|
190 |
|
|
Lines 231-236
void WebProcess::platformInitializeWebPr
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm_sec2
|
| 231 |
#endif |
226 |
#endif |
| 232 |
|
227 |
|
| 233 |
#if USE(APPKIT) |
228 |
#if USE(APPKIT) |
|
|
229 |
// We don't need to talk to the Dock. |
| 230 |
if (Class nsApplicationClass = NSClassFromString(@"NSApplication")) { |
| 231 |
if ([nsApplicationClass respondsToSelector:@selector(_preventDockConnections)]) |
| 232 |
[nsApplicationClass _preventDockConnections]; |
| 233 |
} |
| 234 |
|
| 234 |
[[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions" : @YES }]; |
235 |
[[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions" : @YES }]; |
| 235 |
|
236 |
|
| 236 |
// rdar://9118639 accessibilityFocusedUIElement in NSApplication defaults to use the keyWindow. Since there's |
237 |
// rdar://9118639 accessibilityFocusedUIElement in NSApplication defaults to use the keyWindow. Since there's |
|
Lines 238-244
void WebProcess::platformInitializeWebPr
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm_sec3
|
| 238 |
Method methodToPatch = class_getInstanceMethod([NSApplication class], @selector(accessibilityFocusedUIElement)); |
239 |
Method methodToPatch = class_getInstanceMethod([NSApplication class], @selector(accessibilityFocusedUIElement)); |
| 239 |
method_setImplementation(methodToPatch, (IMP)NSApplicationAccessibilityFocusedUIElement); |
240 |
method_setImplementation(methodToPatch, (IMP)NSApplicationAccessibilityFocusedUIElement); |
| 240 |
#endif |
241 |
#endif |
| 241 |
|
242 |
|
| 242 |
#if PLATFORM(MAC) && ENABLE(WEBPROCESS_NSRUNLOOP) |
243 |
#if PLATFORM(MAC) && ENABLE(WEBPROCESS_NSRUNLOOP) |
| 243 |
// Need to initialize accessibility for VoiceOver to work when the WebContent process is using NSRunLoop. |
244 |
// Need to initialize accessibility for VoiceOver to work when the WebContent process is using NSRunLoop. |
| 244 |
// Currently, it is also needed to allocate and initialize an NSApplication object. |
245 |
// Currently, it is also needed to allocate and initialize an NSApplication object. |
|
Lines 579-587
void WebProcess::initializeSandbox(const
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm_sec4
|
| 579 |
{ |
580 |
{ |
| 580 |
#if PLATFORM(MAC) || PLATFORM(MACCATALYST) |
581 |
#if PLATFORM(MAC) || PLATFORM(MACCATALYST) |
| 581 |
// Need to override the default, because service has a different bundle ID. |
582 |
// Need to override the default, because service has a different bundle ID. |
| 582 |
NSBundle *webKit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; |
583 |
auto webKitBundle = [NSBundle bundleWithIdentifier:@"com.apple.WebKit"]; |
| 583 |
|
584 |
|
| 584 |
sandboxParameters.setOverrideSandboxProfilePath([webKit2Bundle pathForResource:@"com.apple.WebProcess" ofType:@"sb"]); |
585 |
sandboxParameters.setOverrideSandboxProfilePath(makeString(String([webKitBundle resourcePath]), "/com.apple.WebProcess.sb")); |
| 585 |
|
586 |
|
| 586 |
AuxiliaryProcess::initializeSandbox(parameters, sandboxParameters); |
587 |
AuxiliaryProcess::initializeSandbox(parameters, sandboxParameters); |
| 587 |
#endif |
588 |
#endif |