Changeset 258518 in webkit
- Timestamp:
- Mar 16, 2020 2:11:00 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r258498 r258518 1 2020-03-16 Per Arne Vollan <pvollan@apple.com> 2 3 [macOS] Accessibility sandbox regressions 4 https://bugs.webkit.org/show_bug.cgi?id=209065 5 6 Reviewed by Brent Fulgham. 7 8 Add Accessibility notification name. 9 10 * pal/spi/cocoa/NSAccessibilitySPI.h: 11 1 12 2020-03-13 Sergio Villar Senin <svillar@igalia.com> 2 13 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h
r258359 r258518 55 55 WTF_EXTERN_C_BEGIN 56 56 57 extern NSString *const NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification; 58 57 59 void NSAccessibilityHandleFocusChanged(); 58 60 void NSAccessibilityUnregisterUniqueIdForUIElement(id element); -
trunk/Source/WebKit/ChangeLog
r258515 r258518 1 2020-03-16 Per Arne Vollan <pvollan@apple.com> 2 3 [macOS] Accessibility sandbox regressions 4 https://bugs.webkit.org/show_bug.cgi?id=209065 5 <rdar://problem/60202450> 6 7 Reviewed by Brent Fulgham. 8 9 When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility 10 is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent 11 sandbox needs to explicitly allow reading of the various plist files. 12 13 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 14 (WebKit::WebProcessPool::registerNotificationObservers): 15 * WebProcess/com.apple.WebProcess.sb.in: 16 1 17 2020-03-16 Per Arne Vollan <pvollan@apple.com> 2 18 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r258359 r258518 614 614 // Listen for enhanced accessibility changes and propagate them to the WebProcess. 615 615 m_enhancedAccessibilityObserver = [[NSNotificationCenter defaultCenter] addObserverForName:WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *note) { 616 #if ENABLE(CFPREFS_DIRECT_MODE) 617 for (auto& process : m_processes) 618 process->unblockPreferenceServiceIfNeeded(); 619 #endif 616 620 setEnhancedAccessibility([[[note userInfo] objectForKey:@"AXEnhancedUserInterface"] boolValue]); 617 621 }]; … … 664 668 m_accessibilityEnabledObserver = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge id)kAXSApplicationAccessibilityEnabledNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *) { 665 669 for (size_t i = 0; i < m_processes.size(); ++i) { 670 #if ENABLE(CFPREFS_DIRECT_MODE) 666 671 m_processes[i]->unblockPreferenceServiceIfNeeded(); 672 #endif 667 673 m_processes[i]->unblockAccessibilityServerIfNeeded(); 668 674 } -
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
r258456 r258518 522 522 )) 523 523 524 #if ENABLE(CFPREFS_DIRECT_MODE) 525 (allow file-read* 526 (home-subpath "/Library/Preferences/.GlobalPreferences.plist") 527 (home-subpath "/Library/Preferences/com.apple.security.plist") 528 (home-subpath "/Library/Preferences/com.apple.Accessibility.plist") 529 (home-subpath "/Library/Preferences/com.apple.ATS.plist") 530 (home-subpath "/Library/Preferences/com.apple.CoreGraphics.plist") 531 (home-subpath "/Library/Preferences/com.apple.DownloadAssessment.plist") 532 (home-subpath "/Library/Preferences/com.apple.HIToolbox.plist") 533 (home-subpath "/Library/Preferences/com.apple.LaunchServices.plist") 534 (home-subpath "/Library/Preferences/com.apple.MultitouchSupport.plist") 535 (home-subpath "/Library/Preferences/com.apple.ServicesMenu.Services.plist") 536 (home-subpath "/Library/Preferences/com.apple.ViewBridge.plist") 537 (home-subpath "/Library/Preferences/com.apple.WebKit.plist") 538 (home-subpath "/Library/Preferences/com.apple.WebFoundation.plist") 539 (home-subpath "/Library/Preferences/com.apple.avfoundation.plist") 540 (home-subpath "/Library/Preferences/com.apple.avfoundation.frecents.plist") 541 (home-subpath "/Library/Preferences/com.apple.avfoundation.videoperformancehud.plist") 542 (home-subpath "/Library/Preferences/com.apple.coremedia.plist") 543 (home-subpath "/Library/Preferences/com.apple.crypto.plist") 544 (home-subpath "/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.mouse.plist") 545 (home-subpath "/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist") 546 (home-subpath "/Library/Preferences/com.apple.driver.AppleHIDMouse.plist") 547 (home-subpath "/Library/Preferences/com.apple.lookup.shared.plist") 548 (home-subpath "/Library/Preferences/com.apple.mediaaccessibility.plist") 549 (home-subpath "/Library/Preferences/com.apple.networkConnect.plist") 550 (home-subpath "/Library/Preferences/com.apple.speech.voice.prefs.plist") 551 (home-subpath "/Library/Preferences/com.apple.systemsound.plist") 552 (home-subpath "/Library/Preferences/com.apple.universalaccess.plist") 553 (home-subpath "/Library/Preferences/edu.mit.Kerberos.plist") 554 (home-subpath "/Library/Preferences/pbs.plist") 555 ) 556 #endif 557 524 558 ; (Temporary) backward compatibility with non-CFPreferences readers. 525 559 (allow file-read* -
trunk/Tools/ChangeLog
r258505 r258518 1 2020-03-16 Per Arne Vollan <pvollan@apple.com> 2 3 [macOS] Accessibility sandbox regressions 4 https://bugs.webkit.org/show_bug.cgi?id=209065 5 6 Reviewed by Brent Fulgham. 7 8 * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm: 9 (TEST): 10 * TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm: 11 (TEST): 12 1 13 2020-03-16 Ryan Haddad <ryanhaddad@apple.com> 2 14 -
trunk/Tools/TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm
r258174 r258518 31 31 #import <WebKit/_WKProcessPoolConfiguration.h> 32 32 33 #import <pal/spi/cocoa/NSAccessibilitySPI.h> 33 34 #import <wtf/SoftLinking.h> 34 35 … … 47 48 CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), getkAXSApplicationAccessibilityEnabledNotification(), NULL, NULL, false); 48 49 } 50 51 #if WK_HAVE_C_SPI 52 53 TEST(WebKit, AccessibilityHasPreferencesServiceAccess) 54 { 55 auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); 56 WKRetainPtr<WKContextRef> context = adoptWK(TestWebKitAPI::Util::createContextForInjectedBundleTest("InternalsInjectedBundleTest")); 57 configuration.get().processPool = (WKProcessPool *)context.get(); 58 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 300, 300) configuration:configuration.get() addToWindow:YES]); 59 60 [webView synchronouslyLoadTestPageNamed:@"simple"]; 61 62 [[NSNotificationCenter defaultCenter] postNotificationName:NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil userInfo:nil]; 63 64 auto sandboxAccess = [&] { 65 return [webView stringByEvaluatingJavaScript:@"window.internals.hasSandboxMachLookupAccessToGlobalName('com.apple.WebKit.WebContent', 'com.apple.cfprefsd.daemon')"].boolValue; 66 }; 67 68 ASSERT_TRUE(sandboxAccess()); 69 } 70 71 #endif -
trunk/Tools/TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm
r258064 r258518 39 39 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 300, 300) configuration:configuration.get() addToWindow:YES]); 40 40 41 [webView synchronouslyLoadTestPageNamed:@"simple"]; 42 41 43 [webView _grantAccessToPreferenceService]; 42 44 … … 45 47 }; 46 48 47 ASSERT_TRUE(sandboxAccess );49 ASSERT_TRUE(sandboxAccess()); 48 50 } 49 51
Note: See TracChangeset
for help on using the changeset viewer.