[webkit-changes] [295515] trunk

2022-06-13 Thread jya
Title: [295515] trunk








Revision 295515
Author j...@apple.com
Date 2022-06-13 21:46:20 -0700 (Mon, 13 Jun 2022)


Log Message
REGRESSION (251426@main): [ macOS Debug wk2 ] http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=241572
rdar://problem/95059414

Reviewed by Cameron McCormack.

In bug 241455 it was incorrectly assumed that checking that the IPCHandle was null
was a sufficient test to check the validity of the reply. However, this ignore the
fact that the IPC decoder will assert if the size isn't valid.
So rather than returning a Handle directly, we return an optional instead.

Covered by the existing test.

* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp:
(WebKit::RemoteMediaResourceManager::dataReceived):
* Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.h:
* Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.messages.in:
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:
(WebKit::RemoteSourceBufferProxy::append):
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h:
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in:
* Source/WebKit/WebProcess/GPU/media/RemoteMediaResourceProxy.cpp:
(WebKit::RemoteMediaResourceProxy::dataReceived):
* Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
(WebKit::SourceBufferPrivateRemote::append):

Canonical link: https://commits.webkit.org/251520@main

Modified Paths

trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp
trunk/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.h
trunk/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.messages.in
trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp
trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h
trunk/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in
trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaResourceProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp




Diff

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (295514 => 295515)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-06-14 03:34:12 UTC (rev 295514)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-06-14 04:46:20 UTC (rev 295515)
@@ -1027,7 +1027,7 @@
 
 webkit.org/b/207631 tiled-drawing/scrolling/fixed/fixed-during-rubberband.html [ Pass ImageOnlyFailure ]
 
-webkit.org/b/207635 fast/events/before-input-prevent-insert-replacement.html [ Pass Failure ] 
+webkit.org/b/207635 fast/events/before-input-prevent-insert-replacement.html [ Pass Failure ]
 
 webkit.org/b/207728 [ Release ] accessibility/press-targets-center-point.html [ Pass Failure ]
 
@@ -1381,7 +1381,7 @@
 
 webkit.org/b/224633 media/presentationmodechanged-fired-once.html [ Pass Timeout ]
 
-webkit.org/b/228713 [ BigSur Debug arm64 ] compositing/video/video-object-fit.html [ Pass Timeout ] 
+webkit.org/b/228713 [ BigSur Debug arm64 ] compositing/video/video-object-fit.html [ Pass Timeout ]
 
 webkit.org/b/224698 [ BigSur Release arm64 ] inspector/console/console-oom.html [ Pass Crash ]
 
@@ -1389,7 +1389,7 @@
 
 webkit.org/b/238033 imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-050.html [ Pass Failure ]
 
-webkit.org/b/224963 [ BigSur arm64 ] webrtc/captureCanvas-webrtc.html [ Pass Timeout ] 
+webkit.org/b/224963 [ BigSur arm64 ] webrtc/captureCanvas-webrtc.html [ Pass Timeout ]
 
 webkit.org/b/225430 [ BigSur arm64 ] http/tests/inspector/network/resource-sizes-network.html [ Pass Failure ]
 
@@ -1721,5 +1721,3 @@
 webkit.org/b/241265 [ Debug ] imported/w3c/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-object-percentage.html [ Pass Crash ]
 
 webkit.org/b/241283 fast/animation/request-animation-frame-throttling-detached-iframe.html [ Pass Failure ]
-
-webkit.org/b/241572 [ Debug ] http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html [ Pass Crash ]


Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp (295514 => 295515)

--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp	2022-06-14 03:34:12 UTC (rev 295514)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp	2022-06-14 04:46:20 UTC (rev 295515)
@@ -91,12 +91,15 @@
 resource->dataSent(bytesSent, totalBytesToBeSent);
 }
 
-void RemoteMediaResourceManager::dataReceived(RemoteMediaResourceIdentifier identifier, IPC::SharedBufferReference&& buffer, CompletionHandler&& completionHandler)
+void RemoteMediaResourceManager::dataReceived(RemoteMediaResourceIdentifier identifier, IPC::SharedBufferReference&& buffer, CompletionHandler&&)>&& completionHandler)
 {
 SharedMemory::Handle handle;
 
 auto invokeCallbackAtScopeExit = 

[webkit-changes] [295514] trunk

2022-06-13 Thread Hironori . Fujii
Title: [295514] trunk








Revision 295514
Author hironori.fu...@sony.com
Date 2022-06-13 20:34:12 -0700 (Mon, 13 Jun 2022)


Log Message
TextureMapper: if an element has both a mask image and reflection, the part of the reflection isn't painted
https://bugs.webkit.org/show_bug.cgi?id=241257

Reviewed by Don Olmstead.

If an element has both a mask image and reflection, the mask should be
applied both for the reflection and the real layers. However,
TextureMapper was using a single intermediate surface for painting the
reflection and the real layers.
1. Painting the reflection layer
2. Applying the mask to the reflection layer
3. Painting the real layer
4. Applying the mask to the real layer
In the step#4, if the mask layer is larger than the element rect, the
mask was unexpectedly applied to the part of the reflection.

The reflection and the real layers should be painted and masked
separately using intermediate surfaces. If the element has opacity,
they should have another intermediate surface to blend together with
the destination.

* LayoutTests/compositing/reflections/mask-and-reflection-expected.html: Added.
* LayoutTests/compositing/reflections/mask-and-reflection.html: Added.
* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::shouldBlend const):
(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):
(WebCore::TextureMapperLayer::paintSelfChildrenFilterAndMask):
(WebCore::TextureMapperLayer::paintIntoSurface):
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):
(WebCore::TextureMapperLayer::paintSelfAndChildrenWithIntermediateSurface):
(WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask):
(WebCore::TextureMapperLayer::paintRecursive):
(WebCore::TextureMapperLayer::setMaskLayer):
* Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h:

Canonical link: https://commits.webkit.org/251519@main

Modified Paths

trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h


Added Paths

trunk/LayoutTests/compositing/reflections/mask-and-reflection-expected.html
trunk/LayoutTests/compositing/reflections/mask-and-reflection.html




Diff

Added: trunk/LayoutTests/compositing/reflections/mask-and-reflection-expected.html (0 => 295514)

--- trunk/LayoutTests/compositing/reflections/mask-and-reflection-expected.html	(rev 0)
+++ trunk/LayoutTests/compositing/reflections/mask-and-reflection-expected.html	2022-06-14 03:34:12 UTC (rev 295514)
@@ -0,0 +1,29 @@
+
+
+
+
+.outer {
+width: 100px;
+height: 100px;
+-webkit-box-reflect: below 10px;
+}
+
+.inner {
+width: 100px;
+height: 100px;
+-webkit-box-reflect: right 10px;
+background-color: green;
+will-change: transform;
+-webkit-mask-image: linear-gradient(-45deg, black, transparent);
+mask-image: linear-gradient(-45deg, black, transparent);
+}
+
+
+
+You should see four mirrored square boxes with linear gradient green.
+
+
+
+
+
+


Added: trunk/LayoutTests/compositing/reflections/mask-and-reflection.html (0 => 295514)

--- trunk/LayoutTests/compositing/reflections/mask-and-reflection.html	(rev 0)
+++ trunk/LayoutTests/compositing/reflections/mask-and-reflection.html	2022-06-14 03:34:12 UTC (rev 295514)
@@ -0,0 +1,40 @@
+
+
+
+
+.outer {
+width: 100px;
+height: 100px;
+-webkit-box-reflect: below 10px;
+}
+
+.inner {
+width: 100px;
+height: 100px;
+-webkit-box-reflect: right 10px;
+background-color: green;
+will-change: transform;
+-webkit-mask-image: linear-gradient(-45deg, black, transparent);
+mask-image: linear-gradient(-45deg, black, transparent);
+}
+
+.child {
+position: relative;
+top: 100px;
+left: 100px;
+width: 100px;
+height: 100px;
+background-color: blue;
+}
+
+
+
+You should see four mirrored square boxes with linear gradient green.
+
+
+
+
+
+
+
+


Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (295513 => 295514)

--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2022-06-14 03:10:02 UTC (rev 295513)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2022-06-14 03:34:12 UTC (rev 

[webkit-changes] [295513] trunk/Source/WebCore/rendering/RenderThemePlayStation.h

2022-06-13 Thread don . olmstead
Title: [295513] trunk/Source/WebCore/rendering/RenderThemePlayStation.h








Revision 295513
Author don.olmst...@sony.com
Date 2022-06-13 20:10:02 -0700 (Mon, 13 Jun 2022)


Log Message
Build fix for PlayStation after r295476
https://bugs.webkit.org/show_bug.cgi?id=241582

Reviewed by Myles C. Maxfield.

In r295476 RenderThemePlayStation::system implementation was removed but the declaration was still
present.

* Source/WebCore/rendering/RenderThemePlayStation.h:

Canonical link: https://commits.webkit.org/251518@main

Modified Paths

trunk/Source/WebCore/rendering/RenderThemePlayStation.h




Diff

Modified: trunk/Source/WebCore/rendering/RenderThemePlayStation.h (295512 => 295513)

--- trunk/Source/WebCore/rendering/RenderThemePlayStation.h	2022-06-14 02:30:24 UTC (rev 295512)
+++ trunk/Source/WebCore/rendering/RenderThemePlayStation.h	2022-06-14 03:10:02 UTC (rev 295513)
@@ -33,9 +33,6 @@
 class RenderThemePlayStation final : public RenderTheme {
 public:
 friend NeverDestroyed;
-
-private:
-FontCascadeDescription systemFont(CSSValueID systemFontID) const final;
 };
 
 } // namespace WebCore






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295511] trunk

2022-06-13 Thread yurys
Title: [295511] trunk








Revision 295511
Author yu...@chromium.org
Date 2022-06-13 19:24:27 -0700 (Mon, 13 Jun 2022)


Log Message
[WPE][GTK] REGRESSION (r294381): WPEWebProcess leak after closing browser
https://bugs.webkit.org/show_bug.cgi?id=241353

Reviewed by Alex Christensen.

Do not keep strong reference to WebPageProxy in the async IPC callback, instead
use WeakPtr to let the page be destroyed if necessary, otherwise the page may
keep its process pool alive after the page was closed.

* Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp: exposed a couple of internal
methods for testing the behavior.
(webkitWebViewForceRepaintForTesting):
(webkitSetCachedProcessSuspensionDelayForTesting):
* Source/WebKit/UIProcess/API/glib/WebKitWebViewInternal.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint): replaced strong reference in the callback with
a weak one.
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(testNoWebProcessLeakAfterWebKitWebContextDestroy): new test that makes sure that outstanding
async IPC callbacks are run when page and its context are destroyed.
(beforeAll):
* Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::waitUntilLoadFinished):
* Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:

Canonical link: https://commits.webkit.org/251516@main

Modified Paths

trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebViewInternal.h
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp
trunk/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp
trunk/Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h




Diff

Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp (295510 => 295511)

--- trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp	2022-06-14 01:17:18 UTC (rev 295510)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp	2022-06-14 02:24:27 UTC (rev 295511)
@@ -5051,3 +5051,17 @@
 
 webkitWebViewConfigureMediaCapture(webView, WebCore::MediaProducerMediaCaptureKind::Display, state);
 }
+
+void webkitWebViewForceRepaintForTesting(WebKitWebView* webView, ForceRepaintCallback callback, gpointer userData)
+{
+g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
+
+getPage(webView).forceRepaint([callback, userData]() {
+callback(userData);
+});
+}
+
+void webkitSetCachedProcessSuspensionDelayForTesting(double seconds)
+{
+WebKit::WebsiteDataStore::setCachedProcessSuspensionDelayForTesting(Seconds(seconds));
+}


Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitWebViewInternal.h (295510 => 295511)

--- trunk/Source/WebKit/UIProcess/API/glib/WebKitWebViewInternal.h	2022-06-14 01:17:18 UTC (rev 295510)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitWebViewInternal.h	2022-06-14 02:24:27 UTC (rev 295511)
@@ -27,3 +27,6 @@
 typedef struct _WebKitWebView WebKitWebView;
 
 WK_EXPORT void webkitWebViewRunJavascriptWithoutForcedUserGestures(WebKitWebView*, const gchar*, GCancellable*, GAsyncReadyCallback, gpointer);
+typedef void (*ForceRepaintCallback) (gpointer userData);
+WK_EXPORT void webkitWebViewForceRepaintForTesting(WebKitWebView*, ForceRepaintCallback, gpointer userData);
+WK_EXPORT void webkitSetCachedProcessSuspensionDelayForTesting(double seconds);


Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (295510 => 295511)

--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2022-06-14 01:17:18 UTC (rev 295510)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2022-06-14 02:24:27 UTC (rev 295511)
@@ -4577,10 +4577,13 @@
 
 m_drawingArea->waitForBackingStoreUpdateOnNextPaint();
 
-sendWithAsyncReply(Messages::WebPage::ForceRepaint(), [this, protectedThis = Ref { *this }, callback = WTFMove(callback)] () mutable {
-callAfterNextPresentationUpdate([callback = WTFMove(callback)] (auto) mutable {
+sendWithAsyncReply(Messages::WebPage::ForceRepaint(), [weakThis = WeakPtr { *this }, callback = WTFMove(callback)] () mutable {
+if (weakThis) {
+weakThis->callAfterNextPresentationUpdate([callback = WTFMove(callback)] (auto) mutable {
+callback();
+});
+} else
 callback();
-});
 });
 }
 


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp (295510 => 295511)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp	2022-06-14 01:17:18 UTC (rev 295510)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp	2022-06-14 02:24:27 UTC (rev 295511)
@@ -21,6 +21,7 @@
 
 #include "LoadTrackingTest.h"
 #include "WebKitTestServer.h"
+#include "WebKitWebViewInternal.h"
 #include 
 #include 
 #include 
@@ -1043,6 +1044,32 @@
 g_assert_cmpstr(WebViewTest::_javascript_ResultToCString(_javascript_Result), ==, "Europe/Berlin, Europe/Berlin, Europe/Berlin, Europe/Berlin");
 }
 
+static void 

[webkit-changes] [295510] trunk/Source

2022-06-13 Thread pvollan
Title: [295510] trunk/Source








Revision 295510
Author pvol...@apple.com
Date 2022-06-13 18:17:18 -0700 (Mon, 13 Jun 2022)


Log Message
[Catalyst] Fix build
https://bugs.webkit.org/show_bug.cgi?id=241573


Reviewed by Wenson Hsieh.

The function CGSSetDenyWindowServerConnections has not been declared.

* Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:
* Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm:

Canonical link: https://commits.webkit.org/251515@main

Modified Paths

trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h
trunk/Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm




Diff

Modified: trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h (295509 => 295510)

--- trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h	2022-06-14 01:00:05 UTC (rev 295509)
+++ trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h	2022-06-14 01:17:18 UTC (rev 295510)
@@ -368,7 +368,6 @@
 size_t CGDisplayModeGetPixelsWide(CGDisplayModeRef);
 size_t CGDisplayModeGetPixelsHigh(CGDisplayModeRef);
 
-CGError CGSSetDenyWindowServerConnections(bool);
 typedef int32_t CGSDisplayID;
 CGSDisplayID CGSMainDisplayID(void);
 
@@ -375,6 +374,10 @@
 IOHIDEventRef CGEventCopyIOHIDEvent(CGEventRef);
 #endif // PLATFORM(MAC)
 
+#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
+CGError CGSSetDenyWindowServerConnections(bool);
+#endif
+
 #if ENABLE(PDFKIT_PLUGIN) && !USE(APPLE_INTERNAL_SDK)
 
 extern const off_t kCGDataProviderIndeterminateSize;


Modified: trunk/Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm (295509 => 295510)

--- trunk/Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm	2022-06-14 01:00:05 UTC (rev 295509)
+++ trunk/Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm	2022-06-14 01:17:18 UTC (rev 295510)
@@ -32,6 +32,7 @@
 #import 
 #import 
 #import 
+#import 
 #import 
 #import 
 #import 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295509] trunk/Source/JavaScriptCore/jsc.cpp

2022-06-13 Thread ross . kirsling
Title: [295509] trunk/Source/_javascript_Core/jsc.cpp








Revision 295509
Author ross.kirsl...@sony.com
Date 2022-06-13 18:00:05 -0700 (Mon, 13 Jun 2022)


Log Message
jsc.exe --module-file should understand Windows paths
https://bugs.webkit.org/show_bug.cgi?id=241518

Reviewed by Yusuke Suzuki.

jsc.cpp's module loader was written without any accommodation for Windows, so:
1. On Windows, recognize C:\foo as an absolute path and .\foo and ..\foo as dotted relative paths (allowing '/' too).
2. On all platforms, stop misusing the URL(base, relative) constructor. This isn't the way to add file:/// to an abspath.

This ensures that module tests are able to run well on Windows.

* Source/_javascript_Core/jsc.cpp:
(isAbsolutePath): Added.
(isDottedRelativePath): Added.
(absoluteFileURL): Renamed from `absolutePath`.
(GlobalObject::moduleLoaderImportModule):
(GlobalObject::moduleLoaderResolve):
(JSC_DEFINE_HOST_FUNCTION):
(computeFilePath):
(runWithOptions):

Canonical link: https://commits.webkit.org/251514@main

Modified Paths

trunk/Source/_javascript_Core/jsc.cpp




Diff

Modified: trunk/Source/_javascript_Core/jsc.cpp (295508 => 295509)

--- trunk/Source/_javascript_Core/jsc.cpp	2022-06-14 00:41:13 UTC (rev 295508)
+++ trunk/Source/_javascript_Core/jsc.cpp	2022-06-14 01:00:05 UTC (rev 295509)
@@ -844,8 +844,40 @@
 return URL::fileURLWithFileSystemPath(directoryString);
 }
 
-static URL absolutePath(const String& fileName)
+// FIXME: We may wish to support module specifiers beginning with a (back)slash on Windows. We could either:
+// - align with V8 and SM:  treat '/foo' as './foo'
+// - align with PowerShell: treat '/foo' as 'C:/foo'
+static bool isAbsolutePath(StringView path)
 {
+#if OS(WINDOWS)
+// Just look for local drives like C:\.
+return path.length() > 2 && isASCIIAlpha(path[0]) && path[1] == ':' && (path[2] == '\\' || path[2] == '/');
+#else
+return path.startsWith('/');
+#endif
+}
+
+static bool isDottedRelativePath(StringView path)
+{
+#if OS(WINDOWS)
+auto length = path.length();
+if (length < 2 || path[0] != '.')
+return false;
+
+if (path[1] == '/' || path[1] == '\\')
+return true;
+
+return length > 2 && path[1] == '.' && (path[2] == '/' || path[2] == '\\');
+#else
+return path.startsWith("./"_s) || path.startsWith("../"_s);
+#endif
+}
+
+static URL absoluteFileURL(const String& fileName)
+{
+if (isAbsolutePath(fileName))
+return URL::fileURLWithFileSystemPath(fileName);
+
 auto directoryName = currentWorkingDirectory();
 if (!directoryName.isValid())
 return URL::fileURLWithFileSystemPath(fileName);
@@ -872,10 +904,11 @@
 if (!referrer.isLocalFile())
 RELEASE_AND_RETURN(scope, rejectWithError(createError(globalObject, makeString("Could not resolve the referrer's path '", referrer.string(), "', while trying to resolve module '", specifier, "'.";
 
-if (!specifier.startsWith('/') && !specifier.startsWith("./"_s) && !specifier.startsWith("../"_s))
-RELEASE_AND_RETURN(scope, rejectWithError(createTypeError(globalObject, makeString("Module specifier, '"_s, specifier, "' does not start with \"/\", \"./\", or \"../\". Referenced from: "_s, referrer.fileSystemPath();
+bool specifierIsAbsolute = isAbsolutePath(specifier);
+if (!specifierIsAbsolute && !isDottedRelativePath(specifier))
+RELEASE_AND_RETURN(scope, rejectWithError(createTypeError(globalObject, makeString("Module specifier, '"_s, specifier, "' is not absolute and does not start with \"./\" or \"../\". Referenced from: "_s, referrer.fileSystemPath();
 
-URL moduleURL(referrer, specifier);
+auto moduleURL = specifierIsAbsolute ? URL::fileURLWithFileSystemPath(specifier) : URL(referrer, specifier);
 if (!moduleURL.isLocalFile())
 RELEASE_AND_RETURN(scope, rejectWithError(createError(globalObject, makeString("Module url, '", moduleURL.string(), "' does not map to a local file.";
 
@@ -899,8 +932,9 @@
 
 auto resolvePath = [&] (const URL& directoryURL) -> Identifier {
 String specifier = key.impl();
-if (!specifier.startsWith('/') && !specifier.startsWith("./"_s) && !specifier.startsWith("../"_s)) {
-throwTypeError(globalObject, scope, makeString("Module specifier, '"_s, specifier, "' does not start with \"/\", \"./\", or \"../\". Referenced from: "_s, directoryURL.fileSystemPath()));
+bool specifierIsAbsolute = isAbsolutePath(specifier);
+if (!specifierIsAbsolute && !isDottedRelativePath(specifier)) {
+throwTypeError(globalObject, scope, makeString("Module specifier, '"_s, specifier, "' is not absolute and does not start with \"./\" or \"../\". Referenced from: "_s, directoryURL.fileSystemPath()));
 return { };
 }
 
@@ -909,7 +943,7 @@
 return { };
 }
 
-URL resolvedURL(directoryURL, specifier);
+auto resolvedURL = specifierIsAbsolute ? 

[webkit-changes] [295508] trunk/Source/WebKit/WebProcess/Storage/ WebServiceWorkerFetchTaskClient.h

2022-06-13 Thread yurys
Title: [295508] trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h








Revision 295508
Author yu...@chromium.org
Date 2022-06-13 17:41:13 -0700 (Mon, 13 Jun 2022)


Log Message
error: field ‘m_preloadResponse’ has incomplete type ‘WebCore::ResourceResponse’
https://bugs.webkit.org/show_bug.cgi?id=241579

Reviewed by Michael Catanzaro.

Fix WPE compilation.

* Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h: include missing header.

Canonical link: https://commits.webkit.org/251513@main

Modified Paths

trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h




Diff

Modified: trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h (295507 => 295508)

--- trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h	2022-06-14 00:37:03 UTC (rev 295507)
+++ trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h	2022-06-14 00:41:13 UTC (rev 295508)
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295506] trunk/Source

2022-06-13 Thread j_pascoe
Title: [295506] trunk/Source








Revision 295506
Author j_pas...@apple.com
Date 2022-06-13 17:21:10 -0700 (Mon, 13 Jun 2022)


Log Message
[WebAuthn] CTAP2_ERR_USER_ACTION_TIMEOUT isn't handled properly
https://bugs.webkit.org/show_bug.cgi?id=241565
rdar://95040155

Reviewed by Brent Fulgham.

Authenticators will time out operations after so many seconds of
waiting for user interaction, returning an error of
CTAP2_ERR_USER_ACTION_TIMEOUT. This patch handles that error
by reissuing the request, instead of letting it go to U2F fallback
and failing there with "no credentials found."

Tested with a Yubikey 5c.

* Source/WebCore/Modules/webauthn/fido/FidoConstants.cpp:
(fido::isCtapDeviceResponseCode):
* Source/WebCore/Modules/webauthn/fido/FidoConstants.h:
* Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived):
(WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):

Canonical link: https://commits.webkit.org/251511@main

Modified Paths

trunk/Source/WebCore/Modules/webauthn/fido/FidoConstants.cpp
trunk/Source/WebCore/Modules/webauthn/fido/FidoConstants.h
trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp




Diff

Modified: trunk/Source/WebCore/Modules/webauthn/fido/FidoConstants.cpp (295505 => 295506)

--- trunk/Source/WebCore/Modules/webauthn/fido/FidoConstants.cpp	2022-06-13 23:42:46 UTC (rev 295505)
+++ trunk/Source/WebCore/Modules/webauthn/fido/FidoConstants.cpp	2022-06-14 00:21:10 UTC (rev 295506)
@@ -82,6 +82,7 @@
 case CtapDeviceResponseCode::kCtap2ErrPinPolicyViolation:
 case CtapDeviceResponseCode::kCtap2ErrPinTokenExpired:
 case CtapDeviceResponseCode::kCtap2ErrRequestTooLarge:
+case CtapDeviceResponseCode::kCtap2ErrActionTimeout:
 case CtapDeviceResponseCode::kCtap2ErrOther:
 case CtapDeviceResponseCode::kCtap2ErrSpecLast:
 case CtapDeviceResponseCode::kCtap2ErrExtensionFirst:


Modified: trunk/Source/WebCore/Modules/webauthn/fido/FidoConstants.h (295505 => 295506)

--- trunk/Source/WebCore/Modules/webauthn/fido/FidoConstants.h	2022-06-13 23:42:46 UTC (rev 295505)
+++ trunk/Source/WebCore/Modules/webauthn/fido/FidoConstants.h	2022-06-14 00:21:10 UTC (rev 295506)
@@ -98,6 +98,7 @@
 kCtap2ErrPinPolicyViolation = 0x37,
 kCtap2ErrPinTokenExpired = 0x38,
 kCtap2ErrRequestTooLarge = 0x39,
+kCtap2ErrActionTimeout = 0x3A,
 kCtap2ErrOther = 0x7F,
 kCtap2ErrSpecLast = 0xDF,
 kCtap2ErrExtensionFirst = 0xE0,


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp (295505 => 295506)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp	2022-06-13 23:42:46 UTC (rev 295505)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp	2022-06-14 00:21:10 UTC (rev 295506)
@@ -119,6 +119,11 @@
 if (!response) {
 auto error = getResponseCode(data);
 
+if (error == CtapDeviceResponseCode::kCtap2ErrActionTimeout) {
+makeCredential();
+return;
+}
+
 if (error == CtapDeviceResponseCode::kCtap2ErrCredentialExcluded) {
 receiveRespond(ExceptionData { InvalidStateError, "At least one credential matches an entry of the excludeCredentials list in the authenticator."_s });
 return;
@@ -173,6 +178,11 @@
 if (!response) {
 auto error = getResponseCode(data);
 
+if (error == CtapDeviceResponseCode::kCtap2ErrActionTimeout) {
+getAssertion();
+return;
+}
+
 if (!isPinError(error) && tryDowngrade())
 return;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295505] trunk/metadata/contributors.json

2022-06-13 Thread clopez
Title: [295505] trunk/metadata/contributors.json








Revision 295505
Author clo...@igalia.com
Date 2022-06-13 16:42:46 -0700 (Mon, 13 Jun 2022)


Log Message
Add clopez github account to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=241578

Unreviewed.

* metadata/contributors.json:

Canonical link: https://commits.webkit.org/251510@main

Modified Paths

trunk/metadata/contributors.json




Diff

Modified: trunk/metadata/contributors.json (295504 => 295505)

--- trunk/metadata/contributors.json	2022-06-13 22:48:33 UTC (rev 295504)
+++ trunk/metadata/contributors.json	2022-06-13 23:42:46 UTC (rev 295505)
@@ -1327,6 +1327,7 @@
  "clo...@igalia.com"
   ],
   "expertise" : "The WebKitGTK and WPE ports, Tools, Build/test infrastructure",
+  "github" : "clopez",
   "name" : "Carlos Alberto Lopez Perez",
   "nicks" : [
  "clopez"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295504] trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm

2022-06-13 Thread simon . fraser
Title: [295504] trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm








Revision 295504
Author simon.fra...@apple.com
Date 2022-06-13 15:48:33 -0700 (Mon, 13 Jun 2022)


Log Message
CrashTracer: MobileSafari at WebKit: -[WKWebView(WKViewInternalIOS) _updateScrollViewForTransaction:]
https://bugs.webkit.org/show_bug.cgi?id=241563


Reviewed by Wenson Hsieh.

Protect against a null root scrolling node.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _updateScrollViewForTransaction:]):

Canonical link: https://commits.webkit.org/251509@main

Modified Paths

trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm




Diff

Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (295503 => 295504)

--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2022-06-13 22:33:43 UTC (rev 295503)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2022-06-13 22:48:33 UTC (rev 295504)
@@ -876,9 +876,17 @@
 [_scrollView setMinimumZoomScale:layerTreeTransaction.minimumScaleFactor()];
 [_scrollView setMaximumZoomScale:layerTreeTransaction.maximumScaleFactor()];
 [_scrollView _setZoomEnabledInternal:layerTreeTransaction.allowsUserScaling()];
-auto rootNode = _page->scrollingCoordinatorProxy()->rootNode();
-WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateScrollViewForOverscrollBehavior(_scrollView.get(), rootNode->horizontalOverscrollBehavior(), rootNode->verticalOverscrollBehavior(), WebKit::ScrollingTreeScrollingNodeDelegateIOS::AllowOverscrollToPreventScrollPropagation::No);
 
+auto horizontalOverscrollBehavior = WebCore::OverscrollBehavior::Auto;
+auto verticalOverscrollBehavior = WebCore::OverscrollBehavior::Auto;
+
+if (auto rootNode = _page->scrollingCoordinatorProxy()->rootNode()) {
+horizontalOverscrollBehavior = rootNode->horizontalOverscrollBehavior();
+verticalOverscrollBehavior = rootNode->verticalOverscrollBehavior();
+}
+
+WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateScrollViewForOverscrollBehavior(_scrollView.get(), horizontalOverscrollBehavior, verticalOverscrollBehavior, WebKit::ScrollingTreeScrollingNodeDelegateIOS::AllowOverscrollToPreventScrollPropagation::No);
+
 bool hasDockedInputView = !CGRectIsEmpty(_inputViewBoundsInWindow);
 bool isZoomed = layerTreeTransaction.pageScaleFactor() > layerTreeTransaction.initialScaleFactor();
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295503] trunk/LayoutTests/platform/mac-wk2/TestExpectations

2022-06-13 Thread rackler
Title: [295503] trunk/LayoutTests/platform/mac-wk2/TestExpectations








Revision 295503
Author rack...@apple.com
Date 2022-06-13 15:33:43 -0700 (Mon, 13 Jun 2022)


Log Message
[Gardening]: REGRESSION (251426@main): [ macOS Debug wk2 ] http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=241572


Unreviewed test gardening.

* LayoutTests/platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/251508@main

Modified Paths

trunk/LayoutTests/platform/mac-wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (295502 => 295503)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-06-13 21:30:25 UTC (rev 295502)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-06-13 22:33:43 UTC (rev 295503)
@@ -1720,4 +1720,6 @@
 
 webkit.org/b/241265 [ Debug ] imported/w3c/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-object-percentage.html [ Pass Crash ]
 
-webkit.org/b/241283 fast/animation/request-animation-frame-throttling-detached-iframe.html [ Pass Failure ]
\ No newline at end of file
+webkit.org/b/241283 fast/animation/request-animation-frame-throttling-detached-iframe.html [ Pass Failure ]
+
+webkit.org/b/241572 [ Debug ] http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html [ Pass Crash ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295502] trunk/Source

2022-06-13 Thread pangle
Title: [295502] trunk/Source








Revision 295502
Author pan...@apple.com
Date 2022-06-13 14:30:25 -0700 (Mon, 13 Jun 2022)


Log Message
Web Inspector: [Cocoa] Web Inspector windows open in separate window collection instead of on current stage when using Stage Manager
https://bugs.webkit.org/show_bug.cgi?id=241521
rdar://91964707

Reviewed by Devin Rousso.

For Stage Manager, the Web Inspector window should appear in the same workspace as the active Safari window. Currently
the best way to accomplish this without negatively impacting our fullscreen behavior is to appear as if we are a
preferences window with a toolbar and NSWindowToolbarStylePreference. By hiding the toolbar, there is no visual or
functional change to Web Inspector, and we now get classified as an auxiliary window only in Stage Manager.

* Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm:
(WebKit::WebInspectorUIProxy::createFrontendWindow):
* Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController window]):

Canonical link: https://commits.webkit.org/251507@main

Modified Paths

trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm




Diff

Modified: trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm (295501 => 295502)

--- trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm	2022-06-13 20:52:26 UTC (rev 295501)
+++ trunk/Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm	2022-06-13 21:30:25 UTC (rev 295502)
@@ -372,6 +372,11 @@
 [window setMinFullScreenContentSize:NSMakeSize(minimumFullScreenWidth, minimumWindowHeight)];
 [window setCollectionBehavior:([window collectionBehavior] | NSWindowCollectionBehaviorFullScreenAllowsTiling)];
 
+// FIXME:  Replace Stage Manager auxiliary window workaround.
+[window setToolbar:[NSToolbar new]];
+[[window toolbar] setVisible:NO];
+[window setToolbarStyle:NSWindowToolbarStylePreference];
+
 [window setTitlebarAppearsTransparent:YES];
 
 // Center the window if the saved frame was empty.


Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm (295501 => 295502)

--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm	2022-06-13 20:52:26 UTC (rev 295501)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm	2022-06-13 21:30:25 UTC (rev 295502)
@@ -562,6 +562,11 @@
 [window setMinFullScreenContentSize:NSMakeSize(minimumFullScreenWidth, minimumWindowHeight)];
 [window setCollectionBehavior:([window collectionBehavior] | NSWindowCollectionBehaviorFullScreenAllowsTiling)];
 
+// FIXME:  Replace Stage Manager auxiliary window workaround.
+[window setToolbar:[NSToolbar new]];
+[[window toolbar] setVisible:NO];
+[window setToolbarStyle:NSWindowToolbarStylePreference];
+
 [window setTitlebarAppearsTransparent:YES];
 
 [self setWindow:window.get()];






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295501] trunk/Source/WebCore/Modules/indexeddb/server/ UniqueIDBDatabaseConnection.cpp

2022-06-13 Thread achristensen
Title: [295501] trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp








Revision 295501
Author achristen...@apple.com
Date 2022-06-13 13:52:26 -0700 (Mon, 13 Jun 2022)


Log Message
Lambda in UniqueIDBDatabaseConnection::abortTransactionWithoutCallback should check weakThis before using this
https://bugs.webkit.org/show_bug.cgi?id=241557

Reviewed by Youenn Fablet.

* Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):

Canonical link: https://commits.webkit.org/251506@main

Modified Paths

trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp




Diff

Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp (295500 => 295501)

--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp	2022-06-13 20:19:05 UTC (rev 295500)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp	2022-06-13 20:52:26 UTC (rev 295501)
@@ -79,7 +79,9 @@
 ASSERT(m_database);
 
 const auto& transactionIdentifier = transaction.info().identifier();
-m_database->abortTransaction(transaction, [this, transactionIdentifier](const IDBError&) {
+m_database->abortTransaction(transaction, [this, weakThis = WeakPtr { *this }, transactionIdentifier](const IDBError&) {
+if (!weakThis)
+return;
 ASSERT(m_transactionMap.contains(transactionIdentifier));
 m_transactionMap.remove(transactionIdentifier);
 });






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295500] trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js

2022-06-13 Thread rcaliman
Title: [295500] trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js








Revision 295500
Author rcali...@apple.com
Date 2022-06-13 13:19:05 -0700 (Mon, 13 Jun 2022)


Log Message
REGRESSION (r251194): Web Inspector: Uncaught exception when inspecting color referenced by CSS variable
https://bugs.webkit.org/show_bug.cgi?id=241558

Reviewed by Devin Rousso.

The patch for https://bugs.webkit.org/show_bug.cgi?id=241055 introduced an option
to prevent changing color formats when interacting with an inline color swatch.

The value of the `preventChangingColorFormats` option kept as an instance property of `WI.InlineSwatch`.
This is then referenced in the callback passed to `createCodeMirrorColorTextMarkers()`. The
callback doesn't share the same scope, so an exception is raied when calling `this._preventChangingColorFormats`.

This patch ensures the value of the instance property is captured in the scope of the callback passed.

* Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js:
(WI.InlineSwatch.prototype._swatchElementClicked.switch.case.WI.InlineSwatch.Type.Variable.optionsForType):
(WI.InlineSwatch.prototype._swatchElementClicked):

Canonical link: https://commits.webkit.org/251505@main

Modified Paths

trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js




Diff

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js (295499 => 295500)

--- trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js	2022-06-13 20:07:44 UTC (rev 295499)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js	2022-06-13 20:19:05 UTC (rev 295500)
@@ -382,11 +382,13 @@
 codeMirror.setValue(value);
 
 const range = null;
+let preventChangingColorFormats = this._preventChangingColorFormats;
+
 function optionsForType(type) {
 return {
 allowedTokens: /\btag\b/,
 callback(marker, valueObject, valueString) {
-let swatch = new WI.InlineSwatch(type, valueObject, {readOnly: true, preventChangingColorFormats: this._preventChangingColorFormats});
+let swatch = new WI.InlineSwatch(type, valueObject, {readOnly: true, preventChangingColorFormats});
 codeMirror.setUniqueBookmark({line: 0, ch: 0}, swatch.element);
 }
 };






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295499] trunk/Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm

2022-06-13 Thread commit-queue
Title: [295499] trunk/Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm








Revision 295499
Author commit-qu...@webkit.org
Date 2022-06-13 13:07:44 -0700 (Mon, 13 Jun 2022)


Log Message
Check for null buffers in SharedVideoFrameInfo::writePixelBuffer
https://bugs.webkit.org/show_bug.cgi?id=241544
rdar://94649789

Patch by Youenn Fablet  on 2022-06-13
Reviewed by Eric Carlson.

* Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm:
(WebCore::SharedVideoFrameInfo::writePixelBuffer):

Canonical link: https://commits.webkit.org/251504@main

Modified Paths

trunk/Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm




Diff

Modified: trunk/Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm (295498 => 295499)

--- trunk/Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm	2022-06-13 19:52:35 UTC (rev 295498)
+++ trunk/Source/WebCore/platform/cocoa/SharedVideoFrameInfo.mm	2022-06-13 20:07:44 UTC (rev 295499)
@@ -192,11 +192,21 @@
 data += sizeof(SharedVideoFrameInfo);
 
 auto* planeA = static_cast(CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0));
+if (!planeA) {
+RELEASE_LOG_ERROR(WebRTC, "SharedVideoFrameInfo::writePixelBuffer plane A is null");
+return false;
+}
+
 size_t planeASize = m_height * m_bytesPerRow;
 std::memcpy(data, planeA, planeASize);
 
 if (CVPixelBufferGetPlaneCount(pixelBuffer) == 2) {
 auto* planeB = static_cast(CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 1));
+if (!planeB) {
+RELEASE_LOG_ERROR(WebRTC, "SharedVideoFrameInfo::writePixelBuffer plane B is null");
+return false;
+}
+
 size_t planeBSize = m_heightPlaneB * m_bytesPerRowPlaneB;
 std::memcpy(data + planeASize, planeB, planeBSize);
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295498] trunk/Source/WebCore

2022-06-13 Thread said
Title: [295498] trunk/Source/WebCore








Revision 295498
Author s...@apple.com
Date 2022-06-13 12:52:35 -0700 (Mon, 13 Jun 2022)


Log Message
[GPU Process] [Filters] Simplify the dynamic update of the SVG filter elements
https://bugs.webkit.org/show_bug.cgi?id=232842
rdar://85426197

Reviewed by Simon Fraser.

Consider this SVG as an example:









The renderers of the  and the  elements ask the renderer of the
 element, i.e. RenderSVGResourceFilter to applyResource(). In this
function a new SVGFilter is created for each target renderer. A new entry
{ target_renderer, FilterData } is added to
RenderSVGResourceFilter::m_rendererFilterDataMap.

While building the SVGFilter, a new FilterEffect is created for every target
renderer and an entry { primitive_renderer, effect } is added to
SVGFilterBuilder::m_effectRenderer.

Suppose 'stdDeviation' of  has been changed, this is the
current workflow:

SVGFEGaussianBlurElement::svgAttributeChanged() will call
SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged() which
will call RenderSVGResourceFilterPrimitive::primitiveAttributeChanged().
The last one will call RenderSVGResourceFilter::primitiveAttributeChanged()
and pass itself as an argument.

RenderSVGResourceFilter::primitiveAttributeChanged() will loop through
all the entries in m_rendererFilterDataMap and get the FilterData. And
then it gets the effect given the key primitive renderer from
FilterData::SVGFilterBuilder::m_effectRenderer. Having this effect, its
setFilterEffectAttribute() will be called.

This workflow is cumbersome since it was mainly done this way because the result
FilterImage was stored with the FilterEffect. But since the  result FilterImage
was moved out of the FilterEffect, we do not need to create a new FilterEffect
for every target renderer. The same FilterEffect can be shared among all the
target renderers.

This is the new workflow for dynamically updating the FilterEffect attributes:

No need to create a separate FilterEffect for every SVGFilter (or target
renderer). A shared FilterEffect can be used instead. This will be
SVGFilterPrimitiveStandardAttributes::m_effect.

SVGFEGaussianBlurElement::svgAttributeChanged() will call
SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged() which
will call SVGFEGaussianBlurElement::setFilterEffectAttribute() if m_effect
is not null. setFilterEffectAttribute() will return true if it needs to
be repainted. RenderSVGResourceFilterPrimitive::markFilterEffectForRepaint()
will be called then.

RenderSVGResourceFilterPrimitive::markFilterForInvalidation() will call
RenderSVGResourceFilter::markFilterForRepaint() if effect is not null which
will clear the result FilterImage of this effect and all other FilterImages
which takes the result FilterImage of this effect as an input.

If svgAttributeChanged() finds out it needs to rebuild the entire SVGFilter,
it will call SVGFilterPrimitiveStandardAttributes::markFilterEffectForRebuild()
which will call RenderSVGResourceFilterPrimitive::markFilterEffectForRebuild()
and sets SVGFilterPrimitiveStandardAttributes::m_effect to nullptr.
RenderSVGResourceFilterPrimitive::markFilterEffectForRebuild() will call
RenderSVGResourceFilter::markFilterForRebuild() which will clear
RenderSVGResourceFilter::m_rendererFilterDataMap. This will force rebuilding
the SVGFilter for all renderers.

* Source/WebCore/platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::setStdDeviationX):
(WebCore::FEDropShadow::setStdDeviationY):
(WebCore::FEDropShadow::setDx):
(WebCore::FEDropShadow::setDy):
(WebCore::FEDropShadow::setShadowColor):
(WebCore::FEDropShadow::setShadowOpacity):
* Source/WebCore/platform/graphics/filters/FEDropShadow.h:
(WebCore::FEDropShadow::setStdDeviationX): Deleted.
(WebCore::FEDropShadow::setStdDeviationY): Deleted.
(WebCore::FEDropShadow::setDx): Deleted.
(WebCore::FEDropShadow::setDy): Deleted.
(WebCore::FEDropShadow::setShadowColor): Deleted.
(WebCore::FEDropShadow::setShadowOpacity): Deleted.
* Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::setStdDeviationX):
(WebCore::FEGaussianBlur::setStdDeviationY):
(WebCore::FEGaussianBlur::setEdgeMode):
* Source/WebCore/platform/graphics/filters/FEGaussianBlur.h:
* Source/WebCore/platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::setDx):
(WebCore::FEOffset::setDy):
* Source/WebCore/platform/graphics/filters/FEOffset.h:
* Source/WebCore/rendering/CSSFilter.cpp:
(WebCore::createReferenceFilter):
* Source/WebCore/rendering/svg/RenderSVGResourceContainer.h:
* Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::markFilterForRepaint):
(WebCore::RenderSVGResourceFilter::markFilterForRebuild):

[webkit-changes] [295497] trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj

2022-06-13 Thread achristensen
Title: [295497] trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj








Revision 295497
Author achristen...@apple.com
Date 2022-06-13 12:23:41 -0700 (Mon, 13 Jun 2022)


Log Message
Remove "Symlink WebKitPluginHost" build phase of WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=241553

Reviewed by Alexey Proskuryakov.

* Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/251502@main

Modified Paths

trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj




Diff

Modified: trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj (295496 => 295497)

--- trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj	2022-06-13 19:20:59 UTC (rev 295496)
+++ trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj	2022-06-13 19:23:41 UTC (rev 295497)
@@ -3177,7 +3177,6 @@
 5D0D54210E98631D0029E223 /* Check For Weak VTables and Externals */,
 3713F018142905B70036387F /* Check For Inappropriate Objective-C Class Names */,
 532424B1254905FE00A6975B /* Check For Inappropriate Files In Framework */,
-1A3193D5191856E500E1CF89 /* Symlink WebKitPluginHost */,
 537CF83A22EFBFB100C6EBB3 /* Check .xcfilelists */,
 650473452789431C00AF78A2 /* Create Symlink to Alt Root Path */,
 6517572027CEE91400D9FE40 /* Copy Frameworks to Secondary Path */,
@@ -3255,20 +3254,6 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
-		1A3193D5191856E500E1CF89 /* Symlink WebKitPluginHost */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Symlink WebKitPluginHost";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "if [[ ${WK_PLATFORM_NAME} != \"macosx\" ]]; then\nexit 0\nfi\n\n[[ -h \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\" ]] || ln -s Versions/Current/WebKitPluginHost.app \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\"\n[[ ${WK_USE_OVERRIDE_FRAMEWORKS_DIR} == \"YES\" ]] || [[ -h \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginAgent\" ]] || ln -s Versions/Current/WebKitPluginAgent \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginAgent\"\n\nif [[ \"${CONFIGURATION}\" != \"Production\" && ${ACTION} == \"build\"  && ! -e \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\" ]]; then\nif [[ -e \"/System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app\" ]]; then\nln -s /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app \"
 ${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\nelse\nln -s /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/WebKitPluginHost.app \"${TARGET_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\nfi\nfi\n";
-		};
 		1C395DE20C6BE8ED1E52 /* Generate Export Files */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295496] trunk

2022-06-13 Thread emw
Title: [295496] trunk








Revision 295496
Author e...@apple.com
Date 2022-06-13 12:20:59 -0700 (Mon, 13 Jun 2022)


Log Message
[Xcode] Use workspace builds by default in build-webkit
https://bugs.webkit.org/show_bug.cgi?id=241298

Reviewed by Alexey Proskuryakov.

Switch the default value of the --use-workspace flag, and add a warning
message indicating that non-workspace Xcode builds are deprecated.

Add product dependencies and disable SDK metadata parsing in tools
projects, to prevent watchOS/tvOS workspace builds from thinking we are
linking against system WebKit.

Add an aggregate "MiniBrowser (Platform filters)" target, which builds
MiniBrowser.app iff the workspace is building for a Mac destination.

* Source/ThirdParty/libwebrtc/Configurations/DebugRelease.xcconfig: Fix
  an sdk xcconfig setting.
* Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig:
  Set DISABLE_SDK_METADATA_PARSING.
* Tools/DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig: Set
  DISABLE_SDK_METADATA_PARSING.
* Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj: Create the
  aggregate target mentioned above.
* Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
  Link MobileMiniBrowser.framework against WebKit.
* Tools/Scripts/build-webkit: Switch --use-workspace default.
* Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig: Set
  DISABLE_SDK_METADATA_PARSING.
* Tools/TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig: Set
  DISABLE_SDK_METADATA_PARSING.
* Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Set
  DISABLE_SDK_METADATA_PARSING.
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add
  WebKit product dependency.
* Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig: Add
  DISABLE_SDK_METADATA_PARSING.
* Tools/WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig: Add
  DISABLE_SDK_METADATA_PARSING.
* WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme:
  Replace MiniBrowser.app with the aggregate target.
* WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme: Replace
  MiniBrowser.app with the aggregate target.

Canonical link: https://commits.webkit.org/251501@main

Modified Paths

trunk/Source/ThirdParty/libwebrtc/Configurations/DebugRelease.xcconfig
trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig
trunk/Tools/DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig
trunk/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
trunk/Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj
trunk/Tools/Scripts/build-webkit
trunk/Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig
trunk/Tools/TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig
trunk/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
trunk/Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig
trunk/Tools/WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig
trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme
trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme




Diff

Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/DebugRelease.xcconfig (295495 => 295496)

--- trunk/Source/ThirdParty/libwebrtc/Configurations/DebugRelease.xcconfig	2022-06-13 18:51:54 UTC (rev 295495)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/DebugRelease.xcconfig	2022-06-13 19:20:59 UTC (rev 295496)
@@ -48,7 +48,7 @@
 #include "../../../../Tools/ccache/ccache.xcconfig"
 
 OTHER_LDFLAGS[config=Debug][sdk=iphone*] = $(inherited) -framework UIKit -framework CoreGraphics
-OTHER_LDFLAGS[config=Debug][sdk=tv*] = $(inherited) -framework UIKit -framework CoreGraphics
+OTHER_LDFLAGS[config=Debug][sdk=appletv*] = $(inherited) -framework UIKit -framework CoreGraphics
 OTHER_LDFLAGS[config=Debug][sdk=watch*] = $(inherited) -framework UIKit -framework CoreGraphics
 OTHER_LDFLAGS[config=Debug][sdk=macosx*] = $(inherited) $(OTHER_LDFLAGS_$(WK_IS_CATALYST))
 OTHER_LDFLAGS_YES = -framework UIKit -framework CoreGraphics


Modified: trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig (295495 => 295496)

--- trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig	2022-06-13 18:51:54 UTC (rev 295495)
+++ trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig	2022-06-13 19:20:59 UTC (rev 295496)
@@ -28,6 +28,10 @@
 PRODUCT_NAME = DumpRenderTree;
 SKIP_INSTALL = YES;
 
+// Workaround for "WebKit is not available..." error (rdar://91668054)
+DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES;
+DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES;
+
 OTHER_LDFLAGS = ;
 
 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(WK_COCOA_TOUCH)) $(EXCLUDED_PRODUCT_DEPENDENCY_NAMES_$(WK_WHICH_BUILD_SYSTEM));


Modified: trunk/Tools/DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig (295495 => 295496)

--- 

[webkit-changes] [295495] trunk/LayoutTests

2022-06-13 Thread commit-queue
Title: [295495] trunk/LayoutTests








Revision 295495
Author commit-qu...@webkit.org
Date 2022-06-13 11:51:54 -0700 (Mon, 13 Jun 2022)


Log Message
[ macOS ] webanimations/accelerated-animation-after-forward-filling-animation.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=239794


Patch by Antoine Quint  on 2022-06-13
Reviewed by Dean Jackson.

Typically we wait 3 frames before considering an accelerated animation was committed.
Additionally, locally I could reproduce the issue prior to this patch but not with it.

* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/webanimations/accelerated-animation-after-forward-filling-animation.html:

Canonical link: https://commits.webkit.org/251500@main

Modified Paths

trunk/LayoutTests/platform/mac/TestExpectations
trunk/LayoutTests/webanimations/accelerated-animation-after-forward-filling-animation.html




Diff

Modified: trunk/LayoutTests/platform/mac/TestExpectations (295494 => 295495)

--- trunk/LayoutTests/platform/mac/TestExpectations	2022-06-13 18:49:32 UTC (rev 295494)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2022-06-13 18:51:54 UTC (rev 295495)
@@ -2289,8 +2289,6 @@
 
 webkit.org/b/239791 webanimations/accelerated-animation-slot-invalidation.html [ Pass ImageOnlyFailure ]
 
-webkit.org/b/239794 webanimations/accelerated-animation-after-forward-filling-animation.html [ Pass ImageOnlyFailure ]
-
 webkit.org/b/239990 css3/calc/transitions-dependent.html [ Pass Failure ]
 
 webkit.org/b/240074 imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html [ Pass Failure ]


Modified: trunk/LayoutTests/webanimations/accelerated-animation-after-forward-filling-animation.html (295494 => 295495)

--- trunk/LayoutTests/webanimations/accelerated-animation-after-forward-filling-animation.html	2022-06-13 18:49:32 UTC (rev 295494)
+++ trunk/LayoutTests/webanimations/accelerated-animation-after-forward-filling-animation.html	2022-06-13 18:51:54 UTC (rev 295495)
@@ -32,6 +32,7 @@
 await animation.ready;
 await new Promise(requestAnimationFrame);
 await new Promise(requestAnimationFrame);
+await new Promise(requestAnimationFrame);
 
 if (window.testRunner)
 window.testRunner.notifyDone();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295494] trunk/LayoutTests

2022-06-13 Thread commit-queue
Title: [295494] trunk/LayoutTests








Revision 295494
Author commit-qu...@webkit.org
Date 2022-06-13 11:49:32 -0700 (Mon, 13 Jun 2022)


Log Message
Regression (r268615) : [ macOS ] webanimations/relative-ordering-of-translate-and-rotate-properties-accelerated.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=230863


Patch by Antoine Quint  on 2022-06-13
Reviewed by Dean Jackson.

Use the tried and true technique of waiting for animations to be ready and three animation frames
to ensure all accelerated animations have been committed.

* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/webanimations/resources/wait-until-animations-are-committed.js:

Canonical link: https://commits.webkit.org/251499@main

Modified Paths

trunk/LayoutTests/platform/mac-wk1/TestExpectations
trunk/LayoutTests/webanimations/resources/wait-until-animations-are-committed.js




Diff

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (295493 => 295494)

--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2022-06-13 18:20:38 UTC (rev 295493)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2022-06-13 18:49:32 UTC (rev 295494)
@@ -1477,8 +1477,6 @@
 # rdar://80342885 ([ Monterey wk1 arm64 ] webanimations/accelerated-transition-by-removing-property.html is a flaky image only failure)
 [ Monterey arm64 ] webanimations/accelerated-transition-by-removing-property.html [ Pass ImageOnlyFailure ]
 
-webkit.org/b/230863 webanimations/relative-ordering-of-translate-and-rotate-properties-accelerated.html [ Pass ImageOnlyFailure ]
-
 webkit.org/b/223816 [ arm64 ] platform/mac/fast/objc/webScriptObject-hasWebScriptKey.html [ Failure ]
 
 # rdar://80346975


Modified: trunk/LayoutTests/webanimations/resources/wait-until-animations-are-committed.js (295493 => 295494)

--- trunk/LayoutTests/webanimations/resources/wait-until-animations-are-committed.js	2022-06-13 18:20:38 UTC (rev 295493)
+++ trunk/LayoutTests/webanimations/resources/wait-until-animations-are-committed.js	2022-06-13 18:49:32 UTC (rev 295494)
@@ -1,15 +1,12 @@
 
 (async () => {
-if (!window.testRunner)
-return;
+window.testRunner?.waitUntilDone();
 
-testRunner.waitUntilDone();
+await Promise.all(document.getAnimations().map(animation => animation.ready));
 
-const script = document.createElement("script");
-script.src = ""
-script.addEventListener("load", async event => {
-await UIHelper.ensureStablePresentationUpdate();
-testRunner.notifyDone();
-});
-document.body.appendChild(script);
+await new Promise(requestAnimationFrame);
+await new Promise(requestAnimationFrame);
+await new Promise(requestAnimationFrame);
+
+window.testRunner?.notifyDone();
 })();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295493] trunk/Source/WebKit/UIProcess

2022-06-13 Thread sihui_liu
Title: [295493] trunk/Source/WebKit/UIProcess








Revision 295493
Author sihui_...@apple.com
Date 2022-06-13 11:20:38 -0700 (Mon, 13 Jun 2022)


Log Message
Start/stop ProcessStateMonitor with ApplicationStateTracker
https://bugs.webkit.org/show_bug.cgi?id=241427

Reviewed by Geoffrey Garen.

We want ProcessStateMonitor to be started when application is in background and to be stopped when application is in
foreground. In r294405, we start/stop ProcessStateMonitor on receiving UIApplicationDidEnterBackgroundNotification and
UIApplicationWillEnterForegroundNotification notifications. However, UIApplicationWillEnterForegroundNotification can be
sent later than UISceneWillEnterForegroundNotification. In ApplicationStateTracke, we start creating foreground activity
for web process on receiving UISceneWillEnterForegroundNotification. At this time,
UIApplicationWillEnterForegroundNotification may not be received yet and ProcessStateMonitor may still be
working. ProcessStateMonitor may forbid creating new activity after it sets process shouldSuspend (see r294405), so we
need to make sure ProcessStateMonitor is stopped before starting new foreground activity.

To achieve that, we now decide when to start/stop ProcessStateMonitor with ApplicationStateTracker. We start
ProcessStateMonitor when all trackers are in the background, and stop it when at least one tracker is in foreground.

* Source/WebKit/UIProcess/ApplicationStateTracker.mm:
(WebKit::allApplicationStateTrackers):
(WebKit::updateApplicationBackgroundState):
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
(WebKit::ApplicationStateTracker::applicationDidEnterBackground):
(WebKit::ApplicationStateTracker::applicationWillEnterForeground):
* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::setProcessesShouldSuspend):
* Source/WebKit/UIProcess/ProcessAssertion.h:
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager setProcessStateMonitorEnabled:]):
(WebKit::ProcessAndUIAssertion::setProcessStateMonitorEnabled):
* Source/WebKit/UIProcess/ios/ProcessStateMonitor.mm:
(WebKit::ProcessStateMonitor::checkRemainingRunTime):
* Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::platformInitialize):

Canonical link: https://commits.webkit.org/251498@main

Modified Paths

trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/ProcessAssertion.h
trunk/Source/WebKit/UIProcess/WebProcessPool.h
trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm
trunk/Source/WebKit/UIProcess/ios/ProcessStateMonitor.mm
trunk/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm




Diff

Modified: trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm (295492 => 295493)

--- trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm	2022-06-13 17:16:47 UTC (rev 295492)
+++ trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm	2022-06-13 18:20:38 UTC (rev 295493)
@@ -30,6 +30,7 @@
 
 #import "EndowmentStateTracker.h"
 #import "Logging.h"
+#import "ProcessAssertion.h"
 #import "SandboxUtilities.h"
 #import "UIKitSPI.h"
 #import 
@@ -50,6 +51,28 @@
 
 namespace WebKit {
 
+static WeakHashSet& allApplicationStateTrackers()
+{
+static NeverDestroyed> trackers;
+return trackers;
+}
+
+static void updateApplicationBackgroundState()
+{
+static bool s_isApplicationInBackground = false;
+auto isAnyStateTrackerInForeground = []() -> bool {
+return WTF::anyOf(allApplicationStateTrackers(), [](auto& tracker) {
+return !tracker.isInBackground();
+});
+};
+bool isApplicationInBackground = !isAnyStateTrackerInForeground();
+if (s_isApplicationInBackground == isApplicationInBackground)
+return;
+
+s_isApplicationInBackground = isApplicationInBackground;
+ProcessAndUIAssertion::setProcessStateMonitorEnabled(isApplicationInBackground);
+}
+
 ApplicationType applicationType(UIWindow *window)
 {
 if (_UIApplicationIsExtension())
@@ -161,6 +184,9 @@
 break;
 }
 }
+
+allApplicationStateTrackers().add(*this);
+updateApplicationBackgroundState();
 }
 
 ApplicationStateTracker::~ApplicationStateTracker()
@@ -173,11 +199,15 @@
 [notificationCenter removeObserver:m_willEnterForegroundObserver];
 [notificationCenter removeObserver:m_willBeginSnapshotSequenceObserver];
 [notificationCenter removeObserver:m_didCompleteSnapshotSequenceObserver];
+
+allApplicationStateTrackers().remove(*this);
+updateApplicationBackgroundState();
 }
 
 void ApplicationStateTracker::applicationDidEnterBackground()
 {
 m_isInBackground = true;
+updateApplicationBackgroundState();
 
 if (auto view = m_view.get())
 

[webkit-changes] [295492] trunk

2022-06-13 Thread tyler_w
Title: [295492] trunk








Revision 295492
Author tyle...@apple.com
Date 2022-06-13 10:16:47 -0700 (Mon, 13 Jun 2022)


Log Message
AX: Update the isolated tree in response to dynamic aria-orientation changes
https://bugs.webkit.org/show_bug.cgi?id=241543

Reviewed by Chris Fleizach.

This patch also makes aria-orientation work for node-only objects, like
those with display:contents.

* LayoutTests/accessibility/aria-orientation-expected.txt:
* LayoutTests/accessibility/aria-orientation.html:
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):
(WebCore::AXObjectCache::updateIsolatedTree):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::orientation const):
* Source/WebCore/accessibility/AccessibilityNodeObject.h:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::orientation const): Deleted.
* Source/WebCore/accessibility/AccessibilityRenderObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperty):

Canonical link: https://commits.webkit.org/251497@main

Modified Paths

trunk/LayoutTests/accessibility/aria-orientation-expected.txt
trunk/LayoutTests/accessibility/aria-orientation.html
trunk/Source/WebCore/accessibility/AXLogger.cpp
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
trunk/Source/WebCore/accessibility/AXObjectCache.h
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h
trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp




Diff

Modified: trunk/LayoutTests/accessibility/aria-orientation-expected.txt (295491 => 295492)

--- trunk/LayoutTests/accessibility/aria-orientation-expected.txt	2022-06-13 17:15:16 UTC (rev 295491)
+++ trunk/LayoutTests/accessibility/aria-orientation-expected.txt	2022-06-13 17:16:47 UTC (rev 295492)
@@ -1,42 +1,28 @@
-Implicit defaults
+This test ensures that aria-orientation works correctly and the implicit defaults are defined on different roles.
 
-Option
-Menu item 1
-menubar
-radio 1
-item one
-tree item
-cell
-cell2
+PASS: slider.orientation === 'AXOrientation: AXHorizontalOrientation'
+PASS: combobox.orientation === 'AXOrientation: AXUnknownOrientation'
+PASS: listbox.orientation === 'AXOrientation: AXVerticalOrientation'
+PASS: menu.orientation === 'AXOrientation: AXVerticalOrientation'
+PASS: menubar.orientation === 'AXOrientation: AXHorizontalOrientation'
+PASS: radiogroup.orientation === 'AXOrientation: AXUnknownOrientation'
+PASS: separator.orientation === 'AXOrientation: AXHorizontalOrientation'
+PASS: tablist.orientation === 'AXOrientation: AXHorizontalOrientation'
+PASS: toolbar.orientation === 'AXOrientation: AXHorizontalOrientation'
+PASS: tree.orientation === 'AXOrientation: AXVerticalOrientation'
+PASS: treegrid.orientation === 'AXOrientation: AXUnknownOrientation'
+PASS: radiogroup2.orientation === 'AXOrientation: AXVerticalOrientation'
+PASS: treegrid2.orientation === 'AXOrientation: AXHorizontalOrientation'
+PASS: separator2.orientation === 'AXOrientation: AXUnknownOrientation'
+PASS: slider2.orientation === 'AXOrientation: AXUnknownOrientation'
+PASS: listbox2.orientation === 'AXOrientation: AXHorizontalOrientation'
+PASS: listboxDisplayContents.orientation === 'AXOrientation: AXVerticalOrientation'
 
-Authored orientation
-radio 1
-cell
-cell2
-X
-Option
-This test makes sure that aria-orientation works correctly and the implicit defaults are defined on different roles.
+Updating #listbox-display-contents aria-orientation to horizontal.
+PASS: listboxDisplayContents.orientation === 'AXOrientation: AXHorizontalOrientation'
 
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS slider.orientation is 'AXOrientation: AXHorizontalOrientation'
-PASS combobox.orientation is 'AXOrientation: AXUnknownOrientation'
-PASS listbox.orientation is 'AXOrientation: AXVerticalOrientation'
-PASS menu.orientation is 'AXOrientation: AXVerticalOrientation'
-PASS menubar.orientation is 'AXOrientation: AXHorizontalOrientation'
-PASS radiogroup.orientation is 'AXOrientation: AXUnknownOrientation'
-PASS separator.orientation is 'AXOrientation: AXHorizontalOrientation'
-PASS tablist.orientation is 'AXOrientation: AXHorizontalOrientation'
-PASS toolbar.orientation is 'AXOrientation: AXHorizontalOrientation'
-PASS tree.orientation is 'AXOrientation: AXVerticalOrientation'
-PASS treegrid.orientation is 'AXOrientation: AXUnknownOrientation'
-PASS radiogroup2.orientation is 

[webkit-changes] [295491] trunk/Source

2022-06-13 Thread andresg_22
Title: [295491] trunk/Source








Revision 295491
Author andresg...@apple.com
Date 2022-06-13 10:15:16 -0700 (Mon, 13 Jun 2022)


Log Message
AX ITM: Fix for accessibility/Mac/aria-errormessage.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=241398

Test: accessibility/Mac/aria-errormessage.html

Reviewed by Chris Fleizach and Tyler Wilcock.

This test was failing because the elements that are referenced as error messages are  elements, which are ignored on the mac platform. Therefore there was no isolated object created for those elements and AXIsolatedTree::objectsForIDs will not return them. This patch solves this problem by creating orphan isolated objects in AXIsolatedTree:objectsForIDs if there is no isolated object for the requested AXID, and the corresponding live objects exists.

Canonical link: https://commits.webkit.org/251496@main

Modified Paths

trunk/Source/WebCore/accessibility/AXObjectCache.cpp
trunk/Source/WebCore/accessibility/AXObjectCache.h
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
trunk/Source/WebKitLegacy/win/AccessibleBase.cpp




Diff

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (295490 => 295491)

--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-06-13 16:11:21 UTC (rev 295490)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-06-13 17:15:16 UTC (rev 295491)
@@ -958,7 +958,7 @@
 
 return axIDs.map([this] (const auto& axID) -> RefPtr {
 ASSERT(axID.isValid());
-return objectFromAXID(axID);
+return objectForID(axID);
 });
 }
 
@@ -3843,6 +3843,7 @@
 }
 targetsIterator->value.append(target->objectID());
 }
+m_relationTargets.add(target->objectID());
 
 if (addingSymmetricRelation == AddingSymmetricRelation::No) {
 if (auto symmetric = symmetricRelation(relationType); symmetric != AXRelationType::None)
@@ -3859,6 +3860,7 @@
 relationsNeedUpdate(false);
 AXLOG("Updating relations.");
 m_relations.clear();
+m_relationTargets.clear();
 
 struct RelationOrigin {
 Element* originElement { nullptr };
@@ -3919,6 +3921,12 @@
 return m_relations;
 }
 
+const HashSet& AXObjectCache::relationTargetIDs()
+{
+updateRelationsIfNeeded();
+return m_relationTargets;
+}
+
 std::optional> AXObjectCache::relatedObjectIDsFor(const AXCoreObject& object, AXRelationType relationType)
 {
 updateRelationsIfNeeded();


Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (295490 => 295491)

--- trunk/Source/WebCore/accessibility/AXObjectCache.h	2022-06-13 16:11:21 UTC (rev 295490)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h	2022-06-13 17:15:16 UTC (rev 295491)
@@ -223,7 +223,7 @@
 bool nodeIsTextControl(const Node*);
 
 AXID platformGenerateAXID() const;
-AccessibilityObject* objectFromAXID(AXID id) const { return m_objects.get(id); }
+AccessibilityObject* objectForID(const AXID& id) const { return m_objects.get(id); }
 Vector> objectsForIDs(const Vector&) const;
 
 // Text marker utilities.
@@ -510,6 +510,7 @@
 void updateRelationsIfNeeded();
 void relationsNeedUpdate(bool);
 HashMap relations();
+const HashSet& relationTargetIDs();
 
 Document& m_document;
 const std::optional m_pageID; // constant for object's lifetime.
@@ -571,6 +572,7 @@
 // Relationships between objects.
 HashMap m_relations;
 bool m_relationsNeedUpdate { true };
+HashSet m_relationTargets;
 
 #if USE(ATSPI)
 ListHashSet> m_deferredParentChangedList;


Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp (295490 => 295491)

--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp	2022-06-13 16:11:21 UTC (rev 295490)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp	2022-06-13 17:15:16 UTC (rev 295491)
@@ -76,8 +76,6 @@
 {
 ASSERT(is(coreObject));
 auto& object = downcast(coreObject);
-// We should never create an isolated object from an ignored object.
-ASSERT(!object.accessibilityIsIgnored());
 
 setProperty(AXPropertyName::ARIALandmarkRoleDescription, object.ariaLandmarkRoleDescription().isolatedCopy());
 setProperty(AXPropertyName::AccessibilityDescription, object.accessibilityDescription().isolatedCopy());
@@ -413,7 +411,7 @@
 return nullptr;
 
 auto* axObjectCache = this->axObjectCache();
-return axObjectCache ? axObjectCache->objectFromAXID(m_id) : nullptr;
+return axObjectCache ? axObjectCache->objectForID(m_id) : nullptr;
 }
 
 void AXIsolatedObject::setMathscripts(AXPropertyName propertyName, AXCoreObject& object)


Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (295490 => 295491)

--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2022-06-13 16:11:21 UTC 

[webkit-changes] [295490] trunk

2022-06-13 Thread commit-queue
Title: [295490] trunk








Revision 295490
Author commit-qu...@webkit.org
Date 2022-06-13 09:11:21 -0700 (Mon, 13 Jun 2022)


Log Message
WebGL: Fix implicit clears with rasterizer discard enabled
https://bugs.webkit.org/show_bug.cgi?id=223351

Patch by Alexey Knyazev <3479527+lexaknya...@users.noreply.github.com> on 2022-06-13
Reviewed by Kimmo Kinnunen.

* Do not mark context as changed after draw or clear ops with
enabled rasterizer discard.
* Rename ClearCaller enum to CallerType.

* LayoutTests/TestExpectations:
* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::blitFramebuffer):
(WebCore::WebGL2RenderingContext::copyTexSubImage3D):
(WebCore::WebGL2RenderingContext::drawRangeElements):
(WebCore::WebGL2RenderingContext::readPixels):
* Source/WebCore/html/canvas/WebGLMultiDraw.cpp:
(WebCore::WebGLMultiDraw::multiDrawArraysWEBGL):
(WebCore::WebGLMultiDraw::multiDrawArraysInstancedWEBGL):
(WebCore::WebGLMultiDraw::multiDrawElementsWEBGL):
(WebCore::WebGLMultiDraw::multiDrawElementsInstancedWEBGL):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::markContextChangedAndNotifyCanvasObserver):
(WebCore::WebGLRenderingContextBase::clearIfComposited):
(WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
(WebCore::WebGLRenderingContextBase::paintRenderingResultsToPixelBuffer):
(WebCore::WebGLRenderingContextBase::clear):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::drawArrays):
(WebCore::WebGLRenderingContextBase::drawElements):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::copyTexImage2D):
(WebCore::WebGLRenderingContextBase::drawArraysInstanced):
(WebCore::WebGLRenderingContextBase::drawElementsInstanced):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:

Canonical link: https://commits.webkit.org/251494@main

Modified Paths

trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
trunk/Source/WebCore/html/canvas/WebGLMultiDraw.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h




Diff

Modified: trunk/LayoutTests/TestExpectations (295489 => 295490)

--- trunk/LayoutTests/TestExpectations	2022-06-13 16:10:45 UTC (rev 295489)
+++ trunk/LayoutTests/TestExpectations	2022-06-13 16:11:21 UTC (rev 295490)
@@ -3782,6 +3782,7 @@
 webgl/2.0.y/conformance2/extensions/ext-texture-norm16.html [ Pass ]
 webgl/2.0.y/conformance2/extensions/oes-draw-buffers-indexed.html [ Pass ]
 webgl/2.0.y/conformance2/extensions/promoted-extensions-in-shaders.html [ Pass ]
+webgl/2.0.y/conformance2/rendering/rasterizer-discard-and-implicit-clear.html [ Pass ]
 
 # WebGL 1.0.3 and 2.0.0 tests where behavior is obsolete and WebKit contains implementation
 # and tests for the new behavior. Should be removed once 1.0.3 and 2.0.0 are retired.


Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (295489 => 295490)

--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2022-06-13 16:10:45 UTC (rev 295489)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2022-06-13 16:11:21 UTC (rev 295490)
@@ -703,7 +703,7 @@
 if (isContextLostOrPending())
 return;
 m_context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
-markContextChangedAndNotifyCanvasObserver();
+markContextChangedAndNotifyCanvasObserver(CallerTypeOther);
 }
 
 void WebGL2RenderingContext::deleteFramebuffer(WebGLFramebuffer* framebuffer)
@@ -1144,7 +1144,7 @@
 return;
 if (!validateTexture3DBinding("copyTexSubImage3D", target))
 return;
-clearIfComposited(ClearCallerOther);
+clearIfComposited(CallerTypeOther);
 m_context->copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
 }
 
@@ -1612,7 +1612,7 @@
 if (m_currentProgram && InspectorInstrumentation::isWebGLProgramDisabled(*this, *m_currentProgram))
 return;
 
-clearIfComposited(ClearCallerDrawOrClear);
+clearIfComposited(CallerTypeDrawOrClear);
 
 {
 InspectorScopedShaderProgramHighlight scopedHighlight(*this, m_currentProgram.get());
@@ -3392,7 +3392,7 @@
 // taint the origin using the WebGL API.
 ASSERT(canvasBase().originClean());
 
-clearIfComposited(ClearCallerOther);
+clearIfComposited(CallerTypeOther);
 
 m_context->readnPixels(x, y, width, height, format, type, offset);
 }


Modified: trunk/Source/WebCore/html/canvas/WebGLMultiDraw.cpp (295489 => 295490)

--- trunk/Source/WebCore/html/canvas/WebGLMultiDraw.cpp	2022-06-13 16:10:45 UTC (rev 295489)
+++ trunk/Source/WebCore/html/canvas/WebGLMultiDraw.cpp	2022-06-13 16:11:21 UTC (rev 295490)
@@ -73,7 +73,7 @@
 if (m_context->m_currentProgram && InspectorInstrumentation::isWebGLProgramDisabled(*m_context, *m_context->m_currentProgram))
 

[webkit-changes] [295489] trunk/Tools/WebKitTestRunner

2022-06-13 Thread csaavedra
Title: [295489] trunk/Tools/WebKitTestRunner








Revision 295489
Author csaave...@igalia.com
Date 2022-06-13 09:10:45 -0700 (Mon, 13 Jun 2022)


Log Message
39 bytes leaked in WTR::TestController::platformConfigureViewForTest()
https://bugs.webkit.org/show_bug.cgi?id=241525

Reviewed by Adrian Perez de Castro.

Plug a couple of leaks in the test controller.

* Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformConfigureViewForTest):
* Tools/WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformConfigureViewForTest):

Canonical link: https://commits.webkit.org/251494@main

Modified Paths

trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp
trunk/Tools/WebKitTestRunner/wpe/TestControllerWPE.cpp




Diff

Modified: trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp (295488 => 295489)

--- trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp	2022-06-13 14:07:54 UTC (rev 295488)
+++ trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp	2022-06-13 16:10:45 UTC (rev 295489)
@@ -143,7 +143,8 @@
 
 void TestController::platformConfigureViewForTest(const TestInvocation&)
 {
-WKPageSetApplicationNameForUserAgent(mainWebView()->page(), WKStringCreateWithUTF8CString("WebKitTestRunnerGTK"));
+WKRetainPtr appName = adoptWK(WKStringCreateWithUTF8CString("WebKitTestRunnerGTK"));
+WKPageSetApplicationNameForUserAgent(mainWebView()->page(), appName.get());
 }
 
 bool TestController::platformResetStateToConsistentValues(const TestOptions&)


Modified: trunk/Tools/WebKitTestRunner/wpe/TestControllerWPE.cpp (295488 => 295489)

--- trunk/Tools/WebKitTestRunner/wpe/TestControllerWPE.cpp	2022-06-13 14:07:54 UTC (rev 295488)
+++ trunk/Tools/WebKitTestRunner/wpe/TestControllerWPE.cpp	2022-06-13 16:10:45 UTC (rev 295489)
@@ -133,7 +133,8 @@
 
 void TestController::platformConfigureViewForTest(const TestInvocation&)
 {
-WKPageSetApplicationNameForUserAgent(mainWebView()->page(), WKStringCreateWithUTF8CString("WebKitTestRunnerWPE"));
+WKRetainPtr appName = adoptWK(WKStringCreateWithUTF8CString("WebKitTestRunnerWPE"));
+WKPageSetApplicationNameForUserAgent(mainWebView()->page(), appName.get());
 }
 
 bool TestController::platformResetStateToConsistentValues(const TestOptions&)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295488] trunk

2022-06-13 Thread commit-queue
Title: [295488] trunk








Revision 295488
Author commit-qu...@webkit.org
Date 2022-06-13 07:07:54 -0700 (Mon, 13 Jun 2022)


Log Message
Do not route the navigation preload response body to the service worker if we can avoid it
https://bugs.webkit.org/show_bug.cgi?id=241122
rdar://problem/94141714

Patch by Youenn Fablet  on 2022-06-13
Reviewed by Chris Dumez.

To further optimize navigation preload, we always start the preload as soon as possible.
In addition to that, we no longer pipe the body through the service worker in the common case:
- When the preload receives the response, it sends it to the service worker that will resolve the preload promise.
- The service worker is then expected to synchronously provide it to the FetchEvent.
- If the fetch event gets the preload response and the preload response has not been started to load in the service worker,
  the service worker instructs network process to let the preload directly go to the WebProcess.
- The preload response body might be loaded in the service worker if the response is cloned or if the service worker does not instruct
  the fetch event to use the preload fast enough. We schedule one task for the body to actually be loaded in the service worker.
- Set service worker navigation preload redirection fetchStart based on the navigation preloader start to continue passing
  LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/navigation-preload/resource-timing.https.html.

We store the preload response/error in WebServiceWorkerFetchTaskClient as the preload response might be received between the time the fetch event
is received and the time the fetch event is dispatched.

* LayoutTests/http/wpt/service-workers/navigation-optimization-worker.js: Added.
(async doTest):
* LayoutTests/http/wpt/service-workers/navigation-optimization.https-expected.txt: Added.
* LayoutTests/http/wpt/service-workers/navigation-optimization.https.html: Added.
* LayoutTests/http/wpt/service-workers/resources/navigation-optimization.py: Added.
(main):
* LayoutTests/http/wpt/service-workers/resources/service-worker-iframe-preload-script.py:
(main):
* LayoutTests/http/wpt/service-workers/service-worker-iframe-preload.https-expected.txt:
* LayoutTests/http/wpt/service-workers/service-worker-iframe-preload.https.html:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::createFetchResponse):
(WebCore::FetchResponse::fetch):
(WebCore::FetchResponse::startLoader):
(WebCore::FetchResponse::setReceivedInternalResponse):
(WebCore::FetchResponse::BodyLoader::didReceiveResponse):
(WebCore::FetchResponse::markAsDisturbed):
* Source/WebCore/Modules/fetch/FetchResponse.h:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/JSFetchEventCustom.cpp:
* Source/WebCore/testing/ServiceWorkerInternals.cpp:
* Source/WebCore/workers/service/FetchEvent.cpp:
(WebCore::FetchEvent::preloadResponse):
(WebCore::FetchEvent::navigationPreloadIsReady):
(WebCore::FetchEvent::navigationPreloadFailed):
* Source/WebCore/workers/service/FetchEvent.h:
* Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::processResponse):
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):
* Source/WebCore/workers/service/context/ServiceWorkerFetch.h:
* Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::navigationPreloadIsReady):
(WebCore::ServiceWorkerThreadProxy::navigationPreloadFailed):
* Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::ServiceWorkerFetchTask):
(WebKit::ServiceWorkerFetchTask::startFetch):
(WebKit::ServiceWorkerFetchTask::usePreload):
(WebKit::ServiceWorkerFetchTask::loadResponseFromPreloader):
(WebKit::ServiceWorkerFetchTask::preloadResponseIsReady):
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.messages.in:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.cpp:
(WebKit::ServiceWorkerNavigationPreloader::ServiceWorkerNavigationPreloader):
(WebKit::ServiceWorkerNavigationPreloader::didReceiveResponse):
(WebKit::ServiceWorkerNavigationPreloader::waitForResponse):
* Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::navigationPreloadIsReady):
(WebKit::WebSWContextManagerConnection::navigationPreloadFailed):
* Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h:
* Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in:
* Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
(WebKit::WebServiceWorkerFetchTaskClient::navigationPreloadIsReady):
(WebKit::WebServiceWorkerFetchTaskClient::navigationPreloadFailed):
(WebKit::WebServiceWorkerFetchTaskClient::usePreload):

[webkit-changes] [295487] trunk/Source/WebKit/Shared

2022-06-13 Thread jya
Title: [295487] trunk/Source/WebKit/Shared








Revision 295487
Author j...@apple.com
Date 2022-06-13 05:12:37 -0700 (Mon, 13 Jun 2022)


Log Message
SharedBuffer IPC encoders have duplicated and redundant code
https://bugs.webkit.org/show_bug.cgi?id=241407


Reviewed by Kimmo Kinnunen.

Bug 240160 allowed to greatly simplify the serialisation of SharedBuffer objects,
so make use of it.

* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::encodeSharedBuffer): Deleted.
(IPC::decodeSharedBuffer): Deleted.
(IPC::encodeTypesAndData): Deleted.
(IPC::decodeTypesAndData): Deleted.
(IPC::ArgumentCoder>::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
(IPC::ArgumentCoder>::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
(IPC::ArgumentCoder>::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
(IPC::ArgumentCoder>::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.h:

Canonical link: https://commits.webkit.org/251492@main

Modified Paths

trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp
trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h




Diff

Modified: trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp (295486 => 295487)

--- trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp	2022-06-13 10:16:15 UTC (rev 295486)
+++ trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp	2022-06-13 12:12:37 UTC (rev 295487)
@@ -168,114 +168,6 @@
 
 #undef DEFINE_SIMPLE_ARGUMENT_CODER_FOR_SOURCE
 
-static void encodeSharedBuffer(Encoder& encoder, const FragmentedSharedBuffer* buffer)
-{
-bool isNull = !buffer;
-encoder << isNull;
-if (isNull)
-return;
-
-uint64_t bufferSize = buffer->size();
-encoder << bufferSize;
-if (!bufferSize)
-return;
-
-#if USE(UNIX_DOMAIN_SOCKETS)
-// Do not use shared memory for FragmentedSharedBuffer encoding in Unix, because it's easy to reach the
-// maximum number of file descriptors open per process when sending large data in small chunks
-// over the IPC. ConnectionUnix.cpp already uses shared memory to send any IPC message that is
-// too large. See https://bugs.webkit.org/show_bug.cgi?id=208571.
-for (const auto& element : *buffer)
-encoder.encodeFixedLengthData(element.segment->data(), element.segment->size(), 1);
-#else
-SharedMemory::Handle handle;
-{
-auto sharedMemoryBuffer = SharedMemory::copyBuffer(*buffer);
-sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly);
-}
-encoder << SharedMemory::IPCHandle { WTFMove(handle), bufferSize };
-#endif
-}
-
-static WARN_UNUSED_RETURN bool decodeSharedBuffer(Decoder& decoder, RefPtr& buffer)
-{
-std::optional isNull;
-decoder >> isNull;
-if (!isNull)
-return false;
-
-if (*isNull) {
-buffer = nullptr;
-return true;
-}
-
-uint64_t bufferSize = 0;
-if (!decoder.decode(bufferSize))
-return false;
-
-if (!bufferSize) {
-buffer = SharedBuffer::create();
-return true;
-}
-
-#if USE(UNIX_DOMAIN_SOCKETS)
-if (!decoder.bufferIsLargeEnoughToContain(bufferSize))
-return false;
-
-Vector data;
-data.grow(bufferSize);
-if (!decoder.decodeFixedLengthData(data.data(), data.size(), 1))
-return false;
-
-buffer = SharedBuffer::create(WTFMove(data));
-#else
-SharedMemory::IPCHandle ipcHandle;
-if (!decoder.decode(ipcHandle))
-return false;
-
-auto sharedMemoryBuffer = SharedMemory::map(ipcHandle.handle, SharedMemory::Protection::ReadOnly);
-if (!sharedMemoryBuffer)
-return false;
-
-if (sharedMemoryBuffer->size() < bufferSize)
-return false;
-
-buffer = SharedBuffer::create(static_cast(sharedMemoryBuffer->data()), bufferSize);
-#endif
-
-return true;
-}
-
-static void encodeTypesAndData(Encoder& encoder, const Vector& types, const Vector>& data)
-{
-ASSERT(types.size() == data.size());
-encoder << types;
-encoder << static_cast(data.size());
-for (auto& buffer : data)
-encodeSharedBuffer(encoder, buffer.get());
-}
-
-static WARN_UNUSED_RETURN bool decodeTypesAndData(Decoder& decoder, Vector& types, Vector>& data)
-{
-if (!decoder.decode(types))
-return false;
-
-uint64_t dataSize;
-if (!decoder.decode(dataSize))
-return false;
-
-ASSERT(dataSize 

[webkit-changes] [295486] trunk/Source/WebCore/html/canvas

2022-06-13 Thread commit-queue
Title: [295486] trunk/Source/WebCore/html/canvas








Revision 295486
Author commit-qu...@webkit.org
Date 2022-06-13 03:16:15 -0700 (Mon, 13 Jun 2022)


Log Message
Align WebGL draw call functions
https://bugs.webkit.org/show_bug.cgi?id=241347

Patch by Alexey Knyazev <3479527+lexaknya...@users.noreply.github.com> on 2022-06-13
Reviewed by Kimmo Kinnunen.

Some draw commands did not have implicit clears,
inspector helpers, and post-draw notifications.

* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::drawRangeElements):
* Source/WebCore/html/canvas/WebGLMultiDraw.cpp:
(WebCore::WebGLMultiDraw::multiDrawArraysWEBGL):
(WebCore::WebGLMultiDraw::multiDrawArraysInstancedWEBGL):
(WebCore::WebGLMultiDraw::multiDrawElementsWEBGL):
(WebCore::WebGLMultiDraw::multiDrawElementsInstancedWEBGL):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::InspectorScopedShaderProgramHighlight::InspectorScopedShaderProgramHighlight):
(WebCore::InspectorScopedShaderProgramHighlight::~InspectorScopedShaderProgramHighlight):
(WebCore::InspectorScopedShaderProgramHighlight::showHighlight):
(WebCore::InspectorScopedShaderProgramHighlight::hideHighlight):
(WebCore::InspectorScopedShaderProgramHighlight::saveBlendValue):
(WebCore::InspectorScopedShaderProgramHighlight::hasBufferBinding):
(WebCore::InspectorScopedShaderProgramHighlight::hasFramebufferParameterAttachment):
(WebCore::WebGLRenderingContextBase::drawArraysInstanced):
(WebCore::WebGLRenderingContextBase::drawElementsInstanced):
(WebCore::InspectorScopedShaderProgramHighlight::showHightlight): Deleted.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:

Canonical link: https://commits.webkit.org/251491@main

Modified Paths

trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
trunk/Source/WebCore/html/canvas/WebGLMultiDraw.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h




Diff

Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (295485 => 295486)

--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2022-06-13 09:55:16 UTC (rev 295485)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2022-06-13 10:16:15 UTC (rev 295486)
@@ -1608,7 +1608,19 @@
 return;
 if (!validateVertexArrayObject("drawRangeElements"))
 return;
-m_context->drawRangeElements(mode, start, end, count, type, offset);
+
+if (m_currentProgram && InspectorInstrumentation::isWebGLProgramDisabled(*this, *m_currentProgram))
+return;
+
+clearIfComposited(ClearCallerDrawOrClear);
+
+{
+InspectorScopedShaderProgramHighlight scopedHighlight(*this, m_currentProgram.get());
+
+m_context->drawRangeElements(mode, start, end, count, type, offset);
+}
+
+markContextChangedAndNotifyCanvasObserver();
 }
 
 void WebGL2RenderingContext::drawBuffers(const Vector& buffers)


Modified: trunk/Source/WebCore/html/canvas/WebGLMultiDraw.cpp (295485 => 295486)

--- trunk/Source/WebCore/html/canvas/WebGLMultiDraw.cpp	2022-06-13 09:55:16 UTC (rev 295485)
+++ trunk/Source/WebCore/html/canvas/WebGLMultiDraw.cpp	2022-06-13 10:16:15 UTC (rev 295486)
@@ -28,6 +28,8 @@
 #if ENABLE(WEBGL)
 #include "WebGLMultiDraw.h"
 
+#include "InspectorInstrumentation.h"
+
 #include 
 
 namespace WebCore {
@@ -65,7 +67,21 @@
 return;
 }
 
-m_context->graphicsContextGL()->multiDrawArraysANGLE(mode, GCGLSpanTuple { firstsList.data() + firstsOffset, countsList.data() + countsOffset, static_cast(drawcount) });
+if (!m_context->validateVertexArrayObject("multiDrawArraysWEBGL"))
+return;
+
+if (m_context->m_currentProgram && InspectorInstrumentation::isWebGLProgramDisabled(*m_context, *m_context->m_currentProgram))
+return;
+
+m_context->clearIfComposited(WebGLRenderingContextBase::ClearCallerDrawOrClear);
+
+{
+InspectorScopedShaderProgramHighlight scopedHighlight(*m_context, m_context->m_currentProgram.get());
+
+m_context->graphicsContextGL()->multiDrawArraysANGLE(mode, GCGLSpanTuple { firstsList.data() + firstsOffset, countsList.data() + countsOffset, static_cast(drawcount) });
+}
+
+m_context->markContextChangedAndNotifyCanvasObserver();
 }
 
 void WebGLMultiDraw::multiDrawArraysInstancedWEBGL(GCGLenum mode, Int32List firstsList, GCGLuint firstsOffset, Int32List countsList, GCGLuint countsOffset, Int32List instanceCountsList, GCGLuint instanceCountsOffset, GCGLsizei drawcount)
@@ -80,7 +96,21 @@
 return;
 }
 
-m_context->graphicsContextGL()->multiDrawArraysInstancedANGLE(mode, GCGLSpanTuple { firstsList.data() +  firstsOffset, countsList.data() + countsOffset, instanceCountsList.data() + instanceCountsOffset, static_cast(drawcount) });
+if (!m_context->validateVertexArrayObject("multiDrawArraysInstancedWEBGL"))
+return;
+
+if (m_context->m_currentProgram && 

[webkit-changes] [295484] trunk/Source/WebCore/platform/graphics/gbm/ GraphicsContextGLGBM.cpp

2022-06-13 Thread commit-queue
Title: [295484] trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp








Revision 295484
Author commit-qu...@webkit.org
Date 2022-06-13 02:17:27 -0700 (Mon, 13 Jun 2022)


Log Message
[GBM] Overzealous attaching of GL texture as color attachment to the default framebuffer
https://bugs.webkit.org/show_bug.cgi?id=241462

Patch by Žan Doberšek  on 2022-06-13
Reviewed by Alejandro G. Castro.

In GraphicsContextGLGBM::prepareTexture(), there's no need to repeatedly
reattach the texture objec to the default framebuffer. With GraphicsContextGLGBM
this is only done when (re)sizing the framebuffer. The attached texture later
isn't switched out for some other texture, it remains in place. What does change
is the backing DMABuf-based EGLImage, which is updated upon the next
make-context-current request.

This means framebuffer operations here, after any required multisampling is
resolved, are not required. Only thing that remains is the GL_Flush() call.

* Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:
(WebCore::GraphicsContextGLGBM::prepareTexture):

Canonical link: https://commits.webkit.org/251489@main

Modified Paths

trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp




Diff

Modified: trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp (295483 => 295484)

--- trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp	2022-06-13 08:09:29 UTC (rev 295483)
+++ trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp	2022-06-13 09:17:27 UTC (rev 295484)
@@ -355,12 +355,7 @@
 if (contextAttributes().antialias)
 resolveMultisamplingIfNecessary();
 
-GL_BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
-GL_FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, drawingBufferTextureTarget(), m_texture, 0);
 GL_Flush();
-
-if (m_state.boundDrawFBO != m_fbo)
-GL_BindFramebuffer(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
 }
 
 bool GraphicsContextGLGBM::reshapeDisplayBufferBacking()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295483] trunk/Tools/MiniBrowser

2022-06-13 Thread commit-queue
Title: [295483] trunk/Tools/MiniBrowser








Revision 295483
Author commit-qu...@webkit.org
Date 2022-06-13 01:09:29 -0700 (Mon, 13 Jun 2022)


Log Message
REGRESSION(r265492): Removed ability to pass GStreamer options from MiniBrowser to WebProcess
https://bugs.webkit.org/show_bug.cgi?id=241507

Patch by Philippe Normand  on 2022-06-13
Reviewed by Xabier Rodriguez-Calvar.

When the static gstreamer-full library is disabled at build time we should still have the
possibility to add the GStreamer CLI init group to the UIProcess commandline.

* Tools/MiniBrowser/gtk/CMakeLists.txt:
* Tools/MiniBrowser/gtk/main.c:
(main):
* Tools/MiniBrowser/wpe/CMakeLists.txt:
* Tools/MiniBrowser/wpe/main.cpp:
(main):

Canonical link: https://commits.webkit.org/251488@main

Modified Paths

trunk/Tools/MiniBrowser/gtk/CMakeLists.txt
trunk/Tools/MiniBrowser/gtk/main.c
trunk/Tools/MiniBrowser/wpe/CMakeLists.txt
trunk/Tools/MiniBrowser/wpe/main.cpp




Diff

Modified: trunk/Tools/MiniBrowser/gtk/CMakeLists.txt (295482 => 295483)

--- trunk/Tools/MiniBrowser/gtk/CMakeLists.txt	2022-06-13 07:15:12 UTC (rev 295482)
+++ trunk/Tools/MiniBrowser/gtk/CMakeLists.txt	2022-06-13 08:09:29 UTC (rev 295483)
@@ -46,6 +46,11 @@
 WebProcess
 )
 
+if (NOT USE_GSTREAMER_FULL)
+  list(APPEND MiniBrowser_PRIVATE_INCLUDE_DIRECTORIES ${GSTREAMER_INCLUDE_DIRS})
+  list(APPEND MiniBrowser_PRIVATE_LIBRARIES ${GSTREAMER_LIBRARIES})
+endif ()
+
 add_custom_command(
 OUTPUT ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.c
${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.h


Modified: trunk/Tools/MiniBrowser/gtk/main.c (295482 => 295483)

--- trunk/Tools/MiniBrowser/gtk/main.c	2022-06-13 07:15:12 UTC (rev 295482)
+++ trunk/Tools/MiniBrowser/gtk/main.c	2022-06-13 08:09:29 UTC (rev 295483)
@@ -34,6 +34,10 @@
 #include 
 #include 
 
+#if !USE_GSTREAMER_FULL && (ENABLE_WEB_AUDIO || ENABLE_VIDEO)
+#include 
+#endif
+
 #define MINI_BROWSER_ERROR (miniBrowserErrorQuark())
 
 static const gchar **uriArguments = NULL;
@@ -804,6 +808,9 @@
 #if !GTK_CHECK_VERSION(3, 98, 0)
 g_option_context_add_group(context, gtk_get_option_group(TRUE));
 #endif
+#if !USE_GSTREAMER_FULL && (ENABLE_WEB_AUDIO || ENABLE_VIDEO)
+g_option_context_add_group(context, gst_init_get_option_group());
+#endif
 
 WebKitSettings *webkitSettings = webkit_settings_new();
 webkit_settings_set_enable_developer_extras(webkitSettings, TRUE);


Modified: trunk/Tools/MiniBrowser/wpe/CMakeLists.txt (295482 => 295483)

--- trunk/Tools/MiniBrowser/wpe/CMakeLists.txt	2022-06-13 07:15:12 UTC (rev 295482)
+++ trunk/Tools/MiniBrowser/wpe/CMakeLists.txt	2022-06-13 08:09:29 UTC (rev 295483)
@@ -26,6 +26,11 @@
 WebKit::WebKit
 )
 
+if (NOT USE_GSTREAMER_FULL)
+  list(APPEND MiniBrowser_PRIVATE_INCLUDE_DIRECTORIES ${GSTREAMER_INCLUDE_DIRS})
+  list(APPEND MiniBrowser_PRIVATE_LIBRARIES ${GSTREAMER_LIBRARIES})
+endif ()
+
 if (DEVELOPER_MODE)
 list(APPEND MiniBrowser_PRIVATE_DEFINITIONS WEBKIT_INJECTED_BUNDLE_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
 endif ()


Modified: trunk/Tools/MiniBrowser/wpe/main.cpp (295482 => 295483)

--- trunk/Tools/MiniBrowser/wpe/main.cpp	2022-06-13 07:15:12 UTC (rev 295482)
+++ trunk/Tools/MiniBrowser/wpe/main.cpp	2022-06-13 08:09:29 UTC (rev 295483)
@@ -31,6 +31,10 @@
 #include 
 #include 
 
+#if !USE_GSTREAMER_FULL && (ENABLE_WEB_AUDIO || ENABLE_VIDEO)
+#include 
+#endif
+
 #if defined(ENABLE_ACCESSIBILITY) && ENABLE_ACCESSIBILITY
 #include 
 #endif
@@ -188,6 +192,10 @@
 GOptionContext* context = g_option_context_new(nullptr);
 g_option_context_add_main_entries(context, commandLineOptions, nullptr);
 
+#if !USE_GSTREAMER_FULL && (ENABLE_WEB_AUDIO || ENABLE_VIDEO)
+g_option_context_add_group(context, gst_init_get_option_group());
+#endif
+
 GError* error = nullptr;
 if (!g_option_context_parse(context, , , )) {
 g_printerr("Cannot parse arguments: %s\n", error->message);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295482] trunk

2022-06-13 Thread commit-queue
Title: [295482] trunk








Revision 295482
Author commit-qu...@webkit.org
Date 2022-06-13 00:15:12 -0700 (Mon, 13 Jun 2022)


Log Message
Switch Web Share Permissions Policy to *
https://bugs.webkit.org/show_bug.cgi?id=241363

Patch by Marcos Cáceres  on 2022-06-12
Reviewed by Youenn Fablet and Tim Horton.

* LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt:
* LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html:
* LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt:
* LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https.html:
* Source/WebCore/html/FeaturePolicy.cpp:
(WebCore::FeaturePolicy::parse):

Canonical link: https://commits.webkit.org/251487@main

Modified Paths

trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt
trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html
trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt
trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https.html
trunk/Source/WebCore/html/FeaturePolicy.cpp




Diff

Modified: trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt (295481 => 295482)

--- trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt	2022-06-13 04:26:54 UTC (rev 295481)
+++ trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https-expected.txt	2022-06-13 07:15:12 UTC (rev 295482)
@@ -1,9 +1,8 @@
-CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute ''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute 'web-share 'none''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://127.0.0.1:8443' and allow attribute 'web-share 'none''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute 'web-share 'self''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://127.0.0.1:8443' and allow attribute 'web-share https://localhost:8443'.
-PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="" MUST NOT be allowed to call canShare().
+PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="" is allowed to call canShare().
 PASS iframe src: "https://127.0.0.1:8443/webshare/resources/webshare-postmessage.html" with allow="" is allowed to call canShare().
 PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="web-share" is allowed to call canShare().
 PASS iframe src: "https://127.0.0.1:8443/webshare/resources/webshare-postmessage.html" with allow="web-share" is allowed to call canShare().


Modified: trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html (295481 => 295482)

--- trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html	2022-06-13 04:26:54 UTC (rev 295481)
+++ trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-canShare.https.html	2022-06-13 07:15:12 UTC (rev 295482)
@@ -48,7 +48,7 @@
   
   
 -  data-enabled="false"
+  data-enabled="true"
   src=""
 >
 

Modified: trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt (295481 => 295482)

--- trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt	2022-06-13 04:26:54 UTC (rev 295481)
+++ trunk/LayoutTests/http/tests/webshare/webshare-allow-attribute-share.https-expected.txt	2022-06-13 07:15:12 UTC (rev 295482)
@@ -1,9 +1,8 @@
-CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute ''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute 'web-share 'none''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://127.0.0.1:8443' and allow attribute 'web-share 'none''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://localhost:8443' and allow attribute 'web-share 'self''.
 CONSOLE MESSAGE: Feature policy 'WebShare' check failed for iframe with origin 'https://127.0.0.1:8443' and allow attribute 'web-share https://localhost:8443'.
-PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="" MUST NOT be allowed to call share(). NotAllowedError Third-party iframes are not allowed to call share() unless explicitly allowed via Feature-Policy (web-share)
+PASS iframe src: "https://localhost:8443/webshare/resources/webshare-postmessage.html" with allow="" is allowed to call share().
 PASS