WebKit Bugzilla
Attachment 347587 Details for
Bug 188750
: [WebGL] Contexts are not updated when display configuration changed.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188750-20180820174609.patch (text/plain), 27.52 KB, created by
Per Arne Vollan
on 2018-08-20 17:46:10 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2018-08-20 17:46:10 PDT
Size:
27.52 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 235078) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,26 @@ >+2018-08-20 Per Arne Vollan <pvollan@apple.com> >+ >+ [WebGL] Contexts are not updated when display configuration changed. >+ https://bugs.webkit.org/show_bug.cgi?id=188750 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-20 Rob Buis <rbuis@igalia.com> > > Throw an exception if window.open() gets passed a URL that cannot be parsed >Index: Source/WebCore/WebCore.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebCore/WebCore.xcodeproj/project.pbxproj (revision 235078) >+++ Source/WebCore/WebCore.xcodeproj/project.pbxproj (working copy) >@@ -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 */; }; >Index: Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp >=================================================================== >--- Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp (revision 235078) >+++ Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp (working copy) >@@ -123,7 +123,7 @@ GraphicsContext3DManager& GraphicsContex > } > > #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 @@ void GraphicsContext3DManager::addContex > 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 @@ void GraphicsContext3DManager::removeCon > m_contextWindowMap.remove(context); > removeContextRequiringHighPerformance(context); > >-#if PLATFORM(MAC) >+#if PLATFORM(MAC) && !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) > if (!m_contexts.size()) > CGDisplayRemoveReconfigurationCallback(displayWasReconfigured, nullptr); > #endif >Index: Source/WebCore/platform/graphics/GraphicsContext3DManager.h >=================================================================== >--- Source/WebCore/platform/graphics/GraphicsContext3DManager.h (revision 235078) >+++ Source/WebCore/platform/graphics/GraphicsContext3DManager.h (working copy) >@@ -25,11 +25,12 @@ > > #pragma once > >-#include <Timer.h> >+#include <WebCore/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 @@ public: > > #if PLATFORM(MAC) > void screenDidChange(PlatformDisplayID, const HostWindow*); >+ WEBCORE_EXPORT static void displayWasReconfigured(CGDirectDisplayID, CGDisplayChangeSummaryFlags, void*); > #endif > > private: >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 235100) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,29 @@ >+2018-08-20 Per Arne Vollan <pvollan@apple.com> >+ >+ [WebGL] Contexts are not updated when display configuration changed. >+ https://bugs.webkit.org/show_bug.cgi?id=188750 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ >+ * UIProcess/API/C/mac/WKMockDisplay.cpp: Added. >+ (WKSendDisplayConfigurationChangedMessageForTesting): >+ * UIProcess/API/C/mac/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-20 Michael Catanzaro <mcatanzaro@igalia.com> > > [CMake] Sync unified build with Cocoa ports >Index: Source/WebKit/UIProcess/WebProcessPool.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebProcessPool.cpp (revision 235078) >+++ Source/WebKit/UIProcess/WebProcessPool.cpp (working copy) >@@ -831,8 +831,12 @@ RefPtr<WebProcessProxy> WebProcessPool:: > 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,18 @@ void WebProcessPool::resetMockMediaDevic > #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)); >+ } >+#else >+ ASSERT_NOT_REACHED(); >+#endif >+} >+ > } // namespace WebKit >Index: Source/WebKit/UIProcess/WebProcessPool.h >=================================================================== >--- Source/WebKit/UIProcess/WebProcessPool.h (revision 235078) >+++ Source/WebKit/UIProcess/WebProcessPool.h (working copy) >@@ -472,6 +472,8 @@ public: > void removeMockMediaDevice(const String& persistentId); > void resetMockMediaDevices(); > >+ void sendDisplayConfigurationChangedMessageForTesting(); >+ > private: > void platformInitialize(); > >Index: Source/WebKit/UIProcess/API/C/mac/WKMockDisplay.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/C/mac/WKMockDisplay.cpp (nonexistent) >+++ Source/WebKit/UIProcess/API/C/mac/WKMockDisplay.cpp (working copy) >@@ -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(); >+} >Index: Source/WebKit/UIProcess/API/C/mac/WKMockDisplay.h >=================================================================== >--- Source/WebKit/UIProcess/API/C/mac/WKMockDisplay.h (nonexistent) >+++ Source/WebKit/UIProcess/API/C/mac/WKMockDisplay.h (working copy) >@@ -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 >Index: Source/WebKit/WebKit.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebKit/WebKit.xcodeproj/project.pbxproj (revision 235078) >+++ Source/WebKit/WebKit.xcodeproj/project.pbxproj (working copy) >@@ -2021,6 +2021,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 */; }; >@@ -4795,6 +4797,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; name = WKMockDisplay.h; path = mac/WKMockDisplay.h; sourceTree = "<group>"; }; >+ C11E1693212B87C500985FF6 /* WKMockDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WKMockDisplay.cpp; path = mac/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>"; }; >@@ -7334,6 +7338,8 @@ > 9FB5F393169E6A80002C25BF /* WKContextPrivateMac.h */, > 9FB5F392169E6A80002C25BF /* WKContextPrivateMac.mm */, > 6EE849C61368D92D0038D481 /* WKInspectorPrivateMac.h */, >+ C11E1693212B87C500985FF6 /* WKMockDisplay.cpp */, >+ C11E1692212B87C500985FF6 /* WKMockDisplay.h */, > BCE17B7C1381F1170012A641 /* WKPagePrivateMac.h */, > BCE17B7B1381F1170012A641 /* WKPagePrivateMac.mm */, > 5272D4C71E735F0900EB4290 /* WKProtectionSpaceNS.h */, >@@ -10105,6 +10111,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 */, >@@ -11985,6 +11992,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 */, >Index: Source/WebKit/WebProcess/WebProcess.h >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.h (revision 235078) >+++ Source/WebKit/WebProcess/WebProcess.h (working copy) >@@ -383,6 +383,7 @@ private: > void setScreenProperties(const WebCore::ScreenProperties&); > #if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) > void scrollerStylePreferenceChanged(bool useOverlayScrollbars); >+ void displayConfigurationChanged(CGDirectDisplayID, CGDisplayChangeSummaryFlags); > #endif > #endif > >Index: Source/WebKit/WebProcess/WebProcess.messages.in >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.messages.in (revision 235078) >+++ Source/WebKit/WebProcess/WebProcess.messages.in (working copy) >@@ -133,6 +133,7 @@ messages -> WebProcess LegacyReceiver { > SetScreenProperties(struct WebCore::ScreenProperties screenProperties) > #if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) > ScrollerStylePreferenceChanged(bool useOvelayScrollbars) >+ DisplayConfigurationChanged(CGDirectDisplayID displayID, CGDisplayChangeSummaryFlags flags) > #endif > #endif > >Index: Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >=================================================================== >--- Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (revision 235078) >+++ Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (working copy) >@@ -86,6 +86,7 @@ > #endif > > #if PLATFORM(MAC) >+#import <WebCore/GraphicsContext3DManager.h> > #import <WebCore/ScrollbarThemeMac.h> > #import <pal/spi/mac/NSScrollerImpSPI.h> > #endif >@@ -601,7 +602,12 @@ void WebProcess::scrollerStylePreference > 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) > { >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 235100) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2018-08-20 Per Arne Vollan <pvollan@apple.com> >+ >+ [WebGL] Contexts are not updated when display configuration changed. >+ https://bugs.webkit.org/show_bug.cgi?id=188750 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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-20 Jonathan Bedard <jbedard@apple.com> > > WebKitTestRunner: Add watchOS entitlements >Index: Tools/WebKitTestRunner/TestController.cpp >=================================================================== >--- Tools/WebKitTestRunner/TestController.cpp (revision 235078) >+++ Tools/WebKitTestRunner/TestController.cpp (working copy) >@@ -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> >@@ -2960,4 +2961,9 @@ void TestController::injectUserScript(WK > > #endif > >+void TestController::sendDisplayConfigurationChangedMessageForTesting() >+{ >+ WKSendDisplayConfigurationChangedMessageForTesting(platformContext()); >+} >+ > } // namespace WTR >Index: Tools/WebKitTestRunner/TestController.h >=================================================================== >--- Tools/WebKitTestRunner/TestController.h (revision 235078) >+++ Tools/WebKitTestRunner/TestController.h (working copy) >@@ -218,6 +218,8 @@ public: > void resetMockMediaDevices(); > > void injectUserScript(WKStringRef); >+ >+ void sendDisplayConfigurationChangedMessageForTesting(); > > private: > WKRetainPtr<WKPageConfigurationRef> generatePageConfiguration(WKContextConfigurationRef); >Index: Tools/WebKitTestRunner/TestInvocation.cpp >=================================================================== >--- Tools/WebKitTestRunner/TestInvocation.cpp (revision 235078) >+++ Tools/WebKitTestRunner/TestInvocation.cpp (working copy) >@@ -1415,6 +1415,11 @@ WKRetainPtr<WKTypeRef> TestInvocation::d > return nullptr; > } > >+ if (WKStringIsEqualToUTF8CString(messageName, "SendDisplayConfigurationChangedMessageForTesting")) { >+ TestController::singleton().sendDisplayConfigurationChangedMessageForTesting(); >+ return nullptr; >+ } >+ > ASSERT_NOT_REACHED(); > return nullptr; > } >Index: Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp >=================================================================== >--- Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (revision 235078) >+++ Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (working copy) >@@ -2296,4 +2296,10 @@ void TestRunner::injectUserScript(JSStri > 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 >Index: Tools/WebKitTestRunner/InjectedBundle/TestRunner.h >=================================================================== >--- Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (revision 235078) >+++ Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (working copy) >@@ -461,6 +461,8 @@ public: > size_t userScriptInjectedCount() const; > void injectUserScript(JSStringRef); > >+ void sendDisplayConfigurationChangedMessageForTesting(); >+ > private: > TestRunner(); > >Index: Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl >=================================================================== >--- Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (revision 235078) >+++ Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (working copy) >@@ -344,4 +344,6 @@ interface TestRunner { > > void injectUserScript(DOMString string); > readonly attribute unsigned long userScriptInjectedCount; >+ >+ void sendDisplayConfigurationChangedMessageForTesting(); > }; >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 235100) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-08-20 Per Arne Vollan <pvollan@apple.com> >+ >+ [WebGL] Contexts are not updated when display configuration changed. >+ https://bugs.webkit.org/show_bug.cgi?id=188750 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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-20 Jeremy Jones <jeremyj@apple.com> > > Enable ios media tests that were blocked on user gesture. >Index: LayoutTests/TestExpectations >=================================================================== >--- LayoutTests/TestExpectations (revision 235078) >+++ LayoutTests/TestExpectations (working copy) >@@ -2222,3 +2222,6 @@ webkit.org/b/187762 http/tests/websocket > 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 ] >Index: LayoutTests/fast/canvas/webgl/context-update-on-display-configuration-expected.txt >=================================================================== >--- LayoutTests/fast/canvas/webgl/context-update-on-display-configuration-expected.txt (nonexistent) >+++ LayoutTests/fast/canvas/webgl/context-update-on-display-configuration-expected.txt (working copy) >@@ -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 >+ >Index: LayoutTests/fast/canvas/webgl/context-update-on-display-configuration.html >=================================================================== >--- LayoutTests/fast/canvas/webgl/context-update-on-display-configuration.html (nonexistent) >+++ LayoutTests/fast/canvas/webgl/context-update-on-display-configuration.html (working copy) >@@ -0,0 +1,39 @@ >+<html> >+<head> >+<style> >+#example { >+ width: 100%; >+ height: 100%; >+} >+</style> >+<script src="../../../resources/js-test.js"></script> >+<script src="resources/webgl-test-utils.js"> </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> >+ >Index: LayoutTests/platform/mac-wk2/TestExpectations >=================================================================== >--- LayoutTests/platform/mac-wk2/TestExpectations (revision 235078) >+++ LayoutTests/platform/mac-wk2/TestExpectations (working copy) >@@ -846,3 +846,5 @@ webkit.org/b/183705 http/tests/workers/s > 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 ] >+ >+fast/canvas/webgl/context-update-on-display-configuration.html [ Pass ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188750
:
347540
|
347567
|
347587
|
347589
|
347594
|
347596
|
347608
|
347642
|
347646
|
347650