Changeset 269906 in webkit
- Timestamp:
- Nov 17, 2020 9:21:49 AM (3 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r269900 r269906 1 2020-11-17 Per Arne Vollan <pvollan@apple.com> 2 3 [macOS] Perform AX TCC check in the UI process 4 https://bugs.webkit.org/show_bug.cgi?id=218870 5 <rdar://problem/71339830> 6 7 Reviewed by Brent Fulgham. 8 9 Add typedef for TCC authentication callback. 10 11 * pal/spi/mac/HIServicesSPI.h: 12 1 13 2020-11-17 Kimmo Kinnunen <kkinnunen@apple.com> 2 14 -
trunk/Source/WebCore/PAL/pal/spi/mac/HIServicesSPI.h
r265996 r269906 157 157 #endif // USE(APPLE_INTERNAL_SDK) 158 158 159 WTF_EXTERN_C_BEGIN 160 161 typedef Boolean (*AXAuditTokenIsAuthenticatedCallback)(audit_token_t); 162 163 WTF_EXTERN_C_END 164 159 165 #define kAXClientTypeWebKitTesting 999999 -
trunk/Source/WebKit/ChangeLog
r269905 r269906 1 2020-11-17 Per Arne Vollan <pvollan@apple.com> 2 3 [macOS] Perform AX TCC check in the UI process 4 https://bugs.webkit.org/show_bug.cgi?id=218870 5 <rdar://problem/71339830> 6 7 Reviewed by Brent Fulgham. 8 9 On behalf of the WebContent process, perform AX TCC check in the UI process on macOS. 10 This is in preparation of blocking tccd in the WebContent process. 11 12 No new tests. It has been manually tested that the WebContent process is allowing VoiceOver 13 to perform AX requests with this patch. 14 15 * UIProcess/Cocoa/WebProcessProxyCocoa.mm: 16 (WebKit::WebProcessProxy::isAXAuthenticated): 17 * UIProcess/WebProcessProxy.h: 18 * UIProcess/WebProcessProxy.messages.in: 19 * WebProcess/cocoa/WebProcessCocoa.mm: 20 (WebKit::isAXAuthenticatedCallback): 21 (WebKit::WebProcess::platformInitializeWebProcess): 22 1 23 2020-11-17 Brian Burg <bburg@apple.com> 2 24 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm
r269810 r269906 50 50 #endif 51 51 52 #if PLATFORM(MAC) 53 #import <wtf/SoftLinking.h> 54 55 SOFT_LINK_PRIVATE_FRAMEWORK(TCC) 56 SOFT_LINK(TCC, TCCAccessCheckAuditToken, Boolean, (CFStringRef service, audit_token_t auditToken, CFDictionaryRef options), (service, auditToken, options)) 57 SOFT_LINK_CONSTANT(TCC, kTCCServiceAccessibility, CFStringRef) 58 #endif 59 52 60 namespace WebKit { 53 61 … … 259 267 } 260 268 261 } 269 #if PLATFORM(MAC) 270 void WebProcessProxy::isAXAuthenticated(audit_token_t auditToken, CompletionHandler<void(bool)>&& completionHandler) 271 { 272 auto authenticated = TCCAccessCheckAuditToken(getkTCCServiceAccessibility(), auditToken, nullptr); 273 completionHandler(authenticated); 274 } 275 #endif 276 277 } -
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
r269785 r269906 509 509 void systemBeep(); 510 510 511 #if PLATFORM(MAC) 512 void isAXAuthenticated(audit_token_t, CompletionHandler<void(bool)>&&); 513 #endif 514 511 515 enum class IsWeak { No, Yes }; 512 516 template<typename T> class WeakOrStrongPtr { -
trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in
r269785 r269906 89 89 90 90 SystemBeep() 91 92 #if PLATFORM(MAC) 93 IsAXAuthenticated(audit_token_t auditToken) -> (bool authenticated) Synchronous 94 #endif 91 95 } -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r269647 r269906 152 152 #define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [sessionID=%" PRIu64 "] WebProcess::" fmt, this, RELEASE_LOG_SESSION_ID, ##__VA_ARGS__) 153 153 154 #if PLATFORM(MAC) 155 SOFT_LINK_FRAMEWORK_IN_UMBRELLA(ApplicationServices, HIServices) 156 SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE(WebKit, HIServices, _AXSetAuditTokenIsAuthenticatedCallback, void, (AXAuditTokenIsAuthenticatedCallback callback), (callback)) 157 #endif 158 154 159 namespace WebKit { 155 160 using namespace WebCore; … … 172 177 173 178 return [page->accessibilityRemoteObject() accessibilityFocusedUIElement]; 179 } 180 #endif 181 182 183 #if PLATFORM(MAC) 184 static Boolean isAXAuthenticatedCallback(audit_token_t auditToken) 185 { 186 bool authenticated = false; 187 WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::IsAXAuthenticated(auditToken), Messages::WebProcessProxy::IsAXAuthenticated::Reply(authenticated), 0); 188 return authenticated; 174 189 } 175 190 #endif … … 362 377 363 378 SystemSoundManager::singleton().setSystemSoundDelegate(makeUnique<WebSystemSoundDelegate>()); 379 380 #if PLATFORM(MAC) 381 if (canLoad_HIServices__AXSetAuditTokenIsAuthenticatedCallback()) 382 softLink_HIServices__AXSetAuditTokenIsAuthenticatedCallback(isAXAuthenticatedCallback); 383 #endif 364 384 } 365 385
Note: See TracChangeset
for help on using the changeset viewer.