[webkit-changes] [276286] trunk/Source/ThirdParty/ANGLE

2021-04-19 Thread commit-queue
Title: [276286] trunk/Source/ThirdParty/ANGLE








Revision 276286
Author commit-qu...@webkit.org
Date 2021-04-19 22:19:31 -0700 (Mon, 19 Apr 2021)


Log Message
Build ANGLE dylib into WK_OVERRIDE_FRAMEWORKS_DIR in builds that use it
https://bugs.webkit.org/show_bug.cgi?id=224785


Patch by Alex Christensen  on 2021-04-19
Reviewed by Alexey Proskuryakov.

* Configurations/ANGLE-dynamic.xcconfig:

Modified Paths

trunk/Source/ThirdParty/ANGLE/ChangeLog
trunk/Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig




Diff

Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (276285 => 276286)

--- trunk/Source/ThirdParty/ANGLE/ChangeLog	2021-04-20 05:15:43 UTC (rev 276285)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog	2021-04-20 05:19:31 UTC (rev 276286)
@@ -1,3 +1,13 @@
+2021-04-19  Alex Christensen  
+
+Build ANGLE dylib into WK_OVERRIDE_FRAMEWORKS_DIR in builds that use it
+https://bugs.webkit.org/show_bug.cgi?id=224785
+
+
+Reviewed by Alexey Proskuryakov.
+
+* Configurations/ANGLE-dynamic.xcconfig:
+
 2021-04-16  Kyle Piddington  
 
 Metal-ANGLE: Shared memory texture tests failing in iOS Simulator


Modified: trunk/Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig (276285 => 276286)

--- trunk/Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig	2021-04-20 05:15:43 UTC (rev 276285)
+++ trunk/Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig	2021-04-20 05:19:31 UTC (rev 276286)
@@ -18,7 +18,9 @@
 
 INSTALL_PATH = $(NORMAL_WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks;
 INSTALL_PATH[sdk=macosx*] = $(INSTALL_PATH_USE_ALTERNATE_FRAMEWORKS_DIR_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
-INSTALL_PATH_USE_ALTERNATE_FRAMEWORKS_DIR_NO = $(NORMAL_WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
+INSTALL_PATH_USE_ALTERNATE_FRAMEWORKS_DIR_NO = $(INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
+INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
+INSTALL_PATH_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
 INSTALL_PATH_USE_ALTERNATE_FRAMEWORKS_DIR_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR)/$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/WebCore.framework/Versions/A/Frameworks;
 
 DYLIB_INSTALL_NAME_BASE[sdk=macosx*] = $(DYLIB_INSTALL_NAME_BASE_USE_ALTERNATE_FRAMEWORKS_DIR_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));






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


[webkit-changes] [276284] trunk

2021-04-19 Thread cdumez
Title: [276284] trunk








Revision 276284
Author cdu...@apple.com
Date 2021-04-19 21:49:46 -0700 (Mon, 19 Apr 2021)


Log Message
REGRESSION (r276189): GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is crashing
https://bugs.webkit.org/show_bug.cgi?id=224790


Reviewed by Darin Adler.

Source/WebKit:

GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is intentionally repeatedly
killing the GPUProcess. As a result, the GPUProcess may get killed very shortly after
a relaunch and the RemoteAudioDestinationManager::StartAudioDestination synchronous IPC
may fail if it is ongoing at the time of the crash. This would cause m_destinationID to
not get initialized and then get sent as IPC parameter, thus crashing.

pre-r276189, we were not crashing because m_destinationID was not reset on crash and we
would thus send IPC for a destination that does not exist but at least the destinationID
would not be 0. This patch makes sure we don't try and send IPC at all when m_destinationID
is 0.

* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::connection):
(WebKit::RemoteAudioDestinationProxy::startRendering):
(WebKit::RemoteAudioDestinationProxy::stopRendering):
(WebKit::RemoteAudioDestinationProxy::storageChanged):
* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:

Tools:

Re-enable API test now that it is no longer crashing.

* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (276283 => 276284)

--- trunk/Source/WebKit/ChangeLog	2021-04-20 04:45:42 UTC (rev 276283)
+++ trunk/Source/WebKit/ChangeLog	2021-04-20 04:49:46 UTC (rev 276284)
@@ -1,3 +1,29 @@
+2021-04-19  Chris Dumez  
+
+REGRESSION (r276189): GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is crashing
+https://bugs.webkit.org/show_bug.cgi?id=224790
+
+
+Reviewed by Darin Adler.
+
+GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is intentionally repeatedly
+killing the GPUProcess. As a result, the GPUProcess may get killed very shortly after
+a relaunch and the RemoteAudioDestinationManager::StartAudioDestination synchronous IPC
+may fail if it is ongoing at the time of the crash. This would cause m_destinationID to
+not get initialized and then get sent as IPC parameter, thus crashing.
+
+pre-r276189, we were not crashing because m_destinationID was not reset on crash and we
+would thus send IPC for a destination that does not exist but at least the destinationID
+would not be 0. This patch makes sure we don't try and send IPC at all when m_destinationID
+is 0.
+
+* WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
+(WebKit::RemoteAudioDestinationProxy::connection):
+(WebKit::RemoteAudioDestinationProxy::startRendering):
+(WebKit::RemoteAudioDestinationProxy::stopRendering):
+(WebKit::RemoteAudioDestinationProxy::storageChanged):
+* WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
+
 2021-04-19  Jer Noble  
 
 [iOS] Media playback continues after backgrounding hosting application


Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp (276283 => 276284)

--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp	2021-04-20 04:45:42 UTC (rev 276283)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp	2021-04-20 04:49:46 UTC (rev 276284)
@@ -98,12 +98,18 @@
 m_renderThread = nullptr;
 }
 
-GPUProcessConnection& RemoteAudioDestinationProxy::ensureGPUProcessConnection()
+IPC::Connection* RemoteAudioDestinationProxy::connection()
 {
 if (!m_gpuProcessConnection) {
 m_gpuProcessConnection = makeWeakPtr(WebProcess::singleton().ensureGPUProcessConnection());
 m_gpuProcessConnection->addClient(*this);
 
+if (!m_gpuProcessConnection->connection().sendSync(Messages::RemoteAudioDestinationManager::CreateAudioDestination(m_inputDeviceId, m_numberOfInputChannels, numberOfOutputChannels(), sampleRate(), hardwareSampleRate(), m_renderSemaphore), Messages::RemoteAudioDestinationManager::CreateAudioDestination::Reply(m_destinationID), 0)) {
+// The GPUProcess likely crashed during this synchronous IPC. gpuProcessConnectionDidClose() will get called to reconnect to the GPUProcess.
+RELEASE_LOG_ERROR(Media, "RemoteAudioDestinationProxy::destinationID: IPC to create the audio destination failed, the GPUProcess likely crashed.");
+return nullptr;
+}
+
 #if PLATFORM(COCOA)
 m_currentFrame = 0;
 AudioStreamBasicDescription 

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

2021-04-19 Thread said
Title: [276283] trunk/Source/WebCore








Revision 276283
Author s...@apple.com
Date 2021-04-19 21:45:42 -0700 (Mon, 19 Apr 2021)


Log Message
cachedCGColor() and nsColor() are not thread-safe
https://bugs.webkit.org/show_bug.cgi?id=223033

Reviewed by Chris Dumez.

These functions will break if they are used by a worker thread.

* platform/graphics/cg/ColorCG.cpp:
(WebCore::cachedCGColor):
* platform/graphics/mac/ColorMac.mm:
(WebCore::nsColor):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cg/ColorCG.cpp
trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (276282 => 276283)

--- trunk/Source/WebCore/ChangeLog	2021-04-20 03:26:59 UTC (rev 276282)
+++ trunk/Source/WebCore/ChangeLog	2021-04-20 04:45:42 UTC (rev 276283)
@@ -1,3 +1,17 @@
+2021-04-19  Said Abou-Hallawa  
+
+cachedCGColor() and nsColor() are not thread-safe
+https://bugs.webkit.org/show_bug.cgi?id=223033
+
+Reviewed by Chris Dumez.
+
+These functions will break if they are used by a worker thread.
+
+* platform/graphics/cg/ColorCG.cpp:
+(WebCore::cachedCGColor):
+* platform/graphics/mac/ColorMac.mm:
+(WebCore::nsColor):
+
 2021-04-19  Wenson Hsieh  
 
 Rename FloatQuad::isEmpty() to boundingBoxIsEmpty() and reimplement isEmpty()


Modified: trunk/Source/WebCore/platform/graphics/cg/ColorCG.cpp (276282 => 276283)

--- trunk/Source/WebCore/platform/graphics/cg/ColorCG.cpp	2021-04-20 03:26:59 UTC (rev 276282)
+++ trunk/Source/WebCore/platform/graphics/cg/ColorCG.cpp	2021-04-20 04:45:42 UTC (rev 276283)
@@ -29,7 +29,9 @@
 #if USE(CG)
 
 #include "ColorSpaceCG.h"
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -126,20 +128,35 @@
 if (auto srgb = color.tryGetAsSRGBABytes()) {
 switch (PackedColor::RGBA { *srgb }.value) {
 case PackedColor::RGBA { Color::transparentBlack }.value: {
-static NeverDestroyed> transparentCGColor = createCGColor(color);
+static LazyNeverDestroyed> transparentCGColor;
+static std::once_flag onceFlag;
+std::call_once(onceFlag, [] {
+transparentCGColor.construct(createCGColor(Color::transparentBlack));
+});
 return transparentCGColor.get().get();
 }
 case PackedColor::RGBA { Color::black }.value: {
-static NeverDestroyed> blackCGColor = createCGColor(color);
+static LazyNeverDestroyed> blackCGColor;
+static std::once_flag onceFlag;
+std::call_once(onceFlag, [] {
+blackCGColor.construct(createCGColor(Color::black));
+});
 return blackCGColor.get().get();
 }
 case PackedColor::RGBA { Color::white }.value: {
-static NeverDestroyed> whiteCGColor = createCGColor(color);
+static LazyNeverDestroyed> whiteCGColor;
+static std::once_flag onceFlag;
+std::call_once(onceFlag, [] {
+whiteCGColor.construct(createCGColor(Color::white));
+});
 return whiteCGColor.get().get();
 }
 }
 }
 
+static Lock cachedColorLock;
+auto holder = holdLock(cachedColorLock);
+
 static NeverDestroyed, 32>> cache;
 return cache.get().get(color).get();
 }


Modified: trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm (276282 => 276283)

--- trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm	2021-04-20 03:26:59 UTC (rev 276282)
+++ trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm	2021-04-20 04:45:42 UTC (rev 276283)
@@ -30,6 +30,7 @@
 
 #import "LocalCurrentGraphicsContext.h"
 #import 
+#import 
 #import 
 #import 
 #import 
@@ -116,20 +117,35 @@
 if (auto srgb = color.tryGetAsSRGBABytes()) {
 switch (PackedColor::RGBA { *srgb }.value) {
 case PackedColor::RGBA { Color::transparentBlack }.value: {
-static NeverDestroyed> clearColor = [NSColor colorWithSRGBRed:0 green:0 blue:0 alpha:0];
+static LazyNeverDestroyed> clearColor;
+static std::once_flag onceFlag;
+std::call_once(onceFlag, [] {
+clearColor.construct([NSColor colorWithSRGBRed:0 green:0 blue:0 alpha:0]);
+});
 return clearColor.get().get();
 }
 case PackedColor::RGBA { Color::black }.value: {
-static NeverDestroyed> blackColor = [NSColor colorWithSRGBRed:0 green:0 blue:0 alpha:1];
+static LazyNeverDestroyed> blackColor;
+static std::once_flag onceFlag;
+std::call_once(onceFlag, [] {
+blackColor.construct([NSColor colorWithSRGBRed:0 green:0 blue:0 alpha:1]);
+});
 return blackColor.get().get();
 }
 case PackedColor::RGBA { Color::white }.value: {
-static NeverDestroyed> whiteColor = [NSColor colorWithSRGBRed:1 green:1 

[webkit-changes] [276282] trunk/LayoutTests

2021-04-19 Thread dpino
Title: [276282] trunk/LayoutTests








Revision 276282
Author dp...@igalia.com
Date 2021-04-19 20:26:59 -0700 (Mon, 19 Apr 2021)


Log Message
[GLIB] Unreviewed test gardening. Gardened flaky failures after r224791.

* platform/glib/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/glib/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (276281 => 276282)

--- trunk/LayoutTests/ChangeLog	2021-04-20 02:26:20 UTC (rev 276281)
+++ trunk/LayoutTests/ChangeLog	2021-04-20 03:26:59 UTC (rev 276282)
@@ -1,5 +1,11 @@
 2021-04-19  Diego Pino Garcia  
 
+[GLIB] Unreviewed test gardening. Gardened flaky failures after r224791.
+
+* platform/glib/TestExpectations:
+
+2021-04-19  Diego Pino Garcia  
+
 [GLIB] Unreviewed test gardening. Update baselines and test expectations after r224791.
 
 * platform/glib/TestExpectations:


Modified: trunk/LayoutTests/platform/glib/TestExpectations (276281 => 276282)

--- trunk/LayoutTests/platform/glib/TestExpectations	2021-04-20 02:26:20 UTC (rev 276281)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2021-04-20 03:26:59 UTC (rev 276282)
@@ -250,6 +250,7 @@
 
 # The test is marked as Timeout for wk2. It has been flaky in GTK and WPE since added.
 webaudio/Panner/hrtf-database.html [ Timeout Pass ]
+webaudio/Panner/panner-loop.html [ Timeout Pass ]
 
 #
 # End of PASSING tests.
@@ -374,6 +375,7 @@
 webkit.org/b/169916 css3/blending/blend-mode-reflection.html [ Missing Failure ]
 webkit.org/b/169916 css3/blending/blend-mode-simple-composited.html [ Missing Failure ]
 webkit.org/b/169916 imported/blink/css3/blending/mix-blend-mode-with-squashing-layer.html [ ImageOnlyFailure ]
+webkit.org/b/222844 imported/blink/compositing/draws-content/webgl-simple-background.html [ ImageOnlyFailure Pass ]
 
 #
 # End of Compositing tests
@@ -2350,6 +2352,9 @@
 
 webkit.org/b/224791 fast/cookies/cookie-averse-document.html [ Crash ]
 webkit.org/b/224791 fast/cookies/local-file-can-set-cookies.html [ Crash Pass ]
+webkit.org/b/224791 imported/w3c/web-platform-tests/fetch/nosniff/parsing-nosniff.window.html [ Failure Pass ]
+webkit.org/b/224791 imported/w3c/web-platform-tests/mimesniff/mime-types/parsing.any.html [ Timeout Pass ]
+webkit.org/b/224791 imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noreferrer.html [ Timeout Pass ]
 
 # End: Common failures between GTK and WPE.
 






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


[webkit-changes] [276281] trunk/Source/WebKit

2021-04-19 Thread jer . noble
Title: [276281] trunk/Source/WebKit








Revision 276281
Author jer.no...@apple.com
Date 2021-04-19 19:26:20 -0700 (Mon, 19 Apr 2021)


Log Message
[iOS] Media playback continues after backgrounding hosting application
https://bugs.webkit.org/show_bug.cgi?id=224776


Reviewed by Eric Carlson.

Tested by existing API test: WKWebViewPausePlayingAudioTests.OutOfWindow

When the MediaSessionHelperIOS was moved into the GPU process, no object remains listening for the
UIApplication{Will,Did}Enter{Foreground,Background}Notification rebroadcasted by WebPageIOS.

Rather than just rebroadcast the UIKit notification to all listeners within the WebContent process,
which may or may not be listening, just tell the current PlatformMediaSessionManager directly.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationWillResignActive):
(WebKit::WebPage::applicationDidEnterBackground):
(WebKit::WebPage::applicationWillEnterForeground):
(WebKit::WebPage::applicationDidBecomeActive):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (276280 => 276281)

--- trunk/Source/WebKit/ChangeLog	2021-04-20 01:02:01 UTC (rev 276280)
+++ trunk/Source/WebKit/ChangeLog	2021-04-20 02:26:20 UTC (rev 276281)
@@ -1,3 +1,25 @@
+2021-04-19  Jer Noble  
+
+[iOS] Media playback continues after backgrounding hosting application
+https://bugs.webkit.org/show_bug.cgi?id=224776
+
+
+Reviewed by Eric Carlson.
+
+Tested by existing API test: WKWebViewPausePlayingAudioTests.OutOfWindow
+
+When the MediaSessionHelperIOS was moved into the GPU process, no object remains listening for the
+UIApplication{Will,Did}Enter{Foreground,Background}Notification rebroadcasted by WebPageIOS.
+
+Rather than just rebroadcast the UIKit notification to all listeners within the WebContent process,
+which may or may not be listening, just tell the current PlatformMediaSessionManager directly.
+
+* WebProcess/WebPage/ios/WebPageIOS.mm:
+(WebKit::WebPage::applicationWillResignActive):
+(WebKit::WebPage::applicationDidEnterBackground):
+(WebKit::WebPage::applicationWillEnterForeground):
+(WebKit::WebPage::applicationDidBecomeActive):
+
 2021-04-19  Chris Dumez  
 
 MotionMark's Canvas-Arcs subtest is broken if the GPUProcess is not yet running


Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (276280 => 276281)

--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2021-04-20 01:02:01 UTC (rev 276280)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2021-04-20 02:26:20 UTC (rev 276281)
@@ -117,6 +117,7 @@
 #import 
 #import 
 #import 
+#import 
 #import 
 #import 
 #import 
@@ -3745,6 +3746,11 @@
 void WebPage::applicationWillResignActive()
 {
 [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillResignActiveNotification object:nil];
+
+// FIXME(224775): Move to WebProcess
+if (auto* manager = PlatformMediaSessionManager::sharedManagerIfExists())
+manager->applicationWillBecomeInactive();
+
 if (m_page)
 m_page->applicationWillResignActive();
 }
@@ -3756,6 +3762,10 @@
 m_isSuspendedUnderLock = isSuspendedUnderLock;
 freezeLayerTree(LayerTreeFreezeReason::BackgroundApplication);
 
+// FIXME(224775): Move to WebProcess
+if (auto* manager = PlatformMediaSessionManager::sharedManagerIfExists())
+manager->applicationDidEnterBackground(isSuspendedUnderLock);
+
 if (m_page)
 m_page->applicationDidEnterBackground();
 }
@@ -3774,6 +3784,10 @@
 
 [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillEnterForegroundNotification object:nil userInfo:@{@"isSuspendedUnderLock": @(isSuspendedUnderLock)}];
 
+// FIXME(224775): Move to WebProcess
+if (auto* manager = PlatformMediaSessionManager::sharedManagerIfExists())
+manager->applicationWillEnterForeground(isSuspendedUnderLock);
+
 if (m_page)
 m_page->applicationWillEnterForeground();
 }
@@ -3781,6 +3795,11 @@
 void WebPage::applicationDidBecomeActive()
 {
 [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationDidBecomeActiveNotification object:nil];
+
+// FIXME(224775): Move to WebProcess
+if (auto* manager = PlatformMediaSessionManager::sharedManagerIfExists())
+manager->applicationDidBecomeActive();
+
 if (m_page)
 m_page->applicationDidBecomeActive();
 }






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


[webkit-changes] [276280] trunk/Tools

2021-04-19 Thread cdumez
Title: [276280] trunk/Tools








Revision 276280
Author cdu...@apple.com
Date 2021-04-19 18:02:01 -0700 (Mon, 19 Apr 2021)


Log Message
Unreviewed, temporarily disable GPUProcess.DISABLED_WebProcessTerminationAfterTooManyGPUProcessCrashes
https://bugs.webkit.org/show_bug.cgi?id=224790

It is crashing. I will renable it with the fix at Bug 224790.

* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm




Diff

Modified: trunk/Tools/ChangeLog (276279 => 276280)

--- trunk/Tools/ChangeLog	2021-04-20 00:54:58 UTC (rev 276279)
+++ trunk/Tools/ChangeLog	2021-04-20 01:02:01 UTC (rev 276280)
@@ -1,3 +1,13 @@
+2021-04-19  Chris Dumez  
+
+Unreviewed, temporarily disable GPUProcess.DISABLED_WebProcessTerminationAfterTooManyGPUProcessCrashes
+https://bugs.webkit.org/show_bug.cgi?id=224790
+
+It is crashing. I will renable it with the fix at Bug 224790.
+
+* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
+(TEST):
+
 2021-04-19  Aakash Jain  
 
 [ews] Enabled detailed error log when unit-tests fails


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm (276279 => 276280)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm	2021-04-20 00:54:58 UTC (rev 276279)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm	2021-04-20 01:02:01 UTC (rev 276280)
@@ -115,7 +115,7 @@
 EXPECT_TRUE([webView _isPlayingAudio]);
 }
 
-TEST(GPUProcess, WebProcessTerminationAfterTooManyGPUProcessCrashes)
+TEST(GPUProcess, DISABLED_WebProcessTerminationAfterTooManyGPUProcessCrashes)
 {
 auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
 WKPreferencesSetBoolValueForKeyForTesting((__bridge WKPreferencesRef)[configuration preferences], true, WKStringCreateWithUTF8CString("UseGPUProcessForMediaEnabled"));






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


[webkit-changes] [276279] trunk/LayoutTests

2021-04-19 Thread dpino
Title: [276279] trunk/LayoutTests








Revision 276279
Author dp...@igalia.com
Date 2021-04-19 17:54:58 -0700 (Mon, 19 Apr 2021)


Log Message
[GLIB] Unreviewed test gardening. Update baselines and test expectations after r224791.

* platform/glib/TestExpectations:
* platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
* platform/glib/imported/w3c/web-platform-tests/xhr/send-entity-body-none-expected.txt:
* platform/glib/security/block-test-no-port-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/glib/TestExpectations
trunk/LayoutTests/platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt
trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/xhr/send-entity-body-none-expected.txt
trunk/LayoutTests/platform/glib/security/block-test-no-port-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (276278 => 276279)

--- trunk/LayoutTests/ChangeLog	2021-04-20 00:18:01 UTC (rev 276278)
+++ trunk/LayoutTests/ChangeLog	2021-04-20 00:54:58 UTC (rev 276279)
@@ -1,3 +1,12 @@
+2021-04-19  Diego Pino Garcia  
+
+[GLIB] Unreviewed test gardening. Update baselines and test expectations after r224791.
+
+* platform/glib/TestExpectations:
+* platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
+* platform/glib/imported/w3c/web-platform-tests/xhr/send-entity-body-none-expected.txt:
+* platform/glib/security/block-test-no-port-expected.txt:
+
 2021-04-19  Youenn Fablet  
 
 [mac-wk2] LayoutTest fast/mediastream/getUserMedia-webaudio.html is a flaky timeout


Modified: trunk/LayoutTests/platform/glib/TestExpectations (276278 => 276279)

--- trunk/LayoutTests/platform/glib/TestExpectations	2021-04-20 00:18:01 UTC (rev 276278)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2021-04-20 00:54:58 UTC (rev 276279)
@@ -2051,8 +2051,6 @@
 webkit.org/b/191497 http/tests/inspector/network/resource-security-certificate.html [ Skip ]
 webkit.org/b/192150 imported/w3c/web-platform-tests/xhr/setrequestheader-content-type.htm [ Failure ]
 webkit.org/b/192407 http/tests/inspector/network/resource-security-connection.html [ Skip ]
-webkit.org/b/192883 fast/cookies/cookie-averse-document.html [ Failure ]
-webkit.org/b/192883 fast/cookies/local-file-can-set-cookies.html [ Failure ]
 webkit.org/b/192888 fast/mediastream/resize-trim.html [ Failure ]
 webkit.org/b/192900 imported/w3c/web-platform-tests/eventsource/format-mime-bogus.htm [ Failure ]
 webkit.org/b/192903 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html [ Pass Failure ]
@@ -2350,6 +2348,9 @@
 
 webkit.org/b/194044 imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Failure ]
 
+webkit.org/b/224791 fast/cookies/cookie-averse-document.html [ Crash ]
+webkit.org/b/224791 fast/cookies/local-file-can-set-cookies.html [ Crash Pass ]
+
 # End: Common failures between GTK and WPE.
 
 #


Modified: trunk/LayoutTests/platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt (276278 => 276279)

--- trunk/LayoutTests/platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt	2021-04-20 00:18:01 UTC (rev 276278)
+++ trunk/LayoutTests/platform/glib/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt	2021-04-20 00:54:58 UTC (rev 276279)
@@ -1,6 +1,6 @@
 CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
 CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/reply.xml due to access control checks.
-CONSOLE MESSAGE: Could not connect: Connection refused
+CONSOLE MESSAGE: Could not connect to localhost: Connection refused
 CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8/ due to access control checks.
 Test that a simple cross-origin request to a server that responds (but does not permit cross-origin requests) is indistinguishable from one that does not exist. Should say PASS:
 


Modified: trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/xhr/send-entity-body-none-expected.txt (276278 => 276279)

--- trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/xhr/send-entity-body-none-expected.txt	2021-04-20 00:18:01 UTC (rev 276278)
+++ trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/xhr/send-entity-body-none-expected.txt	2021-04-20 00:54:58 UTC (rev 276279)
@@ -4,5 +4,5 @@
 PASS No content type (HEAD)
 PASS Explicit content type (POST)
 PASS Explicit content type (PUT)
-FAIL Explicit content type (HEAD) assert_equals: expected "NO" but got "0"
+PASS Explicit content type (HEAD)
 


Modified: trunk/LayoutTests/platform/glib/security/block-test-no-port-expected.txt (276278 => 276279)

--- 

[webkit-changes] [276278] trunk/Source/WebInspectorUI

2021-04-19 Thread pangle
Title: [276278] trunk/Source/WebInspectorUI








Revision 276278
Author pan...@apple.com
Date 2021-04-19 17:18:01 -0700 (Mon, 19 Apr 2021)


Log Message
REGRESSION (r268691 && r270134): Web Inspector: Clicking on go-to arrow in Computed panel no longer works
https://bugs.webkit.org/show_bug.cgi?id=224774

Reviewed by Devin Rousso.

The Styles panel will not always be part of the same sidebar as the Computed panel as of r268691, so we should
look for the Styles panel in WI.detailsSidebar, which will report all of the panels it manages across multiple
sidebars. Additionally, as of r270134, there is no longer a private `_visible` property for
`WI.StyleDetailsPanel`, so it can not be used by `WI.SpreadsheetRulesStyleDetailsPanel`. Instead, visibility
should be determined by checking if the panel is attached and not pending layout.

* UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
(WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsSidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (276277 => 276278)

--- trunk/Source/WebInspectorUI/ChangeLog	2021-04-19 23:37:20 UTC (rev 276277)
+++ trunk/Source/WebInspectorUI/ChangeLog	2021-04-20 00:18:01 UTC (rev 276278)
@@ -1,3 +1,21 @@
+2021-04-19  Patrick Angle  
+
+REGRESSION (r268691 && r270134): Web Inspector: Clicking on go-to arrow in Computed panel no longer works
+https://bugs.webkit.org/show_bug.cgi?id=224774
+
+Reviewed by Devin Rousso.
+
+The Styles panel will not always be part of the same sidebar as the Computed panel as of r268691, so we should
+look for the Styles panel in WI.detailsSidebar, which will report all of the panels it manages across multiple
+sidebars. Additionally, as of r270134, there is no longer a private `_visible` property for
+`WI.StyleDetailsPanel`, so it can not be used by `WI.SpreadsheetRulesStyleDetailsPanel`. Instead, visibility
+should be determined by checking if the panel is attached and not pending layout.
+
+* UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
+(WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
+* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
+(WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
+
 2021-04-19  Devin Rousso  
 
 Web Inspector: Graphics: add support for `steps()`/`spring()` CSS timing functions


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsSidebarPanel.js (276277 => 276278)

--- trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsSidebarPanel.js	2021-04-19 23:37:20 UTC (rev 276277)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsSidebarPanel.js	2021-04-20 00:18:01 UTC (rev 276278)
@@ -34,12 +34,12 @@
 
 computedStyleDetailsPanelShowProperty(property)
 {
-let styleRulesPanel = this.parentSidebar.sidebarPanels.find((panel) => panel instanceof WI.RulesStyleDetailsSidebarPanel);
+let styleRulesPanel = WI.detailsSidebar.sidebarPanels.find((panel) => panel instanceof WI.RulesStyleDetailsSidebarPanel);
 console.assert(styleRulesPanel, "Styles panel is missing.");
 if (!styleRulesPanel)
 return;
 
-this.parentSidebar.selectedSidebarPanel = styleRulesPanel;
+WI.detailsSidebar.selectedSidebarPanel = styleRulesPanel;
 styleRulesPanel.panel.scrollToSectionAndHighlightProperty(property);
 }
 };


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js (276277 => 276278)

--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js	2021-04-19 23:37:20 UTC (rev 276277)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js	2021-04-20 00:18:01 UTC (rev 276278)
@@ -68,7 +68,7 @@
 
 scrollToSectionAndHighlightProperty(property)
 {
-if (!this._visible) {
+if (!this.isAttached || this.layoutPending) {
 this._propertyToSelectAndHighlight = property;
 return;
 }






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


[webkit-changes] [276277] trunk/Tools

2021-04-19 Thread aakash_jain
Title: [276277] trunk/Tools








Revision 276277
Author aakash_j...@apple.com
Date 2021-04-19 16:37:20 -0700 (Mon, 19 Apr 2021)


Log Message
[ews] Enabled detailed error log when unit-tests fails
https://bugs.webkit.org/show_bug.cgi?id=224789

Unreviewed minor unit-test fix.


* CISupport/ews-build/factories_unittest.py:
(TestCase): Set maxDiff to None.

Modified Paths

trunk/Tools/CISupport/ews-build/factories_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/ews-build/factories_unittest.py (276276 => 276277)

--- trunk/Tools/CISupport/ews-build/factories_unittest.py	2021-04-19 23:03:26 UTC (rev 276276)
+++ trunk/Tools/CISupport/ews-build/factories_unittest.py	2021-04-19 23:37:20 UTC (rev 276277)
@@ -30,6 +30,8 @@
 
 
 class TestCase(unittest.TestCase):
+maxDiff = None
+
 def assertBuildSteps(self, actual_steps, expected_steps):
 assert all([isinstance(step, _BuildStepFactory) for step in actual_steps])
 assert all([isinstance(step, _BuildStepFactory) for step in expected_steps])


Modified: trunk/Tools/ChangeLog (276276 => 276277)

--- trunk/Tools/ChangeLog	2021-04-19 23:03:26 UTC (rev 276276)
+++ trunk/Tools/ChangeLog	2021-04-19 23:37:20 UTC (rev 276277)
@@ -1,3 +1,13 @@
+2021-04-19  Aakash Jain  
+
+[ews] Enabled detailed error log when unit-tests fails
+https://bugs.webkit.org/show_bug.cgi?id=224789
+
+Unreviewed minor unit-test fix.
+
+* CISupport/ews-build/factories_unittest.py:
+(TestCase): Set maxDiff to None.
+
 2021-04-19  BJ Burg  
 
 Can't use Web Inspector on web views made by TestWebKitAPI






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


[webkit-changes] [276276] trunk/Tools

2021-04-19 Thread bburg
Title: [276276] trunk/Tools








Revision 276276
Author bb...@apple.com
Date 2021-04-19 16:03:26 -0700 (Mon, 19 Apr 2021)


Log Message
Can't use Web Inspector on web views made by TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=147073


Reviewed by Devin Rousso.

It is necessary to spin a nested run loop at the point in the test where you would
like to remote inspect a WebView. Messages from the remote connection are dispatched
through UIProcess, so if lldb has paused UIProcess, WebInspectorUI will not be able to
get any data from the inspected WebView.

* TestWebKitAPI/DebugUtilities.h: Added.
Add macros to wait for a remote inspector to attach or detach, then drop into
the debugger when it has done so.

* TestWebKitAPI/PlatformUtilities.h: Add missing `#pragma once`.
* TestWebKitAPI/WTFStringUtilities.h: Force the build to fail noisily if we have
attempted to redefine WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING. Force the correct
ordering between "WTFStringUtilities.h" and .

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/PlatformUtilities.h
trunk/Tools/TestWebKitAPI/WTFStringUtilities.h


Added Paths

trunk/Tools/TestWebKitAPI/DebugUtilities.h




Diff

Modified: trunk/Tools/ChangeLog (276275 => 276276)

--- trunk/Tools/ChangeLog	2021-04-19 22:20:53 UTC (rev 276275)
+++ trunk/Tools/ChangeLog	2021-04-19 23:03:26 UTC (rev 276276)
@@ -1,3 +1,25 @@
+2021-04-19  BJ Burg  
+
+Can't use Web Inspector on web views made by TestWebKitAPI
+https://bugs.webkit.org/show_bug.cgi?id=147073
+
+
+Reviewed by Devin Rousso.
+
+It is necessary to spin a nested run loop at the point in the test where you would
+like to remote inspect a WebView. Messages from the remote connection are dispatched
+through UIProcess, so if lldb has paused UIProcess, WebInspectorUI will not be able to
+get any data from the inspected WebView.
+
+* TestWebKitAPI/DebugUtilities.h: Added.
+Add macros to wait for a remote inspector to attach or detach, then drop into
+the debugger when it has done so.
+
+* TestWebKitAPI/PlatformUtilities.h: Add missing `#pragma once`.
+* TestWebKitAPI/WTFStringUtilities.h: Force the build to fail noisily if we have
+attempted to redefine WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING. Force the correct
+ordering between "WTFStringUtilities.h" and .
+
 2021-04-19  Wenson Hsieh  
 
 Rename FloatQuad::isEmpty() to boundingBoxIsEmpty() and reimplement isEmpty()


Added: trunk/Tools/TestWebKitAPI/DebugUtilities.h (0 => 276276)

--- trunk/Tools/TestWebKitAPI/DebugUtilities.h	(rev 0)
+++ trunk/Tools/TestWebKitAPI/DebugUtilities.h	2021-04-19 23:03:26 UTC (rev 276276)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(COCOA)
+
+#include "WTFStringUtilities.h"
+#include 
+#include 
+
+#define WAIT_FOR_INSPECTOR_TO_ATTACH(webView) \
+do { \
+WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "Spinning a nested run loop until an inspector attaches to the WebView. Remote inspect the process (PID: %d) to continue.", getCurrentProcessID()); \
+do { \
+TestWebKitAPI::Util::sleep(1); \
+if ([webView _isBeingInspected]) \
+break; \
+} while (1); \
+WTFBreakpointTrap(); \
+} while (0)
+
+#define WAIT_FOR_INSPECTOR_TO_DETACH(webView) \
+do { \
+WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "Spinning a nested run loop until no inspectors are attached to the WebView. Close all local and remote inspectors for the process (PID: %d) to continue.", 

[webkit-changes] [276275] trunk

2021-04-19 Thread wenson_hsieh
Title: [276275] trunk








Revision 276275
Author wenson_hs...@apple.com
Date 2021-04-19 15:20:53 -0700 (Mon, 19 Apr 2021)


Log Message
Rename FloatQuad::isEmpty() to boundingBoxIsEmpty() and reimplement isEmpty()
https://bugs.webkit.org/show_bug.cgi?id=224769

Reviewed by Tim Horton.

Source/WebCore:

The existing `isEmpty()` method on `FloatQuad` only checks that the bounding box of the quad is empty (as
indicated by the comment above the method declaration). This means `isEmpty()` returns `false` in cases where
the quad consists of one or more non-rectilinear line segments, even though the quad contains no area.

To address this, we rename the existing `isEmpty()` helper to `boundingBoxIsEmpty()` and reintroduce an
`isEmpty()` method that accounts for quads which are equivalent to non-rectilinear line segments.

No change in behavior.

* inspector/InspectorOverlay.cpp:
(WebCore::drawFragmentHighlight):
* platform/graphics/FloatQuad.cpp:
* platform/graphics/FloatQuad.h:
(WebCore::FloatQuad::isEmpty const): Deleted.
(WebCore::FloatQuad::boundingBoxIsEmpty const):

Tools:

Add an API test to exercise the new `FloatQuad::isEmpty()` method.

* TestWebKitAPI/Tests/WebCore/FloatQuadTests.cpp:
(TestWebKitAPI::checkIsEmpty):
(TestWebKitAPI::TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
trunk/Source/WebCore/platform/graphics/FloatQuad.cpp
trunk/Source/WebCore/platform/graphics/FloatQuad.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebCore/FloatQuadTests.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (276274 => 276275)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 21:18:00 UTC (rev 276274)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 22:20:53 UTC (rev 276275)
@@ -1,3 +1,26 @@
+2021-04-19  Wenson Hsieh  
+
+Rename FloatQuad::isEmpty() to boundingBoxIsEmpty() and reimplement isEmpty()
+https://bugs.webkit.org/show_bug.cgi?id=224769
+
+Reviewed by Tim Horton.
+
+The existing `isEmpty()` method on `FloatQuad` only checks that the bounding box of the quad is empty (as
+indicated by the comment above the method declaration). This means `isEmpty()` returns `false` in cases where
+the quad consists of one or more non-rectilinear line segments, even though the quad contains no area.
+
+To address this, we rename the existing `isEmpty()` helper to `boundingBoxIsEmpty()` and reintroduce an
+`isEmpty()` method that accounts for quads which are equivalent to non-rectilinear line segments.
+
+No change in behavior.
+
+* inspector/InspectorOverlay.cpp:
+(WebCore::drawFragmentHighlight):
+* platform/graphics/FloatQuad.cpp:
+* platform/graphics/FloatQuad.h:
+(WebCore::FloatQuad::isEmpty const): Deleted.
+(WebCore::FloatQuad::boundingBoxIsEmpty const):
+
 2021-04-19  Patrick Angle  
 
 Web Inspector: Grid overlay column line label placement copy/paste error


Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (276274 => 276275)

--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2021-04-19 21:18:00 UTC (rev 276274)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2021-04-19 22:20:53 UTC (rev 276275)
@@ -286,16 +286,16 @@
 if (size >= 4)
 contentQuad = highlight.quads[3];
 
-if (!marginQuad.isEmpty() && marginQuad != borderQuad && highlight.marginColor.isVisible())
+if (!marginQuad.boundingBoxIsEmpty() && marginQuad != borderQuad && highlight.marginColor.isVisible())
 drawOutlinedQuadWithClip(context, marginQuad, borderQuad, highlight.marginColor, bounds);
 
-if (!borderQuad.isEmpty() && borderQuad != paddingQuad && highlight.borderColor.isVisible())
+if (!borderQuad.boundingBoxIsEmpty() && borderQuad != paddingQuad && highlight.borderColor.isVisible())
 drawOutlinedQuadWithClip(context, borderQuad, paddingQuad, highlight.borderColor, bounds);
 
-if (!paddingQuad.isEmpty() && paddingQuad != contentQuad && highlight.paddingColor.isVisible())
+if (!paddingQuad.boundingBoxIsEmpty() && paddingQuad != contentQuad && highlight.paddingColor.isVisible())
 drawOutlinedQuadWithClip(context, paddingQuad, contentQuad, highlight.paddingColor, bounds);
 
-if (!contentQuad.isEmpty() && (highlight.contentColor.isVisible() || highlight.contentOutlineColor.isVisible()))
+if (!contentQuad.boundingBoxIsEmpty() && (highlight.contentColor.isVisible() || highlight.contentOutlineColor.isVisible()))
 drawOutlinedQuad(context, contentQuad, highlight.contentColor, highlight.contentOutlineColor, bounds);
 }
 


Modified: trunk/Source/WebCore/platform/graphics/FloatQuad.cpp (276274 => 276275)

--- trunk/Source/WebCore/platform/graphics/FloatQuad.cpp	2021-04-19 21:18:00 UTC (rev 276274)
+++ trunk/Source/WebCore/platform/graphics/FloatQuad.cpp	2021-04-19 22:20:53 UTC (rev 276275)
@@ -228,6 +228,49 @@
 return determinant(m_p2 - m_p1, m_p3 - m_p2) < 0;
 

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

2021-04-19 Thread pangle
Title: [276274] trunk/Source/WebCore








Revision 276274
Author pan...@apple.com
Date 2021-04-19 14:18:00 -0700 (Mon, 19 Apr 2021)


Log Message
Web Inspector: Grid overlay column line label placement copy/paste error
https://bugs.webkit.org/show_bug.cgi?id=224777

Reviewed by Devin Rousso.

In grid overlays, a typo meant for all column line labels after the initial line, only the start of the line was
used for placement, where it is more accurate to use the start and end points to match the behavior of the first
line. This had no visual impact because subsequent lines do not currently have their labels adjusted further into
the grid, only flipped into the grid but still referencing the same point. This patch corrects the value of
`gapLabelLine` to always be a line on which the label can be placed, instead of a single point.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::buildGridOverlay):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorOverlay.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (276273 => 276274)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 21:10:23 UTC (rev 276273)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 21:18:00 UTC (rev 276274)
@@ -1,3 +1,19 @@
+2021-04-19  Patrick Angle  
+
+Web Inspector: Grid overlay column line label placement copy/paste error
+https://bugs.webkit.org/show_bug.cgi?id=224777
+
+Reviewed by Devin Rousso.
+
+In grid overlays, a typo meant for all column line labels after the initial line, only the start of the line was
+used for placement, where it is more accurate to use the start and end points to match the behavior of the first
+line. This had no visual impact because subsequent lines do not currently have their labels adjusted further into
+the grid, only flipped into the grid but still referencing the same point. This patch corrects the value of
+`gapLabelLine` to always be a line on which the label can be placed, instead of a single point.
+
+* inspector/InspectorOverlay.cpp:
+(WebCore::InspectorOverlay::buildGridOverlay):
+
 2021-04-19  Zalan Bujtas  
 
 [LFC][IFC] LineCandidate.inlineContent should be ignored when reverting


Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (276273 => 276274)

--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2021-04-19 21:10:23 UTC (rev 276273)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2021-04-19 21:18:00 UTC (rev 276274)
@@ -1768,7 +1768,7 @@
 gridHighlightOverlay.gaps.append({ previousColumnEndLine.start(), columnStartLine.start(), columnStartLine.end(), previousColumnEndLine.end() });
 FloatLine lineBetweenColumnTops = { columnStartLine.start(), previousColumnEndLine.start() };
 FloatLine lineBetweenColumnBottoms = { columnStartLine.end(), previousColumnEndLine.end() };
-gapLabelLine = { lineBetweenColumnTops.pointAtRelativeDistance(0.5), lineBetweenColumnTops.pointAtRelativeDistance(0.5) };
+gapLabelLine = { lineBetweenColumnTops.pointAtRelativeDistance(0.5), lineBetweenColumnBottoms.pointAtRelativeDistance(0.5) };
 }
 
 if (i < columnWidths.size() && i < columnPositions.size()) {






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


[webkit-changes] [276273] trunk/LayoutTests

2021-04-19 Thread youenn
Title: [276273] trunk/LayoutTests








Revision 276273
Author you...@apple.com
Date 2021-04-19 14:10:23 -0700 (Mon, 19 Apr 2021)


Log Message
[mac-wk2] LayoutTest fast/mediastream/getUserMedia-webaudio.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=170960

Reviewed by Eric Carlson.

Update test to check for noise for more iterations.
Remove timeout expectation since it is no longer timing out in bots.

* fast/mediastream/getUserMedia-webaudio.html:
* platform/mac-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/mediastream/getUserMedia-webaudio.html
trunk/LayoutTests/platform/mac-wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (276272 => 276273)

--- trunk/LayoutTests/ChangeLog	2021-04-19 20:45:57 UTC (rev 276272)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 21:10:23 UTC (rev 276273)
@@ -1,3 +1,16 @@
+2021-04-19  Youenn Fablet  
+
+[mac-wk2] LayoutTest fast/mediastream/getUserMedia-webaudio.html is a flaky timeout
+https://bugs.webkit.org/show_bug.cgi?id=170960
+
+Reviewed by Eric Carlson.
+
+Update test to check for noise for more iterations.
+Remove timeout expectation since it is no longer timing out in bots.
+
+* fast/mediastream/getUserMedia-webaudio.html:
+* platform/mac-wk2/TestExpectations:
+
 2021-04-19  Devin Rousso  
 
 Web Inspector: Graphics: add support for `steps()`/`spring()` CSS timing functions


Modified: trunk/LayoutTests/fast/mediastream/getUserMedia-webaudio.html (276272 => 276273)

--- trunk/LayoutTests/fast/mediastream/getUserMedia-webaudio.html	2021-04-19 20:45:57 UTC (rev 276272)
+++ trunk/LayoutTests/fast/mediastream/getUserMedia-webaudio.html	2021-04-19 21:10:23 UTC (rev 276273)
@@ -91,7 +91,7 @@
 {
 if (!counter)
 counter = 1;
-else if (++counter > 4)
+else if (++counter > 50)
 return Promise.resolve(false);
 results = await analyseAudio(stream, 100, context);
 if (results.heardNoise)


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (276272 => 276273)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-04-19 20:45:57 UTC (rev 276272)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-04-19 21:10:23 UTC (rev 276273)
@@ -602,8 +602,6 @@
 
 webkit.org/b/170484 swipe/main-frame-pinning-requirement.html [ Pass Failure ]
 
-webkit.org/b/170960 fast/mediastream/getUserMedia-webaudio.html [ Pass Failure Timeout ]
-
 webkit.org/b/171553 [ Release ] http/tests/websocket/tests/hybi/inspector/binary.html [ Pass Failure ]
 
 webkit.org/b/171763 compositing/tiling/non-active-window-tiles-size.html [ Pass Failure ]






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


[webkit-changes] [276272] trunk

2021-04-19 Thread drousso
Title: [276272] trunk








Revision 276272
Author drou...@apple.com
Date 2021-04-19 13:45:57 -0700 (Mon, 19 Apr 2021)


Log Message
Web Inspector: Graphics: add support for `steps()`/`spring()` CSS timing functions
https://bugs.webkit.org/show_bug.cgi?id=224654

Reviewed by BJ Burg.

Source/WebInspectorUI:

* UserInterface/Models/Geometry.js:
(WI.StepsFunction): Added.
(WI.StepsFunction.fromString): Added.
(WI.StepsFunction.prototype.get type): Added.
(WI.StepsFunction.prototype.get count): Added.
(WI.StepsFunction.prototype.copy): Added.
(WI.StepsFunction.prototype.toString): Added.
Create a model object for `steps()` CSS timing function.

* UserInterface/Models/Animation.js:
(WI.Animation.prototype._updateEffect):
Also support `effect.timingFunction`/`keyframe.easing` being a `steps()`/`spring()` CSS timing function.

* UserInterface/Views/AnimationContentView.js:
(WI.AnimationContentView.prototype._refreshPreview):
Create a UI for `steps()`/`spring()` CSS timing functions.

LayoutTests:

* inspector/animation/lifecycle-web-animation.html:
* inspector/animation/lifecycle-web-animation-expected.txt:
* inspector/animation/resources/lifecycle-utilities.js:
* inspector/unit-tests/geometry.html: Added.
* inspector/unit-tests/geometry-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt
trunk/LayoutTests/inspector/animation/lifecycle-web-animation.html
trunk/LayoutTests/inspector/animation/resources/lifecycle-utilities.js
trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Models/Animation.js
trunk/Source/WebInspectorUI/UserInterface/Models/Geometry.js
trunk/Source/WebInspectorUI/UserInterface/Views/AnimationContentView.js


Added Paths

trunk/LayoutTests/inspector/unit-tests/geometry-expected.txt
trunk/LayoutTests/inspector/unit-tests/geometry.html




Diff

Modified: trunk/LayoutTests/ChangeLog (276271 => 276272)

--- trunk/LayoutTests/ChangeLog	2021-04-19 20:35:54 UTC (rev 276271)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 20:45:57 UTC (rev 276272)
@@ -1,3 +1,16 @@
+2021-04-19  Devin Rousso  
+
+Web Inspector: Graphics: add support for `steps()`/`spring()` CSS timing functions
+https://bugs.webkit.org/show_bug.cgi?id=224654
+
+Reviewed by BJ Burg.
+
+* inspector/animation/lifecycle-web-animation.html:
+* inspector/animation/lifecycle-web-animation-expected.txt:
+* inspector/animation/resources/lifecycle-utilities.js:
+* inspector/unit-tests/geometry.html: Added.
+* inspector/unit-tests/geometry-expected.txt: Added.
+
 2021-04-19  Zalan Bujtas  
 
 [LFC][IFC] LineCandidate.inlineContent should be ignored when reverting


Modified: trunk/LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt (276271 => 276272)

--- trunk/LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt	2021-04-19 20:35:54 UTC (rev 276271)
+++ trunk/LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt	2021-04-19 20:45:57 UTC (rev 276272)
@@ -31,7 +31,7 @@
   },
   {
 "offset": 0.75,
-"easing": "cubic-bezier(0.6, 0.7, 0.8, 0.9)",
+"easing": "steps(5, jump-end)",
 "style": "color: blue;\nopacity: 1;"
   }
 ]


Modified: trunk/LayoutTests/inspector/animation/lifecycle-web-animation.html (276271 => 276272)

--- trunk/LayoutTests/inspector/animation/lifecycle-web-animation.html	2021-04-19 20:35:54 UTC (rev 276271)
+++ trunk/LayoutTests/inspector/animation/lifecycle-web-animation.html	2021-04-19 20:45:57 UTC (rev 276272)
@@ -25,7 +25,7 @@
 },
 {
 offset: 0.75,
-easing: "cubic-bezier(0.6, 0.7, 0.8, 0.9)",
+easing: "steps(5, jump-end)",
 color: "blue",
 opacity: 1,
 },


Modified: trunk/LayoutTests/inspector/animation/resources/lifecycle-utilities.js (276271 => 276272)

--- trunk/LayoutTests/inspector/animation/resources/lifecycle-utilities.js	2021-04-19 20:35:54 UTC (rev 276271)
+++ trunk/LayoutTests/inspector/animation/resources/lifecycle-utilities.js	2021-04-19 20:45:57 UTC (rev 276272)
@@ -40,7 +40,7 @@
 
 TestPage.registerInitializer(() => {
 function jsonKeyframeFilter(key, value) {
-if (key === "easing" && value instanceof WI.CubicBezier)
+if ((key === "easing" || key === "timingFunction") && (value instanceof WI.CubicBezier || value instanceof WI.StepsFunction || value instanceof WI.Spring))
 return value.toString();
 return value;
 }


Added: trunk/LayoutTests/inspector/unit-tests/geometry-expected.txt (0 => 276272)

--- trunk/LayoutTests/inspector/unit-tests/geometry-expected.txt	(rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/geometry-expected.txt	2021-04-19 20:45:57 UTC (rev 276272)
@@ -0,0 +1,56 @@
+Tests for WI.Geometry classes.
+
+
+== 

[webkit-changes] [276271] trunk/Source/WebKit

2021-04-19 Thread cdumez
Title: [276271] trunk/Source/WebKit








Revision 276271
Author cdu...@apple.com
Date 2021-04-19 13:35:54 -0700 (Mon, 19 Apr 2021)


Log Message
MotionMark's Canvas-Arcs subtest is broken if the GPUProcess is not yet running
https://bugs.webkit.org/show_bug.cgi?id=224778

Reviewed by Simon Fraser.

I recently made changes so that the GPUProcess is only launched when it is needed. This means
that until MotionMark's Canvas-Arcs subtest, the GPUProcess is usually not yet running. As a
result, RemoteRenderingBackendProxy::createImageBuffer() ends up launching the GPUProcess
and sending the GPUConnectionToWebProcess::CreateRenderingBackend and
RemoteRenderingBackend::CreateImageBuffer IPC right away. We seem to have a synchronization
issue because when this happens, the rendering for the Canvas-Arcs subtest is visibly broken
and its score is very low (< 6, instead of > 600).

Making the GPUConnectionToWebProcess::CreateRenderingBackend synchronous again (I made it
async recently) seems to address the synchronization issue and restores correct behavior on
MotionMark. I am therefore making this IPC synchronous again in this patch to get benchmark
coverage again while I investigate the root cause offline.

* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::createRenderingBackend):
* GPUProcess/GPUConnectionToWebProcess.h:
* GPUProcess/GPUConnectionToWebProcess.messages.in:
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (276270 => 276271)

--- trunk/Source/WebKit/ChangeLog	2021-04-19 20:16:18 UTC (rev 276270)
+++ trunk/Source/WebKit/ChangeLog	2021-04-19 20:35:54 UTC (rev 276271)
@@ -1,5 +1,32 @@
 2021-04-19  Chris Dumez  
 
+MotionMark's Canvas-Arcs subtest is broken if the GPUProcess is not yet running
+https://bugs.webkit.org/show_bug.cgi?id=224778
+
+Reviewed by Simon Fraser.
+
+I recently made changes so that the GPUProcess is only launched when it is needed. This means
+that until MotionMark's Canvas-Arcs subtest, the GPUProcess is usually not yet running. As a
+result, RemoteRenderingBackendProxy::createImageBuffer() ends up launching the GPUProcess
+and sending the GPUConnectionToWebProcess::CreateRenderingBackend and
+RemoteRenderingBackend::CreateImageBuffer IPC right away. We seem to have a synchronization
+issue because when this happens, the rendering for the Canvas-Arcs subtest is visibly broken
+and its score is very low (< 6, instead of > 600).
+
+Making the GPUConnectionToWebProcess::CreateRenderingBackend synchronous again (I made it
+async recently) seems to address the synchronization issue and restores correct behavior on
+MotionMark. I am therefore making this IPC synchronous again in this patch to get benchmark
+coverage again while I investigate the root cause offline.
+
+* GPUProcess/GPUConnectionToWebProcess.cpp:
+(WebKit::GPUConnectionToWebProcess::createRenderingBackend):
+* GPUProcess/GPUConnectionToWebProcess.h:
+* GPUProcess/GPUConnectionToWebProcess.messages.in:
+* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
+(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):
+
+2021-04-19  Chris Dumez  
+
 Fix races in LibWebRTCCodecs introduced in r276214
 https://bugs.webkit.org/show_bug.cgi?id=224758
 


Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp (276270 => 276271)

--- trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp	2021-04-19 20:16:18 UTC (rev 276270)
+++ trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp	2021-04-19 20:35:54 UTC (rev 276271)
@@ -409,12 +409,13 @@
 }
 #endif
 
-void GPUConnectionToWebProcess::createRenderingBackend(RemoteRenderingBackendCreationParameters&& creationParameters)
+void GPUConnectionToWebProcess::createRenderingBackend(RemoteRenderingBackendCreationParameters&& creationParameters, CompletionHandler&& completionHandler)
 {
 auto addResult = m_remoteRenderingBackendMap.ensure(creationParameters.identifier, [&]() {
 return IPC::ScopedActiveMessageReceiveQueue { RemoteRenderingBackend::create(*this, WTFMove(creationParameters)) };
 });
 ASSERT_UNUSED(addResult, addResult.isNewEntry);
+completionHandler();
 }
 
 void GPUConnectionToWebProcess::releaseRenderingBackend(RenderingBackendIdentifier renderingBackendIdentifier)


Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h (276270 => 276271)

--- 

[webkit-changes] [276270] trunk/Tools

2021-04-19 Thread timothy_horton
Title: [276270] trunk/Tools








Revision 276270
Author timothy_hor...@apple.com
Date 2021-04-19 13:16:18 -0700 (Mon, 19 Apr 2021)


Log Message
Fix the macCatalyst TestWebKitAPI build
https://bugs.webkit.org/show_bug.cgi?id=224780


* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
Unreviewed build fix; link PDFKit since we now enable it.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig




Diff

Modified: trunk/Tools/ChangeLog (276269 => 276270)

--- trunk/Tools/ChangeLog	2021-04-19 20:09:04 UTC (rev 276269)
+++ trunk/Tools/ChangeLog	2021-04-19 20:16:18 UTC (rev 276270)
@@ -1,3 +1,11 @@
+2021-04-19  Tim Horton  
+
+Fix the macCatalyst TestWebKitAPI build
+https://bugs.webkit.org/show_bug.cgi?id=224780
+
+* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
+Unreviewed build fix; link PDFKit since we now enable it.
+
 2021-04-19  Chris Dumez  
 
 SVG Images launch the GPUProcess unnecessarily


Modified: trunk/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig (276269 => 276270)

--- trunk/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig	2021-04-19 20:09:04 UTC (rev 276269)
+++ trunk/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig	2021-04-19 20:16:18 UTC (rev 276270)
@@ -52,6 +52,7 @@
 
 WK_PDFKIT_LDFLAGS = $(WK_PDFKIT_LDFLAGS_$(WK_PLATFORM_NAME));
 WK_PDFKIT_LDFLAGS_macosx = -framework PDFKit;
+WK_PDFKIT_LDFLAGS_maccatalyst = -framework PDFKit;
 WK_PDFKIT_LDFLAGS_iphoneos = -framework PDFKit;
 WK_PDFKIT_LDFLAGS_iphonesimulator = -framework PDFKit;
 






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


[webkit-changes] [276269] trunk

2021-04-19 Thread zalan
Title: [276269] trunk








Revision 276269
Author za...@apple.com
Date 2021-04-19 13:09:04 -0700 (Mon, 19 Apr 2021)


Log Message
[LFC][IFC] LineCandidate.inlineContent should be ignored when reverting
https://bugs.webkit.org/show_bug.cgi?id=224771


Reviewed by Antti Koivisto.

Source/WebCore:

LineCandidate.inlineContent is a set of candidate runs for the line and when the line breaker says "please revert" (move back to an earlier position on the line)
these runs should all be ignored as they did not make it to the line.
(inlineContentIsFullyCommitted flag got confused when the number of candidate runs matched the number of runs we managed to put on the line as part of the revert. It did not take the "revert" bit into account.)

Test: fast/inline/crash-when-revert-has-trailing-line-break.html

* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::placeInlineContent):

LayoutTests:

* fast/inline/crash-when-revert-has-trailing-line-break-expected.txt: Added.
* fast/inline/crash-when-revert-has-trailing-line-break.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp


Added Paths

trunk/LayoutTests/fast/inline/crash-when-revert-has-trailing-line-break-expected.txt
trunk/LayoutTests/fast/inline/crash-when-revert-has-trailing-line-break.html




Diff

Modified: trunk/LayoutTests/ChangeLog (276268 => 276269)

--- trunk/LayoutTests/ChangeLog	2021-04-19 19:42:44 UTC (rev 276268)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 20:09:04 UTC (rev 276269)
@@ -1,3 +1,14 @@
+2021-04-19  Zalan Bujtas  
+
+[LFC][IFC] LineCandidate.inlineContent should be ignored when reverting
+https://bugs.webkit.org/show_bug.cgi?id=224771
+
+
+Reviewed by Antti Koivisto.
+
+* fast/inline/crash-when-revert-has-trailing-line-break-expected.txt: Added.
+* fast/inline/crash-when-revert-has-trailing-line-break.html: Added.
+
 2021-04-19  Amir Mark Jr  
 
 [ wk2 ] http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.py is a constant text failure


Added: trunk/LayoutTests/fast/inline/crash-when-revert-has-trailing-line-break-expected.txt (0 => 276269)

--- trunk/LayoutTests/fast/inline/crash-when-revert-has-trailing-line-break-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/inline/crash-when-revert-has-trailing-line-break-expected.txt	2021-04-19 20:09:04 UTC (rev 276269)
@@ -0,0 +1,4 @@
+  a
+
+
+


Added: trunk/LayoutTests/fast/inline/crash-when-revert-has-trailing-line-break.html (0 => 276269)

--- trunk/LayoutTests/fast/inline/crash-when-revert-has-trailing-line-break.html	(rev 0)
+++ trunk/LayoutTests/fast/inline/crash-when-revert-has-trailing-line-break.html	2021-04-19 20:09:04 UTC (rev 276269)
@@ -0,0 +1,31 @@
+
+  th, body, span, html {
+padding-left: 250px;
+  }
+
+
+if (window.testRunner)
+  testRunner.dumpAsText();
+
+  _onload_ = () => {
+let div = document.createElement('div');
+document.querySelector('style').appendChild(div);
+document.styleSheets[0].insertRule(`pre { aspect-ratio: 1; }`);
+document.body.appendChild(document.createElement('pre'));
+let th = document.createElement('th');
+document.body.appendChild(th);
+document.designMode = 'on';
+document.execCommand('SelectAll');
+document.execCommand('InsertLineBreak');
+getSelection().selectAllChildren(th);
+document.execCommand('InsertText', false, 'a');
+document.execCommand('UseCSS', false, 'false');
+div.before(undefined);
+document.execCommand('InsertLineBreak');
+document.execCommand('SelectAll');
+document.execCommand('Copy');
+document.execCommand('PasteAndMatchStyle');
+document.execCommand('JustifyFull');
+  };
+
+
\ No newline at end of file


Modified: trunk/Source/WebCore/ChangeLog (276268 => 276269)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 19:42:44 UTC (rev 276268)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 20:09:04 UTC (rev 276269)
@@ -1,3 +1,20 @@
+2021-04-19  Zalan Bujtas  
+
+[LFC][IFC] LineCandidate.inlineContent should be ignored when reverting
+https://bugs.webkit.org/show_bug.cgi?id=224771
+
+
+Reviewed by Antti Koivisto.
+
+LineCandidate.inlineContent is a set of candidate runs for the line and when the line breaker says "please revert" (move back to an earlier position on the line)
+these runs should all be ignored as they did not make it to the line.
+(inlineContentIsFullyCommitted flag got confused when the number of candidate runs matched the number of runs we managed to put on the line as part of the revert. It did not take the "revert" bit into account.) 
+
+Test: fast/inline/crash-when-revert-has-trailing-line-break.html
+
+* layout/inlineformatting/InlineLineBuilder.cpp:
+

[webkit-changes] [276268] trunk/LayoutTests

2021-04-19 Thread amir_mark
Title: [276268] trunk/LayoutTests








Revision 276268
Author amir_m...@apple.com
Date 2021-04-19 12:42:44 -0700 (Mon, 19 Apr 2021)


Log Message
[ wk2 ] http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.py is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=224626

Unreviewed test gardening

* platform/wk2/TestExpectations: Updating expectations as a fix is being worked on.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (276267 => 276268)

--- trunk/LayoutTests/ChangeLog	2021-04-19 18:55:04 UTC (rev 276267)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 19:42:44 UTC (rev 276268)
@@ -1,3 +1,12 @@
+2021-04-19  Amir Mark Jr  
+
+[ wk2 ] http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.py is a constant text failure
+https://bugs.webkit.org/show_bug.cgi?id=224626
+
+Unreviewed test gardening
+
+* platform/wk2/TestExpectations: Updating expectations as a fix is being worked on.
+
 2021-04-19  Manuel Rego Casasnovas  
 
 [selectors] Script focus and :focus-visible


Modified: trunk/LayoutTests/platform/wk2/TestExpectations (276267 => 276268)

--- trunk/LayoutTests/platform/wk2/TestExpectations	2021-04-19 18:55:04 UTC (rev 276267)
+++ trunk/LayoutTests/platform/wk2/TestExpectations	2021-04-19 19:42:44 UTC (rev 276268)
@@ -862,3 +862,5 @@
 fast/speechrecognition/start-recognition-then-stop.html [ Pass ]
 fast/speechrecognition/start-second-recognition.html [ Pass ]
 fullscreen/full-screen-enter-while-exiting.html [ Pass ]
+
+webkit.org/b/224626 http/tests/security/contentSecurityPolicy/report-only-connect-src-xmlhttprequest-redirect-to-blocked.py [ Failure ]
\ No newline at end of file






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


[webkit-changes] [276267] trunk

2021-04-19 Thread cdumez
Title: [276267] trunk








Revision 276267
Author cdu...@apple.com
Date 2021-04-19 11:55:04 -0700 (Mon, 19 Apr 2021)


Log Message
SVG Images launch the GPUProcess unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=224770

Reviewed by Eric Carlson.

Source/WebCore:

Make sure MediaPlayer::supportsType() returns early for MIME types that can definitely
not be media, to avoid launch the GPUProcess unnecessarily.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::supportsType):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (276266 => 276267)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 18:52:25 UTC (rev 276266)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 18:55:04 UTC (rev 276267)
@@ -1,3 +1,16 @@
+2021-04-19  Chris Dumez  
+
+SVG Images launch the GPUProcess unnecessarily
+https://bugs.webkit.org/show_bug.cgi?id=224770
+
+Reviewed by Eric Carlson.
+
+Make sure MediaPlayer::supportsType() returns early for MIME types that can definitely
+not be media, to avoid launch the GPUProcess unnecessarily.
+
+* platform/graphics/MediaPlayer.cpp:
+(WebCore::MediaPlayer::supportsType):
+
 2021-04-19  Manuel Rego Casasnovas  
 
 [selectors] Script focus and :focus-visible


Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (276266 => 276267)

--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp	2021-04-19 18:52:25 UTC (rev 276266)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp	2021-04-19 18:55:04 UTC (rev 276267)
@@ -1039,6 +1039,10 @@
 if (containerType == applicationOctetStream())
 return SupportsType::IsNotSupported;
 
+auto lowercaseType = containerType.convertToASCIILowercase();
+if (!lowercaseType.startsWith("video/") && !lowercaseType.startsWith("audio/") && !lowercaseType.startsWith("application/"))
+return SupportsType::IsNotSupported;
+
 const MediaPlayerFactory* engine = bestMediaEngineForSupportParameters(parameters);
 if (!engine)
 return SupportsType::IsNotSupported;


Modified: trunk/Tools/ChangeLog (276266 => 276267)

--- trunk/Tools/ChangeLog	2021-04-19 18:52:25 UTC (rev 276266)
+++ trunk/Tools/ChangeLog	2021-04-19 18:55:04 UTC (rev 276267)
@@ -1,3 +1,15 @@
+2021-04-19  Chris Dumez  
+
+SVG Images launch the GPUProcess unnecessarily
+https://bugs.webkit.org/show_bug.cgi?id=224770
+
+Reviewed by Eric Carlson.
+
+Add API test coverage.
+
+* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
+(TEST):
+
 2021-04-19  Philippe Normand  
 
 Unreviewed, WPE Minibrowser build warning fix.


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm (276266 => 276267)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm	2021-04-19 18:52:25 UTC (rev 276266)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm	2021-04-19 18:55:04 UTC (rev 276267)
@@ -233,6 +233,22 @@
 EXPECT_EQ([configuration.get().processPool _gpuProcessIdentifier], 0);
 }
 
+TEST(GPUProcess, OnlyLaunchesGPUProcessWhenNecessarySVG)
+{
+auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+WKPreferencesSetBoolValueForKeyForTesting((__bridge WKPreferencesRef)[configuration preferences], true, WKStringCreateWithUTF8CString("UseGPUProcessForMediaEnabled"));
+WKPreferencesSetBoolValueForKeyForTesting((__bridge WKPreferencesRef)[configuration preferences], true, WKStringCreateWithUTF8CString("CaptureVideoInGPUProcessEnabled"));
+WKPreferencesSetBoolValueForKeyForTesting((__bridge WKPreferencesRef)[configuration preferences], true, WKStringCreateWithUTF8CString("UseGPUProcessForCanvasRenderingEnabled"));
+WKPreferencesSetBoolValueForKeyForTesting((__bridge WKPreferencesRef)[configuration preferences], false, WKStringCreateWithUTF8CString("UseGPUProcessForDOMRenderingEnabled"));
+
+auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 400, 400) configuration:configuration.get()]);
+[webView synchronouslyLoadHTMLString:@""];
+
+TestWebKitAPI::Util::spinRunLoop(10);
+
+EXPECT_EQ([configuration.get().processPool _gpuProcessIdentifier], 0);
+}
+
 TEST(GPUProcess, CrashWhilePlayingVideo)
 {
 auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);






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


[webkit-changes] [276266] trunk/Source/bmalloc

2021-04-19 Thread msaboff
Title: [276266] trunk/Source/bmalloc








Revision 276266
Author msab...@apple.com
Date 2021-04-19 11:52:25 -0700 (Mon, 19 Apr 2021)


Log Message
[bmalloc] Enable Adaptive Scavenger for Mac
https://bugs.webkit.org/show_bug.cgi?id=224706

Reviewed by Filip Pizlo.

Enabled the adaptive scavenger code paths for macOS.
The original reason that the partial scavenging paths were kept for macOS was due
to regression on power tests.  To alleviate the power regression, this patch splits
out the adaptive scavenger parameters with macOS specific values.

The parameters are:
  The multiplier used to compute the next scavenging wait time based on the 
time needed for the prior scavenging.
  Minimum wait time between scavenging.
  Maximum wait time between scavenging.

The values in the current code are:
  Wait time Multiplier: 150
  Minimum wait time: 100ms
  Maximum wait time: 10,000ms (10 seconds)

The proposed values for macOS, determined using empirical testing.
  Wait time Multiplier: 300
  Minimum wait time: 750ms
  Maximum wait time: 20,000ms (20 seconds)

When tested on various mac variants, this change:
 * Provides a 3-5% reduction in memory use on RAMification.
 * It is neutral on JetStream2.
 * It is neutral to a slight regression on Speedometer2, but there is some
   variability in those results.

Since macOS was the only platform still using the partial scavenging code path,
the partial scavenging code paths were deleted.

* bmalloc/BPlatform.h:
* bmalloc/Heap.cpp:
(bmalloc::Heap::scavenge):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::scavengeToHighWatermark): Deleted.
* bmalloc/Heap.h:
* bmalloc/IsoDirectory.h:
* bmalloc/IsoDirectoryInlines.h:
(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::scavengeToHighWatermark): Deleted.
* bmalloc/IsoHeapImpl.h:
* bmalloc/IsoHeapImplInlines.h:
(bmalloc::IsoHeapImpl::scavengeToHighWatermark): Deleted.
* bmalloc/LargeMap.cpp:
(bmalloc::LargeMap::add):
* bmalloc/LargeRange.h:
(bmalloc::LargeRange::LargeRange):
(bmalloc::LargeRange::setUsedSinceLastScavenge):
(bmalloc::merge):
(): Deleted.
* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::threadRunLoop):
(bmalloc::Scavenger::timeSinceLastPartialScavenge): Deleted.
(bmalloc::Scavenger::partialScavenge): Deleted.
* bmalloc/Scavenger.h:
* bmalloc/SmallPage.h:
(bmalloc::SmallPage::setUsedSinceLastScavenge):

Modified Paths

trunk/Source/bmalloc/ChangeLog
trunk/Source/bmalloc/bmalloc/BPlatform.h
trunk/Source/bmalloc/bmalloc/Heap.cpp
trunk/Source/bmalloc/bmalloc/Heap.h
trunk/Source/bmalloc/bmalloc/IsoDirectory.h
trunk/Source/bmalloc/bmalloc/IsoDirectoryInlines.h
trunk/Source/bmalloc/bmalloc/IsoHeapImpl.h
trunk/Source/bmalloc/bmalloc/IsoHeapImplInlines.h
trunk/Source/bmalloc/bmalloc/LargeMap.cpp
trunk/Source/bmalloc/bmalloc/LargeRange.h
trunk/Source/bmalloc/bmalloc/Scavenger.cpp
trunk/Source/bmalloc/bmalloc/Scavenger.h
trunk/Source/bmalloc/bmalloc/SmallPage.h




Diff

Modified: trunk/Source/bmalloc/ChangeLog (276265 => 276266)

--- trunk/Source/bmalloc/ChangeLog	2021-04-19 18:21:54 UTC (rev 276265)
+++ trunk/Source/bmalloc/ChangeLog	2021-04-19 18:52:25 UTC (rev 276266)
@@ -1,3 +1,73 @@
+2021-04-19  Michael Saboff  
+
+[bmalloc] Enable Adaptive Scavenger for Mac
+https://bugs.webkit.org/show_bug.cgi?id=224706
+
+Reviewed by Filip Pizlo.
+
+Enabled the adaptive scavenger code paths for macOS.
+The original reason that the partial scavenging paths were kept for macOS was due
+to regression on power tests.  To alleviate the power regression, this patch splits
+out the adaptive scavenger parameters with macOS specific values.
+
+The parameters are:
+  The multiplier used to compute the next scavenging wait time based on the 
+time needed for the prior scavenging.
+  Minimum wait time between scavenging.
+  Maximum wait time between scavenging.
+
+The values in the current code are:
+  Wait time Multiplier: 150
+  Minimum wait time: 100ms
+  Maximum wait time: 10,000ms (10 seconds)
+
+The proposed values for macOS, determined using empirical testing.
+  Wait time Multiplier: 300
+  Minimum wait time: 750ms
+  Maximum wait time: 20,000ms (20 seconds)
+
+When tested on various mac variants, this change:
+ * Provides a 3-5% reduction in memory use on RAMification.
+ * It is neutral on JetStream2.
+ * It is neutral to a slight regression on Speedometer2, but there is some
+   variability in those results.
+
+Since macOS was the only platform still using the partial scavenging code path,
+the partial scavenging code paths were deleted.
+
+* bmalloc/BPlatform.h:
+* bmalloc/Heap.cpp:
+  

[webkit-changes] [276265] trunk/Source/WebInspectorUI

2021-04-19 Thread drousso
Title: [276265] trunk/Source/WebInspectorUI








Revision 276265
Author drou...@apple.com
Date 2021-04-19 11:21:54 -0700 (Mon, 19 Apr 2021)


Log Message
Web Inspector: REGRESSION(?): Network: Request (Object Tree) is sometimes empty
https://bugs.webkit.org/show_bug.cgi?id=224768


Reviewed by BJ Burg.

* UserInterface/Views/LocalJSONContentView.js:
(WI.LocalJSONContentView.prototype.renderRemoteObject):
If the `WI.RemoteObject` is simple enough to be rendered inline, `WI.ObjectTreeView` won't
show a `WI.TreeOutline` by default. We have to tell it to use a `WI.TreeOutline` by passing
`forceExpanding = true` into the constructor.

* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype.showOnlyJSON):
Add some `console.assert` to help prevent this from happening again.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/LocalJSONContentView.js
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (276264 => 276265)

--- trunk/Source/WebInspectorUI/ChangeLog	2021-04-19 17:59:26 UTC (rev 276264)
+++ trunk/Source/WebInspectorUI/ChangeLog	2021-04-19 18:21:54 UTC (rev 276265)
@@ -1,3 +1,21 @@
+2021-04-19  Devin Rousso  
+
+Web Inspector: REGRESSION(?): Network: Request (Object Tree) is sometimes empty
+https://bugs.webkit.org/show_bug.cgi?id=224768
+
+
+Reviewed by BJ Burg.
+
+* UserInterface/Views/LocalJSONContentView.js:
+(WI.LocalJSONContentView.prototype.renderRemoteObject):
+If the `WI.RemoteObject` is simple enough to be rendered inline, `WI.ObjectTreeView` won't
+show a `WI.TreeOutline` by default. We have to tell it to use a `WI.TreeOutline` by passing
+`forceExpanding = true` into the constructor.
+
+* UserInterface/Views/ObjectTreeView.js:
+(WI.ObjectTreeView.prototype.showOnlyJSON):
+Add some `console.assert` to help prevent this from happening again.
+
 2021-04-19  Kimmo Kinnunen  
 
 Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LocalJSONContentView.js (276264 => 276265)

--- trunk/Source/WebInspectorUI/UserInterface/Views/LocalJSONContentView.js	2021-04-19 17:59:26 UTC (rev 276264)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LocalJSONContentView.js	2021-04-19 18:21:54 UTC (rev 276265)
@@ -43,7 +43,9 @@
 
 renderRemoteObject(remoteObject)
 {
-let objectTree = new WI.ObjectTreeView(remoteObject);
+const propertyPath = null;
+const forceExpanding = true;
+let objectTree = new WI.ObjectTreeView(remoteObject, WI.ObjectTreeView.Mode.Properties, propertyPath, forceExpanding);
 objectTree.showOnlyJSON();
 objectTree.expand();
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js (276264 => 276265)

--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js	2021-04-19 17:59:26 UTC (rev 276264)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js	2021-04-19 18:21:54 UTC (rev 276265)
@@ -295,6 +295,9 @@
 
 showOnlyJSON()
 {
+console.assert(this._mode === WI.ObjectTreeView.Mode.Properties, this._mode);
+console.assert(!this._hasLosslessPreview);
+
 this.showOnlyProperties();
 
 this._element.classList.add("json-only");






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


[webkit-changes] [276264] trunk

2021-04-19 Thread rego
Title: [276264] trunk








Revision 276264
Author r...@igalia.com
Date 2021-04-19 10:59:26 -0700 (Mon, 19 Apr 2021)


Log Message
[selectors] Script focus and :focus-visible
https://bugs.webkit.org/show_bug.cgi?id=224598

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update expectations as the tests pass now.

* web-platform-tests/css/selectors/focus-visible-008-expected.txt:
* web-platform-tests/css/selectors/focus-visible-009-expected.txt:
* web-platform-tests/css/selectors/focus-visible-010-expected.txt:
* web-platform-tests/css/selectors/focus-visible-014-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-001-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-002.tentative-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-003.tentative-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-004-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-005-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-006.tentative-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-007.tentative-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-012-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-013-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-014-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-015-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-016.tentative-expected.txt:
* web-platform-tests/css/selectors/focus-visible-script-focus-017.tentative-expected.txt:

Source/WebCore:

Implement :focus-visible behavior when a script moves focus.
An element will match :focus-visible when a script move focus if the last focused element was not focused via mouse click.

This patch makes WebKit behaves like Chromium and Firefox and pass all the related tests.

There's an ongoing discussion about 6 tests that are marked as ".tentative" in the following issue:
https://github.com/web-platform-tests/wpt/issues/28505

Test: web-platform-tests/css/selectors/focus-visible-script-focus-*

* dom/Document.cpp:
(WebCore::Document::adjustFocusedNodeOnNodeRemoval): Just update FocusOptions initializer.
(WebCore::Document::setFocusedElement): Store if the last element has been focused by mouse click or not.
* dom/Document.h: New member m_latestFocusTrigger.
(WebCore::Document::wasLastFocusByClick const): Method to check status of m_latestFocusTrigger.
* dom/Element.cpp:
(WebCore::Element::focus): When there's a script focus, this checks if the last element was focused
by mouse click in order to make it match :focus-visible.
* dom/FocusOptions.h: Add FocusTrigger enum to know if an element has been focused via mouse click or not.
This refers to the "focus trigger" concept on the HTML spec (see https://html.spec.whatwg.org/multipage/interaction.html).
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent): Pass FocusTrigger:Click in setFocusedElement() call.

LayoutTests:

Update expectations for tests, most of them are passing on Mac. On iOS a bunch timeout so they're skipped, as other :focus-visible tests.

* platform/ios/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt: Removed as test passes now.
* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-008-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-010-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-014-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-001-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-002.tentative-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-003.tentative-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-004-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-005-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-006.tentative-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-007.tentative-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-012-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-013-expected.txt

[webkit-changes] [276263] trunk/Source/WebKit

2021-04-19 Thread cdumez
Title: [276263] trunk/Source/WebKit








Revision 276263
Author cdu...@apple.com
Date 2021-04-19 10:53:04 -0700 (Mon, 19 Apr 2021)


Log Message
Fix races in LibWebRTCCodecs introduced in r276214
https://bugs.webkit.org/show_bug.cgi?id=224758

Reviewed by Youenn Fablet.

After r276214, LibWebRTCCodecs's createDecoder() / createEncoder() may hop to the main
thread to initialize the connection to the GPUProcess. If releaseDecoder() / releaseEncoder()
were to get called very shortly after, they may win the race and have no decoder / encoder
to release, since they are dispatched directly to the background thread. To address the issue,
we now call ensureGPUProcessConnectionAndDispatchToThread() in releaseDecoder(), releaseEncoder()
and initializeEncoder().

* WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::releaseEncoder):
(WebKit::LibWebRTCCodecs::initializeEncoder):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (276262 => 276263)

--- trunk/Source/WebKit/ChangeLog	2021-04-19 17:51:46 UTC (rev 276262)
+++ trunk/Source/WebKit/ChangeLog	2021-04-19 17:53:04 UTC (rev 276263)
@@ -1,5 +1,24 @@
 2021-04-19  Chris Dumez  
 
+Fix races in LibWebRTCCodecs introduced in r276214
+https://bugs.webkit.org/show_bug.cgi?id=224758
+
+Reviewed by Youenn Fablet.
+
+After r276214, LibWebRTCCodecs's createDecoder() / createEncoder() may hop to the main
+thread to initialize the connection to the GPUProcess. If releaseDecoder() / releaseEncoder()
+were to get called very shortly after, they may win the race and have no decoder / encoder
+to release, since they are dispatched directly to the background thread. To address the issue,
+we now call ensureGPUProcessConnectionAndDispatchToThread() in releaseDecoder(), releaseEncoder()
+and initializeEncoder().
+
+* WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
+(WebKit::LibWebRTCCodecs::releaseDecoder):
+(WebKit::LibWebRTCCodecs::releaseEncoder):
+(WebKit::LibWebRTCCodecs::initializeEncoder):
+
+2021-04-19  Chris Dumez  
+
 Add more GPUProcess release logging to facilitate debugging
 https://bugs.webkit.org/show_bug.cgi?id=224761
 


Modified: trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp (276262 => 276263)

--- trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp	2021-04-19 17:51:46 UTC (rev 276262)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp	2021-04-19 17:53:04 UTC (rev 276263)
@@ -191,15 +191,25 @@
 void LibWebRTCCodecs::ensureGPUProcessConnectionAndDispatchToThread(Function&& task)
 {
 m_needsGPUProcessConnection = true;
-{
-auto locker = holdLock(m_connectionLock);
-if (m_connection)
-return dispatchToThread(WTFMove(task));
+
+auto locker = holdLock(m_connectionLock);
+
+// Fast path when we already have a connection.
+if (m_connection) {
+dispatchToThread(WTFMove(task));
+return;
 }
-ensureOnMainRunLoop([this, task = WTFMove(task)]() mutable {
+
+// We don't have a connection to the GPUProcess yet, we need to hop to the main thread to initiate it.
+m_tasksToDispatchAfterEstablishingConnection.append(WTFMove(task));
+if (m_tasksToDispatchAfterEstablishingConnection.size() != 1)
+return;
+
+callOnMainRunLoop([this] {
 auto locker = holdLock(m_connectionLock);
 ensureGPUProcessConnectionOnMainThread(locker);
-dispatchToThread(WTFMove(task));
+for (auto& task : std::exchange(m_tasksToDispatchAfterEstablishingConnection, { }))
+dispatchToThread(WTFMove(task));
 });
 }
 
@@ -259,7 +269,7 @@
 int32_t LibWebRTCCodecs::releaseDecoder(Decoder& decoder)
 {
 ASSERT(!decoder.decodedImageCallback);
-dispatchToThread([this, decoderIdentifier = decoder.identifier] {
+ensureGPUProcessConnectionAndDispatchToThread([this, decoderIdentifier = decoder.identifier] {
 ASSERT(m_decoders.contains(decoderIdentifier));
 if (auto decoder = m_decoders.take(decoderIdentifier)) {
 decoder->connection->send(Messages::LibWebRTCCodecsProxy::ReleaseDecoder { decoderIdentifier }, 0);
@@ -382,7 +392,7 @@
 int32_t LibWebRTCCodecs::releaseEncoder(Encoder& encoder)
 {
 ASSERT(!encoder.encodedImageCallback);
-dispatchToThread([this, encoderIdentifier = encoder.identifier] {
+ensureGPUProcessConnectionAndDispatchToThread([this, encoderIdentifier = encoder.identifier] {
 ASSERT(m_encoders.contains(encoderIdentifier));
 auto encoder = m_encoders.take(encoderIdentifier);
 encoder->connection->send(Messages::LibWebRTCCodecsProxy::ReleaseEncoder { encoderIdentifier }, 0);
@@ -393,7 +403,7 @@
 
 int32_t 

[webkit-changes] [276262] trunk

2021-04-19 Thread darin
Title: [276262] trunk








Revision 276262
Author da...@apple.com
Date 2021-04-19 10:51:46 -0700 (Mon, 19 Apr 2021)


Log Message
Nullptr crash in CSSCalcValue::category() via HTMLConverterCaches::floatPropertyValueForNode
https://bugs.webkit.org/show_bug.cgi?id=221392

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt:
Updated to reflect 8 tests passing that were failing before.

Source/WebCore:

* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcOperationNode::createCalcExpression const): Pass in a destination category
when creating a CalcExpressionOperation.
(WebCore::createCSS): Pass the destination category from the CalcExpressionOperation when
creating a CSSCalcOperationNode.

* css/CSSCalculationValue.h: Moved the CalculationCategory enumeration from here to
CalculationValue.h.

* platform/CalculationValue.cpp:
(WebCore::operator==): Include destination category when comparing.

* platform/CalculationValue.h: Moved CalculationCategory here. Added a destination
category constructor argument, data members, and getter function to the
CalcExpressionOperation class.

LayoutTests:

* fast/css/calc-parsing-expected.txt: Updated for change below.
* fast/css/calc-parsing.html: Added more test cases so this covers the affected cases of computed
style for calc expressions that mix percentages and numbers. Alternatively, we could remove this
entire test case because the web platform tests also cover this pretty well.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css/calc-parsing-expected.txt
trunk/LayoutTests/fast/css/calc-parsing.html
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSCalculationValue.cpp
trunk/Source/WebCore/css/CSSCalculationValue.h
trunk/Source/WebCore/platform/CalculationValue.cpp
trunk/Source/WebCore/platform/CalculationValue.h




Diff

Modified: trunk/LayoutTests/ChangeLog (276261 => 276262)

--- trunk/LayoutTests/ChangeLog	2021-04-19 17:17:54 UTC (rev 276261)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 17:51:46 UTC (rev 276262)
@@ -1,3 +1,15 @@
+2021-04-19  Darin Adler  
+
+Nullptr crash in CSSCalcValue::category() via HTMLConverterCaches::floatPropertyValueForNode
+https://bugs.webkit.org/show_bug.cgi?id=221392
+
+Reviewed by Simon Fraser.
+
+* fast/css/calc-parsing-expected.txt: Updated for change below.
+* fast/css/calc-parsing.html: Added more test cases so this covers the affected cases of computed
+style for calc expressions that mix percentages and numbers. Alternatively, we could remove this
+entire test case because the web platform tests also cover this pretty well.
+
 2021-04-19  Chris Gambrell  
 
 [LayoutTests] Convert http/tests/blink convert PHP to Python


Modified: trunk/LayoutTests/fast/css/calc-parsing-expected.txt (276261 => 276262)

--- trunk/LayoutTests/fast/css/calc-parsing-expected.txt	2021-04-19 17:17:54 UTC (rev 276261)
+++ trunk/LayoutTests/fast/css/calc-parsing-expected.txt	2021-04-19 17:51:46 UTC (rev 276262)
@@ -1,96 +1,208 @@
-Tests parsing of various valid and invalid calc expressions.
+Tests parsing and re-serializing of various valid and invalid calc expressions.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
 
-testDiv.style["width"] = "calc(100px)"
-PASS testDiv.style['width'] is "calc(100px)"
-PASS window.getComputedStyle(testDiv).getPropertyValue('width') is "100px"
+element.style["width"] = "calc(100px)"
+PASS element.style['width'] is "calc(100px)"
+PASS getComputedStyle(element).getPropertyValue('width') is "100px"
 
-testDiv.style["width"] = "max(100px + 200px)"
-PASS testDiv.style['width'] is "max(300px)"
-PASS window.getComputedStyle(testDiv).getPropertyValue('width') is "300px"
+element.style["width"] = "max(100px + 200px)"
+PASS element.style['width'] is "max(300px)"
+PASS getComputedStyle(element).getPropertyValue('width') is "300px"
 
-testDiv.style["width"] = "max(100px , 200px)"
-PASS testDiv.style['width'] is "max(200px)"
-PASS window.getComputedStyle(testDiv).getPropertyValue('width') is "200px"
+element.style["width"] = "max(100px , 200px)"
+PASS element.style['width'] is "max(200px)"
+PASS getComputedStyle(element).getPropertyValue('width') is "200px"
 
-testDiv.style["width"] = "max(100px,200px)"
-PASS testDiv.style['width'] is "max(200px)"
-PASS window.getComputedStyle(testDiv).getPropertyValue('width') is "200px"
+element.style["width"] = "max(100px,200px)"
+PASS element.style['width'] is "max(200px)"
+PASS getComputedStyle(element).getPropertyValue('width') is "200px"
 
-testDiv.style["width"] = "clamp(100px,123px,200px)"
-PASS testDiv.style['width'] is "clamp(100px, 123px, 200px)"
-PASS window.getComputedStyle(testDiv).getPropertyValue('width') is "123px"

[webkit-changes] [276261] trunk/LayoutTests

2021-04-19 Thread cgambrell
Title: [276261] trunk/LayoutTests








Revision 276261
Author cgambr...@apple.com
Date 2021-04-19 10:17:54 -0700 (Mon, 19 Apr 2021)


Log Message
[LayoutTests] Convert http/tests/blink convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=224702


Reviewed by Darin Adler.

* http/tests/blink/sendbeacon/beacon-cookie-expected.txt:
* http/tests/blink/sendbeacon/beacon-cookie.html:
* http/tests/blink/sendbeacon/beacon-cross-origin-expected.txt:
* http/tests/blink/sendbeacon/beacon-cross-origin.html:
* http/tests/blink/sendbeacon/beacon-cross-origin.https-expected.txt:
* http/tests/blink/sendbeacon/beacon-cross-origin.https.html:
* http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
* http/tests/blink/sendbeacon/beacon-same-origin.html:
* http/tests/blink/sendbeacon/resources/check-beacon.php: Removed.
* http/tests/blink/sendbeacon/resources/check-beacon.py: Added.
(extensive_strip):
* http/tests/blink/sendbeacon/resources/save-beacon.php: Removed.
* http/tests/blink/sendbeacon/resources/save-beacon.py: Added.
(prettify):
(decode_multipart):
* http/tests/resources/portabilityLayer.py:
(get_post_data):
(get_request):
* platform/ios/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
* platform/mac/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cookie-expected.txt
trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cookie.html
trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cross-origin-expected.txt
trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cross-origin.html
trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cross-origin.https-expected.txt
trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cross-origin.https.html
trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt
trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-same-origin.html
trunk/LayoutTests/http/tests/resources/portabilityLayer.py
trunk/LayoutTests/platform/ios/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt
trunk/LayoutTests/platform/mac/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt


Added Paths

trunk/LayoutTests/http/tests/blink/sendbeacon/resources/check-beacon.py
trunk/LayoutTests/http/tests/blink/sendbeacon/resources/save-beacon.py


Removed Paths

trunk/LayoutTests/http/tests/blink/sendbeacon/resources/check-beacon.php
trunk/LayoutTests/http/tests/blink/sendbeacon/resources/save-beacon.php




Diff

Modified: trunk/LayoutTests/ChangeLog (276260 => 276261)

--- trunk/LayoutTests/ChangeLog	2021-04-19 17:08:31 UTC (rev 276260)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 17:17:54 UTC (rev 276261)
@@ -1,3 +1,32 @@
+2021-04-19  Chris Gambrell  
+
+[LayoutTests] Convert http/tests/blink convert PHP to Python
+https://bugs.webkit.org/show_bug.cgi?id=224702
+
+
+Reviewed by Darin Adler.
+
+* http/tests/blink/sendbeacon/beacon-cookie-expected.txt:
+* http/tests/blink/sendbeacon/beacon-cookie.html:
+* http/tests/blink/sendbeacon/beacon-cross-origin-expected.txt:
+* http/tests/blink/sendbeacon/beacon-cross-origin.html:
+* http/tests/blink/sendbeacon/beacon-cross-origin.https-expected.txt:
+* http/tests/blink/sendbeacon/beacon-cross-origin.https.html:
+* http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
+* http/tests/blink/sendbeacon/beacon-same-origin.html:
+* http/tests/blink/sendbeacon/resources/check-beacon.php: Removed.
+* http/tests/blink/sendbeacon/resources/check-beacon.py: Added.
+(extensive_strip):
+* http/tests/blink/sendbeacon/resources/save-beacon.php: Removed.
+* http/tests/blink/sendbeacon/resources/save-beacon.py: Added.
+(prettify):
+(decode_multipart):
+* http/tests/resources/portabilityLayer.py:
+(get_post_data):
+(get_request):
+* platform/ios/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
+* platform/mac/http/tests/blink/sendbeacon/beacon-same-origin-expected.txt:
+
 2021-04-19  Philippe Normand  
 
 Unreviewed, GLIB gardening


Modified: trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cookie-expected.txt (276260 => 276261)

--- trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cookie-expected.txt	2021-04-19 17:08:31 UTC (rev 276260)
+++ trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cookie-expected.txt	2021-04-19 17:17:54 UTC (rev 276261)
@@ -3,7 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS navigator.sendBeacon("resources/save-beacon.php?name=cookie", "Blip"); is true
+PASS navigator.sendBeacon("resources/save-beacon.py?name=cookie", "Blip"); is true
 PASS Beacon sent successfully
 PASS Content-Type: text/plain;charset=UTF-8
 PASS Cookie: hello=world


Modified: trunk/LayoutTests/http/tests/blink/sendbeacon/beacon-cookie.html (276260 

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

2021-04-19 Thread antti
Title: [276260] trunk/Source/WebCore








Revision 276260
Author an...@apple.com
Date 2021-04-19 10:08:31 -0700 (Mon, 19 Apr 2021)


Log Message
CSSValuePool should be non-copyable
https://bugs.webkit.org/show_bug.cgi?id=224764

Reviewed by Alan Bujtas.

* css/CSSValuePool.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSValuePool.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (276259 => 276260)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 16:59:03 UTC (rev 276259)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 17:08:31 UTC (rev 276260)
@@ -1,3 +1,12 @@
+2021-04-19  Antti Koivisto  
+
+CSSValuePool should be non-copyable
+https://bugs.webkit.org/show_bug.cgi?id=224764
+
+Reviewed by Alan Bujtas.
+
+* css/CSSValuePool.h:
+
 2021-04-19  Zalan Bujtas  
 
 [LFC] The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block


Modified: trunk/Source/WebCore/css/CSSValuePool.h (276259 => 276260)

--- trunk/Source/WebCore/css/CSSValuePool.h	2021-04-19 16:59:03 UTC (rev 276259)
+++ trunk/Source/WebCore/css/CSSValuePool.h	2021-04-19 17:08:31 UTC (rev 276260)
@@ -77,6 +77,7 @@
 
 class CSSValuePool {
 WTF_MAKE_FAST_ALLOCATED;
+WTF_MAKE_NONCOPYABLE(CSSValuePool);
 public:
 CSSValuePool();
 






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


[webkit-changes] [276259] trunk/Source/JavaScriptCore

2021-04-19 Thread mark . lam
Title: [276259] trunk/Source/_javascript_Core








Revision 276259
Author mark@apple.com
Date 2021-04-19 09:59:03 -0700 (Mon, 19 Apr 2021)


Log Message
Build fix for Debug -O3 after r276162.
https://bugs.webkit.org/show_bug.cgi?id=224681
rdar://76698113

Not reviewed.

* runtime/JSObject.cpp:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/JSObject.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (276258 => 276259)

--- trunk/Source/_javascript_Core/ChangeLog	2021-04-19 16:53:53 UTC (rev 276258)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-04-19 16:59:03 UTC (rev 276259)
@@ -1,3 +1,13 @@
+2021-04-19  Mark Lam  
+
+Build fix for Debug -O3 after r276162.
+https://bugs.webkit.org/show_bug.cgi?id=224681
+rdar://76698113
+
+Not reviewed.
+
+* runtime/JSObject.cpp:
+
 2021-04-19  Kimmo Kinnunen  
 
 Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards


Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (276258 => 276259)

--- trunk/Source/_javascript_Core/runtime/JSObject.cpp	2021-04-19 16:53:53 UTC (rev 276258)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp	2021-04-19 16:59:03 UTC (rev 276259)
@@ -42,6 +42,7 @@
 #include "ProxyObject.h"
 #include "TypeError.h"
 #include "VMInlines.h"
+#include "VMTrapsInlines.h"
 #include 
 
 namespace JSC {






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


[webkit-changes] [276258] trunk/LayoutTests

2021-04-19 Thread philn
Title: [276258] trunk/LayoutTests








Revision 276258
Author ph...@webkit.org
Date 2021-04-19 09:53:53 -0700 (Mon, 19 Apr 2021)


Log Message
Unreviewed, GLIB gardening

* platform/glib/TestExpectations: Flag a few more media tests to skip or as flaky crash.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/glib/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (276257 => 276258)

--- trunk/LayoutTests/ChangeLog	2021-04-19 16:46:44 UTC (rev 276257)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 16:53:53 UTC (rev 276258)
@@ -2,6 +2,12 @@
 
 Unreviewed, GLIB gardening
 
+* platform/glib/TestExpectations: Flag a few more media tests to skip or as flaky crash.
+
+2021-04-19  Philippe Normand  
+
+Unreviewed, GLIB gardening
+
 * platform/glib/TestExpectations: Flag imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit.html as flaky crash.
 
 2021-04-19  Philippe Normand  


Modified: trunk/LayoutTests/platform/glib/TestExpectations (276257 => 276258)

--- trunk/LayoutTests/platform/glib/TestExpectations	2021-04-19 16:46:44 UTC (rev 276257)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2021-04-19 16:53:53 UTC (rev 276258)
@@ -1740,6 +1740,8 @@
 # No plans to support Sframes for a while
 imported/w3c/web-platform-tests/webrtc-encoded-transform/sframe-transform.html [ Skip ]
 imported/w3c/web-platform-tests/webrtc-encoded-transform/sframe-transform-in-worker.https.html [ Skip ]
+imported/w3c/web-platform-tests/webrtc-encoded-transform/sframe-keys.https.html [ Skip ]
+imported/w3c/web-platform-tests/webrtc-encoded-transform/sframe-transform-buffer-source.html [ Skip ]
 webrtc/audio-sframe.html [ Skip ]
 webrtc/sframe-test-vectors.html [ Skip ]
 webrtc/sframe-transform-buffer-source.html [ Skip ]
@@ -2344,6 +2346,7 @@
 webkit.org/b/187760 fast/mediastream/get-user-media-on-loadedmetadata.html [ Pass Failure ]
 
 webkit.org/b/213506 webrtc/audio-video-element-playing.html [ Crash Pass ]
+webkit.org/b/213506 webrtc/remove-track.html [ Crash Pass ]
 
 webkit.org/b/194044 imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Failure ]
 






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


[webkit-changes] [276257] trunk/Source/WebKit

2021-04-19 Thread cdumez
Title: [276257] trunk/Source/WebKit








Revision 276257
Author cdu...@apple.com
Date 2021-04-19 09:46:44 -0700 (Mon, 19 Apr 2021)


Log Message
Add more GPUProcess release logging to facilitate debugging
https://bugs.webkit.org/show_bug.cgi?id=224761

Reviewed by Darin Adler.

* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::GPUProcess):
(WebKit::GPUProcess::createGPUConnectionToWebProcess):
(WebKit::GPUProcess::removeGPUConnectionToWebProcess):
(WebKit::GPUProcess::initializeGPUProcess):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/GPUProcess.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (276256 => 276257)

--- trunk/Source/WebKit/ChangeLog	2021-04-19 16:45:58 UTC (rev 276256)
+++ trunk/Source/WebKit/ChangeLog	2021-04-19 16:46:44 UTC (rev 276257)
@@ -1,3 +1,16 @@
+2021-04-19  Chris Dumez  
+
+Add more GPUProcess release logging to facilitate debugging
+https://bugs.webkit.org/show_bug.cgi?id=224761
+
+Reviewed by Darin Adler.
+
+* GPUProcess/GPUProcess.cpp:
+(WebKit::GPUProcess::GPUProcess):
+(WebKit::GPUProcess::createGPUConnectionToWebProcess):
+(WebKit::GPUProcess::removeGPUConnectionToWebProcess):
+(WebKit::GPUProcess::initializeGPUProcess):
+
 2021-04-19  Kimmo Kinnunen  
 
 Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards


Modified: trunk/Source/WebKit/GPUProcess/GPUProcess.cpp (276256 => 276257)

--- trunk/Source/WebKit/GPUProcess/GPUProcess.cpp	2021-04-19 16:45:58 UTC (rev 276256)
+++ trunk/Source/WebKit/GPUProcess/GPUProcess.cpp	2021-04-19 16:46:44 UTC (rev 276257)
@@ -78,6 +78,7 @@
 GPUProcess::GPUProcess(AuxiliaryProcessInitializationParameters&& parameters)
 {
 initialize(WTFMove(parameters));
+RELEASE_LOG(Process, "%p - GPUProcess::GPUProcess:", this);
 }
 
 GPUProcess::~GPUProcess()
@@ -86,6 +87,7 @@
 
 void GPUProcess::createGPUConnectionToWebProcess(ProcessIdentifier identifier, PAL::SessionID sessionID, GPUProcessConnectionParameters&& parameters, CompletionHandler&&)>&& completionHandler)
 {
+RELEASE_LOG(Process, "%p - GPUProcess::createGPUConnectionToWebProcess: processIdentifier=%" PRIu64, this, identifier.toUInt64());
 auto ipcConnection = createIPCConnectionPair();
 if (!ipcConnection) {
 completionHandler({ });
@@ -109,6 +111,7 @@
 
 void GPUProcess::removeGPUConnectionToWebProcess(GPUConnectionToWebProcess& connection)
 {
+RELEASE_LOG(Process, "%p - GPUProcess::removeGPUConnectionToWebProcess: processIdentifier=%" PRIu64, this, connection.webProcessIdentifier().toUInt64());
 ASSERT(m_webProcessConnections.contains(connection.webProcessIdentifier()));
 m_webProcessConnections.remove(connection.webProcessIdentifier());
 tryExitIfUnusedAndUnderMemoryPressure();
@@ -162,6 +165,7 @@
 
 void GPUProcess::initializeGPUProcess(GPUProcessCreationParameters&& parameters)
 {
+RELEASE_LOG(Process, "%p - GPUProcess::initializeGPUProcess:", this);
 WTF::Thread::setCurrentThreadIsUserInitiated();
 AtomString::init();
 






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


[webkit-changes] [276256] trunk/LayoutTests

2021-04-19 Thread philn
Title: [276256] trunk/LayoutTests








Revision 276256
Author ph...@webkit.org
Date 2021-04-19 09:45:58 -0700 (Mon, 19 Apr 2021)


Log Message
Unreviewed, GLIB gardening

* platform/glib/TestExpectations: Flag imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit.html as flaky crash.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/glib/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (276255 => 276256)

--- trunk/LayoutTests/ChangeLog	2021-04-19 15:41:44 UTC (rev 276255)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 16:45:58 UTC (rev 276256)
@@ -1,5 +1,11 @@
 2021-04-19  Philippe Normand  
 
+Unreviewed, GLIB gardening
+
+* platform/glib/TestExpectations: Flag imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit.html as flaky crash.
+
+2021-04-19  Philippe Normand  
+
 Unreviewed, WPE gardening
 
 Share more media tests baselines between the GTK and WPE ports.


Modified: trunk/LayoutTests/platform/glib/TestExpectations (276255 => 276256)

--- trunk/LayoutTests/platform/glib/TestExpectations	2021-04-19 15:41:44 UTC (rev 276255)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2021-04-19 16:45:58 UTC (rev 276256)
@@ -570,6 +570,8 @@
 # MSE failures
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/URL-createObjectURL-revoke.html [ Failure ]
 
+webkit.org/b/224767 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-implicit.html [ Crash Pass ]
+
 # See also bug #175578.
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html [ Failure ]
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure ]






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


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

2021-04-19 Thread zalan
Title: [276255] trunk/Source/WebCore








Revision 276255
Author za...@apple.com
Date 2021-04-19 08:41:44 -0700 (Mon, 19 Apr 2021)


Log Message
[LFC] The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block
https://bugs.webkit.org/show_bug.cgi?id=224754

Reviewed by Antti Koivisto.

https://www.w3.org/TR/css-contain-2/#containment-layout.

"The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block."

* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isContainingBlockForFixedPosition const):
(WebCore::Layout::Box::isContainingBlockForOutOfFlowPosition const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/layouttree/LayoutBox.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (276254 => 276255)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 15:21:58 UTC (rev 276254)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 15:41:44 UTC (rev 276255)
@@ -1,5 +1,20 @@
 2021-04-19  Zalan Bujtas  
 
+[LFC] The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block
+https://bugs.webkit.org/show_bug.cgi?id=224754
+
+Reviewed by Antti Koivisto.
+
+https://www.w3.org/TR/css-contain-2/#containment-layout.
+
+"The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block."
+
+* layout/layouttree/LayoutBox.h:
+(WebCore::Layout::Box::isContainingBlockForFixedPosition const):
+(WebCore::Layout::Box::isContainingBlockForOutOfFlowPosition const):
+
+2021-04-19  Zalan Bujtas  
+
 [LFC] Layout containment box establishes an independent formatting context
 https://bugs.webkit.org/show_bug.cgi?id=224753
 


Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.h (276254 => 276255)

--- trunk/Source/WebCore/layout/layouttree/LayoutBox.h	2021-04-19 15:21:58 UTC (rev 276254)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.h	2021-04-19 15:41:44 UTC (rev 276255)
@@ -228,12 +228,12 @@
 
 inline bool Box::isContainingBlockForFixedPosition() const
 {
-return isInitialContainingBlock() || style().hasTransform();
+return isInitialContainingBlock() || isLayoutContainmentBox() || style().hasTransform();
 }
 
 inline bool Box::isContainingBlockForOutOfFlowPosition() const
 {
-return isInitialContainingBlock() || isPositioned() || style().hasTransform();
+return isInitialContainingBlock() || isPositioned() || isLayoutContainmentBox() || style().hasTransform();
 }
 
 }






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


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

2021-04-19 Thread zalan
Title: [276254] trunk/Source/WebCore








Revision 276254
Author za...@apple.com
Date 2021-04-19 08:21:58 -0700 (Mon, 19 Apr 2021)


Log Message
[LFC] Layout containment box establishes an independent formatting context
https://bugs.webkit.org/show_bug.cgi?id=224753

Reviewed by Antti Koivisto.

https://www.w3.org/TR/css-contain-2/#containment-layout.

"The layout containment box establishes an independent formatting context."

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesIndependentFormattingContext const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (276253 => 276254)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 15:18:33 UTC (rev 276253)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 15:21:58 UTC (rev 276254)
@@ -1,3 +1,17 @@
+2021-04-19  Zalan Bujtas  
+
+[LFC] Layout containment box establishes an independent formatting context
+https://bugs.webkit.org/show_bug.cgi?id=224753
+
+Reviewed by Antti Koivisto.
+
+https://www.w3.org/TR/css-contain-2/#containment-layout.
+
+"The layout containment box establishes an independent formatting context."
+
+* layout/layouttree/LayoutBox.cpp:
+(WebCore::Layout::Box::establishesIndependentFormattingContext const):
+
 2021-04-19  Michael Catanzaro  
 
 Silence various -Wreturn-type warnings


Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (276253 => 276254)

--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2021-04-19 15:18:33 UTC (rev 276253)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2021-04-19 15:21:58 UTC (rev 276254)
@@ -134,8 +134,7 @@
 
 bool Box::establishesIndependentFormattingContext() const
 {
-// FIXME: This is where we would check for 'contain' property.
-return isAbsolutelyPositioned() || isFlexItem();
+return isLayoutContainmentBox() || isAbsolutelyPositioned() || isFlexItem();
 }
 
 bool Box::isRelativelyPositioned() const






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


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

2021-04-19 Thread commit-queue
Title: [276253] trunk/Source/WebCore








Revision 276253
Author commit-qu...@webkit.org
Date 2021-04-19 08:18:33 -0700 (Mon, 19 Apr 2021)


Log Message
Silence various -Wreturn-type warnings
https://bugs.webkit.org/show_bug.cgi?id=224756

Patch by Michael Catanzaro  on 2021-04-19
Reviewed by Don Olmstead.

* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::mixColorComponents):
* inspector/InspectorOverlay.cpp:
(WebCore::expectedSizeForLayoutLabel):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::usedClear):
(WebCore::RenderStyle::usedFloat):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
trunk/Source/WebCore/rendering/style/RenderStyle.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (276252 => 276253)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 14:16:05 UTC (rev 276252)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 15:18:33 UTC (rev 276253)
@@ -1,3 +1,18 @@
+2021-04-19  Michael Catanzaro  
+
+Silence various -Wreturn-type warnings
+https://bugs.webkit.org/show_bug.cgi?id=224756
+
+Reviewed by Don Olmstead.
+
+* css/parser/CSSPropertyParserHelpers.cpp:
+(WebCore::CSSPropertyParserHelpers::mixColorComponents):
+* inspector/InspectorOverlay.cpp:
+(WebCore::expectedSizeForLayoutLabel):
+* rendering/style/RenderStyle.cpp:
+(WebCore::RenderStyle::usedClear):
+(WebCore::RenderStyle::usedFloat):
+
 2021-04-19  Wenson Hsieh  
 
 Unreviewed, fix the build after r276181


Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp (276252 => 276253)

--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp	2021-04-19 14:16:05 UTC (rev 276252)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp	2021-04-19 15:18:33 UTC (rev 276253)
@@ -1803,6 +1803,8 @@
 case ColorMixColorSpace::Srgb:
 return mixColorComponentsInColorSpace>(mixPercentages, mixComponents1.color, mixComponents2.color);
 }
+
+RELEASE_ASSERT_NOT_REACHED();
 }
 
 static Color parseColorMixFunctionParameters(CSSParserTokenRange& range, const CSSParserContext& context)


Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (276252 => 276253)

--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2021-04-19 14:16:05 UTC (rev 276252)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2021-04-19 15:18:33 UTC (rev 276253)
@@ -1363,6 +1363,8 @@
 case InspectorOverlay::LabelArrowDirection::None:
 return { textWidth + (layoutLabelPadding * 2), textHeight + (layoutLabelPadding * 2) };
 }
+
+RELEASE_ASSERT_NOT_REACHED();
 }
 
 void InspectorOverlay::drawLayoutLabel(GraphicsContext& context, String label, FloatPoint point, InspectorOverlay::LabelArrowDirection arrowDirection, InspectorOverlay::LabelArrowEdgePosition arrowEdgePosition, Color backgroundColor, float maximumWidth)


Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (276252 => 276253)

--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2021-04-19 14:16:05 UTC (rev 276252)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2021-04-19 15:18:33 UTC (rev 276253)
@@ -2684,6 +2684,8 @@
 return computedValue == Clear::InlineStart ? UsedClear::Right : UsedClear::Left;
 return computedValue == Clear::InlineStart ? UsedClear::Left : UsedClear::Right;
 }
+
+RELEASE_ASSERT_NOT_REACHED();
 }
 
 UsedFloat RenderStyle::usedFloat(const RenderObject& renderer)
@@ -2703,5 +2705,7 @@
 return computedValue == Float::InlineStart ? UsedFloat::Right : UsedFloat::Left;
 return computedValue == Float::InlineStart ? UsedFloat::Left : UsedFloat::Right;
 }
+
+RELEASE_ASSERT_NOT_REACHED();
 }
 } // namespace WebCore






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


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

2021-04-19 Thread wenson_hsieh
Title: [276252] trunk/Source/WebCore








Revision 276252
Author wenson_hs...@apple.com
Date 2021-04-19 07:16:05 -0700 (Mon, 19 Apr 2021)


Log Message
Unreviewed, fix the build after r276181


Add a couple of missing forward declarations for `IntRect` and `IntPoint`.

* page/ContextMenuClient.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/ContextMenuClient.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (276251 => 276252)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 13:54:15 UTC (rev 276251)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 14:16:05 UTC (rev 276252)
@@ -1,3 +1,12 @@
+2021-04-19  Wenson Hsieh  
+
+Unreviewed, fix the build after r276181
+
+
+Add a couple of missing forward declarations for `IntRect` and `IntPoint`.
+
+* page/ContextMenuClient.h:
+
 2021-04-19  Youenn Fablet  
 
 Add assertions to check for no memory allocation in AudioMediaStreamTrackRendererUnit rendering thread


Modified: trunk/Source/WebCore/page/ContextMenuClient.h (276251 => 276252)

--- trunk/Source/WebCore/page/ContextMenuClient.h	2021-04-19 13:54:15 UTC (rev 276251)
+++ trunk/Source/WebCore/page/ContextMenuClient.h	2021-04-19 14:16:05 UTC (rev 276252)
@@ -32,6 +32,8 @@
 namespace WebCore {
 
 class Frame;
+class IntPoint;
+class IntRect;
 
 class ContextMenuClient {
 public:






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


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

2021-04-19 Thread youenn
Title: [276251] trunk/Source/WebCore








Revision 276251
Author you...@apple.com
Date 2021-04-19 06:54:15 -0700 (Mon, 19 Apr 2021)


Log Message
Add assertions to check for no memory allocation in AudioMediaStreamTrackRendererUnit rendering thread
https://bugs.webkit.org/show_bug.cgi?id=224674

Reviewed by Eric Carlson.

Add ForbidMallocUseForCurrentThreadScope in audio rendering code path to prevent memory allocation.
Rename inputProc to renderingCallback.
Remove use of AudioMediaStreamTrackRendererUnit::singleton and instead use the pointer given to renderingCallback.
This is safe as AudioMediaStreamTrackRendererUnit destructor stops the audio unit.

* platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp:
(WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnitIfNeeded):
(WebCore::AudioMediaStreamTrackRendererUnit::render):
(WebCore::AudioMediaStreamTrackRendererUnit::renderingCallback):
(WebCore::AudioMediaStreamTrackRendererUnit::inputProc): Deleted.
* platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp
trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (276250 => 276251)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 13:43:09 UTC (rev 276250)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 13:54:15 UTC (rev 276251)
@@ -1,3 +1,22 @@
+2021-04-19  Youenn Fablet  
+
+Add assertions to check for no memory allocation in AudioMediaStreamTrackRendererUnit rendering thread
+https://bugs.webkit.org/show_bug.cgi?id=224674
+
+Reviewed by Eric Carlson.
+
+Add ForbidMallocUseForCurrentThreadScope in audio rendering code path to prevent memory allocation.
+Rename inputProc to renderingCallback.
+Remove use of AudioMediaStreamTrackRendererUnit::singleton and instead use the pointer given to renderingCallback.
+This is safe as AudioMediaStreamTrackRendererUnit destructor stops the audio unit.
+
+* platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp:
+(WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnitIfNeeded):
+(WebCore::AudioMediaStreamTrackRendererUnit::render):
+(WebCore::AudioMediaStreamTrackRendererUnit::renderingCallback):
+(WebCore::AudioMediaStreamTrackRendererUnit::inputProc): Deleted.
+* platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h:
+
 2021-04-19  Zalan Bujtas  
 
 [LFC] Implement Box::isLayoutContainmentBox


Modified: trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp (276250 => 276251)

--- trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp	2021-04-19 13:43:09 UTC (rev 276250)
+++ trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp	2021-04-19 13:54:15 UTC (rev 276251)
@@ -34,6 +34,7 @@
 #include "Logging.h"
 
 #include 
+#include 
 #include 
 
 #if PLATFORM(COCOA)
@@ -203,7 +204,7 @@
 }
 #endif
 
-AURenderCallbackStruct callback = { inputProc, nullptr };
+AURenderCallbackStruct callback = { renderingCallback, this };
 error = AudioUnitSetProperty(remoteIOUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Global, 0, , sizeof(callback));
 if (error) {
 RELEASE_LOG_ERROR(WebRTC, "AudioMediaStreamTrackRendererUnit::createAudioUnit unable to set vpio unit speaker proc, error = %d", error);
@@ -237,6 +238,9 @@
 
 OSStatus AudioMediaStreamTrackRendererUnit::render(UInt32 sampleCount, AudioBufferList& ioData, UInt32 /*inBusNumber*/, const AudioTimeStamp& timeStamp, AudioUnitRenderActionFlags& actionFlags)
 {
+// For performance reasons, we forbid heap allocations while doing rendering on the audio thread.
+ForbidMallocUseForCurrentThreadScope forbidMallocUse;
+
 ASSERT(!isMainThread());
 if (m_shouldUpdateRenderSources) {
 auto locker = tryHoldLock(m_sourcesLock);
@@ -263,9 +267,9 @@
 return 0;
 }
 
-OSStatus AudioMediaStreamTrackRendererUnit::inputProc(void*, AudioUnitRenderActionFlags* actionFlags, const AudioTimeStamp* timeStamp, UInt32 inBusNumber, UInt32 sampleCount, AudioBufferList* ioData)
+OSStatus AudioMediaStreamTrackRendererUnit::renderingCallback(void* processor, AudioUnitRenderActionFlags* actionFlags, const AudioTimeStamp* timeStamp, UInt32 inBusNumber, UInt32 sampleCount, AudioBufferList* ioData)
 {
-return AudioMediaStreamTrackRendererUnit::singleton().render(sampleCount, *ioData, inBusNumber, *timeStamp, *actionFlags);
+return static_cast(processor)->render(sampleCount, *ioData, inBusNumber, *timeStamp, *actionFlags);
 }
 
 } // namespace WebCore


Modified: trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h (276250 => 276251)

--- trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h	

[webkit-changes] [276250] trunk/Tools

2021-04-19 Thread philn
Title: [276250] trunk/Tools








Revision 276250
Author ph...@webkit.org
Date 2021-04-19 06:43:09 -0700 (Mon, 19 Apr 2021)


Log Message
Unreviewed, WPE Minibrowser build warning fix.

* MiniBrowser/wpe/main.cpp: No need to use typedef for this struct declaration.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/MiniBrowser/wpe/main.cpp




Diff

Modified: trunk/Tools/ChangeLog (276249 => 276250)

--- trunk/Tools/ChangeLog	2021-04-19 13:28:40 UTC (rev 276249)
+++ trunk/Tools/ChangeLog	2021-04-19 13:43:09 UTC (rev 276250)
@@ -1,3 +1,9 @@
+2021-04-19  Philippe Normand  
+
+Unreviewed, WPE Minibrowser build warning fix.
+
+* MiniBrowser/wpe/main.cpp: No need to use typedef for this struct declaration.
+
 2021-04-19  Kimmo Kinnunen  
 
 Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards


Modified: trunk/Tools/MiniBrowser/wpe/main.cpp (276249 => 276250)

--- trunk/Tools/MiniBrowser/wpe/main.cpp	2021-04-19 13:28:40 UTC (rev 276249)
+++ trunk/Tools/MiniBrowser/wpe/main.cpp	2021-04-19 13:43:09 UTC (rev 276250)
@@ -135,11 +135,11 @@
 return std::make_unique(width, height);
 }
 
-typedef struct {
+struct FilterSaveData {
 GMainLoop* mainLoop { nullptr };
 WebKitUserContentFilter* filter { nullptr };
 GError* error { nullptr };
-} FilterSaveData;
+};
 
 static void filterSavedCallback(WebKitUserContentFilterStore *store, GAsyncResult *result, FilterSaveData *data)
 {






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


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

2021-04-19 Thread zalan
Title: [276249] trunk/Source/WebCore








Revision 276249
Author za...@apple.com
Date 2021-04-19 06:28:40 -0700 (Mon, 19 Apr 2021)


Log Message
[LFC] Implement Box::isLayoutContainmentBox
https://bugs.webkit.org/show_bug.cgi?id=224740

Reviewed by Antti Koivisto.

This is part of https://www.w3.org/TR/css-contain-2/#containment-layout

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isLayoutContainmentBox const):
(WebCore::Layout::Box::isInternalTableBox const):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isInternalRubyBox const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp
trunk/Source/WebCore/layout/layouttree/LayoutBox.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (276248 => 276249)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 13:22:54 UTC (rev 276248)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 13:28:40 UTC (rev 276249)
@@ -1,3 +1,18 @@
+2021-04-19  Zalan Bujtas  
+
+[LFC] Implement Box::isLayoutContainmentBox
+https://bugs.webkit.org/show_bug.cgi?id=224740
+
+Reviewed by Antti Koivisto.
+
+This is part of https://www.w3.org/TR/css-contain-2/#containment-layout
+
+* layout/layouttree/LayoutBox.cpp:
+(WebCore::Layout::Box::isLayoutContainmentBox const):
+(WebCore::Layout::Box::isInternalTableBox const):
+* layout/layouttree/LayoutBox.h:
+(WebCore::Layout::Box::isInternalRubyBox const):
+
 2021-04-19  Kimmo Kinnunen  
 
 Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards


Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (276248 => 276249)

--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2021-04-19 13:22:54 UTC (rev 276248)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp	2021-04-19 13:28:40 UTC (rev 276249)
@@ -353,6 +353,30 @@
 || isTableCaption(); // TODO && !replaced element
 }
 
+bool Box::isLayoutContainmentBox() const
+{
+auto supportsLayoutContainment = [&] {
+// If the element does not generate a principal box (as is the case with display values of contents or none),
+// or its principal box is an internal table box other than table-cell, or an internal ruby box, or a non-atomic inline-level box,
+// layout containment has no effect.
+if (isInternalTableBox())
+return isTableCell();
+if (isInternalRubyBox())
+return false;
+if (isInlineLevelBox())
+return isAtomicInlineLevelBox();
+return true;
+};
+return m_style.contain().contains(Containment::Layout) && supportsLayoutContainment();
+}
+
+bool Box::isInternalTableBox() const
+{
+// table-row-group, table-header-group, table-footer-group, table-row, table-cell, table-column-group, table-column
+// generates the appropriate internal table box which participates in a table formatting context.
+return isTableBody() || isTableHeader() || isTableFooter() || isTableRow() || isTableCell() || isTableColumnGroup() || isTableColumn();
+}
+
 const Box* Box::nextInFlowSibling() const
 {
 auto* nextSibling = this->nextSibling();


Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.h (276248 => 276249)

--- trunk/Source/WebCore/layout/layouttree/LayoutBox.h	2021-04-19 13:22:54 UTC (rev 276248)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.h	2021-04-19 13:28:40 UTC (rev 276249)
@@ -117,6 +117,7 @@
 bool isInlineBlockBox() const;
 bool isInlineTableBox() const;
 bool isInitialContainingBlock() const { return baseTypeFlags().contains(InitialContainingBlockFlag); }
+bool isLayoutContainmentBox() const;
 
 bool isDocumentBox() const { return m_elementAttributes && m_elementAttributes.value().elementType == ElementType::Document; }
 bool isBodyBox() const { return m_elementAttributes && m_elementAttributes.value().elementType == ElementType::Body; }
@@ -130,10 +131,12 @@
 bool isTableColumnGroup() const { return style().display() == DisplayType::TableColumnGroup; }
 bool isTableColumn() const { return style().display() == DisplayType::TableColumn; }
 bool isTableCell() const { return style().display() == DisplayType::TableCell; }
+bool isInternalTableBox() const;
 bool isFlexBox() const { return style().display() == DisplayType::Flex; }
 bool isFlexItem() const;
 bool isIFrame() const { return m_elementAttributes && m_elementAttributes.value().elementType == ElementType::IFrame; }
 bool isImage() const { return m_elementAttributes && m_elementAttributes.value().elementType == ElementType::Image; }
+bool isInternalRubyBox() const { return false; }
 
 const ContainerBox& parent() const { return *m_parent; }
 const Box* nextSibling() const { return m_nextSibling; }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org

[webkit-changes] [276247] trunk

2021-04-19 Thread commit-queue
Title: [276247] trunk








Revision 276247
Author commit-qu...@webkit.org
Date 2021-04-19 06:12:23 -0700 (Mon, 19 Apr 2021)


Log Message
Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards
https://bugs.webkit.org/show_bug.cgi?id=221614


Patch by Kimmo Kinnunen  on 2021-04-19
Reviewed by David Kilzer.

PerformanceTests:

Add -Wthread-safety to compile flags.

* DecoderTest/Configurations/Base.xcconfig:

Source/bmalloc:

Add -Wthread-safety to compile flags.

* Configurations/Base.xcconfig:

Source/_javascript_Core:

Add -Wthread-safety to compile flags.

* Configurations/Base.xcconfig:

Source/WebCore:

Add -Wthread-safety to compile flags.

* Configurations/Base.xcconfig:

Source/WebCore/PAL:

Add -Wthread-safety to compile flags.

* Configurations/Base.xcconfig:

Source/WebInspectorUI:

Add -Wthread-safety to compile flags.

* Configurations/Base.xcconfig:

Source/WebKit:

Add -Wthread-safety to compile flags.

* Configurations/Base.xcconfig:

Source/WebKitLegacy/mac:

Add -Wthread-safety to compile flags.

* Configurations/Base.xcconfig:

Source/WTF:

Implement rudimentary support for clang thread safety analysis.
The added macros can be used to declare which member variables or
global variables are locked by which mutexes. The compiler will
check statically that the mutexes are held correctly. The checking
is intra procedural, not global.

* Configurations/Base.xcconfig:
Add -Wthread-safety to compile flags.

* wtf/CheckedLock.h: Added.
Add CheckedLock, a Lock variant that is amenable to static
analysis.
Add a Locker specialization for CheckedLock that is amenable to
static analysis.

Locker is a std::scoped_lock. The scoped_lock cannot be aliased,
since it appears that (Apple's) libcxx is not compiled with thread safety
analysis support enabled by default.

New types are needed due Locker move constructor and conditional locking.
The Locker has default usage pattern of:
  auto locker = holdLock(m_lock);
This forces dynamism that removes the possibility of simple statical
analysis that thread safety analysis capabilities "mutex" and "scoped_lock"
currently implement. Most likely large fraction of call sites is due to historical
lack of CTAD and as such can be converted to less general form.
Once the pattern is not used by default, CheckedLock can be deleted
and the move dynamism bits of Locker can be moved to some more specific type
("UncheckedLocker").

* wtf/ThreadSafetyAnalysis.h: Added.
Add macro wrappers around clang "mutex" and "scoped_lock" capability attributes.

Tools:

* TestWebKitAPI/Configurations/Base.xcconfig:
Add -Wthread-safety to compile flags.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/CheckedLock.cpp: Added.
(TestWebKitAPI::TEST):
Implement a test for testing that CheckedLock compiles.

Modified Paths

trunk/PerformanceTests/ChangeLog
trunk/PerformanceTests/DecoderTest/Configurations/Base.xcconfig
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/Base.xcconfig
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/Configurations/Base.xcconfig
trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
trunk/Source/WTF/wtf/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/Base.xcconfig
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/Configurations/Base.xcconfig
trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Configurations/Base.xcconfig
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Configurations/Base.xcconfig
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig
trunk/Source/bmalloc/ChangeLog
trunk/Source/bmalloc/Configurations/Base.xcconfig
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/CMakeLists.txt
trunk/Tools/TestWebKitAPI/Configurations/Base.xcconfig
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WTF/wtf/CheckedLock.h
trunk/Source/WTF/wtf/ThreadSafetyAnalysis.h
trunk/Tools/TestWebKitAPI/Tests/WTF/CheckedLockTest.cpp




Diff

Modified: trunk/PerformanceTests/ChangeLog (276246 => 276247)

--- trunk/PerformanceTests/ChangeLog	2021-04-19 11:55:43 UTC (rev 276246)
+++ trunk/PerformanceTests/ChangeLog	2021-04-19 13:12:23 UTC (rev 276247)
@@ -1,3 +1,15 @@
+2021-04-19  Kimmo Kinnunen  
+
+Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards
+https://bugs.webkit.org/show_bug.cgi?id=221614
+
+
+Reviewed by David Kilzer.
+
+Add -Wthread-safety to compile flags.
+
+* DecoderTest/Configurations/Base.xcconfig:
+
 2021-04-12  Sergio Villar Senin  
 
 [css-flexbox] CDC COVID Vaccine Tracker: Safari garbles data table


Modified: trunk/PerformanceTests/DecoderTest/Configurations/Base.xcconfig (276246 => 276247)

--- trunk/PerformanceTests/DecoderTest/Configurations/Base.xcconfig	2021-04-19 11:55:43 

[webkit-changes] [276246] trunk

2021-04-19 Thread carlosgc
Title: [276246] trunk








Revision 276246
Author carlo...@webkit.org
Date 2021-04-19 04:55:43 -0700 (Mon, 19 Apr 2021)


Log Message
[GTK] Switch to libsoup3 by default
https://bugs.webkit.org/show_bug.cgi?id=224741

Reviewed by Sergio Villar Senin.

* Source/cmake/OptionsGTK.cmake:

Modified Paths

trunk/ChangeLog
trunk/Source/cmake/OptionsGTK.cmake




Diff

Modified: trunk/ChangeLog (276245 => 276246)

--- trunk/ChangeLog	2021-04-19 10:28:56 UTC (rev 276245)
+++ trunk/ChangeLog	2021-04-19 11:55:43 UTC (rev 276246)
@@ -1,3 +1,12 @@
+2021-04-19  Carlos Garcia Campos  
+
+[GTK] Switch to libsoup3 by default
+https://bugs.webkit.org/show_bug.cgi?id=224741
+
+Reviewed by Sergio Villar Senin.
+
+* Source/cmake/OptionsGTK.cmake:
+
 2021-04-19  Philippe Normand  
 
 [WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests


Modified: trunk/Source/cmake/OptionsGTK.cmake (276245 => 276246)

--- trunk/Source/cmake/OptionsGTK.cmake	2021-04-19 10:28:56 UTC (rev 276245)
+++ trunk/Source/cmake/OptionsGTK.cmake	2021-04-19 11:55:43 UTC (rev 276246)
@@ -78,7 +78,7 @@
 WEBKIT_OPTION_DEFINE(USE_LIBSECRET "Whether to enable the persistent credential storage using libsecret." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_OPENGL_OR_ES "Whether to use OpenGL or ES." PUBLIC ${USE_OPENGL_OR_ES_DEFAULT})
 WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images." PUBLIC ON)
-WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC ON)
+WEBKIT_OPTION_DEFINE(USE_SOUP2 "Whether to enable usage of Soup 2 instead of Soup 3." PUBLIC OFF)
 WEBKIT_OPTION_DEFINE(USE_SYSTEMD "Whether to enable journald logging" PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_WPE_RENDERER "Whether to enable WPE rendering" PUBLIC ON)






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


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

2021-04-19 Thread youenn
Title: [276245] trunk/Source/WebCore








Revision 276245
Author you...@apple.com
Date 2021-04-19 03:28:56 -0700 (Mon, 19 Apr 2021)


Log Message
Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer
https://bugs.webkit.org/show_bug.cgi?id=224672

Reviewed by Eric Carlson.

Instead of allocating the buffer on valid data, we wait for data to be of the correct sample rate.
We preallocate the buffer accordingly in constructor to avoid allocation in the webrtc audio thread.
Default is 1 channel since mono is what webrtc encoders mostly do these days.
Covered by existing tests.

* platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
(WebCore::RealtimeIncomingAudioSourceCocoa::RealtimeIncomingAudioSourceCocoa):
(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (276244 => 276245)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 09:56:09 UTC (rev 276244)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 10:28:56 UTC (rev 276245)
@@ -1,5 +1,21 @@
 2021-04-19  Youenn Fablet  
 
+Make RealtimeIncomingAudioSourceCocoa preallocate audio buffer
+https://bugs.webkit.org/show_bug.cgi?id=224672
+
+Reviewed by Eric Carlson.
+
+Instead of allocating the buffer on valid data, we wait for data to be of the correct sample rate.
+We preallocate the buffer accordingly in constructor to avoid allocation in the webrtc audio thread.
+Default is 1 channel since mono is what webrtc encoders mostly do these days.
+Covered by existing tests.
+
+* platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
+(WebCore::RealtimeIncomingAudioSourceCocoa::RealtimeIncomingAudioSourceCocoa):
+(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
+
+2021-04-19  Youenn Fablet  
+
 Move from RecursiveLock to Lock in RealtimeMediaSource
 https://bugs.webkit.org/show_bug.cgi?id=224671
 


Modified: trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp (276244 => 276245)

--- trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp	2021-04-19 09:56:09 UTC (rev 276244)
+++ trunk/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp	2021-04-19 10:28:56 UTC (rev 276245)
@@ -53,11 +53,6 @@
 return adoptRef(*new RealtimeIncomingAudioSourceCocoa(WTFMove(audioTrack), WTFMove(audioTrackId)));
 }
 
-RealtimeIncomingAudioSourceCocoa::RealtimeIncomingAudioSourceCocoa(rtc::scoped_refptr&& audioTrack, String&& audioTrackId)
-: RealtimeIncomingAudioSource(WTFMove(audioTrack), WTFMove(audioTrackId))
-{
-}
-
 static inline AudioStreamBasicDescription streamDescription(size_t sampleRate, size_t channelCount)
 {
 AudioStreamBasicDescription streamFormat;
@@ -65,8 +60,20 @@
 return streamFormat;
 }
 
+RealtimeIncomingAudioSourceCocoa::RealtimeIncomingAudioSourceCocoa(rtc::scoped_refptr&& audioTrack, String&& audioTrackId)
+: RealtimeIncomingAudioSource(WTFMove(audioTrack), WTFMove(audioTrackId))
+, m_sampleRate(LibWebRTCAudioFormat::sampleRate)
+, m_numberOfChannels(1)
+, m_streamDescription(streamDescription(m_sampleRate, m_numberOfChannels))
+, m_audioBufferList(makeUnique(m_streamDescription))
+{
+}
+
 void RealtimeIncomingAudioSourceCocoa::OnData(const void* audioData, int bitsPerSample, int sampleRate, size_t numberOfChannels, size_t numberOfFrames)
 {
+if (sampleRate != m_sampleRate)
+return;
+
 #if !RELEASE_LOG_DISABLED
 if (!(++m_chunksReceived % 200)) {
 callOnMainThread([identifier = LOGIDENTIFIER, this, protectedThis = makeRef(*this), chunksReceived = m_chunksReceived] {
@@ -75,7 +82,7 @@
 }
 #endif
 
-if (!m_audioBufferList || m_sampleRate != sampleRate || m_numberOfChannels != numberOfChannels) {
+if (!m_audioBufferList || m_numberOfChannels != numberOfChannels) {
 callOnMainThread([identifier = LOGIDENTIFIER, this, protectedThis = makeRef(*this), sampleRate, numberOfChannels] {
 ALWAYS_LOG_IF(loggerPtr(), identifier, "new audio buffer list for sampleRate ", sampleRate, " and ", numberOfChannels, " channel(s)");
 });






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


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

2021-04-19 Thread youenn
Title: [276244] trunk/Source/WebCore








Revision 276244
Author you...@apple.com
Date 2021-04-19 02:56:09 -0700 (Mon, 19 Apr 2021)


Log Message
Move from RecursiveLock to Lock in RealtimeMediaSource
https://bugs.webkit.org/show_bug.cgi?id=224671

Reviewed by Eric Carlson.

RecursiveLock is more expensive as it allocates memory and not useful here.
Covered by existing tests.

* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/RealtimeOutgoingAudioSource.h:
* platform/mediastream/RealtimeOutgoingVideoSource.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h
trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h
trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (276243 => 276244)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 09:53:37 UTC (rev 276243)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 09:56:09 UTC (rev 276244)
@@ -1,5 +1,19 @@
 2021-04-19  Youenn Fablet  
 
+Move from RecursiveLock to Lock in RealtimeMediaSource
+https://bugs.webkit.org/show_bug.cgi?id=224671
+
+Reviewed by Eric Carlson.
+
+RecursiveLock is more expensive as it allocates memory and not useful here.
+Covered by existing tests.
+
+* platform/mediastream/RealtimeMediaSource.h:
+* platform/mediastream/RealtimeOutgoingAudioSource.h:
+* platform/mediastream/RealtimeOutgoingVideoSource.h:
+
+2021-04-19  Youenn Fablet  
+
 Reduce crackling at start of playing a live audio track
 https://bugs.webkit.org/show_bug.cgi?id=218898
 


Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h (276243 => 276244)

--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h	2021-04-19 09:53:37 UTC (rev 276243)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h	2021-04-19 09:56:09 UTC (rev 276244)
@@ -43,8 +43,8 @@
 #include "RealtimeMediaSourceCapabilities.h"
 #include "RealtimeMediaSourceFactory.h"
 #include 
+#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -276,10 +276,10 @@
 String m_name;
 WeakHashSet m_observers;
 
-mutable RecursiveLock m_audioSampleObserversLock;
+mutable Lock m_audioSampleObserversLock;
 HashSet m_audioSampleObservers;
 
-mutable RecursiveLock m_videoSampleObserversLock;
+mutable Lock m_videoSampleObserversLock;
 HashSet m_videoSampleObservers;
 
 // Set on the main thread from constraints.


Modified: trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h (276243 => 276244)

--- trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h	2021-04-19 09:53:37 UTC (rev 276243)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h	2021-04-19 09:56:09 UTC (rev 276244)
@@ -127,7 +127,7 @@
 bool m_muted { false };
 bool m_enabled { true };
 
-mutable RecursiveLock m_sinksLock;
+mutable Lock m_sinksLock;
 HashSet m_sinks;
 
 #if !RELEASE_LOG_DISABLED


Modified: trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h (276243 => 276244)

--- trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h	2021-04-19 09:53:37 UTC (rev 276243)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h	2021-04-19 09:56:09 UTC (rev 276244)
@@ -141,7 +141,7 @@
 Timer m_blackFrameTimer;
 rtc::scoped_refptr m_blackFrame;
 
-mutable RecursiveLock m_sinksLock;
+mutable Lock m_sinksLock;
 HashSet*> m_sinks;
 bool m_areSinksAskingToApplyRotation { false };
 






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


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

2021-04-19 Thread youenn
Title: [276243] trunk/Source/WebCore








Revision 276243
Author you...@apple.com
Date 2021-04-19 02:53:37 -0700 (Mon, 19 Apr 2021)


Log Message
Reduce crackling at start of playing a live audio track
https://bugs.webkit.org/show_bug.cgi?id=218898


Reviewed by Eric Carlson.

We often hear crackles at the beginning of playing a MediaStreamTrack.
This is due to starting at a point where there is not enough data, so we start rendering and quickly run short of data.
Our heuristic to start was not good since we were not accounting to LibWebRTC audio module which sends audio samples by batch of 5 samples.
So we would have needed to at least have 6 samples to be sure to not run out of data.

What this patch does:
- Add an extra parameter to AudioSampleDataSource so that we do not start until we have at least been pushed a given number of sample count.
- Change LibWebRTAudioModule to send audio samples by batch of 3 (hence 30 ms) instead of 5
- Set this new parameter to 2 for local tracks and 4 for remote tracks
- Add a new boolean to AudioSampleDataSource to know whether we start the track for the first time or not. If we start it, use the new parameter to buffer enough data.
  Otherwise, use current heuristic.

We also reduce the AudioSampleDataSource buffer to 0.5 seconds instead of 2 seconds, since 2 seconds is too much for real time audio.

Manually tested.

* platform/audio/cocoa/AudioSampleDataSource.h:
* platform/audio/cocoa/AudioSampleDataSource.mm:
(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
* platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
(WebCore::LibWebRTCAudioModule::pollFromSource):
* platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
* platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
(WebCore::pollSamplesCount):
(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
* platform/mediastream/mac/MediaStreamTrackAudioSourceProviderCocoa.cpp:
(WebCore::MediaStreamTrackAudioSourceProviderCocoa::MediaStreamTrackAudioSourceProviderCocoa):
* platform/mediastream/mac/WebAudioSourceProviderCocoa.h:
* platform/mediastream/mac/WebAudioSourceProviderCocoa.mm:
(WebCore::WebAudioSourceProviderCocoa::prepare):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.h
trunk/Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.h
trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp
trunk/Source/WebCore/platform/mediastream/mac/MediaStreamTrackAudioSourceProviderCocoa.cpp
trunk/Source/WebCore/platform/mediastream/mac/WebAudioSourceProviderCocoa.h
trunk/Source/WebCore/platform/mediastream/mac/WebAudioSourceProviderCocoa.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (276242 => 276243)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 09:49:20 UTC (rev 276242)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 09:53:37 UTC (rev 276243)
@@ -1,3 +1,44 @@
+2021-04-19  Youenn Fablet  
+
+Reduce crackling at start of playing a live audio track
+https://bugs.webkit.org/show_bug.cgi?id=218898
+
+
+Reviewed by Eric Carlson.
+
+We often hear crackles at the beginning of playing a MediaStreamTrack.
+This is due to starting at a point where there is not enough data, so we start rendering and quickly run short of data.
+Our heuristic to start was not good since we were not accounting to LibWebRTC audio module which sends audio samples by batch of 5 samples.
+So we would have needed to at least have 6 samples to be sure to not run out of data.
+
+What this patch does:
+- Add an extra parameter to AudioSampleDataSource so that we do not start until we have at least been pushed a given number of sample count.
+- Change LibWebRTAudioModule to send audio samples by batch of 3 (hence 30 ms) instead of 5
+- Set this new parameter to 2 for local tracks and 4 for remote tracks
+- Add a new boolean to AudioSampleDataSource to know whether we start the track for the first time or not. If we start it, use the new parameter to buffer enough data.
+  Otherwise, use current heuristic.
+
+We also reduce the AudioSampleDataSource buffer to 0.5 seconds instead of 2 seconds, since 2 seconds is too much for real time audio.
+
+Manually tested.
+
+* platform/audio/cocoa/AudioSampleDataSource.h:
+* platform/audio/cocoa/AudioSampleDataSource.mm:
+(WebCore::AudioSampleDataSource::create):
+(WebCore::AudioSampleDataSource::AudioSampleDataSource):
+(WebCore::AudioSampleDataSource::pullSamplesInternal):
+* platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
+

[webkit-changes] [276242] trunk/LayoutTests

2021-04-19 Thread youenn
Title: [276242] trunk/LayoutTests








Revision 276242
Author you...@apple.com
Date 2021-04-19 02:49:20 -0700 (Mon, 19 Apr 2021)


Log Message
Migrate some WebRTC encoded transform tests to WPT
https://bugs.webkit.org/show_bug.cgi?id=224604

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc-encoded-transform/routines.js: Added.
(async createConnections):
(waitFor):
* web-platform-tests/webrtc-encoded-transform/script-audio-transform-worker.js: Added.
(MockRTCRtpTransformer):
(MockRTCRtpTransformer.prototype.start):
(MockRTCRtpTransformer.prototype.process):
(onrtctransform):
* web-platform-tests/webrtc-encoded-transform/script-audio-transform.https-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/script-audio-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/audio-script-transform.html.
* web-platform-tests/webrtc-encoded-transform/script-change-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/change-encoded-transform.js.
* web-platform-tests/webrtc-encoded-transform/script-change-transform.https-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/script-change-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/change-encoded-transform.html.
* web-platform-tests/webrtc-encoded-transform/script-late-transform.https-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/script-late-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/webrtc-late-transform.html.
* web-platform-tests/webrtc-encoded-transform/script-metadata-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/metadata-transform-worker.js.
* web-platform-tests/webrtc-encoded-transform/script-metadata-transform.https-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/script-metadata-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/metadata-transform.html.
* web-platform-tests/webrtc-encoded-transform/script-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/script-transform.js.
* web-platform-tests/webrtc-encoded-transform/script-transform.https-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/script-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/webrtc-transform.html.
* web-platform-tests/webrtc-encoded-transform/script-write-twice-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/write-twice-transform.js.
* web-platform-tests/webrtc-encoded-transform/script-write-twice-transform.https-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/script-write-twice-transform.https.html: Renamed from LayoutTests/http/wpt/webrtc/write-twice-transform.html.
* web-platform-tests/webrtc-encoded-transform/sframe-keys.https-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/sframe-keys.https.html: Added.
* web-platform-tests/webrtc-encoded-transform/sframe-transform-buffer-source-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/sframe-transform-buffer-source.html: Added.
* web-platform-tests/webrtc-encoded-transform/sframe-transform-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/sframe-transform-in-worker.https-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/sframe-transform-in-worker.https.html: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform-in-worker.html.
* web-platform-tests/webrtc-encoded-transform/sframe-transform-readable-expected.txt: Added.
* web-platform-tests/webrtc-encoded-transform/sframe-transform-readable.html: Added.
* web-platform-tests/webrtc-encoded-transform/sframe-transform-worker.js: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform.js.
* web-platform-tests/webrtc-encoded-transform/sframe-transform.html: Renamed from LayoutTests/http/wpt/webrtc/sframe-transform.html.

LayoutTests:

* http/wpt/webrtc/sframe-transform-readable-crash.html: Removed.
* platform/glib/TestExpectations:
* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:
* webrtc/script-transform.js: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/platform/glib/TestExpectations
trunk/LayoutTests/platform/ios-wk1/TestExpectations
trunk/LayoutTests/platform/mac-wk1/TestExpectations


Added Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc-encoded-transform/
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc-encoded-transform/routines.js
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc-encoded-transform/script-audio-transform-worker.js
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc-encoded-transform/script-audio-transform.https-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc-encoded-transform/script-audio-transform.https.html
trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc-encoded-transform/script-change-transform-worker.js

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

2021-04-19 Thread ifernandez
Title: [276241] trunk/Source/WebCore








Revision 276241
Author ifernan...@igalia.com
Date 2021-04-19 02:03:52 -0700 (Mon, 19 Apr 2021)


Log Message
Enable GL_ANGLE_instanced_arrays WebGL extension in WPE
https://bugs.webkit.org/show_bug.cgi?id=224438

Reviewed by Darin Adler.

Tested by WebGL WPT.

* html/canvas/ANGLEInstancedArrays.cpp:
(WebCore::ANGLEInstancedArrays::supported):
* platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:
(WebCore::ExtensionsGLOpenGLES::supportsExtension):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp
trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (276240 => 276241)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 08:39:04 UTC (rev 276240)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 09:03:52 UTC (rev 276241)
@@ -1,3 +1,17 @@
+2021-04-19  Imanol Fernandez  
+
+Enable GL_ANGLE_instanced_arrays WebGL extension in WPE
+https://bugs.webkit.org/show_bug.cgi?id=224438
+
+Reviewed by Darin Adler.
+
+Tested by WebGL WPT.
+
+* html/canvas/ANGLEInstancedArrays.cpp:
+(WebCore::ANGLEInstancedArrays::supported):
+* platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:
+(WebCore::ExtensionsGLOpenGLES::supportsExtension):
+
 2021-04-19  Felipe Erias  
 
 [css-flexbox] Table layout disregards overriding height


Modified: trunk/Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp (276240 => 276241)

--- trunk/Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp	2021-04-19 08:39:04 UTC (rev 276240)
+++ trunk/Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp	2021-04-19 09:03:52 UTC (rev 276241)
@@ -28,7 +28,7 @@
 #if ENABLE(WEBGL)
 #include "ANGLEInstancedArrays.h"
 
-#if PLATFORM(GTK) || USE(ANGLE)
+#if PLATFORM(GTK) || USE(ANGLE) || PLATFORM(WPE)
 #include "ExtensionsGL.h"
 #endif
 
@@ -55,7 +55,7 @@
 
 bool ANGLEInstancedArrays::supported(WebGLRenderingContextBase& context)
 {
-#if USE(ANGLE) || PLATFORM(GTK)
+#if USE(ANGLE) || PLATFORM(GTK) || PLATFORM(WPE)
 return context.graphicsContextGL()->getExtensions().supports("GL_ANGLE_instanced_arrays");
 #else
 UNUSED_PARAM(context);


Modified: trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp (276240 => 276241)

--- trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp	2021-04-19 08:39:04 UTC (rev 276240)
+++ trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp	2021-04-19 09:03:52 UTC (rev 276241)
@@ -272,6 +272,27 @@
 
 bool ExtensionsGLOpenGLES::supportsExtension(const String& name)
 {
+if (name == "GL_ANGLE_instanced_arrays") {
+auto majorVersion = []() {
+GLint version = 0;
+::glGetIntegerv(GL_MAJOR_VERSION, );
+return version;
+};
+
+if (m_availableExtensions.contains(name)) {
+m_glVertexAttribDivisorANGLE = reinterpret_cast(eglGetProcAddress("glVertexAttribDivisorANGLE"));
+m_glDrawArraysInstancedANGLE = reinterpret_cast(eglGetProcAddress("glDrawArraysInstancedANGLE"));
+m_glDrawElementsInstancedANGLE = reinterpret_cast(eglGetProcAddress("glDrawElementsInstancedANGLE"));
+m_supportsANGLEinstancedArrays = true;
+} else if (majorVersion() >= 3 || (m_availableExtensions.contains("GL_EXT_instanced_arrays") && m_availableExtensions.contains("GL_EXT_draw_instanced"))) {
+m_glVertexAttribDivisorANGLE = ::glVertexAttribDivisor;
+m_glDrawArraysInstancedANGLE = ::glDrawArraysInstanced;
+m_glDrawElementsInstancedANGLE = ::glDrawElementsInstanced;
+m_supportsANGLEinstancedArrays = true;
+}
+return m_supportsANGLEinstancedArrays;
+}
+
 if (m_availableExtensions.contains(name)) {
 if (!m_supportsOESvertexArrayObject && name == "GL_OES_vertex_array_object") {
 m_glBindVertexArrayOES = reinterpret_cast(eglGetProcAddress("glBindVertexArrayOES"));
@@ -288,11 +309,6 @@
 m_glReadnPixelsEXT = reinterpret_cast(eglGetProcAddress("glReadnPixelsEXT"));
 m_glGetnUniformfvEXT = reinterpret_cast(eglGetProcAddress("glGetnUniformfvEXT"));
 m_glGetnUniformivEXT = reinterpret_cast(eglGetProcAddress("glGetnUniformivEXT"));
-} else if (!m_supportsANGLEinstancedArrays && name == "GL_ANGLE_instanced_arrays") {
-m_glVertexAttribDivisorANGLE = reinterpret_cast(eglGetProcAddress("glVertexAttribDivisorANGLE"));
-m_glDrawArraysInstancedANGLE = reinterpret_cast(eglGetProcAddress("glDrawArraysInstancedANGLE"));
-m_glDrawElementsInstancedANGLE = reinterpret_cast(eglGetProcAddress("glDrawElementsInstancedANGLE"));
-m_supportsANGLEinstancedArrays = true;
 } else if (name == "GL_EXT_draw_buffers") {
 // FIXME: implement the support.
 return false;







[webkit-changes] [276240] trunk

2021-04-19 Thread commit-queue
Title: [276240] trunk








Revision 276240
Author commit-qu...@webkit.org
Date 2021-04-19 01:39:04 -0700 (Mon, 19 Apr 2021)


Log Message
[css-flexbox] Table layout disregards overriding height
https://bugs.webkit.org/show_bug.cgi?id=224665

Patch by Felipe Erias  on 2021-04-19
Reviewed by Sergio Villar Senin.

Source/WebCore:

Update table layout to take into account the overriding height set by the element's parent.
This was causing several WPT tests to fail.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
During layout, set the computed height so that it is at least as large as the overriding height
provided by the element's parent (if any) minus the height that will be taken up by captions.
This additional height will be distributed among the table's sections so its total height matches
the overriding value.

LayoutTests:

* TestExpectations: Removed four WPT tests that now pass.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTable.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (276239 => 276240)

--- trunk/LayoutTests/ChangeLog	2021-04-19 08:23:34 UTC (rev 276239)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 08:39:04 UTC (rev 276240)
@@ -1,3 +1,12 @@
+2021-04-19  Felipe Erias  
+
+[css-flexbox] Table layout disregards overriding height
+https://bugs.webkit.org/show_bug.cgi?id=224665
+
+Reviewed by Sergio Villar Senin.
+
+* TestExpectations: Removed four WPT tests that now pass.
+
 2021-04-19  Philippe Normand  
 
 [WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests


Modified: trunk/LayoutTests/TestExpectations (276239 => 276240)

--- trunk/LayoutTests/TestExpectations	2021-04-19 08:23:34 UTC (rev 276239)
+++ trunk/LayoutTests/TestExpectations	2021-04-19 08:39:04 UTC (rev 276240)
@@ -3962,16 +3962,12 @@
 
 # Tables as flex items.
 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-fixed-min-width-3.html [ ImageOnlyFailure ]
-webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-flex-cross-size.html [ ImageOnlyFailure ]
 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-percent-width-cell-001.html [ ImageOnlyFailure ]
 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width.html [ ImageOnlyFailure ]
-webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-stretch-cross-size.html [ ImageOnlyFailure ]
 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-1.html [ ImageOnlyFailure ]
 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-2.html [ ImageOnlyFailure ]
 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-row-2.html [ ImageOnlyFailure ]
-webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-narrow-content-2.html [ ImageOnlyFailure ]
 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-height.html [ ImageOnlyFailure ]
-webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-stretch-cross-size-2.html [ ImageOnlyFailure ]
 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-item-flex-percentage-width.html [ ImageOnlyFailure ]
 
 # SVGs as flex items.


Modified: trunk/Source/WebCore/ChangeLog (276239 => 276240)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 08:23:34 UTC (rev 276239)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 08:39:04 UTC (rev 276240)
@@ -1,3 +1,20 @@
+2021-04-19  Felipe Erias  
+
+[css-flexbox] Table layout disregards overriding height
+https://bugs.webkit.org/show_bug.cgi?id=224665
+
+Reviewed by Sergio Villar Senin.
+
+Update table layout to take into account the overriding height set by the element's parent.
+This was causing several WPT tests to fail.
+
+* rendering/RenderTable.cpp:
+(WebCore::RenderTable::layout):
+During layout, set the computed height so that it is at least as large as the overriding height
+provided by the element's parent (if any) minus the height that will be taken up by captions.
+This additional height will be distributed among the table's sections so its total height matches
+the overriding value.
+
 2021-04-19  Martin Robinson  
 
 [css-scroll-snap] Properly support fractional scroll steps in WebCore::ScrollAnimator::scroll


Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (276239 => 276240)

--- trunk/Source/WebCore/rendering/RenderTable.cpp	2021-04-19 08:23:34 UTC (rev 276239)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp	2021-04-19 08:39:04 UTC (rev 276240)
@@ -506,6 +506,13 @@
 if (logicalHeightLength.isIntrinsic() || 

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

2021-04-19 Thread mrobinson
Title: [276239] trunk/Source/WebCore








Revision 276239
Author mrobin...@webkit.org
Date 2021-04-19 01:23:34 -0700 (Mon, 19 Apr 2021)


Log Message
[css-scroll-snap] Properly support fractional scroll steps in WebCore::ScrollAnimator::scroll
https://bugs.webkit.org/show_bug.cgi?id=224176

Reviewed by Simon Fraser.

Stop using the ScrollableArea's position to calculate scroll snap positions in ScrollAnimator::snap.
The position stored in ScrollAnimator is a floating point position, while the one stored in ScrollableArea
is an integer position. This currently isn't an issue, because all callers of ScrollAnimator::scroll
use integer scroll offsets, but this will allow this function to be used in the future for precise
scrolling delta.

No new tests. This doesn't change any behavior, since all callers currently use
integer scroll offsets, but a future change will make use of this fix.

* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scroll): Get the current scroll position from the ScrollAnimator,
which stores it in floating point. Also, only call into the scroll snap code if we actually
have scroll offsets.
(WebCore::ScrollAnimator::offsetFromPosition): Added this helper.
(WebCore::ScrollAnimator::positionFromOffset): Ditto.
(WebCore::ScrollAnimator::deltaFromStep): Return a delta instead of a position so this helper
can be used with offsets or positions.
(WebCore::ScrollAnimator::positionFromStep): Deleted.
* platform/ScrollAnimator.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::scroll): Use the new helper.j

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/ScrollAnimator.cpp
trunk/Source/WebCore/platform/ScrollAnimator.h
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (276238 => 276239)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 08:16:42 UTC (rev 276238)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 08:23:34 UTC (rev 276239)
@@ -1,3 +1,32 @@
+2021-04-19  Martin Robinson  
+
+[css-scroll-snap] Properly support fractional scroll steps in WebCore::ScrollAnimator::scroll
+https://bugs.webkit.org/show_bug.cgi?id=224176
+
+Reviewed by Simon Fraser.
+
+Stop using the ScrollableArea's position to calculate scroll snap positions in ScrollAnimator::snap.
+The position stored in ScrollAnimator is a floating point position, while the one stored in ScrollableArea
+is an integer position. This currently isn't an issue, because all callers of ScrollAnimator::scroll
+use integer scroll offsets, but this will allow this function to be used in the future for precise
+scrolling delta.
+
+No new tests. This doesn't change any behavior, since all callers currently use
+integer scroll offsets, but a future change will make use of this fix.
+
+* platform/ScrollAnimator.cpp:
+(WebCore::ScrollAnimator::scroll): Get the current scroll position from the ScrollAnimator,
+which stores it in floating point. Also, only call into the scroll snap code if we actually
+have scroll offsets.
+(WebCore::ScrollAnimator::offsetFromPosition): Added this helper.
+(WebCore::ScrollAnimator::positionFromOffset): Ditto.
+(WebCore::ScrollAnimator::deltaFromStep): Return a delta instead of a position so this helper
+can be used with offsets or positions.
+(WebCore::ScrollAnimator::positionFromStep): Deleted.
+* platform/ScrollAnimator.h:
+* platform/mac/ScrollAnimatorMac.mm:
+(WebCore::ScrollAnimatorMac::scroll): Use the new helper.j
+
 2021-04-19  Philippe Normand  
 
 [WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests


Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (276238 => 276239)

--- trunk/Source/WebCore/platform/ScrollAnimator.cpp	2021-04-19 08:16:42 UTC (rev 276238)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp	2021-04-19 08:23:34 UTC (rev 276239)
@@ -83,16 +83,23 @@
 
 bool ScrollAnimator::scroll(ScrollbarOrientation orientation, ScrollGranularity granularity, float step, float multiplier, ScrollBehavior behavior)
 {
+auto delta = deltaFromStep(orientation, step, multiplier);
 #if ENABLE(CSS_SCROLL_SNAP)
 if (behavior == ScrollBehavior::DoDirectionalSnapping) {
-auto newOffset = ScrollableArea::scrollOffsetFromPosition(positionFromStep(orientation, step, multiplier), toFloatSize(m_scrollableArea.scrollOrigin()));
-auto currentOffset = m_scrollableArea.scrollOffset();
-if (orientation == HorizontalScrollbar) {
+if (!m_scrollController.usesScrollSnap())
+return scroll(orientation, granularity, step, multiplier);
+
+auto currentOffset = offsetFromPosition(currentPosition());
+auto newOffset = currentOffset + delta;
+if (orientation == HorizontalScrollbar)
 

[webkit-changes] [276238] trunk

2021-04-19 Thread philn
Title: [276238] trunk








Revision 276238
Author ph...@webkit.org
Date 2021-04-19 01:16:42 -0700 (Mon, 19 Apr 2021)


Log Message
[WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests
https://bugs.webkit.org/show_bug.cgi?id=224663

Reviewed by Xabier Rodriguez-Calvar.

.:

Make the USE_AVIF option public and enable it as experimental feature.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Refactor the AVIF build options out of the GTK port so they can be reused by other CMake ports.

* PlatformGTK.cmake:
* platform/ImageDecoders.cmake:
* platform/image-decoders/avif/AVIFImageDecoder.cpp:
* platform/image-decoders/avif/AVIFImageReader.cpp:
* platform/image-decoders/avif/AVIFUniquePtr.h:

LayoutTests:

* platform/gtk/TestExpectations: Unskip avif tests.

Modified Paths

trunk/ChangeLog
trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PlatformGTK.cmake
trunk/Source/WebCore/platform/ImageDecoders.cmake
trunk/Source/WebCore/platform/image-decoders/avif/AVIFImageDecoder.cpp
trunk/Source/WebCore/platform/image-decoders/avif/AVIFImageReader.cpp
trunk/Source/WebCore/platform/image-decoders/avif/AVIFUniquePtr.h
trunk/Source/cmake/OptionsGTK.cmake
trunk/Source/cmake/OptionsWPE.cmake




Diff

Modified: trunk/ChangeLog (276237 => 276238)

--- trunk/ChangeLog	2021-04-19 06:57:16 UTC (rev 276237)
+++ trunk/ChangeLog	2021-04-19 08:16:42 UTC (rev 276238)
@@ -1,3 +1,15 @@
+2021-04-19  Philippe Normand  
+
+[WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests
+https://bugs.webkit.org/show_bug.cgi?id=224663
+
+Reviewed by Xabier Rodriguez-Calvar.
+
+Make the USE_AVIF option public and enable it as experimental feature.
+
+* Source/cmake/OptionsGTK.cmake:
+* Source/cmake/OptionsWPE.cmake:
+
 2021-04-16  Philippe Normand  
 
 [CMake] UBSan build fixes


Modified: trunk/LayoutTests/ChangeLog (276237 => 276238)

--- trunk/LayoutTests/ChangeLog	2021-04-19 06:57:16 UTC (rev 276237)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 08:16:42 UTC (rev 276238)
@@ -1,3 +1,12 @@
+2021-04-19  Philippe Normand  
+
+[WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests
+https://bugs.webkit.org/show_bug.cgi?id=224663
+
+Reviewed by Xabier Rodriguez-Calvar.
+
+* platform/gtk/TestExpectations: Unskip avif tests.
+
 2021-04-18  Manuel Rego Casasnovas  
 
 [selectors] Update :focus-visible tests from WPT


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (276237 => 276238)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2021-04-19 06:57:16 UTC (rev 276237)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2021-04-19 08:16:42 UTC (rev 276238)
@@ -113,11 +113,6 @@
 
 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https.html [ Pass ]
 
-# Temporarily skip avif related tests until the gtk port enables avif as default.
-fast/images/avif-image-decoding.html [ Skip ]
-fast/images/avif-as-image.html [ Skip ]
-fast/images/animated-avif.html [ Skip ]
-
 #
 # End of PASSING tests. See below where to put expected failures.
 #


Modified: trunk/Source/WebCore/ChangeLog (276237 => 276238)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 06:57:16 UTC (rev 276237)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 08:16:42 UTC (rev 276238)
@@ -1,3 +1,18 @@
+2021-04-19  Philippe Normand  
+
+[WPE][GTK] Enable AVIF decoder as experimental feature and unskip tests
+https://bugs.webkit.org/show_bug.cgi?id=224663
+
+Reviewed by Xabier Rodriguez-Calvar.
+
+Refactor the AVIF build options out of the GTK port so they can be reused by other CMake ports.
+
+* PlatformGTK.cmake:
+* platform/ImageDecoders.cmake:
+* platform/image-decoders/avif/AVIFImageDecoder.cpp:
+* platform/image-decoders/avif/AVIFImageReader.cpp:
+* platform/image-decoders/avif/AVIFUniquePtr.h:
+
 2021-04-18  Wenson Hsieh  
 
 Selected image overlay text should never be visible


Modified: trunk/Source/WebCore/PlatformGTK.cmake (276237 => 276238)

--- trunk/Source/WebCore/PlatformGTK.cmake	2021-04-19 06:57:16 UTC (rev 276237)
+++ trunk/Source/WebCore/PlatformGTK.cmake	2021-04-19 08:16:42 UTC (rev 276238)
@@ -37,20 +37,6 @@
 "${WEBCORE_DIR}/platform/text/gtk"
 )
 
-if (USE_AVIF)
-list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
-"${WEBCORE_DIR}/platform/image-decoders/avif"
-)
-list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
-platform/image-decoders/avif/AVIFUniquePtr.h
-)
-list(APPEND WebCore_SOURCES
-platform/image-decoders/avif/AVIFImageDecoder.cpp
-

[webkit-changes] [276237] trunk/LayoutTests

2021-04-19 Thread rego
Title: [276237] trunk/LayoutTests








Revision 276237
Author r...@igalia.com
Date 2021-04-18 23:57:16 -0700 (Sun, 18 Apr 2021)


Log Message
[selectors] Update :focus-visible tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=224601


Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Fix expectations that were broken due to a mistake in the previous commit.
The tests had some extra changes due to webkit.org/224658, the tests were modified but not the expectations.

* web-platform-tests/css/selectors/focus-visible-002-expected.txt:
* web-platform-tests/css/selectors/focus-visible-003-expected.txt:
* web-platform-tests/css/selectors/focus-visible-004-expected.txt:

LayoutTests:

Remove glib expectations as they match the main ones.

* platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt: Removed.
* platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt: Removed.
* platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt


Removed Paths

trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/selectors/




Diff

Modified: trunk/LayoutTests/ChangeLog (276236 => 276237)

--- trunk/LayoutTests/ChangeLog	2021-04-19 06:32:12 UTC (rev 276236)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 06:57:16 UTC (rev 276237)
@@ -1,3 +1,17 @@
+2021-04-18  Manuel Rego Casasnovas  
+
+[selectors] Update :focus-visible tests from WPT
+https://bugs.webkit.org/show_bug.cgi?id=224601
+
+
+Reviewed by Darin Adler.
+
+Remove glib expectations as they match the main ones.
+
+* platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt: Removed.
+* platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt: Removed.
+* platform/glib/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt: Removed.
+
 2021-04-18  Wenson Hsieh  
 
 Selected image overlay text should never be visible


Modified: trunk/LayoutTests/imported/w3c/ChangeLog (276236 => 276237)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-04-19 06:32:12 UTC (rev 276236)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-04-19 06:57:16 UTC (rev 276237)
@@ -1,3 +1,18 @@
+2021-04-18  Manuel Rego Casasnovas  
+
+[selectors] Update :focus-visible tests from WPT
+https://bugs.webkit.org/show_bug.cgi?id=224601
+
+
+Reviewed by Darin Adler.
+
+Fix expectations that were broken due to a mistake in the previous commit.
+The tests had some extra changes due to webkit.org/224658, the tests were modified but not the expectations.
+
+* web-platform-tests/css/selectors/focus-visible-002-expected.txt:
+* web-platform-tests/css/selectors/focus-visible-003-expected.txt:
+* web-platform-tests/css/selectors/focus-visible-004-expected.txt:
+
 2021-04-18  Antoine Quint  
 
 Fix interpolation of the rotate CSS property


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt (276236 => 276237)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt	2021-04-19 06:32:12 UTC (rev 276236)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt	2021-04-19 06:57:16 UTC (rev 276237)
@@ -1,4 +1,4 @@
-This test checks that :focus-visible always matches on  elements which take text input, regardless of focus mechanism.
+This test checks that :focus-visible always matches on  elements which take text input, regardless of focus mechanism.
 If the user-agent does not claim to support the :focus-visible pseudo-class then SKIP this test.
 Click each form element below to focus it.
 If the element has a red background, then the test result is FAILURE. If the element has a green outline, then the test result is SUCCESS.


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt (276236 => 276237)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt	2021-04-19 06:32:12 UTC (rev 276236)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt	2021-04-19 06:57:16 UTC (rev 276237)
@@ -1,4 +1,4 @@
-This test checks that :focus-visible is not triggered by mouse focus on  elements which do not take text input.
+This test checks that :focus-visible is not triggered by mouse focus on  elements which do not take text 

[webkit-changes] [276236] trunk

2021-04-19 Thread wenson_hsieh
Title: [276236] trunk








Revision 276236
Author wenson_hs...@apple.com
Date 2021-04-18 23:32:12 -0700 (Sun, 18 Apr 2021)


Log Message
Selected image overlay text should never be visible
https://bugs.webkit.org/show_bug.cgi?id=224734


Reviewed by Darin Adler.

Source/WebCore:

Make a slight adjustment to the UA stylesheet to ensure that image overlay text is never visible. See below for
more details.

Test: fast/images/image-extraction/image-overlay-with-selection-styles.html

* html/shadow/imageOverlay.css:
(div.image-overlay-text::selection):

Enforce selected text styles for image overlay text.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::selectionPseudoStyle const):

Make an additional adjustment when computing selection pseudo styles for UA shadow root content. Currently, for
elements inside a UA shadow root, we always immediately ascend to the shadow host; this means that `::selection`
pseudo selectors currently don't work in UA stylesheets, since they're skipped when resolving styles, upon
painting selected text.

To fix this, we can let the element's own pseudo styles take precedence over the shadow host's renderer in the
case where we have a selection pseudo style. While we're here, also replace a few raw pointers with `RefPtr`.

LayoutTests:

Add a new layout test.

* fast/images/image-extraction/image-overlay-with-selection-styles-expected.html: Added.
* fast/images/image-extraction/image-overlay-with-selection-styles.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/shadow/imageOverlay.css
trunk/Source/WebCore/rendering/RenderElement.cpp


Added Paths

trunk/LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html
trunk/LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html




Diff

Modified: trunk/LayoutTests/ChangeLog (276235 => 276236)

--- trunk/LayoutTests/ChangeLog	2021-04-19 06:13:38 UTC (rev 276235)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 06:32:12 UTC (rev 276236)
@@ -1,3 +1,16 @@
+2021-04-18  Wenson Hsieh  
+
+Selected image overlay text should never be visible
+https://bugs.webkit.org/show_bug.cgi?id=224734
+
+
+Reviewed by Darin Adler.
+
+Add a new layout test.
+
+* fast/images/image-extraction/image-overlay-with-selection-styles-expected.html: Added.
+* fast/images/image-extraction/image-overlay-with-selection-styles.html: Added.
+
 2021-04-18  Rob Buis  
 
 Support contain: layout


Added: trunk/LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html (0 => 276236)

--- trunk/LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html	(rev 0)
+++ trunk/LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html	2021-04-19 06:32:12 UTC (rev 276236)
@@ -0,0 +1,35 @@
+
+
+
+
+img {
+position: absolute;
+top: 0;
+left: 0;
+}
+
+::selection {
+color: red;
+}
+
+
+
+
+addEventListener("load", () => {
+const image = document.querySelector("img");
+internals.installImageOverlay(image, [
+{
+text : "hello",
+topLeft : new DOMPointReadOnly(0, 0),
+topRight : new DOMPointReadOnly(1, 0),
+bottomRight : new DOMPointReadOnly(1, 0.5),
+bottomLeft : new DOMPointReadOnly(0, 0.5),
+}
+]);
+
+getSelection().selectAllChildren(internals.shadowRoot(image).querySelector(".image-overlay-text"));
+});
+
+
+
\ No newline at end of file


Added: trunk/LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html (0 => 276236)

--- trunk/LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html	(rev 0)
+++ trunk/LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html	2021-04-19 06:32:12 UTC (rev 276236)
@@ -0,0 +1,31 @@
+
+
+
+
+img {
+position: absolute;
+top: 0;
+left: 0;
+}
+
+
+
+
+addEventListener("load", () => {
+const image = document.querySelector("img");
+internals.installImageOverlay(image, [
+{
+text : "hello",
+topLeft : new DOMPointReadOnly(0, 0),
+topRight : new DOMPointReadOnly(1, 0),
+bottomRight : new DOMPointReadOnly(1, 0.5),
+bottomLeft : new DOMPointReadOnly(0, 0.5),
+}
+]);
+
+getSelection().selectAllChildren(internals.shadowRoot(image).querySelector(".image-overlay-text"));
+});
+
+
+
\ No newline at end of file


Modified: trunk/Source/WebCore/ChangeLog (276235 => 276236)

--- trunk/Source/WebCore/ChangeLog	2021-04-19 06:13:38 UTC (rev 276235)
+++ trunk/Source/WebCore/ChangeLog	2021-04-19 06:32:12 UTC (rev 276236)
@@ -1,3 +1,32 @@
+2021-04-18  Wenson Hsieh  
+
+Selected image overlay text should never be visible
+

[webkit-changes] [276235] trunk

2021-04-19 Thread commit-queue
Title: [276235] trunk








Revision 276235
Author commit-qu...@webkit.org
Date 2021-04-18 23:13:38 -0700 (Sun, 18 Apr 2021)


Log Message
Support contain: layout
https://bugs.webkit.org/show_bug.cgi?id=223569

Patch by Rob Buis  on 2021-04-18
Reviewed by Darin Adler.

Source/WebCore:

This patch implements layout containment as specified[1].
It adds shouldApplyLayoutContainment to check whether the
element applies for layout containment. Is so, then:
- an independent formatting context is established.
- any overflow is treated as ink overflow.
- an absolute positioning and fixed positioning
containing block is established.
- a stacking context is created.
- for baseline handling, the box is treated as having no
baseline. For grid/flexible box containers/items, this needs
a baseline synthesized from the border edges [2], for buttons it
requires a baseline synthesized from the margin edges [2, 3].

[1] https://drafts.csswg.org/css-contain-2/#layout-containment
[2] https://drafts.csswg.org/css-align-3/#synthesize-baseline
[3] https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::firstLineBaseline const):
(WebCore::RenderBlock::inlineBlockBaseline const):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::createsNewFormattingContext const):
(WebCore::RenderBox::layoutOverflowRectForPropagation const):
* rendering/RenderBox.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::baselinePosition const):
* rendering/RenderElement.h:
(WebCore::RenderElement::canContainFixedPositionObjects const):
(WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::firstLineBaseline const):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::firstLineBaseline const):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::baselinePosition const):
* rendering/RenderObject.cpp:
(WebCore::objectIsRelayoutBoundary):
(WebCore::shouldApplyLayoutContainment):
* rendering/RenderObject.h:
(WebCore::RenderObject::isAtomicInlineLevelBox const):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::firstLineBaseline const):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::containsLayout const):
* style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):

LayoutTests:

Unskip tests that pass now.

* TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBlock.cpp
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
trunk/Source/WebCore/rendering/RenderBox.cpp
trunk/Source/WebCore/rendering/RenderBox.h
trunk/Source/WebCore/rendering/RenderButton.cpp
trunk/Source/WebCore/rendering/RenderElement.h
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
trunk/Source/WebCore/rendering/RenderGrid.cpp
trunk/Source/WebCore/rendering/RenderListBox.cpp
trunk/Source/WebCore/rendering/RenderObject.cpp
trunk/Source/WebCore/rendering/RenderObject.h
trunk/Source/WebCore/rendering/RenderTable.cpp
trunk/Source/WebCore/rendering/style/RenderStyle.h
trunk/Source/WebCore/style/StyleAdjuster.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (276234 => 276235)

--- trunk/LayoutTests/ChangeLog	2021-04-19 02:43:33 UTC (rev 276234)
+++ trunk/LayoutTests/ChangeLog	2021-04-19 06:13:38 UTC (rev 276235)
@@ -1,3 +1,14 @@
+2021-04-18  Rob Buis  
+
+Support contain: layout
+https://bugs.webkit.org/show_bug.cgi?id=223569
+
+Reviewed by Darin Adler.
+
+Unskip tests that pass now.
+
+* TestExpectations:
+
 2021-04-18  Diego Pino Garcia  
 
 [GLIB] Unreviewed test gardening. Marked css-transforms/animation/rotate-composition.html as failure after r276231.


Modified: trunk/LayoutTests/TestExpectations (276234 => 276235)

--- trunk/LayoutTests/TestExpectations	2021-04-19 02:43:33 UTC (rev 276234)
+++ trunk/LayoutTests/TestExpectations	2021-04-19 06:13:38 UTC (rev 276235)
@@ -4678,21 +4678,8 @@
 
 # CSS containment tests that fail
 imported/w3c/web-platform-tests/css/css-contain/contain-animation-001.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-contain/contain-content-001.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-contain/contain-content-002.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-contain/contain-content-003.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-contain/contain-content-004.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-contain/contain-content-011.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-contain/contain-layout-006.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/css/css-contain/contain-layout-007.html [ ImageOnlyFailure ]