Title: [273657] trunk/Source
Revision
273657
Author
[email protected]
Date
2021-03-01 11:15:01 -0800 (Mon, 01 Mar 2021)

Log Message

Remove ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING which is always true for macOS
https://bugs.webkit.org/show_bug.cgi?id=222459

Reviewed by Sam Weinig.

ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING is always defined for PLATFORM(MAC), so remove it,
replacing with PLATFORM(MAC) in a few places. In order to reduce the number PLATFORM(MAC), define
HAVE(CVDISPLAYLINK) and use it in WK2 code that relates to DisplayLinks.

Source/WebCore:

* platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::ensurePlatformContext):
* platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp:
(WebCore::GraphicsContextGLOpenGLManager::addContext):
(WebCore::GraphicsContextGLOpenGLManager::removeContext):
* platform/mac/KeyEventMac.mm:
(WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys):
* platform/mac/PlatformScreenMac.mm:
(WebCore::gpuIDForDisplay):
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
(-[WebScrollbarPartAnimation startAnimation]):
(-[WebScrollbarPartAnimation setCurrentProgress:]):
(-[WebScrollbarPartAnimation stopAnimation]):
(-[WebScrollbarPartAnimation setCurrentProgress:setCurrentProgress:]): Deleted.

Source/WebKit:

* Platform/cocoa/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForExternalHostingProcess):
* Shared/mac/HangDetectionDisablerMac.mm:
(WebKit::setClientsMayIgnoreEvents):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
* UIProcess/WebPageProxy.cpp:
(WebKit::ScrollingObserver::singleton):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::updateCurrentModifierState):
* UIProcess/WebProcessPool.cpp:
(WebKit::displayReconfigurationCallBack):
(WebKit::WebProcessPool::sendDisplayConfigurationChangedMessageForTesting):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::processWillShutDown):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/mac/DisplayLink.cpp:
* UIProcess/mac/DisplayLink.h:
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::WebProcessProxy::stopDisplayLink):
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::initialize):
* WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::PDFPlugin):
* WebProcess/WebPage/DrawingArea.cpp:
* WebProcess/WebPage/EventDispatcher.cpp:
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/mac/DrawingAreaMac.cpp:
(WebKit::DrawingArea::createDisplayRefreshMonitor):
* WebProcess/WebProcess.cpp:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformInitializeProcess):

Source/WTF:

* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (273656 => 273657)


--- trunk/Source/WTF/ChangeLog	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WTF/ChangeLog	2021-03-01 19:15:01 UTC (rev 273657)
@@ -1,3 +1,18 @@
+2021-02-25  Simon Fraser  <[email protected]>
+
+        Remove ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING which is always true for macOS
+        https://bugs.webkit.org/show_bug.cgi?id=222459
+
+        Reviewed by Sam Weinig.
+
+        ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING is always defined for PLATFORM(MAC), so remove it,
+        replacing with PLATFORM(MAC) in a few places. In order to reduce the number PLATFORM(MAC), define
+        HAVE(CVDISPLAYLINK) and use it in WK2 code that relates to DisplayLinks.
+
+        * wtf/PlatformEnable.h:
+        * wtf/PlatformEnableCocoa.h:
+        * wtf/PlatformHave.h:
+
 2021-03-01  Chris Dumez  <[email protected]>
 
         Set ownership of IOSurfaces from the GPUProcess instead of the WebProcess

Modified: trunk/Source/WTF/wtf/PlatformEnable.h (273656 => 273657)


--- trunk/Source/WTF/wtf/PlatformEnable.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WTF/wtf/PlatformEnable.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -108,10 +108,6 @@
 #define ENABLE_WEBPROCESS_NSRUNLOOP 0
 #endif
 
-#if !defined(ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING)
-#define ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING 0
-#endif
-
 #if !defined(ENABLE_MAC_GESTURE_EVENTS)
 #define ENABLE_MAC_GESTURE_EVENTS 0
 #endif

Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (273656 => 273657)


--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -582,10 +582,6 @@
 #define ENABLE_WEBPROCESS_NSRUNLOOP 1
 #endif
 
-#if !defined(ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING) && PLATFORM(MAC)
-#define ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING 1
-#endif
-
 #if !defined(ENABLE_WEBXR) && (HAVE(WEBXR_INTERNALS) || (USE(APPLE_INTERNAL_SDK) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000))
 #define ENABLE_WEBXR 1
 #endif

Modified: trunk/Source/WTF/wtf/PlatformHave.h (273656 => 273657)


--- trunk/Source/WTF/wtf/PlatformHave.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -286,6 +286,10 @@
 #define HAVE_IOSURFACE 1
 #endif
 
+#if PLATFORM(MAC)
+#define HAVE_CVDISPLAYLINK 1
+#endif
+
 #if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)
 #define HAVE_IOSURFACE_COREIMAGE_SUPPORT 1
 #endif

Modified: trunk/Source/WebCore/ChangeLog (273656 => 273657)


--- trunk/Source/WebCore/ChangeLog	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebCore/ChangeLog	2021-03-01 19:15:01 UTC (rev 273657)
@@ -1,3 +1,30 @@
+2021-02-25  Simon Fraser  <[email protected]>
+
+        Remove ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING which is always true for macOS
+        https://bugs.webkit.org/show_bug.cgi?id=222459
+
+        Reviewed by Sam Weinig.
+
+        ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING is always defined for PLATFORM(MAC), so remove it,
+        replacing with PLATFORM(MAC) in a few places. In order to reduce the number PLATFORM(MAC), define
+        HAVE(CVDISPLAYLINK) and use it in WK2 code that relates to DisplayLinks.
+
+        * platform/graphics/cocoa/IOSurface.mm:
+        (WebCore::IOSurface::ensurePlatformContext):
+        * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp:
+        (WebCore::GraphicsContextGLOpenGLManager::addContext):
+        (WebCore::GraphicsContextGLOpenGLManager::removeContext):
+        * platform/mac/KeyEventMac.mm:
+        (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys):
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::gpuIDForDisplay):
+        * platform/mac/ScrollAnimatorMac.mm:
+        (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
+        (-[WebScrollbarPartAnimation startAnimation]):
+        (-[WebScrollbarPartAnimation setCurrentProgress:]):
+        (-[WebScrollbarPartAnimation stopAnimation]):
+        (-[WebScrollbarPartAnimation setCurrentProgress:setCurrentProgress:]): Deleted.
+
 2021-03-01  Antoine Quint  <[email protected]>
 
         REGRESSION(r272004): transform transition with delay doesn't behave correctly

Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (273656 => 273657)


--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -349,7 +349,7 @@
     
     m_cgContext = adoptCF(CGIOSurfaceContextCreate(m_surface.get(), m_contextSize.width(), m_contextSize.height(), bitsPerComponent, bitsPerPixel, m_colorSpace.get(), bitmapInfo));
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
     if (auto displayMask = primaryOpenGLDisplayMask()) {
         if (hostWindow && hostWindow->displayID())
             displayMask = displayMaskForDisplay(hostWindow->displayID());

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp (273656 => 273657)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -62,11 +62,6 @@
     if (!context)
         return;
 
-#if PLATFORM(MAC) && !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-    if (!m_contexts.size())
-        CGDisplayRegisterReconfigurationCallback(displayWasReconfigured, nullptr);
-#endif
-
     ASSERT(!m_contexts.contains(context));
     m_contexts.append(context);
 }
@@ -76,10 +71,6 @@
     if (!m_contexts.contains(context))
         return;
     m_contexts.removeFirst(context);
-#if PLATFORM(MAC) && !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-    if (!m_contexts.size())
-        CGDisplayRemoveReconfigurationCallback(displayWasReconfigured, nullptr);
-#endif
 }
 
 void GraphicsContextGLOpenGLManager::recycleContextIfNecessary()

Modified: trunk/Source/WebCore/platform/mac/KeyEventMac.mm (273656 => 273657)


--- trunk/Source/WebCore/platform/mac/KeyEventMac.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebCore/platform/mac/KeyEventMac.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -259,13 +259,12 @@
 
 OptionSet<PlatformEvent::Modifier> PlatformKeyboardEvent::currentStateOfModifierKeys()
 {
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     // s_currentModifiers is only set in the WebContent process, not in the UI process.
     if (s_currentModifiers) {
         ASSERT(isMainThread());
         return *s_currentModifiers;
     }
-#endif
+
     UInt32 currentModifiers = GetCurrentKeyModifiers();
 
     OptionSet<PlatformEvent::Modifier> modifiers;

Modified: trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm (273656 => 273657)


--- trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -202,13 +202,10 @@
 
 IORegistryGPUID gpuIDForDisplay(PlatformDisplayID displayID)
 {
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     if (auto data = ""
         return data->gpuID;
+
     return 0;
-#else
-    return gpuIDForDisplayMask(CGDisplayIDToOpenGLDisplayMask(displayID));
-#endif
 }
 
 IORegistryGPUID gpuIDForDisplayMask(GLuint displayMask)

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (273656 => 273657)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -302,11 +302,7 @@
 }
 #endif
 
-#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-@interface WebScrollbarPartAnimation : NSAnimation
-#else
 @interface WebScrollbarPartAnimation : NSObject
-#endif
 {
     Scrollbar* _scrollbar;
     RetainPtr<NSScrollerImp> _scrollerImp;
@@ -313,19 +309,15 @@
     FeatureToAnimate _featureToAnimate;
     CGFloat _startValue;
     CGFloat _endValue;
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     NSTimeInterval _duration;
     RetainPtr<NSTimer> _timer;
     RetainPtr<NSDate> _startDate;
     RefPtr<CubicBezierTimingFunction> _timingFunction;
-#endif
 }
 - (id)initWithScrollbar:(Scrollbar*)scrollbar featureToAnimate:(FeatureToAnimate)featureToAnimate animateFrom:(CGFloat)startValue animateTo:(CGFloat)endValue duration:(NSTimeInterval)duration;
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 - (void)setCurrentProgress:(NSTimer *)timer;
 - (void)setDuration:(NSTimeInterval)duration;
 - (void)stopAnimation;
-#endif
 @end
 
 @implementation WebScrollbarPartAnimation
@@ -332,11 +324,6 @@
 
 - (id)initWithScrollbar:(Scrollbar*)scrollbar featureToAnimate:(FeatureToAnimate)featureToAnimate animateFrom:(CGFloat)startValue animateTo:(CGFloat)endValue duration:(NSTimeInterval)duration
 {
-#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-    self = [super initWithDuration:duration animationCurve:NSAnimationEaseInOut];
-    if (!self)
-        return nil;
-#else
     self = [super init];
     if (!self)
         return nil;
@@ -345,7 +332,6 @@
     _timer = adoptNS([[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:0] interval:timeInterval target:self selector:@selector(setCurrentProgress:) userInfo:nil repeats:YES]);
     _duration = duration;
     _timingFunction = CubicBezierTimingFunction::create(CubicBezierTimingFunction::EaseInOut);
-#endif
 
     LOG_WITH_STREAM(OverlayScrollbars, stream << "Creating WebScrollbarPartAnimation for " << featureToAnimate << " from " << startValue << " to " << endValue);
 
@@ -354,10 +340,6 @@
     _startValue = startValue;
     _endValue = endValue;
 
-#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-    [self setAnimationBlockingMode:NSAnimationNonblocking];
-#endif
-
     return self;
 }
 
@@ -369,12 +351,8 @@
 
     LOG_WITH_STREAM(OverlayScrollbars, stream << "-[WebScrollbarPartAnimation " << self << "startAnimation] for " << _featureToAnimate);
 
-#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-    [super startAnimation];
-#else
     [[NSRunLoop mainRunLoop] addTimer:_timer.get() forMode:NSDefaultRunLoopMode];
     _startDate = adoptNS([[NSDate alloc] initWithTimeIntervalSinceNow:0]);
-#endif
 }
 
 - (void)setStartValue:(CGFloat)startValue
@@ -387,15 +365,8 @@
     _endValue = endValue;
 }
 
-#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-- (void)setCurrentProgress:(NSAnimationProgress)progress
-#else
 - (void)setCurrentProgress:(NSTimer *)timer
-#endif
 {
-#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-    [super setCurrentProgress:progress];
-#else
     CGFloat progress = 0;
     NSDate *now = [NSDate dateWithTimeIntervalSinceNow:0];
     NSTimeInterval elapsed = [now timeIntervalSinceDate:_startDate.get()];
@@ -408,7 +379,6 @@
             t = elapsed / _duration;
         progress = _timingFunction->transformTime(t, _duration);
     }
-#endif
     ASSERT(_scrollbar);
 
     LOG_WITH_STREAM(OverlayScrollbars, stream << "-[WebScrollbarPartAnimation " << self << "setCurrentProgress:" << progress <<"] for " << _featureToAnimate);
@@ -446,7 +416,6 @@
     _scrollbar = 0;
 }
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 - (void)setDuration:(NSTimeInterval)duration
 {
     _duration = duration;
@@ -456,7 +425,6 @@
 {
     [_timer invalidate];
 }
-#endif
 
 @end
 

Modified: trunk/Source/WebKit/ChangeLog (273656 => 273657)


--- trunk/Source/WebKit/ChangeLog	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/ChangeLog	2021-03-01 19:15:01 UTC (rev 273657)
@@ -1,3 +1,56 @@
+2021-02-25  Simon Fraser  <[email protected]>
+
+        Remove ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING which is always true for macOS
+        https://bugs.webkit.org/show_bug.cgi?id=222459
+
+        Reviewed by Sam Weinig.
+
+        ENABLE_WEBPROCESS_WINDOWSERVER_BLOCKING is always defined for PLATFORM(MAC), so remove it,
+        replacing with PLATFORM(MAC) in a few places. In order to reduce the number PLATFORM(MAC), define
+        HAVE(CVDISPLAYLINK) and use it in WK2 code that relates to DisplayLinks.
+
+        * Platform/cocoa/LayerHostingContext.mm:
+        (WebKit::LayerHostingContext::createForExternalHostingProcess):
+        * Shared/mac/HangDetectionDisablerMac.mm:
+        (WebKit::setClientsMayIgnoreEvents):
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::registerNotificationObservers):
+        (WebKit::WebProcessPool::unregisterNotificationObservers):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::ScrollingObserver::singleton):
+        (WebKit::WebPageProxy::sendWheelEvent):
+        (WebKit::WebPageProxy::updateCurrentModifierState):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::displayReconfigurationCallBack):
+        (WebKit::WebProcessPool::sendDisplayConfigurationChangedMessageForTesting):
+        * UIProcess/WebProcessPool.h:
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::~WebProcessProxy):
+        (WebKit::WebProcessProxy::processWillShutDown):
+        * UIProcess/WebProcessProxy.h:
+        * UIProcess/WebProcessProxy.messages.in:
+        * UIProcess/mac/DisplayLink.cpp:
+        * UIProcess/mac/DisplayLink.h:
+        * UIProcess/mac/WebProcessProxyMac.mm:
+        (WebKit::WebProcessProxy::stopDisplayLink):
+        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
+        (WebKit::InjectedBundle::initialize):
+        * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::PDFPlugin):
+        * WebProcess/WebPage/DrawingArea.cpp:
+        * WebProcess/WebPage/EventDispatcher.cpp:
+        * WebProcess/WebPage/EventDispatcher.h:
+        * WebProcess/WebPage/EventDispatcher.messages.in:
+        * WebProcess/WebPage/mac/DrawingAreaMac.cpp:
+        (WebKit::DrawingArea::createDisplayRefreshMonitor):
+        * WebProcess/WebProcess.cpp:
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+        (WebKit::WebProcess::platformInitializeProcess):
+
 2021-03-01  Chris Dumez  <[email protected]>
 
         Set ownership of IOSurfaces from the GPUProcess instead of the WebProcess

Modified: trunk/Source/WebKit/Platform/cocoa/LayerHostingContext.mm (273656 => 273657)


--- trunk/Source/WebKit/Platform/cocoa/LayerHostingContext.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/Platform/cocoa/LayerHostingContext.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -67,7 +67,7 @@
         kCAContextDisplayId : @10000
 #endif
     }];
-#elif !PLATFORM(MACCATALYST) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#elif !PLATFORM(MACCATALYST)
     [CAContext setAllowsCGSConnections:NO];
     layerHostingContext->m_context = [CAContext remoteContextWithOptions:@{
         kCAContextCIFilterBehavior :  @"ignore",

Modified: trunk/Source/WebKit/Shared/mac/HangDetectionDisablerMac.mm (273656 => 273657)


--- trunk/Source/WebKit/Shared/mac/HangDetectionDisablerMac.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/Shared/mac/HangDetectionDisablerMac.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -48,7 +48,7 @@
 static void setClientsMayIgnoreEvents(bool clientsMayIgnoreEvents)
 {
     auto cgsId = CGSMainConnectionID();
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+
     // In macOS 10.14 and later, the WebContent process does not have access to the WindowServer.
     // In this case, there will be no valid WindowServer main connection.
     if (!cgsId)
@@ -55,7 +55,7 @@
         return;
     // FIXME: <https://webkit.org/b/184484> We should assert here if this is being called from
     // the WebContent process.
-#endif
+
     if (CGSSetConnectionProperty(cgsId, cgsId, clientsMayIgnoreEventsKey, clientsMayIgnoreEvents ? kCFBooleanTrue : kCFBooleanFalse) != kCGErrorSuccess)
         ASSERT_NOT_REACHED();
 }

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -669,12 +669,10 @@
         screenPropertiesStateChanged();
     }];
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     m_scrollerStyleNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSPreferredScrollerStyleDidChangeNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
         auto scrollbarStyle = [NSScroller preferredScrollerStyle];
         sendToAllProcesses(Messages::WebProcess::ScrollerStylePreferenceChanged(scrollbarStyle));
     }];
-#endif
 
     m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidBecomeActiveNotification object:NSApp queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
 #if ENABLE(CFPREFS_DIRECT_MODE)
@@ -739,9 +737,7 @@
     [[NSNotificationCenter defaultCenter] removeObserver:m_automaticQuoteSubstitutionNotificationObserver.get()];
     [[NSNotificationCenter defaultCenter] removeObserver:m_automaticDashSubstitutionNotificationObserver.get()];
     [[NSWorkspace.sharedWorkspace notificationCenter] removeObserver:m_accessibilityDisplayOptionsNotificationObserver.get()];
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     [[NSNotificationCenter defaultCenter] removeObserver:m_scrollerStyleNotificationObserver.get()];
-#endif
     [[NSNotificationCenter defaultCenter] removeObserver:m_deactivationObserver.get()];
     CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), this, AppleColorPreferencesChangedNotification, nullptr);
 #elif !PLATFORM(MACCATALYST)
@@ -770,7 +766,7 @@
     return _CFNetworkIsKnownHSTSHostWithSession(url.get(), nullptr);
 }
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
 Optional<unsigned> WebProcessPool::nominalFramesPerSecondForDisplay(WebCore::PlatformDisplayID displayID)
 {
     for (auto& displayLink : m_displayLinks) {
@@ -813,7 +809,7 @@
     for (auto& displayLink : m_displayLinks)
         displayLink->removeObservers(connection);
 }
-#endif
+#endif // HAVE(CVDISPLAYLINK)
 
 // FIXME: Deprecated. Left here until a final decision is made.
 void WebProcessPool::setCookieStoragePartitioningEnabled(bool enabled)

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -224,6 +224,7 @@
 #endif
 
 #if PLATFORM(MAC)
+#include "DisplayLink.h"
 #include <WebCore/ImageUtilities.h>
 #include <WebCore/UTIUtilities.h>
 #endif
@@ -294,10 +295,6 @@
 #include "WebDateTimePicker.h"
 #endif
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-#include "DisplayLink.h"
-#endif
-
 // This controls what strategy we use for mouse wheel coalescing.
 #define MERGE_WHEEL_EVENTS 1
 
@@ -321,7 +318,7 @@
 
 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageProxyCounter, ("WebPageProxy"));
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
 class ScrollingObserver {
     WTF_MAKE_NONCOPYABLE(ScrollingObserver);
     WTF_MAKE_FAST_ALLOCATED;
@@ -348,7 +345,7 @@
     static NeverDestroyed<ScrollingObserver> detector;
     return detector;
 }
-#endif // ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#endif
 
 class StorageRequests {
     WTF_MAKE_NONCOPYABLE(StorageRequests); WTF_MAKE_FAST_ALLOCATED;
@@ -2747,7 +2744,7 @@
 
 void WebPageProxy::sendWheelEvent(const WebWheelEvent& event)
 {
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     ScrollingObserver::singleton().willSendWheelEvent();
 #endif
 
@@ -9935,7 +9932,7 @@
 
 void WebPageProxy::updateCurrentModifierState()
 {
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) || PLATFORM(IOS_FAMILY)
+#if PLATFORM(COCOA)
     auto modifiers = PlatformKeyboardEvent::currentStateOfModifierKeys();
     send(Messages::WebPage::UpdateCurrentModifierState(modifiers));
 #endif

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -686,9 +686,7 @@
     auto screenProperties = WebCore::collectScreenProperties();
     for (auto& processPool : WebProcessPool::allProcessPools()) {
         processPool->sendToAllProcesses(Messages::WebProcess::SetScreenProperties(screenProperties));
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
         processPool->sendToAllProcesses(Messages::WebProcess::DisplayConfigurationChanged(display, flags));
-#endif
     }
 }
 
@@ -1949,7 +1947,7 @@
 
 void WebProcessPool::sendDisplayConfigurationChangedMessageForTesting()
 {
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
     auto display = CGSMainDisplayID();
 
     for (auto& processPool : WebProcessPool::allProcessPools()) {

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -70,12 +70,10 @@
 #endif
 
 #if PLATFORM(MAC)
-#import <WebCore/PowerObserverMac.h>
-#import <pal/system/SystemSleepListener.h>
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 #include "DisplayLink.h"
+#include <WebCore/PowerObserverMac.h>
+#include <pal/system/SystemSleepListener.h>
 #endif
-#endif
 
 namespace API {
 class AutomationClient;
@@ -240,7 +238,7 @@
     PluginInfoStore& pluginInfoStore() { return m_pluginInfoStore; }
 #endif
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     Optional<unsigned> nominalFramesPerSecondForDisplay(WebCore::PlatformDisplayID);
     void startDisplayLink(IPC::Connection&, DisplayLinkObserverID, WebCore::PlatformDisplayID);
     void stopDisplayLink(IPC::Connection&, DisplayLinkObserverID, WebCore::PlatformDisplayID);
@@ -667,9 +665,7 @@
     RetainPtr<NSObject> m_automaticQuoteSubstitutionNotificationObserver;
     RetainPtr<NSObject> m_automaticDashSubstitutionNotificationObserver;
     RetainPtr<NSObject> m_accessibilityDisplayOptionsNotificationObserver;
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     RetainPtr<NSObject> m_scrollerStyleNotificationObserver;
-#endif
     RetainPtr<NSObject> m_deactivationObserver;
     RetainPtr<WKWebInspectorPreferenceObserver> m_webInspectorPreferenceObserver;
 
@@ -753,7 +749,7 @@
 
     HashMap<WebCore::RegistrableDomain, std::unique_ptr<WebCore::PrewarmInformation>> m_prewarmInformationPerRegistrableDomain;
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     Vector<std::unique_ptr<DisplayLink>> m_displayLinks;
 #endif
 

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -244,7 +244,7 @@
 
     WebPasteboardProxy::singleton().removeWebProcessProxy(*this);
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     if (state() == State::Running)
         processPool().stopDisplayLinks(*connection());
 #endif
@@ -439,7 +439,7 @@
 {
     ASSERT_UNUSED(connection, this->connection() == &connection);
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     processPool().stopDisplayLinks(connection);
 #endif
 }

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.h (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -297,7 +297,7 @@
     void releaseHighPerformanceGPU();
 #endif
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     void startDisplayLink(DisplayLinkObserverID, WebCore::PlatformDisplayID);
     void stopDisplayLink(DisplayLinkObserverID, WebCore::PlatformDisplayID);
 #endif

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in	2021-03-01 19:15:01 UTC (rev 273657)
@@ -71,7 +71,7 @@
     ReleaseHighPerformanceGPU()
 #endif
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     StartDisplayLink(WebKit::DisplayLinkObserverID observerID, uint32_t displayID)
     StopDisplayLink(WebKit::DisplayLinkObserverID observerID, uint32_t displayID)
 #endif

Modified: trunk/Source/WebKit/UIProcess/mac/DisplayLink.cpp (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/mac/DisplayLink.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/mac/DisplayLink.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "DisplayLink.h"
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
 
 #include "EventDispatcherMessages.h"
 #include "WebProcessMessages.h"
@@ -150,4 +150,4 @@
 
 } // namespace WebKit
 
-#endif // ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#endif // HAVE(CVDISPLAYLINK)

Modified: trunk/Source/WebKit/UIProcess/mac/DisplayLink.h (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/mac/DisplayLink.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/mac/DisplayLink.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
 
 #include "DisplayLinkObserverID.h"
 #include <CoreVideo/CVDisplayLink.h>
@@ -71,5 +71,4 @@
 
 } // namespace WebKit
 
-#endif
-
+#endif // HAVE(CVDISPLAYLINK)

Modified: trunk/Source/WebKit/UIProcess/mac/WebProcessProxyMac.mm (273656 => 273657)


--- trunk/Source/WebKit/UIProcess/mac/WebProcessProxyMac.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/UIProcess/mac/WebProcessProxyMac.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -59,7 +59,6 @@
     return !path.isEmpty() && !path.startsWith("/System/");
 }
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 void WebProcessProxy::startDisplayLink(DisplayLinkObserverID observerID, WebCore::PlatformDisplayID displayID)
 {
     ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
@@ -72,7 +71,6 @@
     ASSERT(connection());
     processPool().stopDisplayLink(*connection(), observerID, displayID);
 }
-#endif
 
 } // namespace WebKit
 

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -52,8 +52,7 @@
 namespace WebKit {
 using namespace WebCore;
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-
+#if PLATFORM(MAC)
 static NSEventModifierFlags currentModifierFlags(id self, SEL _cmd)
 {
     auto currentModifiers = PlatformKeyboardEvent::currentStateOfModifierKeys();
@@ -72,7 +71,6 @@
     
     return modifiers;
 }
-
 #endif
 
 static RetainPtr<NSKeyedUnarchiver> createUnarchiver(const unsigned char* bytes, NSUInteger length)
@@ -177,7 +175,7 @@
     if (additionalClassesForParameterCoderFunction)
         additionalClassesForParameterCoderFunction(toAPI(this), toAPI(initializationUserData));
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
     // Swizzle [NSEvent modiferFlags], since it always returns 0 when the WindowServer is blocked.
     Method method = class_getClassMethod([NSEvent class], @selector(modifierFlags));
     method_setImplementation(method, reinterpret_cast<IMP>(currentModifierFlags));

Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef PDFLayerControllerSPI_h
-#define PDFLayerControllerSPI_h
+#pragma once
 
 #if ENABLE(PDFKIT_PLUGIN)
 
@@ -170,10 +169,8 @@
 - (NSArray *)accessibilityChildren;
 - (void)setAccessibilityParent:(id)parent;
 - (id)accessibilityElementForAnnotation:(PDFAnnotation *)annotation;
+- (void)setDeviceColorSpace:(CGColorSpaceRef)colorSpace;
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-- (void)setDeviceColorSpace:(CGColorSpaceRef)colorSpace;
-#endif
 @end
 
 @interface PDFAnnotation (AccessibilityPrivate)
@@ -180,6 +177,4 @@
 - (id)accessibilityNode;
 @end
 
-#endif
-
-#endif // PDFLayerControllerSPI_h
+#endif // ENABLE(PDFKIT_PLUGIN)

Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -628,12 +628,10 @@
 
     [m_containerLayer addSublayer:m_contentLayer.get()];
     [m_containerLayer addSublayer:m_scrollCornerLayer.get()];
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     if ([m_pdfLayerController respondsToSelector:@selector(setDeviceColorSpace:)]) {
         auto view = frame.coreFrame()->view();
         [m_pdfLayerController setDeviceColorSpace:screenColorSpace(view)];
     }
-#endif
 
 #if HAVE(INCREMENTAL_PDF_APIS)
     if (m_incrementalPDFLoadingEnabled) {

Modified: trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -82,7 +82,7 @@
     function();
 }
 
-#if !(PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING))
+#if !PLATFORM(MAC)
 RefPtr<WebCore::DisplayRefreshMonitor> DrawingArea::createDisplayRefreshMonitor(PlatformDisplayID)
 {
     return nullptr;

Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -291,7 +291,7 @@
 #endif
 }
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
 void EventDispatcher::displayWasRefreshed(PlatformDisplayID displayID)
 {
     ASSERT(!RunLoop::isMain());

Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -106,7 +106,7 @@
     static void sendDidReceiveEvent(WebCore::PageIdentifier, WebEvent::Type, bool didHandleEvent);
 #endif
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
     void displayWasRefreshed(WebCore::PlatformDisplayID);
 #endif
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in	2021-03-01 19:15:01 UTC (rev 273657)
@@ -29,7 +29,7 @@
 #if ENABLE(MAC_GESTURE_EVENTS)
     GestureEvent(WebCore::PageIdentifier pageID, WebKit::WebGestureEvent event)
 #endif
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     DisplayWasRefreshed(uint32_t displayID)
 #endif
 }

Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/DrawingAreaMac.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "DrawingArea.h"
 
+#if PLATFORM(MAC)
+
 #include "WebProcess.h"
 #include "WebProcessProxy.h"
 #include "WebProcessProxyMessages.h"
@@ -36,8 +38,6 @@
 namespace WebKit {
 using namespace WebCore;
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-
 class DisplayRefreshMonitorMac : public DisplayRefreshMonitor {
 public:
     static Ref<DisplayRefreshMonitorMac> create(PlatformDisplayID displayID)
@@ -106,6 +106,7 @@
 {
     return DisplayRefreshMonitorMac::create(displayID);
 }
-#endif // ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 
 }
+
+#endif // PLATFORM(MAC)

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2021-03-01 19:15:01 UTC (rev 273657)
@@ -154,6 +154,10 @@
 #include "UserMediaCaptureManager.h"
 #endif
 
+#if PLATFORM(MAC)
+#include <WebCore/DisplayRefreshMonitorManager.h>
+#endif
+
 #if PLATFORM(IOS_FAMILY)
 #include "WebSQLiteDatabaseTracker.h"
 #endif
@@ -212,10 +216,6 @@
 #include <WebCore/VP9UtilitiesCocoa.h>
 #endif
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-#include <WebCore/DisplayRefreshMonitorManager.h>
-#endif
-
 #define RELEASE_LOG_SESSION_ID (m_sessionID ? m_sessionID->toUInt64() : 0)
 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [sessionID=%" PRIu64 "] WebProcess::" fmt, this, RELEASE_LOG_SESSION_ID, ##__VA_ARGS__)
 #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__)
@@ -1882,7 +1882,7 @@
     });
 }
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
 void WebProcess::displayWasRefreshed(uint32_t displayID)
 {
     ASSERT(RunLoop::isMain());

Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/WebProcess.h	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h	2021-03-01 19:15:01 UTC (rev 273657)
@@ -503,7 +503,7 @@
     void sendResourceLoadStatisticsDataImmediately(CompletionHandler<void()>&&);
 #endif
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     void displayWasRefreshed(uint32_t displayID);
 #endif
 
@@ -523,7 +523,7 @@
     // Implemented in generated WebProcessMessageReceiver.cpp
     void didReceiveWebProcessMessage(IPC::Connection&, IPC::Decoder&);
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
     void scrollerStylePreferenceChanged(bool useOverlayScrollbars);
     void displayConfigurationChanged(CGDirectDisplayID, CGDisplayChangeSummaryFlags);
 #endif

Modified: trunk/Source/WebKit/WebProcess/WebProcess.messages.in (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/WebProcess.messages.in	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/WebProcess.messages.in	2021-03-01 19:15:01 UTC (rev 273657)
@@ -111,7 +111,7 @@
 #if PLATFORM(COCOA)
     SetScreenProperties(struct WebCore::ScreenProperties screenProperties)
 #endif
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
     ScrollerStylePreferenceChanged(bool useOvelayScrollbars)
     DisplayConfigurationChanged(CGDirectDisplayID displayID, CGDisplayChangeSummaryFlags flags)
 #endif
@@ -188,7 +188,7 @@
     DidWriteToPasteboardAsynchronously(String pasteboardName);
 #endif
 
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if HAVE(CVDISPLAYLINK)
     DisplayWasRefreshed(uint32_t displayID)
 #endif
 

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (273656 => 273657)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-03-01 18:47:02 UTC (rev 273656)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-03-01 19:15:01 UTC (rev 273657)
@@ -352,7 +352,7 @@
         launchServicesExtension->revoke();
 #endif
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
     // App nap must be manually enabled when not running the NSApplication run loop.
     __CFRunLoopSetOptionsReason(__CFRunLoopOptionsEnableAppNap, CFSTR("Finished checkin as application - enable app nap"));
 #endif
@@ -388,7 +388,7 @@
 
     WebCore::setScreenProperties(parameters.screenProperties);
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
     scrollerStylePreferenceChanged(parameters.useOverlayScrollbars);
 #endif
 
@@ -633,7 +633,6 @@
 void WebProcess::platformInitializeProcess(const AuxiliaryProcessInitializationParameters& parameters)
 {
 #if PLATFORM(MAC)
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     // Deny the WebContent process access to the WindowServer.
     // This call will not succeed if there are open WindowServer connections at this point.
     auto retval = CGSSetDenyWindowServerConnections(true);
@@ -640,15 +639,7 @@
     RELEASE_ASSERT(retval == kCGErrorSuccess);
     // Make sure that we close any WindowServer connections after checking in with Launch Services.
     CGSShutdownServerConnections();
-#else
 
-    if (![NSApp isRunning]) {
-        // This call is needed when the WebProcess is not running the NSApplication event loop.
-        // Otherwise, calling enableSandboxStyleFileQuarantine() will fail.
-        launchServicesCheckIn();
-    }
-#endif // ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
-
     SwitchingGPUClient::setSingleton(WebSwitchingGPUClient::singleton());
     MainThreadSharedTimer::shouldSetupPowerObserver() = false;
 #endif // PLATFORM(MAC)
@@ -992,7 +983,7 @@
 }
 #endif
 
-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC)
 void WebProcess::scrollerStylePreferenceChanged(bool useOverlayScrollbars)
 {
     ScrollerStyle::setUseOverlayScrollbars(useOverlayScrollbars);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to