Unreviewed, rolling out r242745 and r242756.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 05:23:43 +0000 (05:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 05:23:43 +0000 (05:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195606

Breaks internal builds (Requested by ryanhaddad on #webkit).

Reverted changesets:

"[iOS] Block access to backboardd service"
https://bugs.webkit.org/show_bug.cgi?id=195484
https://trac.webkit.org/changeset/242745

"Unreviewed build fix after r242745."
https://trac.webkit.org/changeset/242756

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242775 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/WebProcess/WebProcess.h
Source/WebKit/WebProcess/WebProcess.messages.in
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

index 935443e..c1b488a 100644 (file)
@@ -1,3 +1,19 @@
+2019-03-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r242745 and r242756.
+        https://bugs.webkit.org/show_bug.cgi?id=195606
+
+        Breaks internal builds (Requested by ryanhaddad on #webkit).
+
+        Reverted changesets:
+
+        "[iOS] Block access to backboardd service"
+        https://bugs.webkit.org/show_bug.cgi?id=195484
+        https://trac.webkit.org/changeset/242745
+
+        "Unreviewed build fix after r242745."
+        https://trac.webkit.org/changeset/242756
+
 2019-03-11  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [CoordinatedGraphics] ASSERTION FAILED: !m_state.isSuspended
index 4a7baa3..6d87410 100644 (file)
@@ -1124,10 +1124,6 @@ typedef NSInteger UICompositingMode;
 @end
 #endif
 
-@interface UIDevice ()
-@property (nonatomic, setter=_setBacklightLevel:) float _backlightLevel;
-@end
-
 static inline bool currentUserInterfaceIdiomIsPad()
 {
     // This inline function exists to thwart unreachable code
@@ -1191,6 +1187,4 @@ extern NSString * const UIPreviewDataAttachmentListIsContentManaged;
 
 UIEdgeInsets UIEdgeInsetsAdd(UIEdgeInsets lhs, UIEdgeInsets rhs, UIRectEdge);
 
-extern NSString *const UIBacklightLevelChangedNotification;
-
 WTF_EXTERN_C_END
index a87b630..30f4067 100644 (file)
     (global-name "com.apple.coremedia.decompressionsession")
     (global-name "com.apple.coremedia.videoqueue"))
 
-
-;; FIXME: remove the send-signal when this rule is no longer generating crashes.
-(deny mach-lookup (with send-signal SIGKILL)
-    (global-name "com.apple.backboard.hid.services"))
-
 ;; These services have been identified as unused during living-on.
 ;; This list overrides some definitions above and in common.sb.
 ;; FIXME: remove overridden rules once the final list has been
index 2fb232f..b207cd4 100644 (file)
@@ -77,11 +77,6 @@ static NSString * const WebKitSuppressMemoryPressureHandlerDefaultsKey = @"WebKi
 static NSString * const WebKitLogCookieInformationDefaultsKey = @"WebKitLogCookieInformation";
 #endif
 
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
-SOFT_LINK_PRIVATE_FRAMEWORK(BackBoardServices)
-SOFT_LINK(BackBoardServices, BKSDisplayBrightnessGetCurrent, float, (), ());
-#endif
-
 namespace WebKit {
 using namespace WebCore;
 
@@ -386,24 +381,9 @@ bool WebProcessPool::networkProcessHasEntitlementForTesting(const String& entitl
     return WTF::hasEntitlement(ensureNetworkProcess().connection()->xpcConnection(), entitlement.utf8().data());
 }
 
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
-float WebProcessPool::displayBrightness()
-{
-    return BKSDisplayBrightnessGetCurrent();
-}
-    
-void WebProcessPool::backlightLevelDidChangeCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo)
-{
-    WebProcessPool* pool = reinterpret_cast<WebProcessPool*>(observer);
-    pool->sendToAllProcesses(Messages::WebProcess::BacklightLevelDidChange(BKSDisplayBrightnessGetCurrent()));
-}
-#endif
-
 void WebProcessPool::registerNotificationObservers()
 {
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
-    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, (CFStringRef)UIBacklightLevelChangedNotification, nullptr, CFNotificationSuspensionBehaviorCoalesce);
-#else
+#if !PLATFORM(IOS_FAMILY)
     // Listen for enhanced accessibility changes and propagate them to the WebProcess.
     m_enhancedAccessibilityObserver = [[NSNotificationCenter defaultCenter] addObserverForName:WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *note) {
         setEnhancedAccessibility([[[note userInfo] objectForKey:@"AXEnhancedUserInterface"] boolValue]);
@@ -453,9 +433,7 @@ void WebProcessPool::registerNotificationObservers()
 
 void WebProcessPool::unregisterNotificationObservers()
 {
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
-    CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, (CFStringRef)UIBacklightLevelChangedNotification, nullptr);
-#else
+#if !PLATFORM(IOS_FAMILY)
     [[NSNotificationCenter defaultCenter] removeObserver:m_enhancedAccessibilityObserver.get()];    
     [[NSNotificationCenter defaultCenter] removeObserver:m_automaticTextReplacementNotificationObserver.get()];
     [[NSNotificationCenter defaultCenter] removeObserver:m_automaticSpellingCorrectionNotificationObserver.get()];
index 5f3df02..152b360 100644 (file)
@@ -997,10 +997,6 @@ void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDa
         process.send(Messages::WebProcess::PrewarmGlobally(), 0);
     }
 
-#if PLATFORM(IOS_FAMILY)
-    process.send(Messages::WebProcess::BacklightLevelDidChange(displayBrightness()), 0);
-#endif
-
 #if ENABLE(REMOTE_INSPECTOR)
     // Initialize remote inspector connection now that we have a sub-process that is hosting one of our web views.
     Inspector::RemoteInspector::singleton(); 
index 2988581..d96d6e0 100644 (file)
@@ -572,11 +572,6 @@ private:
 
     void updateMaxSuspendedPageCount();
 
-#if PLATFORM(IOS_FAMILY)
-    static float displayBrightness();
-    static void backlightLevelDidChangeCallback(CFNotificationCenterRef, void *observer, CFStringRef name, const void *, CFDictionaryRef userInfo);    
-#endif
-
     Ref<API::ProcessPoolConfiguration> m_configuration;
 
     IPC::MessageReceiverMap m_messageReceiverMap;
index 8bf4545..7372064 100644 (file)
@@ -244,7 +244,6 @@ public:
 
 #if PLATFORM(IOS_FAMILY)
     void accessibilityProcessSuspendedNotification(bool);
-    float backlightLevel() const { return m_backlightLevel; }
 #endif
 
 #if PLATFORM(COCOA)
@@ -410,10 +409,6 @@ private:
 #endif
 #endif
 
-#if PLATFORM(IOS_FAMILY)
-    void backlightLevelDidChange(float backlightLevel);
-#endif
-
 #if ENABLE(VIDEO)
     void suspendAllMediaBuffering();
     void resumeAllMediaBuffering();
@@ -511,10 +506,6 @@ private:
 #if ENABLE(MEDIA_STREAM) && ENABLE(SANDBOX_EXTENSIONS)
     HashMap<String, RefPtr<SandboxExtension>> m_mediaCaptureSandboxExtensions;
 #endif
-
-#if PLATFORM(IOS_FAMILY)
-    float m_backlightLevel { 0 };
-#endif
 };
 
 } // namespace WebKit
index 9820d70..44fdb9d 100644 (file)
@@ -134,10 +134,6 @@ messages -> WebProcess LegacyReceiver {
 #endif
 #endif
 
-#if PLATFORM(IOS_FAMILY)
-    BacklightLevelDidChange(float backlightLevel)
-#endif
-
     IsJITEnabled() -> (bool enabled) Async
 
 #if PLATFORM(COCOA)
index 9055c69..73d51ce 100644 (file)
@@ -75,7 +75,6 @@
 #import <wtf/cocoa/NSURLExtras.h>
 
 #if PLATFORM(IOS_FAMILY)
-#import "UIKitSPI.h"
 #import "WKAccessibilityWebPageObjectIOS.h"
 #import <UIKit/UIAccessibility.h>
 #import <pal/spi/ios/GraphicsServicesSPI.h>
@@ -699,28 +698,6 @@ void WebProcess::displayWasRefreshed(CGDirectDisplayID displayID)
 }
 #endif
 
-#if PLATFORM(IOS_FAMILY)
-static float currentBacklightLevel()
-{
-    return WebProcess::singleton().backlightLevel();
-}
-
-void WebProcess::backlightLevelDidChange(float backlightLevel)
-{
-    m_backlightLevel = backlightLevel;
-
-    // Swizzle -[UIDevice _backlightLevel]
-    // FIXME: remove the swizzling and related code once <rdar://problem/47603552> is fixed.
-    static std::once_flag onceFlag;
-    std::call_once(
-        onceFlag,
-        [] {
-            Method methodToPatch = class_getInstanceMethod([UIDevice class], @selector(_backlightLevel));
-            method_setImplementation(methodToPatch, reinterpret_cast<IMP>(currentBacklightLevel));
-        });
-}
-#endif
-
 void WebProcess::setMediaMIMETypes(const Vector<String> types)
 {
     AVFoundationMIMETypeCache::singleton().setSupportedTypes(types);