Changeset 242775 in webkit


Ignore:
Timestamp:
Mar 11, 2019 10:23:43 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

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

Location:
trunk/Source/WebKit
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r242771 r242775  
     12019-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
    1172019-03-11  Fujii Hironori  <Hironori.Fujii@sony.com>
    218
  • trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h

    r242745 r242775  
    11251125#endif
    11261126
    1127 @interface UIDevice ()
    1128 @property (nonatomic, setter=_setBacklightLevel:) float _backlightLevel;
    1129 @end
    1130 
    11311127static inline bool currentUserInterfaceIdiomIsPad()
    11321128{
     
    11921188UIEdgeInsets UIEdgeInsetsAdd(UIEdgeInsets lhs, UIEdgeInsets rhs, UIRectEdge);
    11931189
    1194 extern NSString *const UIBacklightLevelChangedNotification;
    1195 
    11961190WTF_EXTERN_C_END
  • trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb

    r242745 r242775  
    450450    (global-name "com.apple.coremedia.decompressionsession")
    451451    (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"))
    457452
    458453;; These services have been identified as unused during living-on.
  • trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm

    r242756 r242775  
    7878#endif
    7979
    80 #if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
    81 SOFT_LINK_PRIVATE_FRAMEWORK(BackBoardServices)
    82 SOFT_LINK(BackBoardServices, BKSDisplayBrightnessGetCurrent, float, (), ());
    83 #endif
    84 
    8580namespace WebKit {
    8681using namespace WebCore;
     
    387382}
    388383
    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 #endif
    401 
    402384void WebProcessPool::registerNotificationObservers()
    403385{
    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)
    407387    // Listen for enhanced accessibility changes and propagate them to the WebProcess.
    408388    m_enhancedAccessibilityObserver = [[NSNotificationCenter defaultCenter] addObserverForName:WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *note) {
     
    454434void WebProcessPool::unregisterNotificationObservers()
    455435{
    456 #if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
    457     CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, (CFStringRef)UIBacklightLevelChangedNotification, nullptr);
    458 #else
     436#if !PLATFORM(IOS_FAMILY)
    459437    [[NSNotificationCenter defaultCenter] removeObserver:m_enhancedAccessibilityObserver.get()];   
    460438    [[NSNotificationCenter defaultCenter] removeObserver:m_automaticTextReplacementNotificationObserver.get()];
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r242764 r242775  
    998998    }
    999999
    1000 #if PLATFORM(IOS_FAMILY)
    1001     process.send(Messages::WebProcess::BacklightLevelDidChange(displayBrightness()), 0);
    1002 #endif
    1003 
    10041000#if ENABLE(REMOTE_INSPECTOR)
    10051001    // 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  
    573573    void updateMaxSuspendedPageCount();
    574574
    575 #if PLATFORM(IOS_FAMILY)
    576     static float displayBrightness();
    577     static void backlightLevelDidChangeCallback(CFNotificationCenterRef, void *observer, CFStringRef name, const void *, CFDictionaryRef userInfo);   
    578 #endif
    579 
    580575    Ref<API::ProcessPoolConfiguration> m_configuration;
    581576
  • trunk/Source/WebKit/WebProcess/WebProcess.h

    r242745 r242775  
    245245#if PLATFORM(IOS_FAMILY)
    246246    void accessibilityProcessSuspendedNotification(bool);
    247     float backlightLevel() const { return m_backlightLevel; }
    248247#endif
    249248
     
    411410#endif
    412411
    413 #if PLATFORM(IOS_FAMILY)
    414     void backlightLevelDidChange(float backlightLevel);
    415 #endif
    416 
    417412#if ENABLE(VIDEO)
    418413    void suspendAllMediaBuffering();
     
    512507    HashMap<String, RefPtr<SandboxExtension>> m_mediaCaptureSandboxExtensions;
    513508#endif
    514 
    515 #if PLATFORM(IOS_FAMILY)
    516     float m_backlightLevel { 0 };
    517 #endif
    518509};
    519510
  • trunk/Source/WebKit/WebProcess/WebProcess.messages.in

    r242745 r242775  
    135135#endif
    136136
    137 #if PLATFORM(IOS_FAMILY)
    138     BacklightLevelDidChange(float backlightLevel)
    139 #endif
    140 
    141137    IsJITEnabled() -> (bool enabled) Async
    142138
  • trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

    r242745 r242775  
    7676
    7777#if PLATFORM(IOS_FAMILY)
    78 #import "UIKitSPI.h"
    7978#import "WKAccessibilityWebPageObjectIOS.h"
    8079#import <UIKit/UIAccessibility.h>
     
    700699#endif
    701700
    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 #endif
    723 
    724701void WebProcess::setMediaMIMETypes(const Vector<String> types)
    725702{
Note: See TracChangeset for help on using the changeset viewer.