Diff
Modified: trunk/LayoutTests/ChangeLog (235124 => 235125)
--- trunk/LayoutTests/ChangeLog 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/LayoutTests/ChangeLog 2018-08-21 18:04:48 UTC (rev 235125)
@@ -1,3 +1,15 @@
+2018-08-21 Per Arne Vollan <pvol...@apple.com>
+
+ [WebGL] Contexts are not updated when display configuration changed.
+ https://bugs.webkit.org/show_bug.cgi?id=188750
+
+ Reviewed by Brent Fulgham.
+
+ * TestExpectations:
+ * fast/canvas/webgl/context-update-on-display-configuration-expected.txt: Added.
+ * fast/canvas/webgl/context-update-on-display-configuration.html: Added.
+ * platform/mac-wk2/TestExpectations:
+
2018-08-21 John Wilander <wilan...@apple.com>
Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
Modified: trunk/LayoutTests/TestExpectations (235124 => 235125)
--- trunk/LayoutTests/TestExpectations 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/LayoutTests/TestExpectations 2018-08-21 18:04:48 UTC (rev 235125)
@@ -2223,3 +2223,6 @@
webkit.org/b/187269 [ Debug ] imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.html [ Skip ]
webkit.org/b/185308 legacy-animation-engine/animations/combo-transform-translate+scale.html [ Pass Failure ]
+
+# This test is currently only relevant on mac-wk2
+fast/canvas/webgl/context-update-on-display-configuration.html [ Skip ]
Added: trunk/LayoutTests/fast/canvas/webgl/context-update-on-display-configuration-expected.txt (0 => 235125)
--- trunk/LayoutTests/fast/canvas/webgl/context-update-on-display-configuration-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/context-update-on-display-configuration-expected.txt 2018-08-21 18:04:48 UTC (rev 235125)
@@ -0,0 +1,9 @@
+Tests that context is updated when display configuration changes.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/canvas/webgl/context-update-on-display-configuration.html (0 => 235125)
--- trunk/LayoutTests/fast/canvas/webgl/context-update-on-display-configuration.html (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/context-update-on-display-configuration.html 2018-08-21 18:04:48 UTC (rev 235125)
@@ -0,0 +1,39 @@
+<html>
+<head>
+<style>
+#example {
+ width: 100%;
+ height: 100%;
+}
+</style>
+<script src=""
+<script src="" </script>
+<script>
+description('Tests that context is updated when display configuration changes.');
+
+function start()
+{
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ var canvas = document.getElementById('example');
+ var gl = WebGLTestUtils.create3DContext(canvas);
+
+ canvas.addEventListener('webglcontextchanged', function(e) {
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, false);
+
+ if (window.testRunner)
+ testRunner.sendDisplayConfigurationChangedMessageForTesting();
+}
+</script>
+</head>
+
+<body _onload_="start()">
+ <canvas id="example"></canvas>
+</body>
+</html>
+
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (235124 => 235125)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2018-08-21 18:04:48 UTC (rev 235125)
@@ -846,3 +846,5 @@
webkit.org/b/183705 http/tests/workers/service/serviceworkerclients-matchAll.https.html [ Pass Failure ]
webkit.org/b/187658 http/tests/security/bypassing-cors-checks-for-extension-urls.html [ Pass Failure ]
+
+[ Mojave+ ] fast/canvas/webgl/context-update-on-display-configuration.html [ Pass ]
Modified: trunk/Source/WebCore/ChangeLog (235124 => 235125)
--- trunk/Source/WebCore/ChangeLog 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebCore/ChangeLog 2018-08-21 18:04:48 UTC (rev 235125)
@@ -1,3 +1,26 @@
+2018-08-21 Per Arne Vollan <pvol...@apple.com>
+
+ [WebGL] Contexts are not updated when display configuration changed.
+ https://bugs.webkit.org/show_bug.cgi?id=188750
+
+ Reviewed by Brent Fulgham.
+
+ Calling CGDisplayRegisterReconfigurationCallback in GraphicsContext3DManager::addContext
+ returns kCGErrorSuccess when WindowServer access is blocked in the WebContent process,
+ but the callback function is never called. We should register the callback function in
+ the UI process, and send a message to the WebContent process when the display
+ configuration changed.
+
+ Test: fast/canvas/webgl/context-update-on-display-configuration.html
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/GraphicsContext3DManager.cpp:
+ (WebCore::GraphicsContext3DManager::displayWasReconfigured):
+ (WebCore::GraphicsContext3DManager::addContext):
+ (WebCore::GraphicsContext3DManager::removeContext):
+ (WebCore::displayWasReconfigured): Deleted.
+ * platform/graphics/GraphicsContext3DManager.h:
+
2018-08-21 John Wilander <wilan...@apple.com>
Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (235124 => 235125)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2018-08-21 18:04:48 UTC (rev 235125)
@@ -4129,7 +4129,7 @@
D05CED2A0A40BB2C00C5AF38 /* FormatBlockCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D05CED280A40BB2C00C5AF38 /* FormatBlockCommand.h */; };
D06C0D8F0CFD11460065F43F /* RemoveFormatCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D06C0D8D0CFD11460065F43F /* RemoveFormatCommand.h */; };
D07DEABA0A36554A00CA30F8 /* InsertListCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D07DEAB80A36554A00CA30F8 /* InsertListCommand.h */; };
- D0843A4B20FEBE3D00FE860E /* GraphicsContext3DManager.h in Headers */ = {isa = PBXBuildFile; fileRef = D0843A4A20FEBE3D00FE860E /* GraphicsContext3DManager.h */; };
+ D0843A4B20FEBE3D00FE860E /* GraphicsContext3DManager.h in Headers */ = {isa = PBXBuildFile; fileRef = D0843A4A20FEBE3D00FE860E /* GraphicsContext3DManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
D0843A4D20FEC16500FE860E /* GraphicsContext3DManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0843A4C20FEC16500FE860E /* GraphicsContext3DManager.cpp */; };
D086FE9809D53AAB005BC74D /* UnlinkCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D086FE9609D53AAB005BC74D /* UnlinkCommand.h */; };
D08B00E220A282490004BC0A /* WebGLCompressedTextureASTC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A20D562092A0A600E0C259 /* WebGLCompressedTextureASTC.cpp */; };
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp (235124 => 235125)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp 2018-08-21 18:04:48 UTC (rev 235125)
@@ -123,7 +123,7 @@
}
#if PLATFORM(MAC)
-static void displayWasReconfigured(CGDirectDisplayID, CGDisplayChangeSummaryFlags flags, void*)
+void GraphicsContext3DManager::displayWasReconfigured(CGDirectDisplayID, CGDisplayChangeSummaryFlags flags, void*)
{
if (flags & kCGDisplaySetModeFlag)
GraphicsContext3DManager::sharedManager().updateAllContexts();
@@ -158,7 +158,7 @@
if (!context)
return;
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
if (!m_contexts.size())
CGDisplayRegisterReconfigurationCallback(displayWasReconfigured, nullptr);
#endif
@@ -175,7 +175,7 @@
m_contextWindowMap.remove(context);
removeContextRequiringHighPerformance(context);
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
if (!m_contexts.size())
CGDisplayRemoveReconfigurationCallback(displayWasReconfigured, nullptr);
#endif
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3DManager.h (235124 => 235125)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3DManager.h 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3DManager.h 2018-08-21 18:04:48 UTC (rev 235125)
@@ -25,11 +25,12 @@
#pragma once
-#include <Timer.h>
+#include "Timer.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#if PLATFORM(MAC)
+#include <CoreGraphics/CGDisplayConfiguration.h>
#include <OpenGL/CGLTypes.h>
#endif
@@ -65,6 +66,7 @@
#if PLATFORM(MAC)
void screenDidChange(PlatformDisplayID, const HostWindow*);
+ WEBCORE_EXPORT static void displayWasReconfigured(CGDirectDisplayID, CGDisplayChangeSummaryFlags, void*);
#endif
private:
Modified: trunk/Source/WebKit/ChangeLog (235124 => 235125)
--- trunk/Source/WebKit/ChangeLog 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebKit/ChangeLog 2018-08-21 18:04:48 UTC (rev 235125)
@@ -1,3 +1,30 @@
+2018-08-21 Per Arne Vollan <pvol...@apple.com>
+
+ [WebGL] Contexts are not updated when display configuration changed.
+ https://bugs.webkit.org/show_bug.cgi?id=188750
+
+ Reviewed by Brent Fulgham.
+
+ Calling CGDisplayRegisterReconfigurationCallback in GraphicsContext3DManager::addContext
+ returns kCGErrorSuccess when WindowServer access is blocked in the WebContent process,
+ but the callback function is never called. We should register the callback function in
+ the UI process, and send a message to the WebContent process when the display
+ configuration changed.
+
+ * Sources.txt:
+ * UIProcess/API/C/WKMockDisplay.cpp: Added.
+ (WKSendDisplayConfigurationChangedMessageForTesting):
+ * UIProcess/API/C/WKMockDisplay.h: Added.
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::displayReconfigurationCallBack):
+ (WebKit::WebProcessPool::sendDisplayConfigurationChangedMessageForTesting):
+ * UIProcess/WebProcessPool.h:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebProcess/WebProcess.h:
+ * WebProcess/WebProcess.messages.in:
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::displayConfigurationChanged):
+
2018-08-21 John Wilander <wilan...@apple.com>
Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
Modified: trunk/Source/WebKit/Sources.txt (235124 => 235125)
--- trunk/Source/WebKit/Sources.txt 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebKit/Sources.txt 2018-08-21 18:04:48 UTC (rev 235125)
@@ -328,6 +328,7 @@
UIProcess/API/C/WKInspector.cpp @no-unify
UIProcess/API/C/WKKeyValueStorageManager.cpp @no-unify
UIProcess/API/C/WKMediaSessionMetadata.cpp @no-unify
+UIProcess/API/C/WKMockDisplay.cpp @no-unify
UIProcess/API/C/WKMockMediaDevice.cpp @no-unify
UIProcess/API/C/WKNavigationActionRef.cpp @no-unify
UIProcess/API/C/WKNavigationDataRef.cpp @no-unify
Added: trunk/Source/WebKit/UIProcess/API/C/WKMockDisplay.cpp (0 => 235125)
--- trunk/Source/WebKit/UIProcess/API/C/WKMockDisplay.cpp (rev 0)
+++ trunk/Source/WebKit/UIProcess/API/C/WKMockDisplay.cpp 2018-08-21 18:04:48 UTC (rev 235125)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "config.h"
+#include "WKMockDisplay.h"
+
+#include "WKAPICast.h"
+#include "WKString.h"
+#include "WebProcessPool.h"
+
+using namespace WebKit;
+
+void WKSendDisplayConfigurationChangedMessageForTesting(WKContextRef context)
+{
+ toImpl(context)->sendDisplayConfigurationChangedMessageForTesting();
+}
Added: trunk/Source/WebKit/UIProcess/API/C/WKMockDisplay.h (0 => 235125)
--- trunk/Source/WebKit/UIProcess/API/C/WKMockDisplay.h (rev 0)
+++ trunk/Source/WebKit/UIProcess/API/C/WKMockDisplay.h 2018-08-21 18:04:48 UTC (rev 235125)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#pragma once
+
+#include <WebKit/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT void WKSendDisplayConfigurationChangedMessageForTesting(WKContextRef);
+
+#ifdef __cplusplus
+}
+#endif
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (235124 => 235125)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2018-08-21 18:04:48 UTC (rev 235125)
@@ -831,8 +831,12 @@
static void displayReconfigurationCallBack(CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, void *userInfo)
{
auto screenProperties = WebCore::collectScreenProperties();
- for (auto& processPool : WebProcessPool::allProcessPools())
+ for (auto& processPool : WebProcessPool::allProcessPools()) {
processPool->sendToAllProcesses(Messages::WebProcess::SetScreenProperties(screenProperties));
+#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+ processPool->sendToAllProcesses(Messages::WebProcess::DisplayConfigurationChanged(display, flags));
+#endif
+ }
}
static void registerDisplayConfigurationCallback()
@@ -2292,4 +2296,16 @@
#endif
}
+void WebProcessPool::sendDisplayConfigurationChangedMessageForTesting()
+{
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+ auto display = CGSMainDisplayID();
+
+ for (auto& processPool : WebProcessPool::allProcessPools()) {
+ processPool->sendToAllProcesses(Messages::WebProcess::DisplayConfigurationChanged(display, kCGDisplayBeginConfigurationFlag));
+ processPool->sendToAllProcesses(Messages::WebProcess::DisplayConfigurationChanged(display, kCGDisplaySetModeFlag | kCGDisplayDesktopShapeChangedFlag));
+ }
+#endif
+}
+
} // namespace WebKit
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (235124 => 235125)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.h 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h 2018-08-21 18:04:48 UTC (rev 235125)
@@ -472,6 +472,8 @@
void removeMockMediaDevice(const String& persistentId);
void resetMockMediaDevices();
+ void sendDisplayConfigurationChangedMessageForTesting();
+
private:
void platformInitialize();
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (235124 => 235125)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2018-08-21 18:04:48 UTC (rev 235125)
@@ -1999,6 +1999,8 @@
C0CE72A11247E71D00BC0EC4 /* WebPageMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */; };
C0CE72AD1247E78D00BC0EC4 /* HandleMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C0CE72AC1247E78D00BC0EC4 /* HandleMessage.h */; };
C0E3AA7C1209E83C00A49D01 /* Module.h in Headers */ = {isa = PBXBuildFile; fileRef = C0E3AA441209E2BA00A49D01 /* Module.h */; };
+ C11E1694212B87C500985FF6 /* WKMockDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = C11E1692212B87C500985FF6 /* WKMockDisplay.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ C11E1695212B87C500985FF6 /* WKMockDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C11E1693212B87C500985FF6 /* WKMockDisplay.cpp */; };
C181735F205839F600DFDA65 /* DrawingAreaMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C181735E205839F600DFDA65 /* DrawingAreaMac.cpp */; };
C18173612058424700DFDA65 /* DisplayLink.h in Headers */ = {isa = PBXBuildFile; fileRef = C18173602058424700DFDA65 /* DisplayLink.h */; };
C1817363205844A900DFDA65 /* DisplayLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C1817362205844A900DFDA65 /* DisplayLink.cpp */; };
@@ -4759,6 +4761,8 @@
C0E3AA441209E2BA00A49D01 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Module.h; sourceTree = "<group>"; };
C0E3AA451209E2BA00A49D01 /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Module.cpp; sourceTree = "<group>"; };
C0E3AA481209E45000A49D01 /* ModuleCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModuleCF.cpp; sourceTree = "<group>"; };
+ C11E1692212B87C500985FF6 /* WKMockDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMockDisplay.h; sourceTree = "<group>"; };
+ C11E1693212B87C500985FF6 /* WKMockDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKMockDisplay.cpp; sourceTree = "<group>"; };
C181735E205839F600DFDA65 /* DrawingAreaMac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingAreaMac.cpp; sourceTree = "<group>"; };
C18173602058424700DFDA65 /* DisplayLink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayLink.h; sourceTree = "<group>"; };
C1817362205844A900DFDA65 /* DisplayLink.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayLink.cpp; sourceTree = "<group>"; };
@@ -7981,6 +7985,8 @@
C98C48A81B6FD5B500145103 /* WKMediaSessionFocusManager.h */,
C9CD43991B4B024200239E33 /* WKMediaSessionMetadata.cpp */,
C9CD439A1B4B024200239E33 /* WKMediaSessionMetadata.h */,
+ C11E1693212B87C500985FF6 /* WKMockDisplay.cpp */,
+ C11E1692212B87C500985FF6 /* WKMockDisplay.h */,
411A8DDA20DDB6050060D34F /* WKMockMediaDevice.cpp */,
411A8DD920DDB6050060D34F /* WKMockMediaDevice.h */,
C09AE5E8125257C20025825D /* WKNativeEvent.h */,
@@ -10070,6 +10076,7 @@
C98C48AA1B6FD5B500145103 /* WKMediaSessionFocusManager.h in Headers */,
C9CD439D1B4B024F00239E33 /* WKMediaSessionMetadata.h in Headers */,
1AB40EE61BF677E300BA81BE /* WKMenuItemIdentifiersPrivate.h in Headers */,
+ C11E1694212B87C500985FF6 /* WKMockDisplay.h in Headers */,
411A8DDB20DDD1AC0060D34F /* WKMockMediaDevice.h in Headers */,
BC4075FE124FF0270068F20A /* WKMutableArray.h in Headers */,
BC407600124FF0270068F20A /* WKMutableDictionary.h in Headers */,
@@ -11913,6 +11920,7 @@
C98C48A91B6FD5B500145103 /* WKMediaSessionFocusManager.cpp in Sources */,
C9CD439E1B4B025300239E33 /* WKMediaSessionMetadata.cpp in Sources */,
1AB40EE51BF677E300BA81BE /* WKMenuItemIdentifiers.mm in Sources */,
+ C11E1695212B87C500985FF6 /* WKMockDisplay.cpp in Sources */,
411A8DDC20DDD23F0060D34F /* WKMockMediaDevice.cpp in Sources */,
BC4075FD124FF0270068F20A /* WKMutableArray.cpp in Sources */,
BC4075FF124FF0270068F20A /* WKMutableDictionary.cpp in Sources */,
Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (235124 => 235125)
--- trunk/Source/WebKit/WebProcess/WebProcess.h 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h 2018-08-21 18:04:48 UTC (rev 235125)
@@ -383,6 +383,7 @@
void setScreenProperties(const WebCore::ScreenProperties&);
#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
void scrollerStylePreferenceChanged(bool useOverlayScrollbars);
+ void displayConfigurationChanged(CGDirectDisplayID, CGDisplayChangeSummaryFlags);
#endif
#endif
Modified: trunk/Source/WebKit/WebProcess/WebProcess.messages.in (235124 => 235125)
--- trunk/Source/WebKit/WebProcess/WebProcess.messages.in 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebKit/WebProcess/WebProcess.messages.in 2018-08-21 18:04:48 UTC (rev 235125)
@@ -133,6 +133,7 @@
SetScreenProperties(struct WebCore::ScreenProperties screenProperties)
#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
ScrollerStylePreferenceChanged(bool useOvelayScrollbars)
+ DisplayConfigurationChanged(CGDirectDisplayID displayID, CGDisplayChangeSummaryFlags flags)
#endif
#endif
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (235124 => 235125)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2018-08-21 18:04:48 UTC (rev 235125)
@@ -86,6 +86,7 @@
#endif
#if PLATFORM(MAC)
+#import <WebCore/GraphicsContext3DManager.h>
#import <WebCore/ScrollbarThemeMac.h>
#import <pal/spi/mac/NSScrollerImpSPI.h>
#endif
@@ -601,8 +602,13 @@
NSScrollerStyle style = useOverlayScrollbars ? NSScrollerStyleOverlay : NSScrollerStyleLegacy;
[NSScrollerImpPair _updateAllScrollerImpPairsForNewRecommendedScrollerStyle:style];
}
-#endif
+void WebProcess::displayConfigurationChanged(CGDirectDisplayID displayID, CGDisplayChangeSummaryFlags flags)
+{
+ GraphicsContext3DManager::displayWasReconfigured(displayID, flags, nullptr);
+}
+#endif
+
void WebProcess::setMediaMIMETypes(const Vector<String> types)
{
AVFoundationMIMETypeCache::singleton().setSupportedTypes(types);
Modified: trunk/Tools/ChangeLog (235124 => 235125)
--- trunk/Tools/ChangeLog 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Tools/ChangeLog 2018-08-21 18:04:48 UTC (rev 235125)
@@ -1,3 +1,20 @@
+2018-08-21 Per Arne Vollan <pvol...@apple.com>
+
+ [WebGL] Contexts are not updated when display configuration changed.
+ https://bugs.webkit.org/show_bug.cgi?id=188750
+
+ Reviewed by Brent Fulgham.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::sendDisplayConfigurationChangedMessageForTesting):
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
+
2018-08-21 John Wilander <wilan...@apple.com>
Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (235124 => 235125)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2018-08-21 18:04:48 UTC (rev 235125)
@@ -345,4 +345,6 @@
void injectUserScript(DOMString string);
readonly attribute unsigned long userScriptInjectedCount;
+
+ void sendDisplayConfigurationChangedMessageForTesting();
};
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (235124 => 235125)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2018-08-21 18:04:48 UTC (rev 235125)
@@ -2322,4 +2322,10 @@
WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get(), &returnData);
}
+void TestRunner::sendDisplayConfigurationChangedMessageForTesting()
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SendDisplayConfigurationChangedMessageForTesting"));
+ WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), nullptr, nullptr);
+}
+
} // namespace WTR
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (235124 => 235125)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2018-08-21 18:04:48 UTC (rev 235125)
@@ -462,6 +462,8 @@
size_t userScriptInjectedCount() const;
void injectUserScript(JSStringRef);
+ void sendDisplayConfigurationChangedMessageForTesting();
+
private:
TestRunner();
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (235124 => 235125)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2018-08-21 18:04:48 UTC (rev 235125)
@@ -43,6 +43,7 @@
#include <WebKit/WKFrameHandleRef.h>
#include <WebKit/WKFrameInfoRef.h>
#include <WebKit/WKIconDatabase.h>
+#include <WebKit/WKMockDisplay.h>
#include <WebKit/WKMockMediaDevice.h>
#include <WebKit/WKNavigationResponseRef.h>
#include <WebKit/WKNotification.h>
@@ -2969,4 +2970,9 @@
#endif
+void TestController::sendDisplayConfigurationChangedMessageForTesting()
+{
+ WKSendDisplayConfigurationChangedMessageForTesting(platformContext());
+}
+
} // namespace WTR
Modified: trunk/Tools/WebKitTestRunner/TestController.h (235124 => 235125)
--- trunk/Tools/WebKitTestRunner/TestController.h 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2018-08-21 18:04:48 UTC (rev 235125)
@@ -219,6 +219,8 @@
void resetMockMediaDevices();
void injectUserScript(WKStringRef);
+
+ void sendDisplayConfigurationChangedMessageForTesting();
private:
WKRetainPtr<WKPageConfigurationRef> generatePageConfiguration(WKContextConfigurationRef);
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (235124 => 235125)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2018-08-21 18:02:33 UTC (rev 235124)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2018-08-21 18:04:48 UTC (rev 235125)
@@ -1430,6 +1430,11 @@
return nullptr;
}
+ if (WKStringIsEqualToUTF8CString(messageName, "SendDisplayConfigurationChangedMessageForTesting")) {
+ TestController::singleton().sendDisplayConfigurationChangedMessageForTesting();
+ return nullptr;
+ }
+
ASSERT_NOT_REACHED();
return nullptr;
}