Changeset 242775 in webkit
- Timestamp:
- Mar 11, 2019 10:23:43 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r242771 r242775 1 2019-03-11 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r242745 and r242756. 4 https://bugs.webkit.org/show_bug.cgi?id=195606 5 6 Breaks internal builds (Requested by ryanhaddad on #webkit). 7 8 Reverted changesets: 9 10 "[iOS] Block access to backboardd service" 11 https://bugs.webkit.org/show_bug.cgi?id=195484 12 https://trac.webkit.org/changeset/242745 13 14 "Unreviewed build fix after r242745." 15 https://trac.webkit.org/changeset/242756 16 1 17 2019-03-11 Fujii Hironori <Hironori.Fujii@sony.com> 2 18 -
trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h
r242745 r242775 1125 1125 #endif 1126 1126 1127 @interface UIDevice ()1128 @property (nonatomic, setter=_setBacklightLevel:) float _backlightLevel;1129 @end1130 1131 1127 static inline bool currentUserInterfaceIdiomIsPad() 1132 1128 { … … 1192 1188 UIEdgeInsets UIEdgeInsetsAdd(UIEdgeInsets lhs, UIEdgeInsets rhs, UIRectEdge); 1193 1189 1194 extern NSString *const UIBacklightLevelChangedNotification;1195 1196 1190 WTF_EXTERN_C_END -
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
r242745 r242775 450 450 (global-name "com.apple.coremedia.decompressionsession") 451 451 (global-name "com.apple.coremedia.videoqueue")) 452 453 454 ;; FIXME: remove the send-signal when this rule is no longer generating crashes.455 (deny mach-lookup (with send-signal SIGKILL)456 (global-name "com.apple.backboard.hid.services"))457 452 458 453 ;; These services have been identified as unused during living-on. -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r242756 r242775 78 78 #endif 79 79 80 #if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)81 SOFT_LINK_PRIVATE_FRAMEWORK(BackBoardServices)82 SOFT_LINK(BackBoardServices, BKSDisplayBrightnessGetCurrent, float, (), ());83 #endif84 85 80 namespace WebKit { 86 81 using namespace WebCore; … … 387 382 } 388 383 389 #if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)390 float WebProcessPool::displayBrightness()391 {392 return BKSDisplayBrightnessGetCurrent();393 }394 395 void WebProcessPool::backlightLevelDidChangeCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo)396 {397 WebProcessPool* pool = reinterpret_cast<WebProcessPool*>(observer);398 pool->sendToAllProcesses(Messages::WebProcess::BacklightLevelDidChange(BKSDisplayBrightnessGetCurrent()));399 }400 #endif401 402 384 void WebProcessPool::registerNotificationObservers() 403 385 { 404 #if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) 405 CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, (CFStringRef)UIBacklightLevelChangedNotification, nullptr, CFNotificationSuspensionBehaviorCoalesce); 406 #else 386 #if !PLATFORM(IOS_FAMILY) 407 387 // Listen for enhanced accessibility changes and propagate them to the WebProcess. 408 388 m_enhancedAccessibilityObserver = [[NSNotificationCenter defaultCenter] addObserverForName:WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *note) { … … 454 434 void WebProcessPool::unregisterNotificationObservers() 455 435 { 456 #if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) 457 CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, (CFStringRef)UIBacklightLevelChangedNotification, nullptr); 458 #else 436 #if !PLATFORM(IOS_FAMILY) 459 437 [[NSNotificationCenter defaultCenter] removeObserver:m_enhancedAccessibilityObserver.get()]; 460 438 [[NSNotificationCenter defaultCenter] removeObserver:m_automaticTextReplacementNotificationObserver.get()]; -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r242764 r242775 998 998 } 999 999 1000 #if PLATFORM(IOS_FAMILY)1001 process.send(Messages::WebProcess::BacklightLevelDidChange(displayBrightness()), 0);1002 #endif1003 1004 1000 #if ENABLE(REMOTE_INSPECTOR) 1005 1001 // Initialize remote inspector connection now that we have a sub-process that is hosting one of our web views. -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r242745 r242775 573 573 void updateMaxSuspendedPageCount(); 574 574 575 #if PLATFORM(IOS_FAMILY)576 static float displayBrightness();577 static void backlightLevelDidChangeCallback(CFNotificationCenterRef, void *observer, CFStringRef name, const void *, CFDictionaryRef userInfo);578 #endif579 580 575 Ref<API::ProcessPoolConfiguration> m_configuration; 581 576 -
trunk/Source/WebKit/WebProcess/WebProcess.h
r242745 r242775 245 245 #if PLATFORM(IOS_FAMILY) 246 246 void accessibilityProcessSuspendedNotification(bool); 247 float backlightLevel() const { return m_backlightLevel; }248 247 #endif 249 248 … … 411 410 #endif 412 411 413 #if PLATFORM(IOS_FAMILY)414 void backlightLevelDidChange(float backlightLevel);415 #endif416 417 412 #if ENABLE(VIDEO) 418 413 void suspendAllMediaBuffering(); … … 512 507 HashMap<String, RefPtr<SandboxExtension>> m_mediaCaptureSandboxExtensions; 513 508 #endif 514 515 #if PLATFORM(IOS_FAMILY)516 float m_backlightLevel { 0 };517 #endif518 509 }; 519 510 -
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
r242745 r242775 135 135 #endif 136 136 137 #if PLATFORM(IOS_FAMILY)138 BacklightLevelDidChange(float backlightLevel)139 #endif140 141 137 IsJITEnabled() -> (bool enabled) Async 142 138 -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r242745 r242775 76 76 77 77 #if PLATFORM(IOS_FAMILY) 78 #import "UIKitSPI.h"79 78 #import "WKAccessibilityWebPageObjectIOS.h" 80 79 #import <UIKit/UIAccessibility.h> … … 700 699 #endif 701 700 702 #if PLATFORM(IOS_FAMILY)703 static float currentBacklightLevel()704 {705 return WebProcess::singleton().backlightLevel();706 }707 708 void WebProcess::backlightLevelDidChange(float backlightLevel)709 {710 m_backlightLevel = backlightLevel;711 712 // Swizzle -[UIDevice _backlightLevel]713 // FIXME: remove the swizzling and related code once <rdar://problem/47603552> is fixed.714 static std::once_flag onceFlag;715 std::call_once(716 onceFlag,717 [] {718 Method methodToPatch = class_getInstanceMethod([UIDevice class], @selector(_backlightLevel));719 method_setImplementation(methodToPatch, reinterpret_cast<IMP>(currentBacklightLevel));720 });721 }722 #endif723 724 701 void WebProcess::setMediaMIMETypes(const Vector<String> types) 725 702 {
Note: See TracChangeset
for help on using the changeset viewer.