2022-04-22 Alan Coon Cherry-pick r292274. rdar://problem/80544133 [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Source/WebCore: This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a kCTFontManagerRegisteredFontsChangedNotification. FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global callback and calls that instead. This callback is set at initialization time. Test: fast/text/install-font-style-recalc.html * page/Page.cpp: (WebCore::m_contentSecurityPolicyModeForExtension): (WebCore::Page::firstTimeInitialization): * page/Page.h: * platform/graphics/FontCache.cpp: (WebCore::Function [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics. This avoids the problem where spurious layouts during the time when the page has been created but before the test has begun record irrelevant statistics. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::clearResourceLoadStatistics): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::dumpResourceLoadStatistics): 2022-04-22 Alan Coon Cherry-pick r292274. rdar://problem/80544133 [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Source/WebCore: This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a kCTFontManagerRegisteredFontsChangedNotification. FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global callback and calls that instead. This callback is set at initialization time. Test: fast/text/install-font-style-recalc.html * page/Page.cpp: (WebCore::m_contentSecurityPolicyModeForExtension): (WebCore::Page::firstTimeInitialization): * page/Page.h: * platform/graphics/FontCache.cpp: (WebCore::Function [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics. This avoids the problem where spurious layouts during the time when the page has been created but before the test has begun record irrelevant statistics. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::clearResourceLoadStatistics): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::dumpResourceLoadStatistics): 2022-04-22 Alan Coon Apply patch. rdar://problem/91446317 2022-04-21 Youenn Fablet Website policies are not respected when doing COOP based process swap https://bugs.webkit.org/show_bug.cgi?id=238036 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2022-04-22 Alan Coon Cherry-pick r292274. rdar://problem/80544133 [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Source/WebCore: This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a kCTFontManagerRegisteredFontsChangedNotification. FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global callback and calls that instead. This callback is set at initialization time. Test: fast/text/install-font-style-recalc.html * page/Page.cpp: (WebCore::m_contentSecurityPolicyModeForExtension): (WebCore::Page::firstTimeInitialization): * page/Page.h: * platform/graphics/FontCache.cpp: (WebCore::Function [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics. This avoids the problem where spurious layouts during the time when the page has been created but before the test has begun record irrelevant statistics. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::clearResourceLoadStatistics): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::dumpResourceLoadStatistics): 2022-04-22 Alan Coon Cherry-pick r292274. rdar://problem/80544133 [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Source/WebCore: This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a kCTFontManagerRegisteredFontsChangedNotification. FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global callback and calls that instead. This callback is set at initialization time. Test: fast/text/install-font-style-recalc.html * page/Page.cpp: (WebCore::m_contentSecurityPolicyModeForExtension): (WebCore::Page::firstTimeInitialization): * page/Page.h: * platform/graphics/FontCache.cpp: (WebCore::Function [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics. This avoids the problem where spurious layouts during the time when the page has been created but before the test has begun record irrelevant statistics. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::clearResourceLoadStatistics): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::dumpResourceLoadStatistics): 2022-04-22 Russell Epstein Apply patch. rdar://problem/91288849 2022-04-21 Youenn Fablet In case of COOP-based process swap, we need to make sure the document gets controlled by its matching service worker registration https://bugs.webkit.org/show_bug.cgi?id=238800 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2022-04-22 Russell Epstein Cherry-pick r292274. rdar://problem/80544133 [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Source/WebCore: This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a kCTFontManagerRegisteredFontsChangedNotification. FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global callback and calls that instead. This callback is set at initialization time. Test: fast/text/install-font-style-recalc.html * page/Page.cpp: (WebCore::m_contentSecurityPolicyModeForExtension): (WebCore::Page::firstTimeInitialization): * page/Page.h: * platform/graphics/FontCache.cpp: (WebCore::Function [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics. This avoids the problem where spurious layouts during the time when the page has been created but before the test has begun record irrelevant statistics. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::clearResourceLoadStatistics): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::dumpResourceLoadStatistics): 2022-04-19 Alan Coon Cherry-pick r292680. rdar://problem/91323230 The Youtube plugin replacement should only work for actual Youtube URLs https://bugs.webkit.org/show_bug.cgi?id=239003 Reviewed by Brent Fulgham. Source/WebCore: The Youtube plugin replacement was too permissive and was falling back to using the original URL in cases there the original URL wasn't an expected Youtube URL. This patch hardens the plugin replacement and drops the URL if it is not a valid youtube URL instead. Covered by new API test. * Modules/plugins/YouTubePluginReplacement.cpp: (WebCore::isYouTubeURL): (WebCore::processAndCreateYouTubeURL): (WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Tools: Add API test coverage. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp: (TestWebKitAPI::test): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/YoutubeReplacementPlugin.mm: Added. (TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292680 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-04-09 Chris Dumez The Youtube plugin replacement should only work for actual Youtube URLs https://bugs.webkit.org/show_bug.cgi?id=239003 Reviewed by Brent Fulgham. Add API test coverage. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp: (TestWebKitAPI::test): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/YoutubeReplacementPlugin.mm: Added. (TEST): 2022-04-18 Kocsen Chung Cherry-pick r292401. rdar://problem/83168970 5 Media API tests are flakily timing out on iOS14 https://bugs.webkit.org/show_bug.cgi?id=230321 Reviewed by Jer Noble. Source/WebKit: Un-skipped API test WKWebViewPausePlayingAudioTests.OutOfWindow * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::applicationWillEnterForegroundForMedia): Log the correct name. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::applicationDidEnterBackgroundForMedia): Call PlatformMediaSessionManager. (WebKit::WebPage::applicationWillEnterForegroundForMedia): Ditto. Tools: * TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm: (TestWebKitAPI::TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292401 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-04-05 Eric Carlson 5 Media API tests are flakily timing out on iOS14 https://bugs.webkit.org/show_bug.cgi?id=230321 Reviewed by Jer Noble. * TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm: (TestWebKitAPI::TEST): 2022-04-13 Kocsen Chung Cherry-pick r292721. rdar://problem/88249235 Fix size computation in WebCore::StorageMap https://bugs.webkit.org/show_bug.cgi?id=239024 rdar://88249235 Reviewed by Chris Dumez. Source/WebCore: We use currentSize to track size for StorageMap. There are a few issues in current implementation that can make currentSize incorrect and may lead to overflow: 1. When computing size of key, StorageMap uses parameter key instead of stored key. The problem is that two Strings can be evaluated to equal while their sizeInBytes() value is different, when one String is 8-bit and the other is 16-bit. That means removeItem() may decrease currentSize by wrong number (e.g setItem() with an 8-bit key, converting the key to 16-bit, removeItem() with the key). To fix this, StorageMap now always uses stored key for computation. 2. When map.take(key) or map.get(key) returns null string, StorageMap takes it as the key does not exist and will not correctly update currentSize, but user of WebCore::StorageMap may store null string as value. To fix this, StorageMap now check if key exists with find() function. 3. StorageMap only uses CheckedUint32 in setItem(), but removeItem() and importItem() may cause overflow in currentSize as mentioned above, and the error will not be caught until setItem() is called. To fix this, StorageMap now uses CheckedUint32 in all places that update currentSize. New test: WKWebView.LocalStorageNoSizeOverflow * storage/StorageMap.cpp: (WebCore::StorageMap::setItem): (WebCore::StorageMap::removeItem): (WebCore::StorageMap::importItems): Tools: * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: (TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292721 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-04-11 Sihui Liu Fix size computation in WebCore::StorageMap https://bugs.webkit.org/show_bug.cgi?id=239024 rdar://88249235 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: (TEST): 2022-04-07 Alan Coon Cherry-pick r291886. rdar://problem/72814440 `PointerEvent.movementX` always 0 (breaks https://noisecraft.app/) https://bugs.webkit.org/show_bug.cgi?id=220194 Reviewed by Simon Fraser. LayoutTests/imported/w3c: * web-platform-tests/pointerevents/pointerlock/pointerevent_movementxy_with_pointerlock-expected.txt: This change causes the test to progress further than before, but there still appear to be other issues elsewhere, so adjust the expected output to reflect that. Source/WebCore: Test: pointer-lock/pointermove-movement-delta.html * dom/PointerEvent.cpp: (WebCore::PointerEvent::PointerEvent): Also pass along the movement delta in the constructor that takes a `MouseEvent`. * dom/MouseEvent.h: * dom/MouseEvent.cpp: (WebCore::MouseEvent::create): (WebCore::MouseEvent::MouseEvent): Require that all constructors that aren't invoked from JS always provide a movement delta. * dom/MouseRelatedEvent.h: (WebCore::MouseRelatedEvent::movementX const): (WebCore::MouseRelatedEvent::movementY const): Expose these methods even when `!ENABLE(POINTER_LOCK)` so that they can be called without the callsite having to also have a `#if`. * page/EventHandler.cpp: (WebCore::EventHandler::dispatchDragEvent): Pass along the movement delta even when `!ENABLE(POINTER_LOCK)`. Tools: * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController mouseMoveToX:Y:]): * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): On macOS, the screen's origin is the bottom-left corner, so we need to flip the `deltaY`. LayoutTests: * pointer-lock/pointermove-movement-delta.html: Added. * pointer-lock/pointermove-movement-delta-expected.txt: Added. * pointer-lock/mouse-event-delivery-expected.txt: Added. On macOS, the screen's origin is the bottom-left corner, so we need to flip the `deltaY`. * platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_movementxy_with_pointerlock-expected.txt: Added. This change causes the test to progress further than before, but there still appear to be other issues elsewhere, so adjust the expected output to reflect that. * platform/mac-wk1/TestExpectations: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291886 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-03-25 Devin Rousso `PointerEvent.movementX` always 0 (breaks https://noisecraft.app/) https://bugs.webkit.org/show_bug.cgi?id=220194 Reviewed by Simon Fraser. * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController mouseMoveToX:Y:]): * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseMoveTo): On macOS, the screen's origin is the bottom-left corner, so we need to flip the `deltaY`. 2022-03-29 Alan Coon Cherry-pick r290371. rdar://problem/88652375 Call WKNavigationDelegate.didFailProvisionalNavigation even after a cross-origin navigation with COOP https://bugs.webkit.org/show_bug.cgi?id=237071 Patch by Alex Christensen on 2022-02-23 Reviewed by Chris Dumez. Source/WebKit: There was an assumption that this callback wasn't needed in this case, but it is. Covered by an API test that verifies the callback is received. * UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame): Tools: * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290371 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-02-23 Alex Christensen Call WKNavigationDelegate.didFailProvisionalNavigation even after a cross-origin navigation with COOP https://bugs.webkit.org/show_bug.cgi?id=237071 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (TEST): 2022-03-29 Alan Coon Apply patch. rdar://problem/89997669 2022-02-14 Kimmo Kinnunen ExtensionsGL is not useful class, it should be removed https://bugs.webkit.org/show_bug.cgi?id=236490 Reviewed by Dean Jackson. Update manually implemented functions. * Scripts/generate-gpup-webgl: * TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm: 2022-03-29 Alan Coon Cherry-pick r291980. rdar://problem/89434696 [iOS] Add `WKWebView` API to control CSS "small viewport" `sv*` and "large viewport" `lv*` units https://bugs.webkit.org/show_bug.cgi?id=237979 Reviewed by Tim Horton. Source/WebCore: Tests: CSSViewportUnits.NegativeMinimumViewportInset CSSViewportUnits.NegativeMaximumViewportInset CSSViewportUnits.MinimumViewportInsetLargerThanMaximumViewportInset CSSViewportUnits.MinimumViewportInsetLargerThanFrame CSSViewportUnits.MaximumViewportInsetLargerThanFrame CSSViewportUnits.MinimumViewportInset CSSViewportUnits.MaximumViewportInset CSSViewportUnits.MinimumViewportInsetWithZoom CSSViewportUnits.MaximumViewportInsetWithZoom CSSViewportUnits.MinimumViewportInsetWithWritingMode CSSViewportUnits.MaximumViewportInsetWithWritingMode CSSViewportUnits.MinimumViewportInsetWithFrame CSSViewportUnits.MaximumViewportInsetWithFrame CSSViewportUnits.MinimumViewportInsetWithBounds CSSViewportUnits.MaximumViewportInsetWithBounds CSSViewportUnits.MinimumViewportInsetWithContentInset CSSViewportUnits.MaximumViewportInsetWithContentInset CSSViewportUnits.MinimumViewportInsetWithSafeAreaInsets CSSViewportUnits.MaximumViewportInsetWithSafeAreaInsets CSSViewportUnits.UnobscuredSizeOverridesIgnoreMaximumViewportInsetAPI * page/FrameView.h: * page/FrameView.cpp: (WebCore::FrameView::performSizeToContentAutoSize): (WebCore::FrameView::enableAutoSizeMode): (WebCore::FrameView::clearSizeOverrideForCSSDefaultViewportUnits): Added. (WebCore::FrameView::setSizeForCSSDefaultViewportUnits): Added. (WebCore::FrameView::overrideWidthForCSSDefaultViewportUnits): Added. (WebCore::FrameView::resetOverriddenWidthForCSSDefaultViewportUnits): Added. (WebCore::FrameView::overrideSizeForCSSDefaultViewportUnits): Added. (WebCore::FrameView::sizeForCSSDefaultViewportUnits const): Renamed from `sizeForCSSDefaultViewportUnits`. (WebCore::FrameView::copyCSSViewportUnits const): Added. Add all the various methods for getting/setting/overriding/clearing an override value for CSS "default viewport" `v*` units. This allows for `WKWebView` clients to preserve existing behavior (where CSS "default viewport" `v*` units match the size of the `WKWebView`) while adding supporting CSS "small viewport" `sv*` units and CSS "large viewport" `lv*` units. Source/WebKit: Recently the W3C CSS working group added [some new unit types to CSS](https://drafts.csswg.org/css-values-4/#viewport-variants) with the goal of helping web developers better deal with browsers that have dynamic UI elements that change apperance/size/etc. based on user actions (e.g. the URL bar collapsing/"squishing" and expanding/"unsquishing" depending on whether the user has most recently scrolled/swiped down the page). These new units come in three categories: - the "large viewport" units (`lvw`, `lvh`, etc.) each represent 1% of one dimension of the size of the visual area of the page when all browser UI elements are in their smallest state (e.g. when the URL bar is collapsed/"squished") - the "small viewport" units (`svw`, `svh`, etc.) each represent 1% of one dimension of the size of the visual area of the page when all browser UI elements are in their largest state (e.g. when the URL bar is expanded/"unsquished") - the "dynamic viewport" units (`dvw`, `dvh`, etc.) each represent 1% of one dimension of the size of the current visual area of the page, which depends on the current state of all browser UI elements This way, developer could use `100svh` to ensure that no matter what state the browser UI elements are in the entire element will always be visible on the screen, or use `100dvh` to respond to browser UI element changes by automatically resizing various elements to always fully take advantage of the available space. Nothing needs to be added to support "dynamic viewport" `dv*` units as there already exists other methods to adjust the visual area of the `WKWebView` without adjusting its `frame` (e.g. `-[WKWebView setBounds:]`, `-[UIScrollView setContentInset:]`, etc.). But for "small viewport" `sv*` units and "large viewport" `lv*` units, however, there is unfortunately no way to tell a `WKWebView` anything like "this is the smallest/largest that this `WKWebView` will ever be", so there's no way to know ahead of time what the size of the visual area would be when all browser UI elements are in their smallest/largest state. As such, this patch adds a new API to allow for `WKWebView` clients to tell WebKit this information ahead of time. Note that there already exists the concept of "default viewport" units (`vw`, `vh`, etc.) that each represent 1% of one dimension of the size of the visual area of the page when all browser UI elements are in their default state. The behavior of these units remain the same, and the value can be changed via the existing `-[WKWebView setFrame:]`. Tests: CSSViewportUnits.NegativeMinimumViewportInset CSSViewportUnits.NegativeMaximumViewportInset CSSViewportUnits.MinimumViewportInsetLargerThanMaximumViewportInset CSSViewportUnits.MinimumViewportInsetLargerThanFrame CSSViewportUnits.MaximumViewportInsetLargerThanFrame CSSViewportUnits.MinimumViewportInset CSSViewportUnits.MaximumViewportInset CSSViewportUnits.MinimumViewportInsetWithZoom CSSViewportUnits.MaximumViewportInsetWithZoom CSSViewportUnits.MinimumViewportInsetWithWritingMode CSSViewportUnits.MaximumViewportInsetWithWritingMode CSSViewportUnits.MinimumViewportInsetWithFrame CSSViewportUnits.MaximumViewportInsetWithFrame CSSViewportUnits.MinimumViewportInsetWithBounds CSSViewportUnits.MaximumViewportInsetWithBounds CSSViewportUnits.MinimumViewportInsetWithContentInset CSSViewportUnits.MaximumViewportInsetWithContentInset CSSViewportUnits.MinimumViewportInsetWithSafeAreaInsets CSSViewportUnits.MaximumViewportInsetWithSafeAreaInsets CSSViewportUnits.UnobscuredSizeOverridesIgnoreMaximumViewportInsetAPI * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/API/Cocoa/WKWebView.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _recalculateViewportSizesWithMinimumViewportInset:maximumViewportInset:throwOnInvalidInput:]): Added. (-[WKWebView setMinimumViewportInset:maximumViewportInset:]): Added. * UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _processWillSwapOrDidExit]): (-[WKWebView _frameOrBoundsChanged]): (-[WKWebView _didCompleteAnimatedResize]): (-[WKWebView _setMinimumUnobscuredSizeOverride:]): (-[WKWebView _setMaximumUnobscuredSizeOverride:]): (-[WKWebView _beginAnimatedResizeWithUpdates:]): (-[WKWebView _dispatchSetMinimumUnobscuredSize:]): Deleted. (-[WKWebView _dispatchSetMaximumUnobscuredSize:]): Deleted. Recalculate the size for CSS "small viewport" `sv*` units whenever the `frame` changes. Also move the deduplication logic that prevents the same value from being sent to the WebProcess more than once to the setter methods on `WebPageProxy` so that it can be used by more than just iOS-only codepaths. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setDefaultUnobscuredSize): Added. (WebKit::WebPageProxy::setMinimumUnobscuredSize): Added. (WebKit::WebPageProxy::setMaximumUnobscuredSize): Added. (WebKit::WebPageProxy::creationParameters): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::dynamicViewportSizeUpdate): (WebKit::WebPageProxy::setMinimumUnobscuredSize): Deleted. (WebKit::WebPageProxy::setMaximumUnobscuredSize): Deleted. * Shared/WebPageCreationParameters.h: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::setViewportSizeForCSSViewportUnits): (WebKit::WebPage::setDefaultUnobscuredSize): Added. (WebKit::WebPage::setMinimumUnobscuredSize): Added. (WebKit::WebPage::setMaximumUnobscuredSize): Added. (WebKit::WebPage::updateSizeForCSSDefaultViewportUnits): Added. (WebKit::WebPage::updateSizeForCSSSmallViewportUnits): Added. (WebKit::WebPage::updateSizeForCSSLargeViewportUnits): Added. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::viewportConfigurationChanged): (WebKit::WebPage::setMinimumUnobscuredSize): Deleted. (WebKit::WebPage::setMaximumUnobscuredSize): Deleted. (WebKit::WebPage::updateViewportSizeForCSSViewportUnits): Deleted. Add all the various methods for getting/setting/overriding/clearing an override value for CSS "default viewport" `v*` units. This allows for `WKWebView` clients to preserve existing behavior (where CSS "default viewport" `v*` units match the size of the `WKWebView`) while adding supporting CSS "small viewport" `sv*` units and CSS "large viewport" `lv*` units. Move iOS-only code to be for all platforms. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Propagate all viewport size overrides when a new `FrameView` is created. Tools: * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: (TEST.CSSViewportUnits.NegativeMinimumViewportInset): Added. (TEST.CSSViewportUnits.NegativeMaximumViewportInset): Added. (TEST.CSSViewportUnits.MinimumViewportInsetLargerThanMaximumViewportInset): Added. (TEST.CSSViewportUnits.MinimumViewportInsetLargerThanFrame): Added. (TEST.CSSViewportUnits.MaximumViewportInsetLargerThanFrame): Added. (TEST.CSSViewportUnits.MinimumViewportInset): Added. (TEST.CSSViewportUnits.MaximumViewportInset): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithZoom): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithZoom): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithWritingMode): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithWritingMode): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithFrame): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithFrame): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithBounds): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithBounds): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithContentInset): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithContentInset): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithSafeAreaInsets): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithSafeAreaInsets): Added. (TEST.CSSViewportUnits.UnobscuredSizeOverridesIgnoreMaximumViewportInsetAPI): Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291980 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-03-28 Devin Rousso [iOS] Add `WKWebView` API to control CSS "small viewport" `sv*` and "large viewport" `lv*` units https://bugs.webkit.org/show_bug.cgi?id=237979 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: (TEST.CSSViewportUnits.NegativeMinimumViewportInset): Added. (TEST.CSSViewportUnits.NegativeMaximumViewportInset): Added. (TEST.CSSViewportUnits.MinimumViewportInsetLargerThanMaximumViewportInset): Added. (TEST.CSSViewportUnits.MinimumViewportInsetLargerThanFrame): Added. (TEST.CSSViewportUnits.MaximumViewportInsetLargerThanFrame): Added. (TEST.CSSViewportUnits.MinimumViewportInset): Added. (TEST.CSSViewportUnits.MaximumViewportInset): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithZoom): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithZoom): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithWritingMode): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithWritingMode): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithFrame): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithFrame): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithBounds): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithBounds): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithContentInset): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithContentInset): Added. (TEST.CSSViewportUnits.MinimumViewportInsetWithSafeAreaInsets): Added. (TEST.CSSViewportUnits.MaximumViewportInsetWithSafeAreaInsets): Added. (TEST.CSSViewportUnits.UnobscuredSizeOverridesIgnoreMaximumViewportInsetAPI): Added. 2022-03-23 Alan Coon Cherry-pick r290985. rdar://problem/78421282 Add a preference to mute video capture in case audio capture gets interrupted https://bugs.webkit.org/show_bug.cgi?id=237524 Reviewed by Eric Carlson. Source/WebCore: In case we detect that a microphone track source gets muted due to interruption, we mute capture video tracks based if allowed by the new MuteCameraOnMicrophoneInterruptionEnabled setting. Add support for mock microphone interruption and remove previous in process internals API. Test: fast/mediastream/media-stream-video-track-interrupted-from-audio.html * Modules/mediastream/MediaStreamTrack.cpp: * Modules/mediastream/MediaStreamTrack.h: * platform/mediastream/mac/CoreAudioCaptureSource.cpp: * platform/mediastream/mac/CoreAudioCaptureSource.h: * platform/mock/MockRealtimeAudioSource.cpp: (WebCore::MockRealtimeAudioSource::setIsInterrupted): * platform/mock/MockRealtimeAudioSource.h: * platform/mock/MockRealtimeMediaSourceCenter.cpp: (WebCore::MockRealtimeMediaSourceCenter::setMockCaptureDevicesInterrupted): (WebCore::MockRealtimeMediaSourceCenter::setMockCameraIsInterrupted): Deleted. * platform/mock/MockRealtimeMediaSourceCenter.h: Source/WebKit: Add support for interrupt mock microphone devices. Send to WebProcess sources whether sources are interrupted each time the source muted value changes. Store that value in remote sources. * GPUProcess/GPUProcess.cpp: * GPUProcess/GPUProcess.h: * GPUProcess/GPUProcess.messages.in: * UIProcess/API/C/WKPage.cpp: * UIProcess/API/C/WKPagePrivate.h: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/GPU/GPUProcessProxy.cpp: * UIProcess/GPU/GPUProcessProxy.h: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/cocoa/RemoteRealtimeAudioSource.h: * WebProcess/cocoa/RemoteRealtimeDisplaySource.h: * WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.cpp: * WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.h: * WebProcess/cocoa/RemoteRealtimeVideoSource.h: * WebProcess/cocoa/UserMediaCaptureManager.cpp: * WebProcess/cocoa/UserMediaCaptureManager.h: * WebProcess/cocoa/UserMediaCaptureManager.messages.in: Source/WTF: * Scripts/Preferences/WebPreferencesInternal.yaml: Tools: Add support for interrupt mock microphone devices. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: LayoutTests: * fast/mediastream/media-stream-video-track-interrupted-from-audio-expected.txt: Added. * fast/mediastream/media-stream-video-track-interrupted-from-audio.html: Added. * fast/mediastream/media-stream-video-track-interrupted.html: Migrated to testRunner API. * fast/mediastream/track-ended-while-muted.html: * platform/glib/TestExpectations: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290985 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-03-08 Youenn Fablet Add a preference to mute video capture in case audio capture gets interrupted https://bugs.webkit.org/show_bug.cgi?id=237524 Reviewed by Eric Carlson. Add support for interrupt mock microphone devices. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: 2022-03-23 Alan Coon Cherry-pick r290978. rdar://problem/89901536 Add early return for empty path in makeAllDirectories https://bugs.webkit.org/show_bug.cgi?id=237540 rdar://89901536 Reviewed by Chris Dumez. Source/WTF: * wtf/posix/FileSystemPOSIX.cpp: (WTF::FileSystemImpl::makeAllDirectories): Tools: * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290978 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-03-08 Sihui Liu Add early return for empty path in makeAllDirectories https://bugs.webkit.org/show_bug.cgi?id=237540 rdar://89901536 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2022-03-22 Alan Coon Cherry-pick r290367. rdar://problem/88567612 Fix GPUP WebGL generator script wrt uninitialised sized span https://bugs.webkit.org/show_bug.cgi?id=235889 Patch by Kimmo Kinnunen on 2022-02-23 Reviewed by Antti Koivisto. Source/WebKit: Regenerated. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp: (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat): Tools: Fix the generator. The r290328 only edited the generated files. Add a other hunk missing from r290175. * Scripts/generate-gpup-webgl: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290367 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-02-23 Kimmo Kinnunen Fix GPUP WebGL generator script wrt uninitialised sized span https://bugs.webkit.org/show_bug.cgi?id=235889 Reviewed by Antti Koivisto. Fix the generator. The r290328 only edited the generated files. Add a other hunk missing from r290175. * Scripts/generate-gpup-webgl: 2022-03-22 Alan Coon Revert r290708. rdar://problem/90113314 2022-03-23 Alan Coon Cherry-pick r291773. rdar://problem/90716064 [Cocoa] Make IPCTestingAPI.CGColorInNSSecureCoding more robust https://bugs.webkit.org/show_bug.cgi?id=238300 Unreviewed test gardening. Round-tripping a CGColor through CFData on iOS can turn extended sRGB color spaces into regular sRGB color spaces, if the color is common to both. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291773 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-03-23 Myles C. Maxfield [Cocoa] Make IPCTestingAPI.CGColorInNSSecureCoding more robust https://bugs.webkit.org/show_bug.cgi?id=238300 Unreviewed test gardening. Round-tripping a CGColor through CFData on iOS can turn extended sRGB color spaces into regular sRGB color spaces, if the color is common to both. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: 2022-03-21 Alan Coon Cherry-pick r291518. rdar://problem/90124325 [Cocoa] Teach WebKit how to serialize CGColors https://bugs.webkit.org/show_bug.cgi?id=238069 Reviewed by Dean Jackson and Tim Horton. Source/WebKit: We have 2 ways of serializing Cocoa objects: NS type handling in ArgumentCodersCocoa.mm, and CF type handling in ArgumentCodersCF.mm. CGColors are CF types, so this patch adds direct support in ArgumentCodersCF to serialize them, by round-tripping them through WebCore::Colors. However, NS containers (like font descriptor attribute dictionaries) can contain CGColors, so this patch also teaches ArgumentCodersCocoa that there may be CF types inside NS containers. If one is present, ArgumentCodersCocoa has to call into ArgumentCodersCF to serialize it. This patch doesn't add support for the reverse path, where an NS object is contained within a CF container. I intentionally omitted implementing this because I wasn't sure if it would be a layering violation; ArgumentCodersCococa.mm already #includes ArgumentCodersCF.h, but ArgumentCodersCF.mm doesn't #include ArgumentCodersCocoa.h. This path isn't actually necessary to solve my problem at hand, so someone else can add support if necessary in the future. I also added a comment at the site where the code would fail, describing what the problem is and a potential workaround. This patch also adds support for our NSSecureCoding implementation for CGColors. This is necessary because sometimes we want to serialize things like NSAttributedStrings, which we don't have direct support for, so we use NSSecureCoding to serialize them instead. NSAttributedStrings can contain fonts whose descriptor dictionaries contain CGColors, so this path needs to work with CGColors too. Support is implemented using NSKeyedArchiverDelegate and NSKeyedUnarchiverDelegate. Test: IPCTestingAPI.CGColorInNSSecureCoding The non-NSSecureCoding parts of this patch are tested by our regular LayoutTests when DOM GPU Process rendering is enabled. * Shared/Cocoa/ArgumentCodersCocoa.mm: (-[WKSecureCodingArchivingDelegate archiver:willEncodeObject:]): (-[WKSecureCodingArchivingDelegate unarchiver:didDecodeObject:]): (-[WKSecureCodingCGColorWrapper wrappedColor]): (+[WKSecureCodingCGColorWrapper supportsSecureCoding]): (-[WKSecureCodingCGColorWrapper encodeWithCoder:]): (-[WKSecureCodingCGColorWrapper initWithCoder:]): (-[WKSecureCodingCGColorWrapper initWithCGColor:]): (IPC::typeFromObject): (IPC::decodeSecureCodingInternal): (IPC::encodeCFInternal): (IPC::decodeCFInternal): (IPC::encodeObject): (IPC::decodeObject): * Shared/cf/ArgumentCodersCF.cpp: (IPC::typeFromCFTypeRef): (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder>::decode): (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder>::decode): * Shared/cf/ArgumentCodersCF.h: Tools: * Scripts/webkitpy/style/checkers/cpp.py: * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291518 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-03-18 Myles C. Maxfield [Cocoa] Teach WebKit how to serialize CGColors https://bugs.webkit.org/show_bug.cgi?id=238069 Reviewed by Dean Jackson and Tim Horton. * Scripts/webkitpy/style/checkers/cpp.py: * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: 2022-03-21 Alan Coon Cherry-pick r290539. rdar://problem/88767812 [WebAuthn] Fallback to attestation=none whenever attestation fails https://bugs.webkit.org/show_bug.cgi?id=237223 rdar://88767812 Reviewed by Brent Fulgham. Source/WebKit: Whenever attestation is requested by a RP and it fails to complete, we previously errored out of the registration. The more correct platform behavior in this case is to provide attestation=none. Created API test for this behavior. * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested): Tools: Add test for local authenticator attestation fallback behavior. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290539 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-02-25 J Pascoe [WebAuthn] Fallback to attestation=none whenever attestation fails https://bugs.webkit.org/show_bug.cgi?id=237223 rdar://88767812 Reviewed by Brent Fulgham. Add test for local authenticator attestation fallback behavior. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2022-03-21 Alan Coon Cherry-pick r290519. rdar://problem/89148022 Re-add YouTubePluginReplacement, removed in r285252 https://bugs.webkit.org/show_bug.cgi?id=237182 Source/WebCore: Patch by Alex Christensen on 2022-02-25 Reviewed by Chris Dumez. Tests: security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html Its removal broke webpages that work in Chrome and Firefox, so back it comes. * Headers.cmake: * Modules/plugins: Copied from Source/WebCore/Modules/plugins. * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginScriptObject): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::JSTestPluginInterface::visitChildrenImpl): * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::createElementRenderer): (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): (WebCore::registrar): (WebCore::pluginReplacementForType): (WebCore::HTMLPlugInElement::requestObject): (WebCore::HTMLPlugInElement::scriptObjectForPluginReplacement): * html/HTMLPlugInElement.h: (WebCore::HTMLPlugInElement::pluginReplacementScriptObject): * html/shadow/ShadowPseudoIds.cpp: (WebCore::ShadowPseudoIds::webkitPluginReplacement): * html/shadow/ShadowPseudoIds.h: * html/shadow/YouTubeEmbedShadowElement.cpp: * html/shadow/YouTubeEmbedShadowElement.h: * page/Settings.yaml: Tools: Patch by Alex Christensen on 2022-02-25 Reviewed by Chris Dumez. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp: LayoutTests: Patch by Alex Christensen on 2022-02-25 Reviewed by Chris Dumez. * TestExpectations: * platform/ios-wk2/TestExpectations: * platform/win/TestExpectations: * security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement-expected.txt. * security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html. * security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt. * security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html. * security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-expected.txt. * security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type-expected.txt: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type-expected.txt. * security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html. * security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html: Copied from LayoutTests/security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290519 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-02-25 Alex Christensen Re-add YouTubePluginReplacement, removed in r285252 https://bugs.webkit.org/show_bug.cgi?id=237182 Reviewed by Chris Dumez. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp: 2022-03-07 Russell Epstein Cherry-pick r289255. rdar://problem/88490742 Always sync ResourceRequest isAppInitiated request with NSURLRequest attribution value https://bugs.webkit.org/show_bug.cgi?id=236167 Reviewed by Darin Adler. Source/WebCore: We should always keep the state of our 'isAppInitiated' flag in sync with the underlying NSURLRequest object. This also corrects a problem where the 'setIsAppInitiated' method does not mark the platform URL request as dirty, so it does not update with the correct state of the flag. Tests: New TestWebKitAPI Test (AppPrivacyReport.NSURLRequestConstructorAttribution) * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::setIsAppInitiated): * platform/network/ResourceRequestBase.h: * platform/network/cf/ResourceRequest.h: * platform/network/cocoa/ResourceRequestCocoa.mm: (WebCore::ResourceRequest::ResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): (WebCore::copyRequestWithStorageSession): * rendering/RenderThemeIOS.mm: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme: * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289255 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-02-07 Brent Fulgham Always sync ResourceRequest isAppInitiated request with NSURLRequest attribution value https://bugs.webkit.org/show_bug.cgi?id=236167 Reviewed by Darin Adler. * TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme: * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: 2022-03-07 Russell Epstein Cherry-pick r288700. rdar://problem/86602114 Default to 32 bit refcount for CanMakeCheckedPtr https://bugs.webkit.org/show_bug.cgi?id=235723 rdar://86602114 Reviewed by Darin Adler. Source/WTF: It is currently uint16_t for no good reason. It is no unreasonable to have an object being referenced by a large number of other objects. We just hit the first bug caused by overrunning it (in IFC). * wtf/CheckedRef.h: uint16_t -> uint32_t Tools: * TestWebKitAPI/Tests/WTF/CheckedPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/CheckedRef.cpp: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288700 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-27 Antti Koivisto Default to 32 bit refcount for CanMakeCheckedPtr https://bugs.webkit.org/show_bug.cgi?id=235723 rdar://86602114 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/CheckedPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/CheckedRef.cpp: 2022-03-07 Russell Epstein Cherry-pick r288310. rdar://problem/80352256 [ iOS15 ] TestWebKitAPI.WebKit.ServerTrust and TestWebKitAPI.WebKit.FastServerTrust tests timing out https://bugs.webkit.org/show_bug.cgi?id=231320 Patch by Alex Christensen on 2022-01-20 Reviewed by Chris Dumez. SecTrustCopyCertificateChain returns a CFArrayRef of SecCertificateRef, not CFData. * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (verifyCertificateAndPublicKey): (TestWebKitAPI::TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288310 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-20 Alex Christensen [ iOS15 ] TestWebKitAPI.WebKit.ServerTrust and TestWebKitAPI.WebKit.FastServerTrust tests timing out https://bugs.webkit.org/show_bug.cgi?id=231320 Reviewed by Chris Dumez. SecTrustCopyCertificateChain returns a CFArrayRef of SecCertificateRef, not CFData. * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (verifyCertificateAndPublicKey): (TestWebKitAPI::TEST): 2022-03-01 Russell Epstein Revert r289282. rdar://problem/88876661 2022-02-28 Russell Epstein Cherry-pick r289502. rdar://problem/88528286 WKWebView: WKURLSchemeHandler “request to the end of the resource” produces an invalid header https://bugs.webkit.org/show_bug.cgi?id=236401 rdar://88528286 Reviewed by Brent Fulgham. Source/WebCore: https://webkit.org/b/203302 added support for Range requests to AVAssetResourceLoadingDataRequest, but it incorrectly used '*' instead of '' for "last-byte-pos:" for a request to the end of the resource. API test URLSchemeHandler.Ranges was updated. * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::startLoading): Tools: * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289502 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-02-09 Eric Carlson WKWebView: WKURLSchemeHandler “request to the end of the resource” produces an invalid header https://bugs.webkit.org/show_bug.cgi?id=236401 rdar://88528286 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: 2022-02-07 Russell Epstein Cherry-pick r288605. rdar://problem/87948317 REGRESSION (iOS 15.2): Loading gets stuck after back-navigation involving COOP header https://bugs.webkit.org/show_bug.cgi?id=235475 Reviewed by Geoffrey Garen. Source/WebCore: Make sure ShouldTreatAsContinuingLoad is properly propagated for back/forward navigations, not just regular loadRequests. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadWithNavigationAction): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): (WebCore::FrameLoader::loadDifferentDocumentItem): * loader/FrameLoader.h: Source/WebKit: WebPageProxy::continueNavigationInNewProcess() was failing to pass the identifier of the NetworkResourceLoader that needs to be resumed to ProvisionalPageProxy::goToBackForwardItem(). It was only passing it to ProvisionalPageProxy::loadRequest(), which is used for non-back/forward navigations. As a result, in case of COOP process-swap on back/forward navigation, the network process would start a fresh load instead of resuming the existing one. The fresh load would get a COOP header and thus trigger yet another process swap (and so on in a loop). Also fix an issue where ProvisionalPageProxy::goToBackForwardItem() would always use ShouldTreatAsContinuingLoad::YesAfterNavigationPolicyDecision even in the case of a COOP process-swap. In the case of a COOP process-swap, we should pass in ShouldTreatAsContinuingLoad::YesAfterProvisionalLoadStarted. This was causing us to do an extra call to didStartProvisionalLoad() and was causing the new API test to hit an assertion on debug builds. Covered by new API test. * UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::goToBackForwardItem): * UIProcess/ProvisionalPageProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::launchProcessForReload): (WebKit::WebPageProxy::goToBackForwardItem): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadRequest): (WebKit::WebPage::loadData): (WebKit::WebPage::goToBackForwardItem): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Tools: Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288605 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-25 Chris Dumez REGRESSION (iOS 15.2): Loading gets stuck after back-navigation involving COOP header https://bugs.webkit.org/show_bug.cgi?id=235475 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2022-02-07 Russell Epstein Cherry-pick r288590. rdar://problem/87984277 Disable input-security CSS property https://bugs.webkit.org/show_bug.cgi?id=235557 rdar://87984277 Reviewed by Dean Jackson. Source/WebCore: CSSWG is planning to remove input-security from CSS UI 4 (https://github.com/w3c/csswg-drafts/issues/6788). Keep the property around as an experimental feature, so that it can be used in the UA stylesheet, and easily turned on if the resolution is not finalized. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): * css/CSSProperties.json: * css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext): Enable input-security when parsing the UA stylesheet, as it is used to obscure text in password inputs. (WebCore::operator==): (WebCore::add): (WebCore::CSSParserContext::isPropertyRuntimeDisabled const): * css/parser/CSSParserContext.h: * css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): Source/WebKitLegacy/win: Add support for tests enabling the CSSInputSecurityEnabled preference. * WebPreferences.cpp: (WebPreferences::cssInputSecurityEnabled): * WebPreferences.h: * WebView.cpp: (WebView::notifyPreferencesChanged): Source/WTF: * Scripts/Preferences/WebPreferencesExperimental.yaml: Make input-security a disabled-by-default experimental feature. Tools: * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): Add default for WebKitLegacy on Windows. LayoutTests: * fast/css/computed-text-security-for-input-security.html: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288590 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-25 Aditya Keerthi Disable input-security CSS property https://bugs.webkit.org/show_bug.cgi?id=235557 rdar://87984277 Reviewed by Dean Jackson. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): Add default for WebKitLegacy on Windows. 2022-02-07 Russell Epstein Cherry-pick r288478. rdar://problem/72567903 Regression (r286936): SessionStorage data is not cleared when deleting website data by modification time https://bugs.webkit.org/show_bug.cgi?id=235542 Reviewed by Chris Dumez. Source/WebKit: The old behavior before r286936 is to delete SessionStorage data regardless of the modifiedSince parameter. r286936 made it check modifiedSince and perform deleteion when modifiedSince time is -Walltime::infinity. This patch corrects it by deleting SessionStorage data when modifiedSince time is in the past. API test: SessionStorage.ClearByModificationTime * NetworkProcess/storage/OriginStorageManager.cpp: (WebKit::OriginStorageManager::StorageBucket::deleteData): Tools: * TestWebKitAPI/Tests/WebKitCocoa/SessionStorage.mm: (TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288478 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-24 Sihui Liu Regression (r286936): SessionStorage data is not cleared when deleting website data by modification time https://bugs.webkit.org/show_bug.cgi?id=235542 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/SessionStorage.mm: (TEST): 2022-02-07 Russell Epstein Cherry-pick r288178. rdar://problem/79296770 REGRESSION (r264352): Mail compose body field does not avoid the keyboard when scrolling after focus https://bugs.webkit.org/show_bug.cgi?id=235331 rdar://79296770 Reviewed by Tim Horton. Source/WebKit: After r264352 added the call to `_page->scheduleFullEditorStateUpdate();` during element focus, scrolling to reveal the selection in the focused body field in Mail stopped working. This is because Mail: 1. Sets `firstResponderKeyboardAvoidanceEnabled` to NO on the WKScrollView, which prevents automatic inset adjustment logic in UIKit from taking effect and adding the keyboard height to the bottom system content inset. 2. Manually sets `-contentScrollInset` on the WKScrollView during a UIKeyboardDidShowNotification, which occurs after we've already attempted to zoom to the selection. ...combined with the fact that without the call to `scheduleFullEditorStateUpdate()`, the next EditorState would've arrived only after the keyboard animation finished. The end result is that we don't end up avoiding the keyboard at all when focusing the body field in Mail compose. While rdar://87733414 tracks refactoring logic in WebKit2 Mail compose to ensure that the content scroll insets on WKScrollView are applied during UIKeyboardWillShowNotification instead of after the keyboard has finished animating in, this patch provides a short-term workaround by restoring pre-r264352 behavior, with respect to when the element is scrolled into view. Test: editing/selection/ios/scroll-to-reveal-selection-with-keyboard-avoidance-disabled.html * Platform/spi/ios/UIKitSPI.h: Add a declaration for the `-firstResponderKeyboardAvoidanceEnabled` SPI property on non-internal iOS SDKs. * UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _keyboardDidShow:]): Plumb this through to the WKContentView, so we can zoom/scroll to the focused element if needed. * UIProcess/WebPageProxy.h: * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView cleanUpInteraction]): (-[WKContentView _keyboardDidShow]): If we previously deferred the call to `-_zoomToRevealFocusedElement` due to the keyboard still animating in, schedule a call to it now on a 0-delay timer; this delay is necessary to ensure that this zoom occurs *after* Mail has already set the content inset, which also happens underneath a "KeyboardDidShow" notification. (-[WKContentView _zoomToRevealFocusedElement]): In the case where the (presumably internal) client has set `firstResponderKeyboardAvoidanceEnabled` to NO and the keyboard is animating in, defer the actual call into the web view to `-_zoomToRevealFocusedElement` until after the keyboard animation is finished. This ensures compatibility with existant logic in Mail for manually setting the content scroll inset on the WKScrollView after the keyboard animation is complete. (-[WKContentView resetShouldZoomToFocusRectAfterShowingKeyboard]): (-[WKContentView _elementDidBlur]): Tools: Add support for a UIScriptController hook to override `firstResponderKeyboardAvoidanceEnabled` on WKScrollView. See LayoutTests for more details. * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::setScrollViewKeyboardAvoidanceEnabled): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): * WebKitTestRunner/ios/UIScriptControllerIOS.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::setScrollViewKeyboardAvoidanceEnabled): LayoutTests: Add a layout test that (at least) exercises the newly added codepath, where focusing an editor when the scroll view has `firstResponderKeyboardAvoidanceEnabled` set to NO will still allow us to scroll to the selection. * editing/selection/ios/scroll-to-reveal-selection-with-keyboard-avoidance-disabled-expected.txt: Added. * editing/selection/ios/scroll-to-reveal-selection-with-keyboard-avoidance-disabled.html: Added. * resources/ui-helper.js: (window.UIHelper.setScrollViewKeyboardAvoidanceEnabled): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288178 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-18 Wenson Hsieh REGRESSION (r264352): Mail compose body field does not avoid the keyboard when scrolling after focus https://bugs.webkit.org/show_bug.cgi?id=235331 rdar://79296770 Reviewed by Tim Horton. Add support for a UIScriptController hook to override `firstResponderKeyboardAvoidanceEnabled` on WKScrollView. See LayoutTests for more details. * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::setScrollViewKeyboardAvoidanceEnabled): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): * WebKitTestRunner/ios/UIScriptControllerIOS.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::setScrollViewKeyboardAvoidanceEnabled): 2022-02-07 Russell Epstein Cherry-pick r287992. rdar://problem/74845918 Crash in Document::updateStyleIfNeeded() when removing a node containing the drag caret https://bugs.webkit.org/show_bug.cgi?id=235184 rdar://74845918 Reviewed by Darin Adler. Source/WebCore: While performing drag and drop over editable content, DragCaretController handles updating and painting a drag caret, which indicates where the dragged content will be inserted upon drop. If the node containing this drag caret is disconnected, `DragCaretController::nodeWillBeRemoved()` resets the drag caret position and issues a repaint on the renderer responsible for drawing the drag caret. This call to `nodeWillBeRemoved()` occurs in the middle of node removal, so it's encapsulated by a `ScriptDisallowedScope::InMainThread` scope which causes a release assertion in WebKit2 if anything tries to trigger layout or style updates. Currently, if the node being removed would cause the caret position to be removed as well, DragCaretController calls into `setCaretPosition()` with a null visible position, which then calls into `invalidateCaretRect` with the current caret position's anchor node. In turn, `invalidateCaretRect` contains logic to issue a repaint on the anchor node's renderer if the node is editable. However, to check whether the node is editable, we use the helper function `WebCore::isEditableNode()`, which triggers a style update if needed, only in the case where: 1. A style recalc is needed, and... 2. The document contains an element with the `-webkit-user-modify` CSS property. As such, dirtying element styles right before removing the drag caret's anchor node from the document while dispatching a `drag` or `drop` event in an editor with `-webkit-user-modify: read-write;` is sufficient to trigger the release assertion and cause a crash. To address this, instead of calling `clear()` inside of `DragCaretController::nodeWillBeRemoved()`, we can instead directly invalidate the caret rect using the current drag caret anchor (passing in `true` for `caretRectChanged()` since we already know that the drag caret is being cleared out), and then reset the current drag caret position and caret rect. This allows us to avoid the `isEditableNode()` check in this scenario when deciding whether to trigger paint invalidation, which is unnecessary because we already know that the node containing the caret is being removed, so the renderer is going to be repainted anyways. We also pull this logic out into a separate helper method, `clearCaretPositionWithoutUpdatingStyle()`, to make it clear that we must avoid triggering style recalc here. Test: DragAndDropTests.DoNotCrashWhenRemovingNodeOnDrop * editing/FrameSelection.cpp: (WebCore::DragCaretController::nodeWillBeRemoved): (WebCore::DragCaretController::clearCaretPositionWithoutUpdatingStyle): * editing/FrameSelection.h: Tools: Add a test to exercise the crash using drag and drop in WebKit2, on both iOS and macOS. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/remove-node-on-drop.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287992 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-13 Wenson Hsieh Crash in Document::updateStyleIfNeeded() when removing a node containing the drag caret https://bugs.webkit.org/show_bug.cgi?id=235184 rdar://74845918 Reviewed by Darin Adler. Add a test to exercise the crash using drag and drop in WebKit2, on both iOS and macOS. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/remove-node-on-drop.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (TEST): 2022-01-24 Alan Coon Cherry-pick r288039. rdar://problem/79220540 [iOS] Occasional crash under -[UITargetedPreview initWithView:parameters:target:] when focusing form controls https://bugs.webkit.org/show_bug.cgi?id=235248 rdar://79220540 Reviewed by Tim Horton and Aditya Keerthi. Source/WebKit: It's possible for `-resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:` to return a `nil` snapshot view in the case where a screen update has not been performed yet (among other scenarios). In the case where UIKit returns `nil` when we're creating the targeted preview for the context menu when focusing a select element or file input, we'll crash due to an Objective-C exception in the initializer of UITargetedPreview. Mitigate this by falling back to an empty UIView after requesting the snapshot view to make our code robust against this scenario. Test: KeyboardInputTests.DoNotCrashWhenFocusingSelectWithoutViewSnapshot * UIProcess/ios/WKContentViewInteraction.mm: (createFallbackTargetedPreview): Tools: Add an API test that exercises the crash by forcing `-resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:` to return nil via swizzling. * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (TestWebKitAPI::nilResizableSnapshotViewFromRect): (TestWebKitAPI::TEST): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288039 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-14 Wenson Hsieh [iOS] Occasional crash under -[UITargetedPreview initWithView:parameters:target:] when focusing form controls https://bugs.webkit.org/show_bug.cgi?id=235248 rdar://79220540 Reviewed by Tim Horton and Aditya Keerthi. Add an API test that exercises the crash by forcing `-resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:` to return nil via swizzling. * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (TestWebKitAPI::nilResizableSnapshotViewFromRect): (TestWebKitAPI::TEST): 2022-01-24 Alan Coon Cherry-pick r288010. rdar://problem/87557846 Expose way to encode CTAP commands with only the hash of ClientDataJSON https://bugs.webkit.org/show_bug.cgi?id=235191 Reviewed by Brent Fulgham. Source/WebKit: CTAP command encoding covered by existing tests (see CtapRequestTest) and the SPI in new API tests. * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm: (+[_WKWebAuthenticationPanel encodeMakeCredentialCommandWithClientDataHash:options:userVerificationAvailability:]): (+[_WKWebAuthenticationPanel encodeGetAssertionCommandWithClientDataHash:options:userVerificationAvailability:]): Tools: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): Tests for new SPIs. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288010 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-14 J Pascoe Expose way to encode CTAP commands with only the hash of ClientDataJSON https://bugs.webkit.org/show_bug.cgi?id=235191 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): Tests for new SPIs. 2022-01-20 Russell Epstein Cherry-pick r287957. rdar://problem/87327557 [WebAuthn] Fix freebie call without user gesture not being given https://bugs.webkit.org/show_bug.cgi?id=235078 rdar://87327557 Reviewed by Brent Fulgham. Source/WebKit: This logic was previously always requiring a user gesture. The desired behavior of giving pages a single "freebie" webauthn call without gesture was lost in a refactor. Tested manually on iOS device with webauthn.me. * WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp: (WebKit::WebAuthenticatorCoordinator::processingUserGesture): Tools: Updated API test to reflect user gesture freebie. * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-no-mock.html: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287957 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-01-12 J Pascoe [WebAuthn] Fix freebie call without user gesture not being given https://bugs.webkit.org/show_bug.cgi?id=235078 rdar://87327557 Reviewed by Brent Fulgham. Updated API test to reflect user gesture freebie. * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-no-mock.html: 2022-01-10 Carlos Garcia Campos [GTK][a11y] WTR: do not show html-id and toolkit attributes in test results https://bugs.webkit.org/show_bug.cgi?id=235024 Reviewed by Adrian Perez de Castro. The html-id attribute is an internal one used by WTR to get the accessible of an element by its id. The toolkit attribute will make the results different for every platform. Also sort the attributes to ensure same results even if the order is different among platforms. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::attributesOfElement): 2022-01-09 Sam Weinig Remove support for Direct2D https://bugs.webkit.org/show_bug.cgi?id=234999 Reviewed by Darin Adler. Direct2D and FTW have not been building for over a year. It is time to remove them. * DumpRenderTree/PixelDumpSupport.cpp: * DumpRenderTree/PlatformWin.cmake: * DumpRenderTree/win/PixelDumpSupportDirect2D.cpp: Removed. * DumpRenderTree/win/PixelDumpSupportDirect2D.h: Removed. * DumpRenderTree/win/PixelDumpSupportWin.cpp: (createBitmapContextFromWebView): * PlatformFTW.cmake: Removed. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::dumpDOMAsWebArchive): * WebKitTestRunner/PlatformFTW.cmake: Removed. * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/win/PlatformWebViewWin.cpp: * WebKitTestRunner/win/TestInvocationDirect2D.cpp: Removed. 2022-01-08 Wenson Hsieh Null pointer crash when calling into `-[WebView close]` in `-webView:didCommitLoadForFrame:` https://bugs.webkit.org/show_bug.cgi?id=234994 rdar://86845512 Reviewed by Chris Dumez and Geoff Garen. Add a new API test to exercise the fix. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/CloseWhileCommittingLoad.mm: Added. (-[CloseWhileCommittingLoadDelegate webView:didCommitLoadForFrame:]): (TestWebKitAPI::TEST): 2022-01-08 Tyler Wilcock AX: AccessibilityObject::setFocused(true) should make the webpage focused, and make web content the first responder https://bugs.webkit.org/show_bug.cgi?id=234885 Reviewed by Darin Adler. Add testing functionality necessary to check that web content is the first responder in the UI process. * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::isWebContentFirstResponder const): Added. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::takeFocus): Implement this method. * WebKitTestRunner/ios/UIScriptControllerIOS.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::isWebContentFirstResponder const): Added. 2022-01-07 Tim Horton A/B comparison tests fail trying to look up fuzzy match tolerance https://bugs.webkit.org/show_bug.cgi?id=234974 Reviewed by Aditya Keerthi. * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner._run_self_comparison_test): (SingleTestRunner._compare_output_with_reference): Disable fuzzy matching for A/B tests, because A) we don't really want it and B) it crashes run-webkit-tests because there is no actual reference file in which to find the tolerance value. 2022-01-07 David Kilzer check-webkit-style: add checker for unexpected fall through after ASSERT_NOT_REACHED() statements Reviewed by Brent Fulgham. This checker only returns a confidence level of 4 (out of 5) since there are too many different code patterns to check them all perfectly using regular expressions. Run new checker tests like this: $ test-webkitpy webkitpy.style.checkers.cpp_unittest.CppStyleTest.test_debug_not_reached_assertion Run this checker against a file or folder like this: $ check-webkit-style --filter "-,+security/assertion_fallthrough" (file|folder) * Scripts/webkitpy/style/checkers/cpp.py: (SingleLineView.__init__): - Expose `trimmed_lines` as a property on SingleLineView. (_FunctionState.body_view): Add. - Add method to return a SingleLineView object containing the body of the function. (check_function_body): Add. - New function to check for fall through after ASSERT_NOT_REACHED() statements. (process_line): - Call check_function_body() to implement the new check. (CppChecker.categories): - Add 'security/assertion_fallthrough' to the list of known checkers. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (CppStyleTestBase.perform_function_body_check): Add. - Add method to call check_function_body() for testing. (CppStyleTest.test_debug_not_reached_assertion): Add. - Add tests for the new checker. 2022-01-07 Wenson Hsieh Teach modal container observer to make the body element scrollable if necessary https://bugs.webkit.org/show_bug.cgi?id=234708 rdar://86960677 Reviewed by Tim Horton. Adjust an existing API test to exercise the change. * TestWebKitAPI/Tests/WebKit/modal-container-with-overlay.html: * TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: (TestWebKitAPI::TEST): 2022-01-07 Ryan Haddad REGRESSION: TestWebKitAPI.PublicSuffix.IsPublicSuffix is failing on some bots https://bugs.webkit.org/show_bug.cgi?id=234609 Unreviewed test gardening. * TestWebKitAPI/Tests/WebCore/PublicSuffix.cpp: (TestWebKitAPI::TEST_F): Disable failing subtest. 2022-01-07 Alex Christensen Unreviewed, reverting r287698. Broke an internal build Reverted changeset: "Start using C++20" https://bugs.webkit.org/show_bug.cgi?id=233963 https://commits.webkit.org/r287698 2022-01-06 Lauro Moura [GLIB] Make API test initialize localstorage to ensure the database file is created https://bugs.webkit.org/show_bug.cgi?id=234891 Reviewed by Michael Catanzaro. Changes needed after 245553@main/r287418 changed the localstorage behavior to avoid creating an empty database file when reading empty databases. * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp: (testWebsiteDataConfiguration): 2022-01-04 Jonathan Bedard [EWS] Support pull-requests in ConfigureBuild https://bugs.webkit.org/show_bug.cgi?id=234848 Reviewed by Dewei Zhu. * CISupport/ews-build/steps.py: (GitHubMixin.pr_url): Map pull-request number to URL. (GitHubMixin.get_pull_request_number): Check if the event triggering this was a pull_request, and the specified branch can be mapped to a pull-request. (ConfigureBuild.start): Add pull-request details. (ConfigureBuild.add_pr_details): Ditto. 2022-01-06 Alex Christensen Start using C++20 https://bugs.webkit.org/show_bug.cgi?id=233963 Reviewed by Yusuke Suzuki. * DumpRenderTree/DerivedSources.make: * DumpRenderTree/mac/Configurations/Base.xcconfig: * MiniBrowser/Configurations/Base.xcconfig: * MobileMiniBrowser/Configurations/Base.xcconfig: * TestWebKitAPI/Configurations/Base.xcconfig: * TestWebKitAPI/Tests/WTF/Expected.cpp: (TestWebKitAPI::NonCopyable::NonCopyable): * TestWebKitAPI/Tests/WTF/URLParser.cpp: (TestWebKitAPI::TEST_F): * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/DerivedSources.make: * lldb/lldbWebKitTester/Configurations/Base.xcconfig: 2021-12-16 Jonathan Bedard [webkitbugspy] Initial library commit https://bugs.webkit.org/show_bug.cgi?id=234400 Reviewed by Dewei Zhu. * Scripts/libraries/webkitbugspy/MANIFEST.in: Added. * Scripts/libraries/webkitbugspy/README.md: Added. * Scripts/libraries/webkitbugspy/setup.py: Added. * Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Added. * Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py: Added. (Tracker): Bugzilla implementation of generic isssue tracker. * Scripts/libraries/webkitbugspy/webkitbugspy/github.py: Added. (Tracker): GitHub implementation of generic isssue tracker. * Scripts/libraries/webkitbugspy/webkitbugspy/issue.py: Added. (Issue): Dynamically fetched generic Issue object referencing parent Tracker. (Issue.Comment): Issue comment including author and timestamp. * Scripts/libraries/webkitbugspy/webkitbugspy/mocks/__init__.py: Added. * Scripts/libraries/webkitbugspy/webkitbugspy/mocks/base.py: Added. (Base): Base class for mocking http based issue trackers. * Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py: Added. (Bugzilla): Partial mock of Bugzilla webserver. * Scripts/libraries/webkitbugspy/webkitbugspy/mocks/data.py: Added. * Scripts/libraries/webkitbugspy/webkitbugspy/mocks/github.py: Added. (GitHub): Partial mock of GitHub webserver. * Scripts/libraries/webkitbugspy/webkitbugspy/tests/__init__.py: Added. * Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py: Added. (TestBugzilla): * Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py: Added. (TestGitHub): * Scripts/libraries/webkitbugspy/webkitbugspy/tests/user_unittest.py: Added. (TestUser): * Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py: Added. (Tracker): Generic base of all issue trackers. * Scripts/libraries/webkitbugspy/webkitbugspy/user.py: Added. (User): User object tied to specific tracker. (User.Encoder): User JSON encoder. (User.Mapping): Mapping of user alias to User object. * Scripts/webkitpy/test/main.py: (main): Add webkitbugspy to subdirectories to be tested. 2022-01-05 Wenson Hsieh Modal container observer should detect and suppress elements that prevent user interaction https://bugs.webkit.org/show_bug.cgi?id=234695 Reviewed by Tim Horton. Add an API test (as well as a new test page) to exercise the fix. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/modal-container-with-overlay.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: (TestWebKitAPI::TEST): 2022-01-05 Jonathan Bedard Running layout tests sometimes throws an AssertionError in python2.7/multiprocessing https://bugs.webkit.org/show_bug.cgi?id=234487 Reviewed by Simon Fraser. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py: (_BiDirectionalQueue.send): Log failed queue put. 2022-01-05 Youenn Fablet Tighten ServiceWorkerRegistrationKey::fromDatabaseKey https://bugs.webkit.org/show_bug.cgi?id=234838 Reviewed by Chris Dumez. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/ServiceWorkerRoutines.cpp: Added. 2022-01-05 Fujii Hironori [Win][DumpRenderTree] dumpHistoryItem leaks a SafeArray https://bugs.webkit.org/show_bug.cgi?id=234870 Reviewed by Darin Adler. r23462 added the following code. > if (arrPtr && SUCCEEDED(::SafeArrayUnlock(arrPtr))) > ::SafeArrayDestroy(arrPtr); However, the array wasn't locked. SafeArrayUnlock always failed. Thus, SafeArrayDestroy wasn't called. * DumpRenderTree/win/DumpRenderTree.cpp: (dumpHistoryItem): Don't use SafeArrayUnlock. Fixed a typo 'arrary'. 2022-01-04 Ryan Haddad Unreviewed, reverting r287374. Caused assertion failures on Monterey Reverted changeset: "Re-enable CustomDisplayName and DefaultDisplayName API tests on Monterey" https://bugs.webkit.org/show_bug.cgi?id=234613 https://commits.webkit.org/r287374 2022-01-04 Wenson Hsieh Use ICU instead of relying on hard-coded string equality checks in ModalContainerControlClassifier https://bugs.webkit.org/show_bug.cgi?id=234677 Reviewed by Tim Horton. Augment the existing API test so that it additionally tests a symbol ("small roman numeral ten") that would not have been covered as one of the three hard-coded symbol strings in the earlier fix. * TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: (TestWebKitAPI::TEST): 2022-01-04 Wenson Hsieh ModalContainerObserver should search for text in subframes https://bugs.webkit.org/show_bug.cgi?id=234446 rdar://86897770 Reviewed by Tim Horton. Add an API test to exercise the change. See WebCore/ChangLog for more details. * TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: (TestWebKitAPI::TEST): 2022-01-04 Jonathan Bedard [git-webkit] Open closed pull-request when running pr (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=232765 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py: (PullRequest.main): Log found pull-request instead of undefined candidates. 2022-01-04 Alex Christensen Re-disable WKInspectorExtensionDelegate.ExtensionTabNavigatedCallbacks API test in debug builds https://bugs.webkit.org/show_bug.cgi?id=232857 I enabled it with an unrelated change and it is timing out, so re-disable it. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (TEST): 2022-01-04 Alex Christensen Re-enable URLSchemeHandler.Leaks1 API test https://bugs.webkit.org/show_bug.cgi?id=234625 Reviewed by Darin Adler. The test seems to not time out any more. I think it has been fixed without re-enabling the test. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm: (TEST): 2022-01-03 Sam Weinig Add resolved/unresolved color type accessors to require users to be explicit about whether they will handle missing/none color components https://bugs.webkit.org/show_bug.cgi?id=234798 Reviewed by Antti Koivisto. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): Replace uses of Color::toSRGBALossy<>() with Color::toColorTypeLossy>() and add calls to resolved() to access color components. Also update to new name of colorSpaceAndComponents(), colorSpaceAndResolvedColorComponents(). * TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm: (TestWebKitAPI::changeContextContents): Replace unnecessary use of colorSpaceAndComponents() with the more common toColorTypeLossy>().resolved(). 2022-01-03 Wenson Hsieh Undownloaded iCloud Photos are inserted as broken images when attachment element is enabled https://bugs.webkit.org/show_bug.cgi?id=234803 rdar://82318259 Reviewed by Darin Adler. Add a new API test to exercise the change. See WebCore/ChangeLog for more information. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (nonexistentFilePath): (TestWebKitAPI::TEST): 2022-01-03 Martin Robinson A manual test was imported with the WPT css-transforms test suite https://bugs.webkit.org/show_bug.cgi?id=234245 Reviewed by Youenn Fablet. * Scripts/webkitpy/w3c/test_parser.py: (TestParser.analyze_test): Manual tests may also be reference tests and these should not be imported. * Scripts/webkitpy/w3c/test_parser_unittest.py: (test_analyze_manual_reference_wpt_test): Add a test for this situation. 2022-01-02 Wenson Hsieh [WebKit2] Camera continuity is disabled in richly editable content https://bugs.webkit.org/show_bug.cgi?id=234773 rdar://46323417 Reviewed by Darin Adler. Add an API test to verify that the result of `-validRequestorForSendType:returnType:` isn't always `nil` in the case where there is no send type. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/NSResponderTests.mm: Added. (TestWebKitAPI::TEST): 2022-01-01 Jean-Yves Avenard make SharedBuffer::copy() return a contiguous SharedBuffer https://bugs.webkit.org/show_bug.cgi?id=234622 rdar://problem/86829527 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): 2022-01-01 Wenson Hsieh Modal containers are incorrectly detected in navigation elements and fixed document elements https://bugs.webkit.org/show_bug.cgi?id=234669 rdar://87030613 Reviewed by Darin Adler. Add several new API tests to exercise the changes. * TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: (-[ModalContainerWebView initWithFrame:configuration:]): (-[ModalContainerWebView loadHTML:]): (-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]): (TestWebKitAPI::TEST): 2022-01-01 Wenson Hsieh [Cocoa] Simplify some FontAttributes API tests https://bugs.webkit.org/show_bug.cgi?id=234770 Reviewed by Darin Adler. Simplify some of the logic around FontAttributes.FontAttributesAfterChangingSelection: 1. Instead of defining PlatformColor/PlatformFont, use CocoaColor/CocoaFont from WebCore. 2. Remove the `Nullity` flag in ShadowExpectation and ColorExpectation (and use `std::optional` instead to indicate that the shadow or font attribute should be null). 3. Change a several rvalue references to be plain values instead (when passinng expectation structs that only contain a handful of scalar values). * TestWebKitAPI/Tests/WebKitCocoa/FontAttributes.mm: (TestWebKitAPI::checkColor): (TestWebKitAPI::checkShadow): (TestWebKitAPI::checkFont): (TestWebKitAPI::TEST): (TestWebKitAPI::ColorExpectation::ColorExpectation): Deleted. (TestWebKitAPI::ShadowExpectation::ShadowExpectation): Deleted. 2021-12-31 Wenson Hsieh Include a few more tag names to search when running modal container detection https://bugs.webkit.org/show_bug.cgi?id=234652 Reviewed by Darin Adler. Add an API test that's representative of the website where modal container observation failed (due to the search term being inside a `b` element). * TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: (TestWebKitAPI::TEST): 2021-12-31 Wenson Hsieh Updating the file name of attachment-backed images should automatically set the `alt` attribute https://bugs.webkit.org/show_bug.cgi?id=234747 rdar://85899879 Reviewed by Darin Adler. Add a new API test to exercise this scenario -- i.e. copying an attachment-backed image in one web view, pasting it into another web view, and confirming that the pasted attachment preserves the _WKAttachment file name. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (-[TestWKWebView ensureAttachmentForImageElement]): (TestWebKitAPI::TEST): 2021-12-30 Jean-Yves Avenard SharedBuffer::takeData() is still dangerous https://bugs.webkit.org/show_bug.cgi?id=234724 rdar://problem/86957233 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): 2021-12-28 Sam Weinig Enhance Vector::map to allow specifying what kind of Vector to return (e.g. inline capacity, overflow, etc.) https://bugs.webkit.org/show_bug.cgi?id=234683 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/Vector.cpp: Add test for new Vector::map overload. 2021-12-26 Carlos Garcia Campos [GTK][a11y] Stop setting manages-descendants on web process root object with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234663 Reviewed by Adrian Perez de Castro. Update the unit test to remove the ATSPI ifdef. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testAccessibleBasicHierarchy): 2021-12-26 Carlos Garcia Campos [GTK][a11y] WTR: handle xml-roles attributes to return the right role for landmark with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234638 Reviewed by Adrian Perez de Castro. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::xmlRoleValueString): (WTR::AccessibilityUIElement::role): 2021-12-26 Sam Weinig Replace WebKit/CocoaColor.h with WebCore/ColorCocoa.h, not confusing at all https://bugs.webkit.org/show_bug.cgi?id=234693 Reviewed by Simon Fraser. Use WebCore/ColorCocoa.h instead. * TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm: 2021-12-24 Carlos Garcia Campos [GTK][a11y] Expose live region attributes with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234637 Reviewed by Adrian Perez de Castro. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::stringAttributeValue): (WTR::AccessibilityUIElement::boolAttributeValue): (WTR::AccessibilityUIElement::isAttributeSupported): 2021-12-23 Wenson Hsieh Modal container control classifier fails on some neutral controls that contain multiplication symbols https://bugs.webkit.org/show_bug.cgi?id=234651 Reviewed by Tim Horton. Add a new API test to exercise the change. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/modal-container-custom.html: Added. Add an alternate version of `modal-container.html` that allows each API test to present custom markup (as innerHTML) inside a fixed position modal container; use this test page in the new API test. * TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: (-[ModalContainerWebView loadBundlePage:andDecidePolicy:]): (-[ModalContainerWebView evaluate:andDecidePolicy:]): (-[ModalContainerWebView loadBundlePage:]): (-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]): (-[ModalContainerWebView lastModalContainerInfo]): Add a property to keep track of the most recent _WKModalContainerInfo we recieved via the modal container decision handler, and use this to test for which types of controls are available, in both the new test as well as existing tests. (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/analytics/coremldata.bin: * TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/coremldata.bin: Adjust the test CoreML model to classify "x" as the neutral control type. 2021-12-23 Sihui Liu Don't create LocalStorage database for read if it does not exist https://bugs.webkit.org/show_bug.cgi?id=234569 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm: (-[LocalStorageUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TEST): 2021-12-23 Matt Woodrow Check allowed network hosts list when we schedule the load in the network process https://bugs.webkit.org/show_bug.cgi?id=234543 Reviewed by Alex Christensen. The check for WKWebViewConfiguration._allowedNetworkHost previously happened before the check to see if the given ResourceRequest would directly from an archive. This moves to the allowed network host list check to happen when we schedule the network request, and thus allows subresources cached within an archive to load, even if their original URL would be blocked. New test LoadWebArchive.DisallowedNetworkHosts added. * TestWebKitAPI/Tests/mac/LoadWebArchive.mm: (TestWebKitAPI::TEST): 2021-12-23 Brady Eidson Add WTF::UUID class which is natively a 128-bit integer https://bugs.webkit.org/show_bug.cgi?id=234571 Reviewed by Alex Christensen. Notifications - which are UUID identified - are now addressed by a UUID object instead of a v4 UUID string. The way our C-API vends that UUID object is through a data object, so change WKTR to account for that. * WebKitTestRunner/DataFunctions.h: Copied from Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h. (WTR::dataValue): (WTR::dataToUUID): (WTR::uuidToData): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSimulateWebNotificationClick): (WTR::postPageMessage): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::simulateWebNotificationClick): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/WebNotificationProvider.cpp: (WTR::WebNotificationProvider::showWebNotification): (WTR::WebNotificationProvider::closeWebNotification): (WTR::WebNotificationProvider::removeNotificationManager): (WTR::WebNotificationProvider::simulateWebNotificationClick): (WTR::WebNotificationProvider::reset): * WebKitTestRunner/WebNotificationProvider.h: 2021-12-23 Sam Weinig Encapsulate gradient color stops into a self contained class https://bugs.webkit.org/show_bug.cgi?id=234583 Reviewed by Simon Fraser. * TestRunnerShared/PlatformGTK.cmake: Added. * TestRunnerShared/PlatformWPE.cmake: Added. Keep GTK and WPE ports building by propogating glib.h header to the test runnner. Change by Fujii Hironori. 2021-12-23 Patrick Griffis [Flatpak] Revert filesystem permission change in r287396 https://bugs.webkit.org/show_bug.cgi?id=234612 Reviewed by Michael Catanzaro. This causes a regression where some important contents of XDG_RUNTIME_DIR are overriden and causes issues like TLS failures. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2021-12-23 Wenson Hsieh Add API testing support for modal container observation https://bugs.webkit.org/show_bug.cgi?id=234610 Reviewed by Megan Gardner. Add support for new API tests that exercise the modal container observation policy in webpage preferences, as well as the UI delegate SPI method for deciding policies in detected modal containers. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/modal-container.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: Non-unified-source build fix (see below). * TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: Added. (-[NSBundle swizzled_URLForResource:withExtension:]): (TestWebKitAPI::ClassifierModelSwizzler::ClassifierModelSwizzler): (TestWebKitAPI::ClassifierModelSwizzler::~ClassifierModelSwizzler): (-[ModalContainerWebView initWithFrame:configuration:]): (-[ModalContainerWebView loadBundlePage:andDecidePolicy:]): (-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]): (TestWebKitAPI::createModalContainerWebView): (TestWebKitAPI::TEST): Add API tests to exercise each of the 4 modal container policy decisions in a simple modal container. Two key pieces are needed in order to simulate the end-to-end flow for detecting and deciding policies for modal containers: 1. Add `internals.overrideModalContainerSearchTermForTesting()`, which allows script (through the `internals` testing plugin) to set ModalContainerObserver's search term. 2. Swizzle out `-[NSBundle URLForResource:withExtension:]` to return the file URL to TestWebKitAPI's `TestModalContainerControls.mlmodelc`, instead of the real CoreML model. * TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/analytics/coremldata.bin: Added. * TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/coremldata.bin: Copied from Source/WebCore/page/ModalContainerObserver.h. * TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/metadata.json: Added. Add a mock CoreML model that's used to simulate classifier results in WebKit::ModalContainerControlClassifier. See above for more details. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm: More non-unified-source build fixes: hoist the definitions of `redColorComponents` and `blueColorComponents` into the `USE(CG)` part of TestCocoa.h, and then import TestCocoa.h in these files. This avoids build failures due to symbol redefinition when we add the new test file above. * TestWebKitAPI/cocoa/TestCocoa.h: 2021-12-23 Patrick Griffis [Flatpak] Fix a11y tests on some distros including Fedora https://bugs.webkit.org/show_bug.cgi?id=234612 Reviewed by Michael Catanzaro. Using --no-a11y-bus fixes a11y working in Fedora, as well as just being the intended behavior it always had since we granted direct org.a11y.Bus access. * flatpak/flatpakutils.py: (WebkitFlatpak): (WebkitFlatpak.run_in_sandbox): 2021-12-23 Carlos Garcia Campos [GTK][a11y] WTR: handle heading level as special case in intValue with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234603 Reviewed by Adrian Perez de Castro. Tests expect intValue to return the heading level. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::intValue const): 2021-12-23 Carlos Garcia Campos [GTK][a11y] WTR: handle missing cases in isAttributeSettable with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234601 Reviewed by Adrian Perez de Castro. We need to handle aria-readonly attribute and the combobox and listbox elements. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::isAttributeSettable): 2021-12-23 Carlos Garcia Campos [GTK][a11y] WTR: add missing bool and string attribute values with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234599 Reviewed by Adrian Perez de Castro. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::checkElementState): (WTR::AccessibilityUIElement::stringAttributeValue): (WTR::AccessibilityUIElement::boolAttributeValue): 2021-12-23 Carlos Garcia Campos [GTK][a11y] WTR: ensure the root object is created before getting the focused element with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234597 Reviewed by Adrian Perez de Castro. This is causing some tests to fail when executed in the same web process after another test. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp: (WTR::AccessibilityController::focusedElement): 2021-12-23 Carlos Garcia Campos [GTK][a11y] WTR: add support for notifications when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234550 Reviewed by Adrian Perez de Castro. Add AccessibilityNotificationHandler class to handle the ATSPI notifications. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: * WebKitTestRunner/InjectedBundle/AccessibilityController.h: * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp: (WTR::AccessibilityController::resetToConsistentState): Remove the global event listener if there's one active. (WTR::AccessibilityController::addNotificationListener): Create a global event listener. (WTR::AccessibilityController::removeNotificationListener): Remove the global event listener. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.cpp: Added. (WTR::AccessibilityNotificationHandler::AccessibilityNotificationHandler): (WTR::AccessibilityNotificationHandler::~AccessibilityNotificationHandler): * WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.h: Added. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::addNotificationListener): Create the element event listener. (WTR::AccessibilityUIElement::removeNotificationListener): Remove the element event listener. * WebKitTestRunner/PlatformGTK.cmake: 2021-12-22 Alex Christensen Re-enable WebPushD.HandleInjectedPush API test https://bugs.webkit.org/show_bug.cgi?id=234627 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: 2021-12-22 Alex Christensen Disable WKInspectorExtensionDelegate.ShowAndHideTabCallbacks API test webkit.org/b/231847 It seems to be timing out a lot everywhere. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (TEST): 2021-12-22 Sihui Liu WebsiteDataStore::excludeDirectoryFromBackup should set attribute for existing directories https://bugs.webkit.org/show_bug.cgi?id=234404 Reviewed by Youenn Fablet. * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: (TEST): 2021-12-22 Alex Christensen Re-enable CustomDisplayName and DefaultDisplayName API tests on Monterey https://bugs.webkit.org/show_bug.cgi?id=234613 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm: (TestWebKitAPI::TEST): 2021-12-22 Kate Cheney PCM tests crashing with 'unlink' errors https://bugs.webkit.org/show_bug.cgi?id=234565 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (cleanUp): Close the databases before removing the files. (TEST): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::simulatePrivateClickMeasurementSessionRestart): (WTR::TestRunner::simulateResourceLoadStatisticsSessionRestart): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::simulatePrivateClickMeasurementSessionRestart): (WTR::TestController::simulateResourceLoadStatisticsSessionRestart): Deleted. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Rename. 2021-12-22 Alex Christensen Fix compiling with pickier compiler https://bugs.webkit.org/show_bug.cgi?id=234593 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm: * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2021-12-22 Alex Christensen Re-enable WebpagePreferences.WebsitePoliciesDuringRedirect API test on Monterey https://bugs.webkit.org/show_bug.cgi?id=234607 Reviewed by Brady Eidson. This is the same as r285057 where we were responding with one byte short of the ranges requested, which used to give a playing event but since Monterey it doesn't. The fix is to respond with all the bytes requested. If the request is for bytes 0-1, we need to respond with two bytes, for example. * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (-[TestSchemeHandler webView:startURLSchemeTask:]): (TEST): 2021-12-22 J Pascoe [WebAuthn] Set Web Authentication experimental feature flag as default true https://bugs.webkit.org/show_bug.cgi?id=234533 Reviewed by Brent Fulgham. The Web Authentication feature has been shipping for a while. Default value for experimental feature flag should be true. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): (TestWebKitAPI::WebCore::webAuthenticationExperimentalFeature): Deleted. 2021-12-22 Alex Christensen Re-enable PrivateClickMeasurement.EphemeralWithAttributedBundleIdentifier API test https://bugs.webkit.org/show_bug.cgi?id=226548 It was fixed with r287275 * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): 2021-12-22 Alex Christensen Remove failing API test check added in r287342 https://bugs.webkit.org/show_bug.cgi?id=234576 I added a check that has failed on some bots. No need to add it. * TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm: (TestWebKitAPI::TEST): 2021-12-21 Alex Christensen Fix some API tests after r287341 https://bugs.webkit.org/show_bug.cgi?id=232857 * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::TEST): 2021-12-21 Simon Fraser Fuzzy pixel data need to be computed in terms of CSS pixels https://bugs.webkit.org/show_bug.cgi?id=232525 Reviewed by Tim Horton. Pixel tolerance is computed in CSS pixels, so have ImageDiff divide the total number of differing pixels by the square of the scale factor (a single different pixel at 1x becomes 4 different pixels at 2x). * ImageDiff/ImageDiff.cpp: (processImages): * ImageDiff/PlatformImage.cpp: (ImageDiff::PlatformImage::isCompatible const): (ImageDiff::PlatformImage::difference): 2021-12-21 Alex Christensen Re-enable ContextMenu API tests https://bugs.webkit.org/show_bug.cgi?id=234585 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm: (TEST): * TestWebKitAPI/cocoa/TestContextMenuDriver.h: * TestWebKitAPI/cocoa/TestContextMenuDriver.mm: (+[TestContextMenuDriver prefersCancelsTouchesInView]): (-[TestContextMenuDriver cancelsTouchesInView]): (-[TestContextMenuDriver setCancelsTouchesInView:]): 2021-12-21 Alex Christensen Enable Fullscreen.LayoutConstraints API test https://bugs.webkit.org/show_bug.cgi?id=234576 Reviewed by Tim Horton. Added in bug 159900 and not compiled until bug 232768, now it's giving us some useful test coverage. * TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm: (TestWebKitAPI::TEST): 2021-12-21 Alex Christensen Fix some API tests after r287316 https://bugs.webkit.org/show_bug.cgi?id=232857 I saw the test behavior difference on my Monterey arm64 Mac and assumed it was because it was Monterey, but actually it's because it's an arm64 Mac. Fix the test expectations. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::TEST): 2021-12-21 Wenson Hsieh REGRESSION (12/21/2021): [iOS] TestWebKitAPI.WebKit.AddAndRemoveDataDetectors is consistently failing https://bugs.webkit.org/show_bug.cgi?id=234574 rdar://86782559 Reviewed by Tim Horton. This test began failing today due to DataDetectors no longer recognizing "December 21, 2021" as a valid date in the future. Avoid this problem (at least, until the next century) by adjusting this date to be much later. * TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/data-detectors.html: 2021-12-21 Brady Eidson Make Notification identifiers be a UUID string instead of a uint64_t https://bugs.webkit.org/show_bug.cgi?id=234534 Reviewed by Alex Christensen. Where possible, use the String UUID identifier. This gets rid of lots of weird maps and cleans up flaky situations that could occasionally occur. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postSimulateWebNotificationClick): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::simulateWebNotificationClick): * WebKitTestRunner/TestController.cpp: (WTR::TestController::simulateWebNotificationClick): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/WebNotificationProvider.cpp: (WTR::WebNotificationProvider::~WebNotificationProvider): (WTR::WebNotificationProvider::showWebNotification): (WTR::WebNotificationProvider::closeWebNotification): (WTR::WebNotificationProvider::addNotificationManager): (WTR::WebNotificationProvider::removeNotificationManager): (WTR::WebNotificationProvider::simulateWebNotificationClick): (WTR::WebNotificationProvider::reset): (WTR::removeGlobalIDFromIDMap): Deleted. * WebKitTestRunner/WebNotificationProvider.h: 2021-12-21 Simon Fraser Allow a way to specify a custom pixel tolerance in a ref test https://bugs.webkit.org/show_bug.cgi?id=149828 Reviewed by Martin Robinson. When determining if a ref test failed, look for in the test file, and if present, compare the actual pixel differences with the range allowed by the fuzzy metadata. This may cause a failing reference to match, or a passing reference (based on ImageDiff internal tolerance) to fail. In the case of mismatch ref tests, the fuzziness is taken into account to determine if the mismatch still occurs. If not, then the mismatch test fails. * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner._fuzzy_tolerance_for_reference): (SingleTestRunner._compare_output_with_reference): 2021-12-21 Alex Christensen ASSERT NOT REACHED under WebKit::Daemon::ConnectionToMachService seen with TestWebKitAPI.WebPushD.BasicCommunication and PermissionManagement https://bugs.webkit.org/show_bug.cgi?id=232857 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::TEST): 2021-12-21 J Pascoe [WebAuthn] Authenticator is not falling back to clientPIN after internal verification fails and is blocked. https://bugs.webkit.org/show_bug.cgi?id=232501 Reviewed by Darin Adler. Whenever internal uv gets blocked, the user agent should fall back to using a pin for user verification. This adds an API test to verify this behavior. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-12-21 Sam Weinig Add support for premultiplied alpha interpolated gradients and defaulted off option to use them for CSS Gradients https://bugs.webkit.org/show_bug.cgi?id=234492 Reviewed by Simon Fraser. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): Add default for Windows WebKitLegacy testing which still requires it. 2021-12-21 Carlos Garcia Campos [GTK][a11y] Implement list markers when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234485 Reviewed by Adrian Perez de Castro. Add test cases to check list item markers. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testAccessibleListMarkers): (testTextListMarkers): (testHyperlinkBasic): (testHypertextBasic): (beforeAll): 2021-12-20 Alex Christensen REGRESSION: [ iOS ] 5 TestWebKitAPI.WebpagePreferences.* api tests are flaky timing out https://bugs.webkit.org/show_bug.cgi?id=229094 Reviewed by Darin Adler. The tests don't seem to time out any more. Let's try re-enabling them. * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (TEST): 2021-12-20 Fujii Hironori [Win] MSVC reports "DumpRenderTree.cpp(633): error C2362: initialization of 'length' is skipped by 'goto exit'" with /std:c++20 https://bugs.webkit.org/show_bug.cgi?id=234503 Reviewed by Don Olmstead. * DumpRenderTree/win/DumpRenderTree.cpp: (dumpHistoryItem): Removed goto statements. Use std::unique_ptr for SAFEARRAY. 2021-12-20 Simon Fraser Make it possible to enable log channels in WebKitTestRunner and DumpRenderTree https://bugs.webkit.org/show_bug.cgi?id=234525 Reviewed by Wenson Hsieh. Support a "--WebCoreLogging" argument to DumpRenderTree to enable the WebCore log channels. Support "--WebCoreLogging" and "--WebKitLogging" arguments to WebKitTestRunner to enable the WebCore and WebKit log channels. DRT requires the double dash format, so I chose to have both use double dashes for consistency (although this is inconsistent with the single dash format used by AppKit and UIKit apps). * DumpRenderTree/mac/DumpRenderTree.mm: (initializeGlobalsFromCommandLineOptions): (prepareConsistentTestingEnvironment): * WebKitTestRunner/Options.cpp: (WTR::handleOptionLogChannels): (WTR::OptionsHandler::OptionsHandler): * WebKitTestRunner/Options.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): * WebKitTestRunner/TestController.h: * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::cocoaPlatformInitialize): * WebKitTestRunner/gtk/TestControllerGtk.cpp: (WTR::TestController::platformInitialize): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformInitialize): * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformInitialize): * WebKitTestRunner/win/TestControllerWin.cpp: (WTR::TestController::platformInitialize): * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformInitialize): 2021-12-20 Dewei Zhu 'run-benchmark' should launch browsers in a relative clean state. https://bugs.webkit.org/show_bug.cgi?id=234107 Reviewed by Stephanie Lewis. Add code to ensure Chrome and Firefox launches in a relative clean state. Refactor browser drivers for macOS Chrome and Firefox to share more code. * Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py: Added '--no-first-run', '--no-default-browser-check', '--disable-extensions' flags. (OSXChromeDriverBase): (OSXChromeDriverBase.launch_url): (OSXChromeDriverBase.launch_driver): (OSXChromeDriverBase._create_chrome_options): (OSXChromeDriverBase._window_size_arg): (OSXChromeDriverBase._set_chrome_binary_location): (OSXChromeDriver): (OSXChromeDriver._set_chrome_binary_location): (OSXChromeCanaryDriver._set_chrome_binary_location): (OSXChromeDriver.launch_url): Deleted. (OSXChromeDriver.launch_driver): Deleted. (OSXChromeCanaryDriver.launch_url): Deleted. (OSXChromeCanaryDriver.launch_driver): Deleted. (create_args): Deleted. (create_chrome_options): Deleted. (create_window_size_arg): Deleted. * Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py: Added code to use profiles to suppress default browser check and privacy notice tab. (OSXFirefoxDriverBase): (OSXFirefoxDriverBase.__init__): (OSXFirefoxDriverBase.prepare_env): (OSXFirefoxDriverBase.restore_env): (OSXFirefoxDriverBase.launch_url): (OSXFirefoxDriverBase.launch_driver): (OSXFirefoxDriverBase._setup_temporary_profile_directory): (OSXFirefoxDriverBase._teardown_temporary_profile_directory): (OSXFirefoxDriverBase._set_firefox_binary_location): (OSXFirefoxDriver): (OSXFirefoxDriver._set_firefox_binary_location): (OSXFirefoxNightlyDriver): (OSXFirefoxNightlyDriver._set_firefox_binary_location): (OSXFirefoxDriver.launch_url): Deleted. (OSXFirefoxDriver.launch_driver): Deleted. (OSXFirefoxNightlyDriver.launch_url): Deleted. (OSXFirefoxNightlyDriver.launch_driver): Deleted. (create_args): Deleted. * Scripts/webkitpy/benchmark_runner/data/firefox_profile/user.js: Added user preferences so that Firefox can be launched without checking default browser and privacy notice. 2021-12-20 J Pascoe [WebAuthn] Add option to change requestWebAuthenticationNoGesture delegate for api tests. https://bugs.webkit.org/show_bug.cgi?id=234444 rdar://86644642 Reviewed by Brent Fulgham. These test a lack of user gesture in local authenticator. Recently we made a change to change user gesture behavior, causing these tests to call out to an agent that cannot be called from TWAPI. To restore test behavior, we add an option to change the return value of the requestWebAuthenticationNoGesture delegate in tests. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (-[TestWebAuthenticationPanelUIDelegate _webView:requestWebAuthenticationNoGestureForOrigin:completionHandler:]): (TestWebKitAPI::WebCore::reset): (TestWebKitAPI::TEST): 2021-12-20 J Pascoe [WebAuthn] Only run WebAuthn test process on platform it is used https://bugs.webkit.org/show_bug.cgi?id=234445 rdar://86646638 Reviewed by Brent Fulgham. Add PLATFORM(IOS) macro around webauthn process test. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: 2021-12-20 Alex Christensen Prevent test functionality in AdAttributionDaemon when not running tests https://bugs.webkit.org/show_bug.cgi?id=231258 Reviewed by Brady Eidson. * TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements: * WebKitTestRunner/Configurations/WebKitTestRunner.entitlements: 2021-12-20 Alex Christensen [ Monterey ] TestWebKitAPI.WebSocket.PageWithAttributedBundleIdentifierDestroyed (API-test) is a constant timeout https://bugs.webkit.org/show_bug.cgi?id=233224 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm: (TestWebKitAPI::TEST): 2021-12-20 Tim Nguyen Stop assuming WPT is a reftest based on existence of -ref.html file https://bugs.webkit.org/show_bug.cgi?id=234510 Reviewed by Sam Sneddon & Darin Adler. Only the presence of / indicates a test is a reftest. The script should not assume that the existence of a similarly named file with a `-ref.html` suffix means that the original test file is reftest. Here's how upstream WPT detects reftests: https://github.com/web-platform-tests/wpt/blob/22f29564bb82b407aeaf6507c8efffdbd51b9974/tools/manifest/sourcefile.py#L1065 * Scripts/webkitpy/w3c/test_parser.py: (TestParser.analyze_test): (TestParser.fuzzy_metadata): (TestParser.is_reference_filename): (TestParser.potential_ref_filename): Deleted. (TestParser.is_wpt_reftest): Deleted. * Scripts/webkitpy/w3c/test_parser_unittest.py: 2021-12-20 Lauro Moura [webkitcorepy] Require cryptography while on Linux with Py3 https://bugs.webkit.org/show_bug.cgi?id=234499 Reviewed by Philippe Normand. cryptography is required by secretstorage.util. When not installed, the import fails and the keyring backend initialization fails silently, just removing the SecretService keyring backend from the list of viable backends. This can happen when running the scripts from a fresh virtualenv, for example. * Scripts/libraries/webkitcorepy/setup.py: * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: 2021-12-20 Tim Nguyen Fix Tools/Scripts/webkitpy/w3c/test_importer.py https://bugs.webkit.org/show_bug.cgi?id=234480 Reviewed by Manuel Rego Casasnovas. * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.find_importable_tests): 2021-12-20 Lauro Moura REGRESSION(r286936) [GLIB] WebsiteData configuration API test is failing with non-created localstorage dir https://bugs.webkit.org/show_bug.cgi?id=234497 Reviewed by Adrian Perez de Castro. * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp: (testWebsiteDataConfiguration): Ensure localStorage is created before trying to query it. 2021-12-18 Alex Christensen [Monterey] TestWebKitAPI.PrivateClickMeasurement.Daemon* tests timing out: Failed to connect to mach service org.webkit.pcmtestdaemon.service https://bugs.webkit.org/show_bug.cgi?id=232890 Reviewed by Brady Eidson. Using OSLaunchdJob on macOS works, but it requires a private entitlement which the public SDK can't sign with. Just continue using launchctl instead. Also, do the NSDictionary -> xpc dictionary conversion at runtime to reduce duplicate code. * TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::testDaemonPList): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::testWebPushDaemonPList): (TestWebKitAPI::setUpTestWebPushD): * TestWebKitAPI/cocoa/DaemonTestUtilities.h: * TestWebKitAPI/cocoa/DaemonTestUtilities.mm: (TestWebKitAPI::convertArrayToXPC): (TestWebKitAPI::convertDictionaryToXPC): (TestWebKitAPI::registerPlistWithLaunchD): 2021-12-17 Simon Fraser Read the default value of the ScrollAnimatorEnabled setting from NSUserDefaults https://bugs.webkit.org/show_bug.cgi?id=234456 Reviewed by Tim Horton. It's impossible for a test to run with an animated keyboard scroll because platformAllowsScrollAnimation(), which reads from NSUserDefaults, always trumps the Setting. Fix by initializing the setting from NSUserDefaults and removing the platformAllowsScrollAnimation() check. This allows for a WebKitTestRunner test override the setting. Unfortunately in WebKitLegacy AppKit code consults the @"NSScrollAnimationEnabled" key, so DumpRenderTree has to continue to initialize this NSUserDefault to @NO and tests that try to change the Setting will fail. * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm: (WTR::InjectedBundle::platformInitialize): * WebKitTestRunner/mac/main.mm: (setDefaultsToConsistentValuesForTesting): 2021-12-17 Simon Fraser Rename MockScrollAnimatorEnabled to MockScrollbarsControllerEnabled https://bugs.webkit.org/show_bug.cgi?id=234452 Reviewed by Anders Carlsson. The class formerly known as MockScrollAnimatorEnabled is used for logging when scrollbars get events, so fix the name. It's a subclass of ScrollbarsController. * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): 2021-12-18 Chris Dumez Drop ServiceWorkerTCPServer and use HTTPServer instead https://bugs.webkit.org/show_bug.cgi?id=234443 Reviewed by Alex Christensen. Drop ServiceWorkerTCPServer and use HTTPServer instead. ServiceWorkerTCPServer relies on TCPServer which is known to cause flakiness and sometimes hang in its destruction. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h: Removed. (): Deleted. (ServiceWorkerTCPServer::ServiceWorkerTCPServer): Deleted. (ServiceWorkerTCPServer::request): Deleted. (ServiceWorkerTCPServer::requestWithLocalhost): Deleted. (ServiceWorkerTCPServer::requestWithFragment): Deleted. (ServiceWorkerTCPServer::userAgentsChecked const): Deleted. (ServiceWorkerTCPServer::respondToRequests): Deleted. (ServiceWorkerTCPServer::requestWithURLString): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm: * TestWebKitAPI/cocoa/HTTPServer.h: * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::scheme const): (TestWebKitAPI::HTTPServer::request const): (TestWebKitAPI::HTTPServer::requestWithLocalhost const): 2021-12-17 Yusuke Suzuki [WTF] Introduce TrailingArray https://bugs.webkit.org/show_bug.cgi?id=234201 Reviewed by Darin Adler. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/EmbeddedFixedVector.cpp: Added. (TestWebKitAPI::TEST): (TestWebKitAPI::DestructorObserver::DestructorObserver): (TestWebKitAPI::DestructorObserver::~DestructorObserver): (TestWebKitAPI::DestructorObserver::operator=): * TestWebKitAPI/Tests/WTF/FixedVector.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/RefCountedFixedVector.cpp: Added. (TestWebKitAPI::TEST): (TestWebKitAPI::DestructorObserver::DestructorObserver): (TestWebKitAPI::DestructorObserver::~DestructorObserver): (TestWebKitAPI::DestructorObserver::operator=): 2021-12-17 Yusuke Suzuki [JSC] Fix runscript's standalone ability to run https://bugs.webkit.org/show_bug.cgi?id=234166 Reviewed by Mark Lam. r286109 broke the ability to run `runscript` as a standalone script to test JSC stress test package on the device. This patch reverts the ability back. * Scripts/jsc-stress-test-helpers/shell-runner.sh: 2021-12-17 Alex Christensen Remove API::Object::Type::BundlePageGroup https://bugs.webkit.org/show_bug.cgi?id=225611 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp: (TestWebKitAPI::TEST): 2021-12-17 Alexey Shvayka Tools/Scripts/run-perf-tests is failing on Speedometer2 https://bugs.webkit.org/show_bug.cgi?id=234426 Reviewed by Carlos Alberto Lopez Perez. r282357 added a debug console warning regarding 'dppx' units, which is being emitted for TodoMVC's stylesheets, thus failing metrics parsing in PerfTest. To fix the execution of Speedometer2 suite, this particular warning has now been added to the ignore list. * Scripts/webkitpy/performance_tests/perftest.py: (PerfTest): 2021-12-17 Alexey Shvayka Fix deprecation warning in Tools/Scripts/run-jsc-benchmarks https://bugs.webkit.org/show_bug.cgi?id=234425 Reviewed by Alex Christensen. Ruby 2.4 unified Fixnum and Bignum classes into Integer [1], deprecating them as implementation details. To get rid of the deprecation console message, this patch replaces Fixnum type checks with Integer, which is unobservable and backwards-compatible. [1] https://bugs.ruby-lang.org/issues/12005 * Scripts/run-jsc-benchmarks: 2021-12-16 Jonathan Bedard [reporelaypy] Accept pull-request hooks https://bugs.webkit.org/show_bug.cgi?id=234406 Reviewed by Dewei Zhu. * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version. * Scripts/libraries/reporelaypy/reporelaypy/hooks.py: (HookProcessor): (HookProcessor.is_valid): Check 'pull_request' hook format. * Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py: (HooksUnittest.test_pull_request): * Scripts/libraries/reporelaypy/setup.py: Bump version. 2021-12-16 Carlos Alberto Lopez Perez [GTK][WPE] Don't ignore stderr when calling flatpak in update-webkitgtk-libs https://bugs.webkit.org/show_bug.cgi?id=234407 Reviewed by Michael Catanzaro. Print stderr when calling flatpak, is useful to debug problems when it fails. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2021-12-16 Alex Christensen Unreviewed, reverting r287056. Caused performance regression...again Reverted changeset: "Remove properties set by NSURLProtocol on NSURLRequest before serializing" https://bugs.webkit.org/show_bug.cgi?id=232332 https://commits.webkit.org/r287056 2021-12-15 Darin Adler Many call sites use makeNeverDestroyed, but could instead take advantage of the NeverDestroyed deduction guide https://bugs.webkit.org/show_bug.cgi?id=234350 Reviewed by Sam Weinig. * DumpRenderTree/mac/DumpRenderTree.mm: (fontAllowList): Use deduction. * TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp: (TestWebKitAPI::TEST): Remove tests of makeNeverDestroyed. (TestWebKitAPI::list): Use deduction. 2021-12-16 Carlos Alberto Lopez Perez [GTK] Add gtk-wk2 to EWS bubbles https://bugs.webkit.org/show_bug.cgi?id=209104 Reviewed by Jonathan Bedard. A new queue was added in 286405 which runs GTK LayoutTests. This patch adds the queue to the EWS bubbles. * CISupport/ews-app/ews/views/statusbubble.py: (StatusBubble): 2021-12-16 Carlos Alberto Lopez Perez [GTK][WPE] Apply optimizations to speed up the layout-test EWS and add a few more workers to the build ones. https://bugs.webkit.org/show_bug.cgi?id=234378 Reviewed by Jonathan Bedard. This applies two optimizations to speed up the testing on the layout-tests EWS added in r286405 1. Pass --fully-parallel to the retry steps. This makes the tool to utilize all the available workers for running the tests instead of running them in serial. That makes the time needed to complete the retry steps to be considerable less, In this example https://ews-build.webkit.org/#/builders/35/builds/1757 it reduces the timing from 43 mins to 12 mins. 2. When the first run fails without giving a list of failures and we have not reached the maximum retry count we are going to end retring the whole testing anyway, so there is no point in running the tests without patch in that case, we can skip doing that to save time. See: https://ews-build.webkit.org/#/builders/35/builds/1763 On top of that this patch adds an extra worker to the EWS build queues of GTK and WPE because I detected that this queues sometimes are not fast enough. * CISupport/ews-build/config.json: * CISupport/ews-build/steps.py: (BugzillaMixin.send_email_for_infrastructure_issue): (RunWebKitTestsRedTree.evaluateCommand): (RunWebKitTestsRepeatFailuresRedTree.setLayoutTestCommand): (RunWebKitTestsRepeatFailuresWithoutPatchRedTree.setLayoutTestCommand): * CISupport/ews-build/steps_unittest.py: 2021-12-15 John Wilander TestWebKitAPI.PrivateClickMeasurement.MigrateWithDestinationToken is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=234335 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (cleanUp): Made the function sleep-wait until the file is indeed deleted. 2021-12-15 Jonathan Bedard [reporelaypy] Forward branches to alternate remote https://bugs.webkit.org/show_bug.cgi?id=234347 Reviewed by Dewei Zhu. * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version. * Scripts/libraries/reporelaypy/reporelaypy/checkout.py: (Checkout.Encoder.default): Add remotes. (Checkout.clone): After cloning a repository, add required remotes. (Checkout.add_remotes): Track remotes in repository. (Checkout.__init__): Allow caller to specify set of remotes to be tracked. (Checkout.push_update): Push update for specified remote. (Checkout.update_for): Return 'True' and 'False.' (Checkout.update_all): If a branch is being updated, we should forward that update to any tracked remotes. * Scripts/libraries/reporelaypy/reporelaypy/hooks.py: (HookProcessor.process_worker_hook): After updating a branch, forward that update to any tracked remotes. * Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py: (CheckoutUnittest.test_constructor_no_sentinal): Capture debug logging. * Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py: (CheckoutRouteUnittest.test_landing): Capture debug logging. (CheckoutRouteUnittest.test_invoked_redirect): Ditto. (CheckoutRouteUnittest.test_trac): Ditto. * Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py: (HooksUnittest.test_process): Test for any error logging. (HooksUnittest.test_process_branch): Ditto. * Scripts/libraries/reporelaypy/run: Allow caller to specify remote to be tracked. * Scripts/libraries/reporelaypy/setup.py: Bump version. 2021-12-15 Don Olmstead Split ATK specific code in WPEViewBackends https://bugs.webkit.org/show_bug.cgi?id=234310 Reviewed by Adrian Perez de Castro. Move ATK specific code in WPEViewBackends into the atk directory. This splits ViewBackend's implementation into two files with ATK specific code migrated to atk/ViewBackendAtk.cpp. The code in WebKitAccessibleApplication is all ATK specific so its completely moved into the atk directory. * wpe/backends/CMakeLists.txt: * wpe/backends/PlatformWPE.cmake: * wpe/backends/ViewBackend.cpp: (WPEToolingBackends::ViewBackend::initializeAccessibility): (WPEToolingBackends::ViewBackend::updateAccessibilityState): (WPEToolingBackends::addKeyEventListener): Deleted. (WPEToolingBackends::removeKeyEventListener): Deleted. (WPEToolingBackends::notifyAccessibilityKeyEventListeners): Deleted. (WPEToolingBackends::ViewBackend::setAccessibleChild): Deleted. * wpe/backends/ViewBackend.h: * wpe/backends/atk/ViewBackendAtk.cpp: Copied from Tools/wpe/backends/ViewBackend.cpp. (WPEToolingBackends::addKeyEventListener): (WPEToolingBackends::removeKeyEventListener): (WPEToolingBackends::ViewBackend::notifyAccessibilityKeyEventListeners): (WPEToolingBackends::ViewBackend::initializeAccessibility): (WPEToolingBackends::ViewBackend::updateAccessibilityState): (WPEToolingBackends::ViewBackend::setAccessibleChild): * wpe/backends/atk/WebKitAccessibleApplication.cpp: Renamed from Tools/wpe/backends/WebKitAccessibleApplication.cpp. * wpe/backends/atk/WebKitAccessibleApplication.h: Renamed from Tools/wpe/backends/WebKitAccessibleApplication.h. 2021-12-15 Alex Christensen Avoid unnecessary allocation and UTF-8 conversion when calling DFABytecodeInterpreter::interpret https://bugs.webkit.org/show_bug.cgi?id=234351 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::TEST_F): 2021-12-15 Carlos Garcia Campos [GTK][a11y] Add support for loading events when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234344 Reviewed by Joanmarie Diggs. Add a test case to check loading events. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (AccessibilityTest::shouldProcessEvent): Helper to make the filters conditions easier to read. (AccessibilityTest::startEventMonitor): Make it possible to use the monitor without filtering events. (testDocumentLoadEvents): (beforeAll): 2021-12-15 Carlos Garcia Campos [GTK][a11y] Register the wrappers tree when there's an event listener registered https://bugs.webkit.org/show_bug.cgi?id=234338 Reviewed by Joanmarie Diggs. Add unit test to check the tree is created when there's a listener connected. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (AccessibilityTest::findTestApplication): Iterate the applications list backwards since the test program is usually the last one in the list. (AccessibilityTest::accessibleApplicationIsTestProgram): Helper to check if a given accessible belongs to the test program. (AccessibilityTest::startEventMonitor): Support for listening to events associated to the test program, not to a particular accessible. (testAccessibleEventListener): (beforeAll): 2021-12-14 Don Olmstead [CMake] Modernize WPEToolingBackend https://bugs.webkit.org/show_bug.cgi?id=234307 Reviewed by Adrian Perez de Castro. Use WEBKIT_FRAMEWORK to build WPEToolingBackend and follow its conventions. Also support different platform definitions so other ports using libwpe can also use this library. Update includes to use . * MiniBrowser/wpe/CMakeLists.txt: * MiniBrowser/wpe/main.cpp: * TestWebKitAPI/PlatformWPE.cmake: * TestWebKitAPI/glib/PlatformWPE.cmake: * TestWebKitAPI/glib/WebKitGLib/TestMain.h: * TestWebKitAPI/wpe/PlatformWebViewWPE.cpp: * WebKitTestRunner/PlatformWPE.cmake: * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: * wpe/backends/CMakeLists.txt: * wpe/backends/PlatformWPE.cmake: Added. 2021-12-14 Ryan Haddad Bring up another iOS GPU Processes tester https://bugs.webkit.org/show_bug.cgi?id=234016 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/config.json: Put the Catalina GPUP bot back and use a different machine for the new iOS tester. * CISupport/build-webkit-org/factories_unittest.py: Update unit tests. (TestExpectedBuildSteps): 2021-12-14 Alex Christensen Remove properties set by NSURLProtocol on NSURLRequest before serializing https://bugs.webkit.org/show_bug.cgi?id=232332 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm: (TestWebKitAPI::TEST): 2021-12-14 Jonathan Bedard [reporelaypy] Update checkout with hook instead of polling (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=234243 Unreviewed follow-up fix. * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version. * Scripts/libraries/reporelaypy/reporelaypy/checkout.py: (Checkout.update_for): `main` is not a recognized production branch, so handle default branch first. * Scripts/libraries/reporelaypy/setup.py: Bump version. 2021-12-14 Alex Christensen Revert r284816 https://bugs.webkit.org/show_bug.cgi?id=234308 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm: (TestWebKitAPI::TEST): 2021-12-13 Jonathan Bedard [reporelaypy] Update checkout with hook instead of polling https://bugs.webkit.org/show_bug.cgi?id=234243 Reviewed by Dewei Zhu. * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version, export HookProcessor and HookReceiver. * Scripts/libraries/reporelaypy/reporelaypy/checkout.py: (Checkout.update_for): If a branch is new, we need to track it. * Scripts/libraries/reporelaypy/reporelaypy/database.py: (Database.__init__): Use self.host and self.password. * Scripts/libraries/reporelaypy/reporelaypy/hooks.py: Added. (HookProcessor): Class to process received hooks. (HookReceiver): Class to receive hooks and queue them for processing. * Scripts/libraries/reporelaypy/reporelaypy/tests/hooks_unittest.py: Added. (HooksUnittest): (HooksUnittest.setUp): (HooksUnittest.test_receive): (HooksUnittest.test_invalid): (HooksUnittest.test_process): (HooksUnittest.test_hmac): (HooksUnittest.test_invalid_hmac): * Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Add hook routes, if hooks are enabled. * Scripts/libraries/reporelaypy/run: Allow caller to enable hooks. * Scripts/libraries/reporelaypy/setup.py: Bump version. 2021-12-14 Alex Christensen Add _WKContentRuleListAction.redirected and .modifiedHeaders https://bugs.webkit.org/show_bug.cgi?id=234289 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm: (checkURLs): (TEST_F): * TestWebKitAPI/cocoa/TestNavigationDelegate.h: * TestWebKitAPI/cocoa/TestNavigationDelegate.mm: (-[TestNavigationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]): 2021-12-14 Alex Christensen Move FTP disabling from NetworkLoad::start to NetworkDataTask::NetworkDataTask https://bugs.webkit.org/show_bug.cgi?id=234280 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: 2021-12-11 Dean Jackson Allow override of system's preferred color scheme https://bugs.webkit.org/show_bug.cgi?id=234199 Reviewed by Tim Horton. New API test that checks the color-scheme after explicitly setting it. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/color-scheme.html: Added. Note: Xcode was being difficult and wouldn't let me put this file in the right order for the Copy Build Phase :( * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: 2021-12-14 Angelos Oikonomopoulos [JSC] Fix LocalJumpError in run-jsc-stress-tests https://bugs.webkit.org/show_bug.cgi?id=234295 Reviewed by Michael Catanzaro. Ruby code cannot return from a Proc; use an if/else instead. This fixes the LocalJumpError reported in https://bugs.webkit.org/show_bug.cgi?id=233926. * Scripts/run-jsc-stress-tests: 2021-12-14 Jean-Yves Avenard Rename SharedBuffer classes. https://bugs.webkit.org/show_bug.cgi?id=233677 rdar://problem/85963900 Reviewed by Youenn Fablet. SharedBuffer are renamed FragmentedSharedBuffer and ContiguousSharedBuffer to SharedBuffer to better reflect their actual types. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: * TestWebKitAPI/Tests/WebCore/SharedBufferTest.cpp: * TestWebKitAPI/Tests/WebCore/SharedBufferTest.h: * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: * TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm: * TestWebKitAPI/win/TestWebCoreStubs.cpp: 2021-12-13 John Wilander PCM: Remove old DB update and migration code, and add a unit test for destination token DB columns https://bugs.webkit.org/show_bug.cgi?id=234281 Reviewed by Alex Christensen and Kate Cheney. * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (addAttributedPCMv5): (pollUntilPCMIsMigrated): Now takes a parameter UsingDestinationToken and handles its expectation accordingly. (TEST): New test PrivateClickMeasurement.MigrateWithDestinationToken. 2021-12-13 Alex Christensen Allow WKContentRuleList to run regexes on current frame's URL, not just top frame's URL https://bugs.webkit.org/show_bug.cgi?id=233889 Reviewed by Timothy Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::mainDocumentRequest): (TestWebKitAPI::subResourceRequest): (TestWebKitAPI::TEST_F): 2021-12-13 Brady Eidson Teach webpushtool to register and "host" the daemon. https://bugs.webkit.org/show_bug.cgi?id=234265 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::shouldSetupWebPushD): Add a command line argument to skip the "install the daemon" step, so an engineer can handle that part themselves. (TestWebKitAPI::setUpTestWebPushD): (TestWebKitAPI::cleanUpTestWebPushD): 2021-12-13 Christopher Reid [Curl] Improve curl's cookie conformance in WPT https://bugs.webkit.org/show_bug.cgi?id=232722 Reviewed by Fujii Hironori. * WebKitTestRunner/TestController.cpp: Use a unique cookie file for each test on windows 2021-12-13 Jean-Yves Avenard Add SharedBufferBuilder class https://bugs.webkit.org/show_bug.cgi?id=233442 rdar://85693939 Reviewed by Youenn Fablet. Update API tests. * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm: (TestWebKitAPI::TEST_F): 2021-12-13 Angelos Oikonomopoulos [JSC] Unify default/noisy tests definition https://bugs.webkit.org/show_bug.cgi?id=233926 Reviewed by Yusuke Suzuki. Currently, changing a test to be noisy (i.e. using defaultRunNoisyTest) results in only a subset of the tests being run. Instead of manually changing the noisy test test handler, this patch makes the mode definitions table-driven. However, for compatibility with the existing code, it uses the table to define the ruby methods that the testcase definitions (//@ comments, yaml) and other callers in run-jsc-stress-tests (e.g. all default*Run methods) expect. Note that this slightly increases the number of tests executed (as more test modes are enabled for the noisy tests). This is an exploratory first step; other callers in run-jsc-stress-tests could be simplified in the same way. * Scripts/run-jsc-stress-tests: 2021-12-13 Youenn Fablet Start websocket server for tests in http/tests that have websocket in their name https://bugs.webkit.org/show_bug.cgi?id=234075 Reviewed by Jonathan Bedard. Allows to run the websocket server for tests like LayoutTests/http/tests/workers/service/serviceworker-websocket.https.html. * Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py: 2021-12-13 Youenn Fablet Fix ServiceWorker downloads https://bugs.webkit.org/show_bug.cgi?id=202142 Reviewed by Alex Christensen. Add test runner API to log the total download size. This helps ensuring that service worker loads are correctly downloaded and do not rely on networking. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: 2021-12-13 Kimmo Kinnunen Cocoa WebGL should support UI side compositing https://bugs.webkit.org/show_bug.cgi?id=231009 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm: Add a dummy override of the new member function layerContentsDisplayDelegate. 2021-12-13 Jean-Yves Avenard Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability https://bugs.webkit.org/show_bug.cgi?id=233030 rdar://85333814 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm: (TestWebKitAPI::TEST_F): 2021-12-12 Sam Weinig Pipe ColorInterpolationMethod into Gradient https://bugs.webkit.org/show_bug.cgi?id=234205 Reviewed by Antti Koivisto. Update calls to Gradient::create() to pass the now required ColorInterpolationMethod. * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: (TestWebKitAPI::createGradient): * TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: (TestWebKitAPI::TEST): 2021-12-11 Commit Queue Unreviewed, reverting r286893. https://bugs.webkit.org/show_bug.cgi?id=234197 Breaks the build Reverted changeset: "[macOS] Add new screen and window capture backend" https://bugs.webkit.org/show_bug.cgi?id=234029 https://commits.webkit.org/r286893 2021-12-10 Eric Carlson [macOS] Add new screen and window capture backend https://bugs.webkit.org/show_bug.cgi?id=234029 Reviewed by Jer Noble and Youenn Fablet. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMediaWindowAndScreen.mm: Added. (-[WindowAndScreenCaptureTestView haveStream:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm: * TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h: * TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm: (-[UserMediaCaptureUIDelegate init]): (-[UserMediaCaptureUIDelegate setGetDisplayMediaDecision:]): (-[UserMediaCaptureUIDelegate _webView:requestDisplayCapturePermissionForOrigin:initiatedByFrame:decisionHandler:]): 2021-12-10 Don Olmstead Add FileSystem function to read a file at a path https://bugs.webkit.org/show_bug.cgi?id=234103 Reviewed by Alex Christensen. Add tests for readEntireFile. * TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2021-12-10 Alex Christensen Move if-domain and unless-domain conversion to WKContentRuleList parsing https://bugs.webkit.org/show_bug.cgi?id=234126 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::testRequestImpl): (TestWebKitAPI::TEST_F): (TestWebKitAPI::testRequest): Deleted. 2021-12-10 Commit Queue Unreviewed, reverting r286836. https://bugs.webkit.org/show_bug.cgi?id=234153 some tests are flaky on iOS and some are crashing on macOS Reverted changeset: "[Model] Add load and error events to distinguish resource load from model readiness" https://bugs.webkit.org/show_bug.cgi?id=233706 https://commits.webkit.org/r286836 2021-12-10 Kimmo Kinnunen IOSurface memory attribution is hard to use in constructors https://bugs.webkit.org/show_bug.cgi?id=232988 Reviewed by Chris Dumez. Update constructor calling base class constructor, add empty ProcesseIdentity. * TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm: 2021-12-09 Antoine Quint [Model] Add load and error events to distinguish resource load from model readiness https://bugs.webkit.org/show_bug.cgi?id=233706 rdar://85922697 Reviewed by Chris Dumez and Dean Jackson. Use the "load" event instead of the "ready" promise for this test which only requires monitoring the resource being loaded. * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (TestWebKitAPI::TEST): 2021-12-09 Aditya Keerthi [iOS] Add SPI to enable find interactions on WKWebView https://bugs.webkit.org/show_bug.cgi?id=234017 rdar://86140542 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: (TEST): Test that the new SPI installs a _UIFindInteraction on the web view. 2021-12-09 Lauro Moura [webkitpy] Make check-webkit-style check WebDriverTests/TestExpectations.json https://bugs.webkit.org/show_bug.cgi?id=213453 Reviewed by Adrian Perez de Castro. While the WebDriver tests are imported and mostly ignored by check-webkit-style, the script must check TestExpectations.json to avoid commiting invalid json data and breaking the bots. * Scripts/webkitpy/style/checker.py: * Scripts/webkitpy/style/checker_unittest.py: (CheckerDispatcherSkipTest._assert_should_skip_without_warning): Pass a valid error handler so the JSONChecker can be instantiated. (CheckerDispatcherSkipTest.test_should_skip_without_warning__false): 2021-12-09 Alex Christensen Prepare for transition to C++20 https://bugs.webkit.org/show_bug.cgi?id=234022 Reviewed by Yusuke Suzuki. * DumpRenderTree/cg/PixelDumpSupportCG.cpp: (createBitmapContext): * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm: (TEST): * TestWebKitAPI/Tests/WebKitLegacy/ios/SnapshotViaRenderInContext.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestPDFDocument.mm: (TestWebKitAPI::TestPDFPage::colorAtPoint const): * WebKitTestRunner/cg/TestInvocationCG.cpp: (WTR::createCGContextFromCGImage): 2021-12-08 BJ Burg [Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be to notified when an extension tab navigates https://bugs.webkit.org/show_bug.cgi?id=233935 Reviewed by Patrick Angle. Add API test coverage for -inspectorExtension:didNavigateTabWithIdentifier:newURL: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): Drive-by, fix an outdated completion handler type signature. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (-[InspectorExtensionDelegateForTesting inspectorExtension:didNavigateTabWithIdentifier:newURL:]): (TEST): Add a test case which exercises the new delegate method. 2021-12-09 Lauro Moura [WebXR][WPE] Build fails without openxr installed https://bugs.webkit.org/show_bug.cgi?id=220250 Reviewed by Adrian Perez de Castro. Based on original patch by Yury Semikhatsky. Rebased and installed only for WPE, as GTK's module set does not declare openxr. * wpe/dependencies/apt: Install libxcb-glx0-dev 2021-12-09 Ryan Haddad Bring up another iOS GPU Processes tester https://bugs.webkit.org/show_bug.cgi?id=234016 Rubber-stamped by Alexey Proskuryakov. * CISupport/build-webkit-org/config.json: Repurpose the Catalina GPU bot for this queue. * CISupport/build-webkit-org/factories_unittest.py: (TestExpectedBuildSteps): Update unit tests. 2021-12-09 Brady Eidson Add ability to inject messages into webpushd https://bugs.webkit.org/show_bug.cgi?id=233988 Reviewed by Alex Christensen. * TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements: * TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm: (messageDictionary): * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::createMessageDictionary): (TestWebKitAPI::sendMessageToDaemon): (TestWebKitAPI::sendMessageToDaemonWaitingForReply): (TestWebKitAPI::sendConfigurationWithAuditToken): (TestWebKitAPI::createAndConfigureConnectionToService): (TestWebKitAPI::encodeString): (TestWebKitAPI::TEST): (TestWebKitAPI::function): * TestWebKitAPI/cocoa/TestWKWebView.h: 2021-12-09 J Pascoe [WebAuthn] Remove user gesture requirement for using platform authenticator on the web https://bugs.webkit.org/show_bug.cgi?id=230893 Reviewed by Brent Fulgham. This patch removes the Quirks allowlist of the freebie web authentication use without a gesture and replaces it with one freebie, then a consent sheet. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (-[TestWebAuthenticationPanelUIDelegate _webView:requestWebAuthenticationNoGestureForOrigin:completionHandler:]): Test delegate 2021-12-09 Commit Queue Unreviewed, reverting r286764. https://bugs.webkit.org/show_bug.cgi?id=234081 broke the build Reverted changeset: "Add ability to inject messages into webpushd" https://bugs.webkit.org/show_bug.cgi?id=233988 https://commits.webkit.org/r286764 2021-12-09 Myles C. Maxfield and Don Olmstead Move TextCodec files from WebCore/platform/text to WebCore/PAL/text https://bugs.webkit.org/show_bug.cgi?id=233683 Reviewed by Yusuke Suzuki. Update to use the new PAL files. * Scripts/webkitpy/style/checkers/cpp.py: (check_identifier_name_in_declaration): * TestWebKitAPI/Tests/WebCore/TextCodec.cpp: (TestWebKitAPI::testDecode): * TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): 2021-12-09 Carlos Garcia Campos [GTK][a11y] Ensure atspi wrappers have root set at construction time https://bugs.webkit.org/show_bug.cgi?id=233804 Reviewed by Joanmarie Diggs. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp: (WTR::AccessibilityController::axRunLoop): 2021-12-08 Brady Eidson Add ability to inject messages into webpushd https://bugs.webkit.org/show_bug.cgi?id=233988 Reviewed by Alex Christensen. * TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements: * TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm: (messageDictionary): * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::createMessageDictionary): (TestWebKitAPI::sendMessageToDaemon): (TestWebKitAPI::sendMessageToDaemonWaitingForReply): (TestWebKitAPI::sendConfigurationWithAuditToken): (TestWebKitAPI::createAndConfigureConnectionToService): (TestWebKitAPI::encodeString): (TestWebKitAPI::TEST): (TestWebKitAPI::function): * TestWebKitAPI/cocoa/TestWKWebView.h: 2021-12-08 Kyle Piddington [MacCatalyst] Update header search paths for ANGLE Catalyst https://bugs.webkit.org/show_bug.cgi?id=233996 For iOSMac builds, search for ANGLE public headers inside System/iOSSupport Reviewed by Dean Jackson. * TestWebKitAPI/Configurations/Base.xcconfig: 2021-12-08 Alex Christensen Add SPI to load a resource in the context of a page https://bugs.webkit.org/show_bug.cgi?id=233908 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: (TEST): 2021-12-08 J Pascoe [WebAuthn] Consider support for the displayName for FIDO authenticator https://bugs.webkit.org/show_bug.cgi?id=233389 rdar://84938707 Reviewed by Brent Fulgham. Add test for new field stored with platform authenticator: displayName * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-12-08 Truitt Savell Unreviewed, reverting r286596. broke 2 tests on iOS Reverted changeset: "Cocoa WebGL should support UI side compositing" https://bugs.webkit.org/show_bug.cgi?id=231009 https://commits.webkit.org/r286596 2021-12-08 Chris Dumez Make KVO work for WKWebpagePreferences._captivePortalModeEnabled https://bugs.webkit.org/show_bug.cgi?id=233954 Reviewed by Alex Christensen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[CaptivePortalModeKVO observeValueForKeyPath:ofObject:change:context:]): 2021-12-08 Aditya Keerthi [iOS] Add support for _UITextSearchOptions when finding a string https://bugs.webkit.org/show_bug.cgi?id=233957 rdar://86140673 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: (testPerformTextSearchWithQueryStringInWebView): (TEST): Add additional test cases for search options. 2021-12-07 Aditya Keerthi [iOS] Add initial support for find-in-page SPI https://bugs.webkit.org/show_bug.cgi?id=233915 rdar://86140501 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: (-[TestSearchAggregator initWithCompletionHandler:]): (-[TestSearchAggregator foundRange:forSearchString:inDocument:]): (-[TestSearchAggregator finishedSearching]): (TEST): Added an API test to verify that search results are found correctly. 2021-12-07 Wenson Hsieh Add support for `navigator.requestCookieConsent()` behind a disabled feature flag https://bugs.webkit.org/show_bug.cgi?id=233890 rdar://86117718 Reviewed by Darin Adler. Add several new API tests that enable the feature flag and exercise the API. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/CookieConsent.mm: Added. (-[CookieConsentDelegate _webView:requestCookieConsentWithMoreInfoHandler:decisionHandler:]): (TestWebKitAPI::createWebViewForTestingCookieConsent): (TestWebKitAPI::checkForString): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/cookie-consent-basic.html: Added. 2021-12-07 Yousuke Kimoto [webkitcorepy] Fail to install python module when a working directory is not on C drive on Windows https://bugs.webkit.org/show_bug.cgi?id=233936 Reviewed by Jonathan Bedard. On Windows, autoinstall.py installs python modules to C drive even if your working directory is on other drive (e.g. D drive). To install python modules correctly on Windows, a drive letter where your working directory exists needs to be given to "--root" option of "setup.py" in autoinstall.py. * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py: (Package.install): Added root_location to detect a right drive letter to isntall modules on Windows. 2021-12-07 Devin Rousso Add helper methods to `WebCore::FontShadow` for serializing to CSS and converting to `NSShadow` https://bugs.webkit.org/show_bug.cgi?id=233938 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebCore/FontShadowTests.cpp: Added. (TestWebKitAPI::TEST.FontShadow.InvalidColor): (TestWebKitAPI::TEST.FontShadow.NoOffsetOrBlurRadius): (TestWebKitAPI::TEST.FontShadow.NoOffset): (TestWebKitAPI::TEST.FontShadow.NegativeOffset): (TestWebKitAPI::TEST.FontShadow.NoBlurRadius): (TestWebKitAPI::TEST.FontShadow.NegativeBlurRadius): (TestWebKitAPI::TEST.FontShadow.AllNegative): * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2021-12-07 Jonathan Bedard [commits.webkit.org] Fallback to remote repository (Part 2) https://bugs.webkit.org/show_bug.cgi?id=233904 Reviewed by Dewei Zhu. * CISupport/ews-build/steps.py: (PushCommitToWebKitRepo.evaluateCommand): Wait before querying commits.webkit.org 2021-12-06 Jonathan Bedard [commits.webkit.org] Fallback to remote repository (Part 1) https://bugs.webkit.org/show_bug.cgi?id=233904 Reviewed by Dewei Zhu. * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version. * Scripts/libraries/reporelaypy/reporelaypy/checkout.py: (Checkout.Encoder.default): (Checkout.__init__): Allow user to specify a remote fallback repository. * Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py: (CheckoutRoute.commit): If no commit is found, query the fallback repository. * Scripts/libraries/reporelaypy/run: Add --fallback option. * Scripts/libraries/reporelaypy/setup.py: Bump version. 2021-12-07 Lauro Moura [reporelaypy] Autoinstall missing lupa fakeredis dependency https://bugs.webkit.org/show_bug.cgi?id=233934 Reviewed by Jonathan Bedard. Using the same version as resultsdbpy. Avoids ImportErrors running the webkitpy suite when they're not installed. * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Add lupa and bump version. * Scripts/libraries/reporelaypy/setup.py: Bump version. 2021-12-07 Kyle Piddington Roll ANGLE to include upstreamed Metal backend https://bugs.webkit.org/show_bug.cgi?id=220896 Reviewed by Ken Russell and Dean Jackson. Update script to take sources from main, instead of master. * Scripts/update-angle: 2021-12-07 Sihui Liu Fetch and remove file system data via WKWebsiteDataStore https://bugs.webkit.org/show_bug.cgi?id=233567 Reviewed by Youenn Fablet. * TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm: 2021-12-07 Jonathan Bedard [reporelaypy] Add implementation of commits.webkit.org (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=233734 Unreviewed follow-up fix. * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version, add sortedcontainers dependency. * Scripts/libraries/reporelaypy/setup.py: Bump version. 2021-12-07 Kimmo Kinnunen Cocoa WebGL should support UI side compositing https://bugs.webkit.org/show_bug.cgi?id=231009 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm: Add a dummy override of the new member function layerContentsDisplayDelegate. 2021-12-06 John Wilander Add WebCore::RegistrableDomain tests for duplicate sub domains https://bugs.webkit.org/show_bug.cgi?id=233902 Unreviewed expansion of the RegistrableDomain.MatchesURLs API test. https://bugs.webkit.org/show_bug.cgi?id=233330 claims that duplicate sub domains such as news.news.example.com causes WebKit's RegistrableDomain matching to fail and treat same-site content as cross-site. This patch add tests of such duplicate sub domains. * TestWebKitAPI/Tests/WebCore/RegistrableDomain.cpp: (TestWebKitAPI::TEST): 2021-12-06 Brady Eidson webpushd/webpushtool debugging additions https://bugs.webkit.org/show_bug.cgi?id=233864 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::TEST): Adapt to debug message changes. 2021-12-04 Jonathan Bedard [reporelaypy] Add implementation of commits.webkit.org https://bugs.webkit.org/show_bug.cgi?id=233734 Reviewed by Dewei Zhu. As commits.webkit.org becomes more important to WebKit development, we need to apply our normal robust testing and review to the code backing it. * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Add entrypoint to library. * Scripts/libraries/reporelaypy/reporelaypy/checkout.py: Added. (Checkout): Abstraction managing local repository checkout. * Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py: Added. (Redirector): Generates redirects for certain SCM services. (CheckoutRoute): http routes returning information based on a checkout. * Scripts/libraries/reporelaypy/reporelaypy/database.py: Added. (Database): A connection to a true Redis or TinyRedis database. * Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py: (CheckoutUnittest): * Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py: Added. (RedirectorUnittest): (CheckoutRouteUnittest): * Scripts/libraries/reporelaypy/reporelaypy/tests/database_unittest.py: Added. (DatabaseUnittest): * Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Copied from Tools/Scripts/libraries/webkitflaskpy/setup.py. (health): * Scripts/libraries/reporelaypy/run: Added. * Scripts/libraries/reporelaypy/setup.py: Added. * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version. * Scripts/libraries/resultsdbpy/resultsdbpy/flask_support/flask_testcase.py: (FlaskTestCase.run_with_mock_webserver.decorator.real_method): (FlaskRequestsResponse): Moved to webkitflaskpy. * Scripts/libraries/webkitflaskpy/setup.py: Bump version, update library description. * Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: Bump version. * Scripts/libraries/webkitflaskpy/webkitflaskpy/mock_app.py: Added. (mock_app): Setup a flask app for testing. * Scripts/libraries/webkitflaskpy/webkitflaskpy/response.py: Added. (Response): Move FlaskRequestsResponse to more generic location. * Scripts/webkitpy/__init__.py: Include reporelaypy for testing. * Scripts/webkitpy/test/main.py: (main): Include reporelaypy for testing. (Tester._run_tests): Ditto. 2021-12-06 Ryan Haddad REGRESSION (r286507): [macOS] Many file system access layout tests became flaky failures https://bugs.webkit.org/show_bug.cgi?id=233892 Unreviewed, revert r286507. * TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm: 2021-12-06 Jon Lee Update GPU Process feature flags https://bugs.webkit.org/show_bug.cgi?id=232547 rdar://83905400 Reviewed by Wenson Hsieh. * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): Update features that are set when using `run-webkit-tests --use-gpu-process`. * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): Turn off DOM Rendering on layout test bots for the time being. 2021-12-06 Matt Gilligan [iOS] Allow WKWebView clients to override undoManager https://bugs.webkit.org/show_bug.cgi?id=233297 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (-[CustomUndoManagerWebView undoManager]): (TestWebKitAPI::TEST): 2021-12-06 Wenson Hsieh [iOS] AppHighlights.AppHighlightCreateAndRestoreAndScroll is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=233828 Reviewed by Tim Horton. This test began to sometimes fail on iOS 15 API test runners in EWS after enabling `APP_HIGHLIGHTS` in non- internal builds. Make this test more robust by waiting for scrolling to the restored highlight. * TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm: (TestWebKitAPI::TEST): 2021-12-06 Alex Christensen WKWebpagePreferences._activeContentRuleListActionPatterns should be an NSDictionary of identifier to allowed patterns https://bugs.webkit.org/show_bug.cgi?id=233842 Reviewed by Timothy Hatcher. * TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm: (navigationDelegateAllowingActiveActionsOnTestHost): (TEST_F): 2021-12-05 Said Abou-Hallawa [GPU Process] Add the encoding/decoding for Filter and FilterEffect https://bugs.webkit.org/show_bug.cgi?id=232844 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: 2021-12-05 Simon Fraser Add trace points for generated momentum events https://bugs.webkit.org/show_bug.cgi?id=233857 Reviewed by Tim Horton. Add start/end points for synthetic momentum, and a trace point for each generated event. * Tracing/SystemTracePoints.plist: 2021-12-04 Andres Gonzalez Change WTR::AccessibilityUIElement::descriptionOfValue(id) to return a RetainPtr. https://bugs.webkit.org/show_bug.cgi?id=233815 Reviewed by Chris Fleizach. This fixes several tests in isolated tree mode, in particular: accessibility/mac/focus-crash.html accessibility/mac/search-predicate.html * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::descriptionOfValue const): (WTR::AccessibilityUIElement::allAttributes): (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): (WTR::AccessibilityUIElement::role): (WTR::AccessibilityUIElement::subrole): (WTR::AccessibilityUIElement::roleDescription): (WTR::AccessibilityUIElement::computedRoleString): (WTR::AccessibilityUIElement::title): (WTR::AccessibilityUIElement::description): (WTR::AccessibilityUIElement::orientation const): (WTR::AccessibilityUIElement::stringValue): (WTR::AccessibilityUIElement::language): (WTR::AccessibilityUIElement::helpText const): (WTR::AccessibilityUIElement::embeddedImageDescription const): 2021-12-03 Wenson Hsieh [iOS] Web content process sometimes crashes under WebPage::positionInformation() https://bugs.webkit.org/show_bug.cgi?id=233841 rdar://85917212 Reviewed by Geoffrey Garen. Add a test that exercises hit-testing for Live Text, but induces this crash by hit-testing outside of the bounds of the web view (such that the hit-tested node ends up as null). * TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm: (TestWebKitAPI::swizzledLocationInView): (TestWebKitAPI::TEST): 2021-12-03 John Wilander PCM: Unlinkable tokens for triggering event to prevent fraud https://bugs.webkit.org/show_bug.cgi?id=233673 Reviewed by Alex Christensen. New test PrivateClickMeasurement.DestinationClickFraudPrevention. The other changes are a report version bump 2->3 and a name change FraudPrevention–>SourceClickFraudPrevention. * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::runBasicPCMTest): (TestWebKitAPI::triggerAttributionWithSubresourceRedirect): Extracted shared code. (TestWebKitAPI::runDestinationWebView): Extracted shared code. (TestWebKitAPI::signUnlinkableTokenAndSendSecretToken): Extracted shared code. (TestWebKitAPI::TEST): New test PrivateClickMeasurement.DestinationClickFraudPrevention. Extracted shared code from PrivateClickMeasurement.SourceClickFraudPrevention. 2021-12-03 Sihui Liu Fetch and remove file system data via WKWebsiteDataStore https://bugs.webkit.org/show_bug.cgi?id=233567 Reviewed by Youenn Fablet. * TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm: 2021-12-03 Chris Dumez Follow-up to r286479 to add API test and address issues found by the test https://bugs.webkit.org/show_bug.cgi?id=233798 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-12-03 Alex Christensen Add room for more bytecode in WKContentRuleList file format https://bugs.webkit.org/show_bug.cgi?id=233780 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: 2021-12-03 Youenn Fablet Persist NavigationPreloadState in service worker registration database https://bugs.webkit.org/show_bug.cgi?id=233698 Reviewed by Chris Dumez. Increase counter from 7 to 8. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2021-12-02 Jean-Yves Avenard Compilation error on Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm https://bugs.webkit.org/show_bug.cgi?id=233797 rdar://problem/86000569 Unreviewed API test build fix. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: 2021-11-29 Jonathan Bedard [resultsdbpy] Make Python 3.10 compatible https://bugs.webkit.org/show_bug.cgi?id=233771 Reviewed by Dewei Zhu. * Scripts/libraries/resultsdbpy/resultsdbpy/model/configuration_context.py: 2021-12-02 Jonathan Bedard [git-webkit] Handle ambiguous branch names in land https://bugs.webkit.org/show_bug.cgi?id=233763 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.rebase): Be explicit about the name of the target branch when modifying timestamps. 2021-12-02 Devin Rousso [css-values-4] Support `*vi` (inline) and `*vb` (block) viewport units https://bugs.webkit.org/show_bug.cgi?id=232895 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.html: * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.svg: Added. * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: (TEST.CSSViewportUnits.AllSame): (TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides): (TEST.CSSViewportUnits.SameUnobscuredSizeOverrides): (TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides): (TEST.CSSViewportUnits.SVGDocument): Added. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2021-12-02 Chris Dumez [WK2] Make Web Lock API work across multiple WebProcesses https://bugs.webkit.org/show_bug.cgi?id=233719 Reviewed by Alex Christensen. Add API test coverage. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WebLocks.mm: Added. (TestWebKitAPI::TEST): 2021-12-02 Wenson Hsieh [ Monterey ] fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html (layout-test) is a constant text failure https://bugs.webkit.org/show_bug.cgi?id=233658 rdar://problem/85886424 Reviewed by Tim Horton. Add a forward declaration for open source builds. * TestWebKitAPI/ios/UIKitSPI.h: 2021-12-02 Brady Eidson REGRESSION: r286075 [ Big Sur x86] 2 TestWebKitAPI.WebPushD (API-Tests) are constant failures https://bugs.webkit.org/show_bug.cgi?id=233726 Unreviewed gardening. - Disabling these tests on all Mac platforms until we can figure out the code signing/etc situation - Fix the truly broken "basic" test everywhere by adapting to messaging changes * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::TEST): 2021-12-02 Carlos Garcia Campos Unreviewed. [GTK] Use nullptr instead of 0 in JSStringCreateWithCharacters() * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): (WTR::AccessibilityUIElement::attributesOfDocumentLinks): (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): (WTR::AccessibilityUIElement::stringAttributeValue): (WTR::AccessibilityUIElement::parameterizedAttributeNames): (WTR::AccessibilityUIElement::role): (WTR::AccessibilityUIElement::subrole): (WTR::AccessibilityUIElement::computedRoleString): (WTR::AccessibilityUIElement::stringValue): (WTR::AccessibilityUIElement::language): (WTR::AccessibilityUIElement::helpText const): (WTR::AccessibilityUIElement::speakAs): (WTR::AccessibilityUIElement::ariaDropEffects const): (WTR::AccessibilityUIElement::rangeForLine): (WTR::AccessibilityUIElement::rangeForPosition): (WTR::AccessibilityUIElement::boundsForRange): (WTR::AccessibilityUIElement::stringForRange): (WTR::AccessibilityUIElement::attributedStringForRange): (WTR::AccessibilityUIElement::attributesOfColumnHeaders): (WTR::AccessibilityUIElement::attributesOfRowHeaders): (WTR::AccessibilityUIElement::attributesOfColumns): (WTR::AccessibilityUIElement::attributesOfRows): (WTR::AccessibilityUIElement::attributesOfVisibleCells): (WTR::AccessibilityUIElement::attributesOfHeader): (WTR::AccessibilityUIElement::rowIndexRange): (WTR::AccessibilityUIElement::columnIndexRange): (WTR::AccessibilityUIElement::selectedTextRange): (WTR::AccessibilityUIElement::accessibilityValue const): (WTR::AccessibilityUIElement::documentEncoding): (WTR::AccessibilityUIElement::documentURI): (WTR::AccessibilityUIElement::url): (WTR::AccessibilityUIElement::stringForTextMarkerRange): (WTR::AccessibilityUIElement::rectsForTextMarkerRange): (WTR::AccessibilityUIElement::characterAtOffset): 2021-12-01 Carlos Garcia Campos [GTK][a11y] Add implementation of table and table cell interfaces when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=233694 Reviewed by Adrian Perez de Castro. Add unit tests and WTR implementation for tables. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testTableBasic): (beforeAll): * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::rowAtIndex): (WTR::elementsVector): (WTR::attributesOfElements): (WTR::AccessibilityUIElement::attributesOfChildren): (WTR::AccessibilityUIElement::numberAttributeValue): (WTR::makeJSArray): (WTR::AccessibilityUIElement::rowHeaders const): (WTR::AccessibilityUIElement::columnHeaders const): (WTR::AccessibilityUIElement::attributesOfColumnHeaders): (WTR::AccessibilityUIElement::attributesOfRowHeaders): (WTR::AccessibilityUIElement::attributesOfRows): (WTR::AccessibilityUIElement::attributesOfVisibleCells): (WTR::AccessibilityUIElement::rowCount): (WTR::AccessibilityUIElement::columnCount): (WTR::AccessibilityUIElement::rowIndexRange): (WTR::AccessibilityUIElement::columnIndexRange): (WTR::AccessibilityUIElement::cellForColumnAndRow): 2021-12-01 Sihui Liu FileSystemSyncAccessHandle should be invalidated when network process crashes https://bugs.webkit.org/show_bug.cgi?id=232605 Reviewed by Youenn Fablet. * TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm: (test): (keepAccessHandleActive): 2021-12-01 Carlos Alberto Lopez Perez [EWS][GTK][WPE] Add a new Class for running layout tests on the EWS for the GTK and WPE ports. https://bugs.webkit.org/show_bug.cgi?id=231999 Reviewed by Jonathan Bedard. This patch adds a new class to the EWS for running layout tests for the GTK and WPE ports. It will be used initially for the GTK port and later for the WPE one. Mac/iOS ports will continue to use the current default EWS, so no behaviour change for them. This new class is specially designed to: A. Work with a tree that is not always green (or even that is often quite red). B. To not report any false positive to the patch author. C. To allow patch authors to use this EWS to get new expectations for patches that need lot of new re-baselines (like a WPT import) The very simplified logic of how this works is the following: 1. Run layout tests with patch (abort early at 500 unexpected failures) 2. Run layout tests with patch 10 times for each test that failed consistently (non-flaky) on step 1. 3. Run layout tests without patch 10 times for each test that failed consistently (non-flaky) on step 2. Then report to the patch author only the new consistent failures (tests that failed always with the patch and passed always without the patch, retrying 10 times) Any flaky test found is only reported to the bot watchers. For an explainer about why this is needed, and more details about the flow diagram and several design considerations, please check: https://people.igalia.com/clopez/wkbug/231999/explainer.html The patch also add 3 new workers to the queue (to a total of 8) to speed up testing. * CISupport/ews-build/config.json: * CISupport/ews-build/factories.py: (GTKTestsFactory): * CISupport/ews-build/layout_test_failures.py: (LayoutTestFailures.__init__): (LayoutTestFailures.results_from_string): (LayoutTestFailures.results_from_string.get_failing_tests): * CISupport/ews-build/steps.py: (BufferLogHeaderObserver): (BufferLogHeaderObserver.__init__): (BufferLogHeaderObserver.headerReceived): (BufferLogHeaderObserver.getHeaders): (BugzillaMixin.send_email_for_infrastructure_issue): (Trigger.propertiesToPassToTriggers): (RunWebKitTests.setLayoutTestCommand): (RunWebKitTests.start): (RunWebKitTests.commandComplete): (ReRunWebKitTests.evaluateCommand): (ReRunWebKitTests.commandComplete): (RunWebKitTestsWithoutPatch.commandComplete): (AnalyzeLayoutTestsResults.report_failure): (AnalyzeLayoutTestsResults.send_email_for_flaky_failure): (AnalyzeLayoutTestsResults.send_email_for_new_test_failures): (AnalyzeLayoutTestsResults.start): (RunWebKit1Tests.start): (RunWebKitTestsRedTree): (RunWebKitTestsRedTree._did_command_timed_out): (RunWebKitTestsRedTree.evaluateCommand): (RunWebKitTestsRepeatFailuresRedTree): (RunWebKitTestsRepeatFailuresRedTree.__init__): (RunWebKitTestsRepeatFailuresRedTree.setLayoutTestCommand): (RunWebKitTestsRepeatFailuresRedTree.evaluateCommand): (RunWebKitTestsRepeatFailuresRedTree.commandComplete): (RunWebKitTestsRepeatFailuresRedTree.start): (RunWebKitTestsRepeatFailuresWithoutPatchRedTree): (RunWebKitTestsRepeatFailuresWithoutPatchRedTree.__init__): (RunWebKitTestsRepeatFailuresWithoutPatchRedTree.setLayoutTestCommand): (RunWebKitTestsRepeatFailuresWithoutPatchRedTree.evaluateCommand): (RunWebKitTestsRepeatFailuresWithoutPatchRedTree.commandComplete): (RunWebKitTestsRepeatFailuresWithoutPatchRedTree.start): (RunWebKitTestsWithoutPatchRedTree): (RunWebKitTestsWithoutPatchRedTree.evaluateCommand): (AnalyzeLayoutTestsResultsRedTree): (AnalyzeLayoutTestsResultsRedTree.report_success): (AnalyzeLayoutTestsResultsRedTree.report_warning): (AnalyzeLayoutTestsResultsRedTree.report_infrastructure_issue_and_maybe_retry_build): (AnalyzeLayoutTestsResultsRedTree.send_email_for_pre_existent_failures): (AnalyzeLayoutTestsResultsRedTree.start): * CISupport/ews-build/steps_unittest.py: 2021-12-01 Alex Christensen Use Span instead of pointer/length in CompiledContentExtension https://bugs.webkit.org/show_bug.cgi?id=233727 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: 2021-12-01 Chris Dumez Unreviewed API test build fix. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: 2021-12-01 Alex Christensen Add csp-report resource type to WKContentRuleList https://bugs.webkit.org/show_bug.cgi?id=233675 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::compareContents): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (TEST): 2021-12-01 Ryan Haddad [ iOS ] TestWebKitAPI.ApplicationManifest.IconCoding is a constant failure https://bugs.webkit.org/show_bug.cgi?id=233715 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: (TestWebKitAPI::TEST): Remove a fragile assertion about the size of NSKeyedArchive that is causing the test to fail on iOS. 2021-12-01 W.D. Xiong [macOS] run-benchmark should take diagnostic screenshots upon test timeout https://bugs.webkit.org/show_bug.cgi?id=232736 Reviewed by Dewei Zhu. Added defaults for the --diagnose-directory flag depending on platform. Added diagnose_test_failure method to OSXBrowserDriver to take screenshots and save to diagnostic directory. * Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py: (OSXBrowserDriver._save_screenshot_to_path): (OSXBrowserDriver): (OSXBrowserDriver.diagnose_test_failure): 2021-12-01 Jonathan Bedard [webkitscmpy] Do not query remotes when determining branches containing commit https://bugs.webkit.org/show_bug.cgi?id=233700 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.branches_for): Remove -a from --contains check. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: 2021-12-01 Tim Horton REGRESSION (r286346): ResourceLoadDelegate.LoadInfo fails https://bugs.webkit.org/show_bug.cgi?id=233689 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm: This test asserts that archiving a _WKResourceLoadInfo via NSKeyedArchiver encodes to a particular size (607 bytes). If you look at the resultant plist before r286346, the encoded frameID and resourceLoadID have the same value, and because of NSKeyedArchiver deduplication, share the same object. If you look at the resultant plist *after* r286346, the encoded frameID is one larger than the resourceLoadID, thus cannot be deduplicated, and end up encoding as separate objects. This results in the encoded size increasing to 612 bytes. The reason that the encoded frameID is now one value larger is that ObjectIdentifier uses a global identifier pool, and r286346 creates one more ObjectIdentifier during EventHandler construction, destroying our entirely coincidental ID overlap, and causing the aforementioned encoded size change. Remove this assertion from the test, since it is very aggressive and seems unnecessary. We could instead just rebaseline the test, but it seems insufficiently important to burden some future developer with a repeat of this evening of exploration and discovery. 2021-12-01 Brady Eidson Add WKWebsiteDataStore configuration option to enable Mock app bundle testing. https://bugs.webkit.org/show_bug.cgi?id=233679 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: 2021-11-30 Devin Rousso [css-values-4] Dynamic `dv*` viewport units should not respect the page scale https://bugs.webkit.org/show_bug.cgi?id=233291 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.html: * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: (evaluateForNumber): (dimensionOfElement): Added. (widthOfElementWithID): Added. (heightOfElementWithID): ADded. (viewportUnitLength): Added. (TEST.CSSViewportUnits.AllSame): (TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides): (TEST.CSSViewportUnits.SameUnobscuredSizeOverrides): (TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides): (getElementHeight): Deleted. 2021-11-30 BJ Burg Web Inspector: add ExtensionTabActivation diagnostic event https://bugs.webkit.org/show_bug.cgi?id=233101 Reviewed by Devin Rousso. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm: (TEST): Start using new method parameter 'extensionBundleIdentifier'. 2021-11-30 Brent Fulgham Correct serialization error in _WKApplicationManifestIcon https://bugs.webkit.org/show_bug.cgi?id=233602 Reviewed by Devin Rousso. This patch adds a new test "ApplicationManifest.IconCoding" to exercise the NSCoder code paths. * TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: (TestWebKitAPI::TEST): 2021-11-30 Chris Dumez Scripting attributes are sometimes not properly stripped from elements when JS is disabled https://bugs.webkit.org/show_bug.cgi?id=233642 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm: (TEST): 2021-11-30 Tyler Wilcock AX: Reduce repetition in retrieving typed attribute values in AccessibilityUIElementMac https://bugs.webkit.org/show_bug.cgi?id=233603 Reviewed by Chris Fleizach. We have a lot of functions in both the WebKitTestRunner and DumpRenderTree versions of AccessibilityUIElementMac that repeat the same logic for getting a typed attribute value. We can make this simpler. * DumpRenderTree/AccessibilityUIElement.h: * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (AccessibilityUIElement::stringAttributeValue): Move core logic to new stringAttributeValue(NSString* attribute) function. (AccessibilityUIElement::stringAttributeValue const): Added. (AccessibilityUIElement::numberAttributeValue): Move core logic to new numberAttributeValue(NSString* attribute) function. (AccessibilityUIElement::numberAttributeValue const): Added. (AccessibilityUIElement::boolAttributeValue const): Added. (AccessibilityUIElement::boolAttributeValue): Move core logic to new boolAttributeValue(NSString* attribute) function. (AccessibilityUIElement::domIdentifier const): (AccessibilityUIElement::intValue const): (AccessibilityUIElement::minValue): (AccessibilityUIElement::maxValue): (AccessibilityUIElement::isEnabled): (AccessibilityUIElement::isRequired const): (AccessibilityUIElement::isFocused const): (AccessibilityUIElement::isSelected const): (AccessibilityUIElement::isExpanded const): (AccessibilityUIElement::ariaIsGrabbed const): (AccessibilityUIElement::documentEncoding): (AccessibilityUIElement::documentURI): (AccessibilityUIElement::isOnScreen const): (AccessibilityUIElement::hasPopup const): (AccessibilityUIElement::popupValue const): (AccessibilityUIElement::hasDocumentRoleAncestor const): (AccessibilityUIElement::hasWebApplicationAncestor const): (AccessibilityUIElement::isInDescriptionListDetail const): (AccessibilityUIElement::isInDescriptionListTerm const): (AccessibilityUIElement::isInCell const): Refactor to use new `NSString *attribute` convenience functions. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::stringAttributeValue): Move core logic to new stringAttributeValue(NSString* attribute) function. (WTR::AccessibilityUIElement::stringAttributeValue const): Added. (WTR::AccessibilityUIElement::numberAttributeValue): Move core logic to new numberAttributeValue(NSString* attribute) function. (WTR::AccessibilityUIElement::numberAttributeValue const): Added. (WTR::AccessibilityUIElement::boolAttributeValue const): Added. (WTR::AccessibilityUIElement::boolAttributeValue): Move core logic to new boolAttributeValue(NSString* attribute) function. (WTR::AccessibilityUIElement::domIdentifier const): (WTR::AccessibilityUIElement::intValue const): (WTR::AccessibilityUIElement::minValue): (WTR::AccessibilityUIElement::maxValue): (WTR::AccessibilityUIElement::isEnabled): (WTR::AccessibilityUIElement::isRequired const): (WTR::AccessibilityUIElement::isFocused const): (WTR::AccessibilityUIElement::isExpanded const): (WTR::AccessibilityUIElement::currentStateValue const): (WTR::AccessibilityUIElement::sortDirection const): (WTR::AccessibilityUIElement::ariaIsGrabbed const): (WTR::AccessibilityUIElement::documentEncoding): (WTR::AccessibilityUIElement::documentURI): (WTR::AccessibilityUIElement::hasPopup const): (WTR::AccessibilityUIElement::popupValue const): (WTR::AccessibilityUIElement::hasDocumentRoleAncestor const): (WTR::AccessibilityUIElement::hasWebApplicationAncestor const): (WTR::AccessibilityUIElement::isInDescriptionListDetail const): (WTR::AccessibilityUIElement::isInDescriptionListTerm const): (WTR::AccessibilityUIElement::isInCell const): Refactor to use new `NSString *attribute` convenience functions. 2021-11-29 Jonathan Bedard [git-webkit] Use info log level instead of warning https://bugs.webkit.org/show_bug.cgi?id=233607 Reviewed by Ryan Haddad. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py: (Branch.branch_point): Log to info instead of warning. (Branch.main): Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/checkout.py: (Checkout.main): Log to info instead of warning. * Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py: (Land.main): Log to info instead of warning. * Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py: (PullRequest.create_commit): Log to info instead of warning. (PullRequest.main): Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: (Setup.github): Log to info instead of warning. (Setup.git): Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py: (TestBranch.test_basic_git): (TestBranch.test_prompt_git): * Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py: (TestLand.test_non_editable): (TestLand.test_with_oops): (TestLand.test_default): (TestLand.test_canonicalize): (TestLand.test_no_svn_canonical_svn): (TestLand.test_svn): * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: * Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py: (TestSetup.test_svn): (TestSetup.test_github): 2021-11-29 Simon Fraser Store image resolution in layout test snapshots, and have ImageDiff read it https://bugs.webkit.org/show_bug.cgi?id=233609 Reviewed by Darin Adler. On the way to fixing bug 232525, we need to communicate to ImageDiff the resolution of layout test snapshots so that it can account for the resolution when computing pixel tolerance values, which should be reported in CSS pixels. So have DumpRenderTree and WebKitTestRunner, on Cocoa platforms, add image resolution metadata, where a 2x snapshot (i.e. a hidpi test) reports a horizontal and vertical resolution of 144dpi. Change ImageDiff to read these values and store them in PlatformImage; a future patch will make use of the data. * DumpRenderTree/cg/PixelDumpSupportCG.cpp: (printPNG): (dumpBitmap): * DumpRenderTree/cg/PixelDumpSupportCG.h: (BitmapContext::scaleFactor const): (BitmapContext::setScaleFactor): * DumpRenderTree/ios/PixelDumpSupportIOS.mm: (createBitmapContextFromWebView): * DumpRenderTree/mac/PixelDumpSupportMac.mm: (createBitmapContextFromWebView): * ImageDiff/ImageDiff.cpp: (main): * ImageDiff/PlatformImage.h: (ImageDiff::PlatformImage::scaleFactor const): * ImageDiff/cg/PlatformImageCG.cpp: (ImageDiff::createImageFromDataProvider): (ImageDiff::PlatformImage::createFromFile): (ImageDiff::PlatformImage::createFromStdin): (ImageDiff::PlatformImage::PlatformImage): * WebKitTestRunner/cg/TestInvocationCG.cpp: (WTR::dumpBitmap): (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): 2021-11-29 Jonathan Bedard [webkitscmpy] Guard git-webkit with __name__ https://bugs.webkit.org/show_bug.cgi?id=233278 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/git-webkit: 2021-11-29 Jonathan Bedard [webkitcorepy] Delete unused environment variables https://bugs.webkit.org/show_bug.cgi?id=233565 Reviewed by Dewei Zhu. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/environment.py: (Environment.__init__): Keep track of sure environment files. (Environment.load): Ditto. (Environment.secure): Delete all unused environment files, since they may contain credentials. * Scripts/libraries/webkitcorepy/webkitcorepy/tests/environment_unittest.py: (TestEnvironment.test_secure): 2021-11-29 Lauro Moura [webkitcorepy] Environment: Sort values before comparing in unittest https://bugs.webkit.org/show_bug.cgi?id=233582 Reviewed by Jonathan Bedard. While Python3.6+'s dicts happen to keep insertion order, `os.listdir` does not guarantee the order of the listed items[1]. This may cause the Environment unittest to fail when comparing to the fixed expected data, as it has been happending in some GTK/WPE bots. [1] https://docs.python.org/3/library/os.html#os.listdir * Scripts/libraries/webkitcorepy/webkitcorepy/tests/environment_unittest.py: (TestEnvironment.test_list): 2021-11-29 Wenson Hsieh WKContentView should allow -captureTextFromCamera: with a caret selection unless the sender is the callout bar https://bugs.webkit.org/show_bug.cgi?id=233378 rdar://85478344 Reviewed by Tim Horton. Adjust an API test to exercise the changes. See WebKit/ChangeLog for more details. * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: 2021-11-29 Yusuke Suzuki [JSC] Move m_incomingPolymorphicCalls out of CodeBlock::JITData https://bugs.webkit.org/show_bug.cgi?id=233415 Reviewed by Mark Lam and Darin Adler. Add tests for SentinelLinkedList. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp: Added. (TestWebKitAPI::TestNode::TestNode): (TestWebKitAPI::TestNode::value const): (TestWebKitAPI::TEST): 2021-11-29 Lauro Moura [webkitflaskpy] Make sure flask is registered before importing webkitflaskpy https://bugs.webkit.org/show_bug.cgi?id=233561 Reviewed by Jonathan Bedard. bug233339 moved AuthedBlueprint to webkitflaskpy, but flask needs to be registered before being imported to make sure AutoInstall takes care of it. This avoids `ModuleNotFound: flask` errors running the tests from a clean tree. * Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: 2021-11-29 Angelos Oikonomopoulos Consider Source/cmake relevant for JSC https://bugs.webkit.org/show_bug.cgi?id=233552 Reviewed by Aakash Jain. Changes in Source/cmake may well be relevant for JSC. * CISupport/ews-build/steps.py: (CheckPatchRelevance): 2021-11-29 Nikolas Zimmermann [LBSE] Add runtime flag for Layer-based SVG engine (LBSE) https://bugs.webkit.org/show_bug.cgi?id=233211 Reviewed by Sam Weinig. Add build option ('build-webkit --(no-)layer-based-svg-engine') and runtime flag ('LayerBasedSVGEngineEnabled' in LBSE enabled builds) to switch between the SVG engines. The actual SVG code changes will follow in subsequent patches, this just adds the infrastructure for LBSE. * Scripts/webkitperl/FeatureList.pm: Add mapping from 'layer-based-svg-engine' -> 'ENABLE_LAYER_BASED_SVG_ENGINE'. 2021-11-27 Carlos Garcia Campos [GTK][a11y] Signal state-changed:selected is not emitted for listbox elements when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=233521 Reviewed by Adrian Perez de Castro. Add test cases to check that the signal is now emitted as expected. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (AccessibilityTest::isSelected): (testAccessibleStateChanged): (testSelectionListBox): (testSelectionMenuList): 2021-11-26 Lauro Moura [GTK] Gardening API test WebKit.OnDeviceChangedCrash as flaky timeout Unreviewed test gardening. Flakiness seems to have been introduced between 243131@main and 243249@main. * TestWebKitAPI/glib/TestExpectations.json: 2021-11-26 Carlos Garcia Campos [GTK][a11y] MenuListPopup elements should implement selection interface too when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=233519 Reviewed by Adrian Perez de Castro. Add a test case for menu list. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testSelectionListBox): (testSelectionMenuList): (beforeAll): 2021-11-26 Carlos Garcia Campos [GTK][a11y] Add implementation of selection interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=233494 Reviewed by Adrian Perez de Castro. Add tests case for selection interface and WTR implementation. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testSelectionListBox): (beforeAll): * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::selectedChildAtIndex const): (WTR::AccessibilityUIElement::selectedChildrenCount const): (WTR::AccessibilityUIElement::setSelectedChildAtIndex const): (WTR::AccessibilityUIElement::removeSelectionAtIndex const): (WTR::AccessibilityUIElement::clearSelectedChildren const): 2021-11-25 Jean-Yves Avenard Avoid flattening a SharedBuffer when reading reading it through SharedBufferChunkReader. https://bugs.webkit.org/show_bug.cgi?id=233481 rdar://problem/85733358 Reviewed by Cameron McCormack. Add API tests. API tests original data come from the original bug that added SharedBufferChunkReader (bug 59946) and then expanded. * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): (TestWebKitAPI::readAllChunks): (TestWebKitAPI::checkChunks): (TestWebKitAPI::checkDataInRange): * TestWebKitAPI/Tests/WebCore/SharedBufferTest.h: 2021-11-25 Lauro Moura [GTK] Gardening API test authentication-success flaky timeout Unreviewed test gardening. * TestWebKitAPI/glib/TestExpectations.json: 2021-11-25 Kimmo Kinnunen GraphicsContextGL implementations should have separate class definitions https://bugs.webkit.org/show_bug.cgi?id=233491 Reviewed by Antti Koivisto. Adjust TestGraphicsContextGLOpenGLCocoa to TestGraphicsContextGLCocoa after GraphicsContextGLOpenGL Cocoa variant rename to GraphicsContextGLCocoa. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm: Renamed from Tools/TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm. (TestWebKitAPI::createDefaultTestContext): (TestWebKitAPI::changeContextContents): (TestWebKitAPI::TEST_F): 2021-11-25 Kimmo Kinnunen ANGLE Metal: The memory backing IOSurfaces of former client buffer pbuffers is leaked https://bugs.webkit.org/show_bug.cgi?id=233328 Reviewed by Antti Koivisto. Add tests testing Cocoa GraphicsContextGLOpenGL drawing buffer recycling behavior. * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: * TestWebKitAPI/Sources.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp: (TestWebKitAPI::imageBufferPixelIs): (TestWebKitAPI::memoryFootprintChangedBy): Deleted. * TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm: (TestWebKitAPI::createDefaultTestContext): (TestWebKitAPI::changeContextContents): (TestWebKitAPI::TEST): * TestWebKitAPI/TestUtilities.h: Added. * TestWebKitAPI/TestUtilities.cpp: Added. Add few useful functions to TestUtilities.h so that different tests can use them. 2021-11-23 Lauro Moura [GTK] GdkRGBA expects colors to be in the 0.0 to 1.0 range https://bugs.webkit.org/show_bug.cgi?id=233452 Reviewed by Michael Catanzaro. GTK4 debug was hitting assertInRange inside ColorTypes.h due to 255 being used as the max value, while GdkRGBA expects the value to be between 0.0 and 1.0, per the official docs [1][2]. [1] https://docs.gtk.org/gdk3/struct.RGBA.html [2] https://docs.gtk.org/gdk4/struct.RGBA.html * MiniBrowser/gtk/BrowserWindow.c: 2021-11-23 Carlos Garcia Campos [GTK] Change hardware-acceleration-policy setting default value to always https://bugs.webkit.org/show_bug.cgi?id=233418 Reviewed by Michael Catanzaro. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp: (testWebKitSettings): 2021-11-23 Angelos Oikonomopoulos Fix buildbot command timeout issue for remote tests https://bugs.webkit.org/show_bug.cgi?id=233309 Reviewed by Adrian Perez de Castro. Occasionally, buildbots that execute the JSC tests on remote devices would stop producing any output and eventually get killed due to a timeout. The issue is that run-jsc-stress-tests would start an ssh command (overwhelmingly likely, the command to copy over the payload), then the remote board would stop responding. Introduce a timeout option to forEachRemote and bound the waiting time. Could also do this for each command individually (and this would make it straightforward to GC zombie processes) but seems way more fragile than doing it at the thread level. * Scripts/run-jsc-stress-tests: 2021-11-22 Wenson Hsieh Remove old concurrent display list logic that's no longer necessary https://bugs.webkit.org/show_bug.cgi?id=233433 Reviewed by Sam Weinig. See WebCore ChangeLog for more details. * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: (TestWebKitAPI::TEST): 2021-11-22 Geza Lore [JSC] Make sharing of unlinked baseline code possible on JSVALUE32_64 https://bugs.webkit.org/show_bug.cgi?id=232624 Reviewed by Yusuke Suzuki. Add extra SunSpider run on 32-bit platforms exerciseing baseline JIT code sharing. * Scripts/run-javascriptcore-tests: (runJSCStressTests): 2021-11-22 Angelos Oikonomopoulos Move detection of flaky JSC tests to run-jsc-stress-tests https://bugs.webkit.org/show_bug.cgi?id=232529 Reviewed by Jonathan Bedard. Currently, flaky detection happens by ReRunJavaScriptCoreTests. Unfortunately, this means that we end up rerunning all JSC tests when there's even a single failure. Even worse, when the tree is broken (as sometimes happens on ARM32 and MIPS) we end up 1. running the tests once (they fail) 2. running all tests again 3. running all tests again without the patch This means the queue slows down a lot, since it runs all JSC stress tests 3 times. This patch attempts to eliminate step 2, while also being more reliable about handling flaky tests. Since we no longer need to rerun the whole test suite, we can spend more CPU time on identifying tests that might be flaky. The user can pass in --treat-failing-as-flaky=passPercentage,maxTries,maxFailing. If less than maxFailing tests failed, we run them again (up to maxTries) until we can tell whether they pass more than passPercentage of the time. This should result in less false positives compared to ReRunJavaScriptCoreTests, as we'll no longer declare a flaky test a failure if it happens to fail two times in a row. In order to remove ReRunJavaScriptCoreTests, the patch unconditionally enables --treat-failing-as-flaky by default in the JSC EWS queues. Implementation-wise, the patch generalizes the existing retry loop in run-jsc-stress-tests (for dealing with flaky remote hosts) to (a) work with any runner and (b) also retry flaky tests. As flaky handling is impractical to test manually, it also abstracts-out the retry logic so that we can test with predetermined results. This means we need to e.g. pass the runlist around instead of treating it as a global, capturing the main logic in classes and having a subclass provide methods to be called back and so on. The patch does not shy away from refactoring code when it makes sense but also doesn't go out of its way to refactor (e.g. there's still a lot of duplication between the default and ruby writers). Downsides: we can no longer detect flakiness in the binary tests (testair, testb3, ...). However, I'm not aware of any instance of flakiness in those tests. The retry loop is now being used for all runners, which means the results analysis path for e.g. the make runner is now a bit more complicated. Detecting flaky tests needs code somewhere, but this moves the detection code before the result reporting, so is a bit riskier. The self tests should counterbalance this. * CISupport/ews-build/steps.py: Kill ReRunJavaScriptCoreTests and enable --treat-failing-as-flaky. Defaults to 60% pass percentage, 10 maxTries and a limit of 200 failing tests. (RunJavaScriptCoreTests): (RunJavaScriptCoreTests.__init__): (RunJavaScriptCoreTests.start): (RunJavaScriptCoreTests.evaluateCommand): (RunJavaScriptCoreTests.commandComplete): (RunJavaScriptCoreTests.getResultSummary): (RunJavaScriptCoreTests._addToLog): (AnalyzeJSCTestsResults.start): (ReRunJavaScriptCoreTests): Deleted. (ReRunJavaScriptCoreTests.evaluateCommand): Deleted. * CISupport/ews-build/steps_unittest.py: Update to match the changes in steps.py. Some testcases no longer apply. * Scripts/jsc-stress-test-helpers/shell-runner.sh: Don't deduce the test list manually, expect it as an argument instead. * Scripts/run-javascriptcore-tests: Propagate info on test flakiness. (runJSCStressTests): * Scripts/run-jsc-stress-tests: Refactor the execution logic to use the abstracted-out code in executor.rb. Use the retry loop on every runner. * Scripts/webkitruby/jsc-stress-test-writer-default.rb: Update the test-writer files for the changes to run-jsc-stress-tests. Move prepareFooRunner and testRunnerCommand to a class so that we can keep state (for the new argument to the shell runner). * Scripts/webkitruby/jsc-stress-test-writer-playstation.rb: * Scripts/webkitruby/jsc-stress-test-writer-ruby.rb: * Scripts/webkitruby/jsc-stress-test/executor.rb: Added. Implement a generic retry loop and define an array of virtual tests (using predefined test results for each iteration). * Scripts/webkitruby/jsc-stress-test/test-result-evaluator.rb: Added. Encapsulate the logic on whether a test has passed or not (Did we get any results? Were those results enough to declare a flaky/non-flaky test a pass?) and add a number of tests. 2021-11-21 Wenson Hsieh Add an API test for batch image analysis (-[WKWebView _startImageAnalysis:]) https://bugs.webkit.org/show_bug.cgi?id=233331 Reviewed by Sam Weinig. Add a new API teset to exercise the `-_startImageAnalysis:` SPI introduced in r285949, along with helper functions to simulate `VKImageAnalysis` results from VisionKitCore. See below for more details. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm: (-[TestWKWebView waitForImageAnalysisRequests:]): (TestWebKitAPI::createWebViewWithTextRecognitionEnhancements): (TestWebKitAPI::swizzledProcessRequestWithResults): (TestWebKitAPI::swizzledProcessRequestWithError): (TestWebKitAPI::TEST): (TestWebKitAPI::swizzledProcessRequest): Deleted. Add an API test that uses `-_startImageAnalysis:` to perform batch image analysis over 5 image elements on the page, and verify that the text results are injected back into the page. * TestWebKitAPI/Tests/WebKitCocoa/multiple-images.html: Added. * TestWebKitAPI/cocoa/ImageAnalysisTestingUtilities.h: Added. * TestWebKitAPI/cocoa/ImageAnalysisTestingUtilities.mm: Added. (-[TestVKQuad initWithTopLeft:topRight:bottomLeft:bottomRight:]): (-[TestVKWKTextInfo initWithString:quad:]): (-[TestVKWKTextInfo string]): (-[TestVKWKTextInfo quad]): (-[TestVKWKLineInfo initWithString:quad:children:]): (-[TestVKWKLineInfo children]): (-[TestVKImageAnalysis initWithLines:]): (-[TestVKImageAnalysis allLines]): (TestWebKitAPI::createQuad): (TestWebKitAPI::createTextInfo): (TestWebKitAPI::createLineInfo): (TestWebKitAPI::createImageAnalysis): (TestWebKitAPI::createImageAnalysisWithSimpleFixedResults): Add helper functions to create and return mock objects that represent VKImageAnalysis, VKWKLineInfo, VKWKTextInfo and VKQuad. 2021-11-21 Andres Gonzalez Dispatch all AccessibilityUIElement parameterized attribute requests to the AX thread for isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=233377 Reviewed by Chris Fleizach. To simulate AT client requests in isolated tree mode, all parameterized attribute requests should be dispatched to the AX thread. This patch adds AccessibilityUIElement::attributeValueForParameter that does the appropriate dispatch to the AX thread. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::attributeValue): (WTR::AccessibilityUIElement::attributeValue const): (WTR::AccessibilityUIElement::attributeValueForParameter const): (WTR::AccessibilityUIElement::lineForIndex): (WTR::AccessibilityUIElement::rangeForLine): (WTR::AccessibilityUIElement::rangeForPosition): (WTR::AccessibilityUIElement::boundsForRange): (WTR::AccessibilityUIElement::stringForRange): (WTR::AccessibilityUIElement::attributedStringForRange): (WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled): (WTR::AccessibilityUIElement::uiElementCountForSearchPredicate): (WTR::AccessibilityUIElement::uiElementForSearchPredicate): (WTR::AccessibilityUIElement::selectTextWithCriteria): (WTR::AccessibilityUIElement::searchTextWithCriteria): (WTR::AccessibilityUIElement::cellForColumnAndRow): (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): (WTR::AccessibilityUIElement::lineIndexForTextMarker const): (WTR::AccessibilityUIElement::misspellingTextMarkerRange): (WTR::AccessibilityUIElement::textMarkerRangeForElement): (WTR::AccessibilityUIElement::textMarkerRangeLength): (WTR::AccessibilityUIElement::previousTextMarker): (WTR::AccessibilityUIElement::nextTextMarker): (WTR::AccessibilityUIElement::stringForTextMarkerRange): (WTR::AccessibilityUIElement::textMarkerRangeForMarkers): (WTR::AccessibilityUIElement::textMarkerRangeForRange): (WTR::AccessibilityUIElement::resetSelectedTextMarkerRange): (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): (WTR::AccessibilityUIElement::endTextMarkerForBounds): (WTR::AccessibilityUIElement::startTextMarkerForBounds): (WTR::AccessibilityUIElement::textMarkerForPoint): (WTR::AccessibilityUIElement::accessibilityElementForTextMarker): (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange): (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): (WTR::AccessibilityUIElement::indexForTextMarker): (WTR::AccessibilityUIElement::isTextMarkerValid): (WTR::AccessibilityUIElement::textMarkerForIndex): (WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): (WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): (WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): (WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): (WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): (WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): (WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): (WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): (WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): (WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): (WTR::_convertMathMultiscriptPairsToString): 2021-11-19 Carlos Garcia Campos [GTK][a11y] Add implementation of image interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=232782 Reviewed by Adrian Perez de Castro. Add unit tests for the image interface. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testImageBasic): (beforeAll): 2021-11-19 Alex Christensen Implement extension-path variant of redirect action in WKContentRuleList https://bugs.webkit.org/show_bug.cgi?id=233351 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::makeBackend): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm: (TEST_F): 2021-11-19 J Pascoe [WebAuthn] Add headers for [_WKWebAuthenticationPanel makeCredentialWithClientDataHash] and [_WKWebAuthenticationPanel getAssertionWithClientDataHash] https://bugs.webkit.org/show_bug.cgi?id=233371 Reviewed by Brent Fulgham. Add tests for [_WKWebAuthenticationPanel makeCredentialWithClientDataHash] and [_WKWebAuthenticationPanel getAssertionWithClientDataHash]. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-11-19 Robert Jenner [ Monterey ] TestWebKitAPI.WebSocket.PageWithAttributedBundleIdentifierDestroyed (API-test) is a constant timeout https://bugs.webkit.org/show_bug.cgi?id=233224 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm: (TestWebKitAPI::TEST): 2021-11-18 Jonathan Bedard [webkitcorepy] Indicate to user the default option https://bugs.webkit.org/show_bug.cgi?id=233342 Reviewed by Ryan Haddad. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py: (Terminal.choose): Surround the default option with square brackets. * Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py: (TerminalTests.test_choose_triple): * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: (Setup.github): We should construct a user owned mirror by default. * Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py: (TestLand.test_default): (TestLand.test_canonicalize): (TestLand.test_svn): (TestLandGitHub): * Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py: (TestSetup.test_github): 2021-11-19 Brady Eidson More webpushd architecture work https://bugs.webkit.org/show_bug.cgi?id=233295 Reviewed by Alex Christensen. * TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements: * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::TEST): 2021-11-18 Jonathan Bedard [resultsdbpy] Move AuthedBlueprint to webkitflaskpy https://bugs.webkit.org/show_bug.cgi?id=233339 Reviewed by Ryan Haddad. * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version. * Scripts/libraries/resultsdbpy/resultsdbpy/controller/api_routes.py: Import AuthedBlueprint from webkitflaskpy. * Scripts/libraries/resultsdbpy/resultsdbpy/view/view_routes.py: Ditto. * Scripts/libraries/resultsdbpy/setup.py: Bump version. * Scripts/libraries/webkitflaskpy/setup.py: Ditto. * Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: Bump Export object. * Scripts/libraries/webkitflaskpy/webkitflaskpy/authed_blueprint.py: Renamed from Tools/Scripts/libraries/resultsdbpy/resultsdbpy/flask_support/authed_blueprint.py. 2021-11-19 Brent Fulgham Add support for web app manifest icons in WebKit/UI Process layer https://bugs.webkit.org/show_bug.cgi?id=233350 Reviewed by Chris Dumez. Add a new API test to exercise the _WKApplicationManifestIcon API. * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: (ApplicationManifestParserTest::testIconsSizes): (TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: (TestWebKitAPI::TEST): 2021-11-19 Robert Jenner [ Monterey ]TestWebKitAPI.PrivateClickMeasurement.EphemeralWithAttributedBundleIdentifier (API-test) is a constant timeout https://bugs.webkit.org/show_bug.cgi?id=233345 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): 2021-11-19 Carlos Garcia Campos [GTK][a11y] Add implementation of document interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=232755 Reviewed by Adrian Perez de Castro. Add unit test for the document interface and WTR implementation. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testDocumentBasic): (beforeAll): * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::language): (WTR::AccessibilityUIElement::documentEncoding): (WTR::AccessibilityUIElement::documentURI): 2021-11-19 Carlos Garcia Campos [GTK][a11y] Add implementation of action interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=232749 Reviewed by Adrian Perez de Castro. Add a unit test for the action interface and WTR implementation. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testActionBasic): (beforeAll): * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::isPressActionSupported): (WTR::AccessibilityUIElement::press): 2021-11-19 Carlos Garcia Campos [GTK][a11y] Add implementation of hypertext interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=232708 Reviewed by Adrian Perez de Castro. Add unit tests to check hypertext interface. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testHypertextBasic): (beforeAll): 2021-11-19 Carlos Garcia Campos Unreviewed. [GLIB] Add new test case to /jsc/class Add a test case to check using JSC_TYPE_VALUE for a JSCClass property. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (setFooValue): (getFooValue): (testJSCClass): 2021-11-19 Arcady Goldmints-Orlov REGRESSION(r285859) [GTK][WPE] a number of accessibility/* tests crash on GTK and WPE https://bugs.webkit.org/show_bug.cgi?id=233221 Reviewed by Carlos Garcia Campos. Add null checks in the ATK code to ensure AccessibilityUIElement::create() is not passed a NULL pointer. * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: (WTR::AccessibilityController::focusedElement): * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::getChildren): (WTR::AccessibilityUIElement::getChildrenWithRange): 2021-11-19 Carlos Garcia Campos [GTK][a11y] Add implementation of hyperlink interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=232707 Reviewed by Adrian Perez de Castro. Add unit tests to check hyperlink interface and implement AccessibilityUIElement::url() in WTR. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testTextReplacedObjects): (testHyperlinkBasic): (beforeAll): * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::url): 2021-11-18 Alex Christensen Allow all redirect schemes when compiling a content rule list https://bugs.webkit.org/show_bug.cgi?id=233338 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::InMemoryCompiledContentExtension::create): (TestWebKitAPI::checkCompilerError): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm: (compileContentRuleList): 2021-11-18 Robert Jenner [ Monterey ] TestWebKitAPI.WebpagePreferences.WebsitePoliciesDuringRedirect is a constant timeout Uneviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (TEST): 2021-11-18 Robert Jenner [ Monterey ] 2 TestWebKitAPI.WebKit.DisplayName (api-tests) are constantly failing Uneviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm: (TestWebKitAPI::TEST): 2021-11-18 Robert Jenner [ Monterey ] 2 TestWebKitAPI.WebKit.DisplayName (api-tests) are constantly failing Uneviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm: (TestWebKitAPI::TEST): 2021-11-18 Jonathan Bedard Link Python packages to GitHub https://bugs.webkit.org/show_bug.cgi?id=233318 Reviewed by Stephanie Lewis. * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version. * Scripts/libraries/resultsdbpy/setup.py: Bump version, link to GitHub. * Scripts/libraries/webkitcorepy/setup.py: Bump version, link to GitHub. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version. * Scripts/libraries/webkitflaskpy/setup.py: Bump version, link to GitHub. * Scripts/libraries/webkitflaskpy/webkitflaskpy/__init__.py: Bump version. * Scripts/libraries/webkitscmpy/setup.py: Bump version, link to GitHub. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version. 2021-10-26 Carlos Garcia Campos [GTK][a11y] Add implementation of value interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=232300 Reviewed by Adrian Perez de Castro. Add new unit test for the value interface and implement WTR value support. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testValueBasic): (beforeAll): * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::isAttributeSettable): (WTR::AccessibilityUIElement::intValue const): (WTR::AccessibilityUIElement::minValue): (WTR::AccessibilityUIElement::maxValue): (WTR::AccessibilityUIElement::valueDescription): (WTR::AccessibilityUIElement::increment): (WTR::AccessibilityUIElement::decrement): 2021-10-25 Carlos Garcia Campos [GTK][a11y] Add initial WTR accessibility support when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=230259 Reviewed by Adrian Perez de Castro. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp: (WTR::findAccessibleObjectById): (WTR::AccessibilityController::accessibleElementById): (WTR::AccessibilityController::platformName): (WTR::AccessibilityController::axRunLoop): (WTR::AccessibilityController::executeOnAXThreadAndWait): (WTR::AccessibilityController::executeOnAXThread): (WTR::AccessibilityController::executeOnMainThread): * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::AccessibilityUIElement::AccessibilityUIElement): (WTR::AccessibilityUIElement::isEqual): (WTR::AccessibilityUIElement::childrenCount): (WTR::AccessibilityUIElement::elementAtPoint): (WTR::AccessibilityUIElement::childAtIndex): (WTR::elementForRelationAtIndex): (WTR::AccessibilityUIElement::ariaOwnsElementAtIndex): (WTR::AccessibilityUIElement::ariaFlowToElementAtIndex): (WTR::AccessibilityUIElement::ariaControlsElementAtIndex): (WTR::AccessibilityUIElement::titleUIElement): (WTR::AccessibilityUIElement::parentElement): (WTR::attributesOfElement): (WTR::attributesOfElements): (WTR::AccessibilityUIElement::attributesOfChildren): (WTR::AccessibilityUIElement::allAttributes): (WTR::AccessibilityUIElement::stringAttributeValue): (WTR::AccessibilityUIElement::numberAttributeValue): (WTR::checkElementState): (WTR::AccessibilityUIElement::boolAttributeValue): (WTR::AccessibilityUIElement::isAttributeSupported): (WTR::roleValueToString): (WTR::AccessibilityUIElement::role): (WTR::AccessibilityUIElement::roleDescription): (WTR::AccessibilityUIElement::computedRoleString): (WTR::AccessibilityUIElement::title): (WTR::AccessibilityUIElement::description): (WTR::AccessibilityUIElement::orientation const): (WTR::AccessibilityUIElement::stringValue): (WTR::AccessibilityUIElement::helpText const): (WTR::AccessibilityUIElement::x): (WTR::AccessibilityUIElement::y): (WTR::AccessibilityUIElement::width): (WTR::AccessibilityUIElement::height): (WTR::AccessibilityUIElement::clickPointX): (WTR::AccessibilityUIElement::clickPointY): (WTR::AccessibilityUIElement::isEnabled): (WTR::AccessibilityUIElement::isRequired const): (WTR::AccessibilityUIElement::isFocused const): (WTR::AccessibilityUIElement::isSelected const): (WTR::AccessibilityUIElement::isSelectedOptionActive const): (WTR::AccessibilityUIElement::isExpanded const): (WTR::AccessibilityUIElement::isChecked const): (WTR::AccessibilityUIElement::isIndeterminate const): (WTR::AccessibilityUIElement::hierarchicalLevel const): (WTR::AccessibilityUIElement::ariaIsGrabbed const): (WTR::AccessibilityUIElement::ariaDropEffects const): (WTR::AccessibilityUIElement::lineForIndex): (WTR::AccessibilityUIElement::rangeForLine): (WTR::AccessibilityUIElement::boundsForRange): (WTR::AccessibilityUIElement::stringForRange): (WTR::AccessibilityUIElement::attributedStringForRange): (WTR::AccessibilityUIElement::selectedTextRange): (WTR::AccessibilityUIElement::setSelectedTextRange): (WTR::AccessibilityUIElement::isFocusable const): (WTR::AccessibilityUIElement::isSelectable const): (WTR::AccessibilityUIElement::isMultiSelectable const): (WTR::AccessibilityUIElement::isVisible const): (WTR::AccessibilityUIElement::isOffScreen const): (WTR::AccessibilityUIElement::isCollapsed const): (WTR::AccessibilityUIElement::isSingleLine const): (WTR::AccessibilityUIElement::isMultiLine const): (WTR::AccessibilityUIElement::hasPopup const): (WTR::AccessibilityUIElement::scrollToMakeVisible): (WTR::AccessibilityUIElement::scrollToGlobalPoint): (WTR::stringAtOffset): (WTR::AccessibilityUIElement::characterAtOffset): (WTR::AccessibilityUIElement::wordAtOffset): (WTR::AccessibilityUIElement::lineAtOffset): (WTR::AccessibilityUIElement::sentenceAtOffset): * WebKitTestRunner/gtk/main.cpp: (main): 2021-11-18 Youenn Fablet MediaPlayerAVFoundation should support rvfc https://bugs.webkit.org/show_bug.cgi?id=231945 Reviewed by Eric Carlson. Enable rvfc by default in test runner. * DumpRenderTree/mac/DumpRenderTree.mm: * WebKitTestRunner/TestController.cpp: 2021-11-18 Carlos Garcia Campos [GLIB] jsc_value_object_define_property_accessor() throws an exception when called on a value without a wrapper instance https://bugs.webkit.org/show_bug.cgi?id=233253 Reviewed by Michael Catanzaro. Add unit tests to check jsc_value_object_define_property_accessor(). * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (getIntProperty): (setIntProperty): (testJSCObject): 2021-11-17 Alex Christensen Implement most of redirect and modify-headers action types https://bugs.webkit.org/show_bug.cgi?id=233268 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::InMemoryCompiledContentExtension::create): (TestWebKitAPI::checkCompilerError): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm: (compileContentRuleList): (navigationDelegateAllowingActiveActionsOnTestHost): (TEST_F): 2021-11-17 John Wilander PCM: Add capability for click destination to fire triggering event without cross-site requests to the click source https://bugs.webkit.org/show_bug.cgi?id=233173 Reviewed by Alex Christensen. These changes are just a correction of a function name: sourceUnlinkableToken() to sourceSecretToken() * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm: (TestWebKitAPI::TEST): 2021-11-17 Ryan Haddad ASSERT NOT REACHED under WebKit::Daemon::ConnectionToMachService seen with TestWebKitAPI.WebPushD.BasicCommunication and PermissionManagement https://bugs.webkit.org/show_bug.cgi?id=232857 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: Fix number in version check. 2021-11-17 Ryan Haddad [Monterey] TestWebKitAPI.PrivateClickMeasurement.Daemon* tests timing out: Failed to connect to mach service org.webkit.pcmtestdaemon.service https://bugs.webkit.org/show_bug.cgi?id=232890 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): Disable tests for Monterey. 2021-11-17 Alex Christensen Enable adattributiond testing on iOS simulator https://bugs.webkit.org/show_bug.cgi?id=233285 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::testDaemonPList): (TestWebKitAPI::cleanUpDaemon): (TestWebKitAPI::TEST): 2021-11-17 Ryan Haddad ASSERT NOT REACHED under WebKit::Daemon::ConnectionToMachService seen with TestWebKitAPI.WebPushD.BasicCommunication and PermissionManagement https://bugs.webkit.org/show_bug.cgi?id=232857 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::TEST): Disable the tests for Monterey. 2021-11-16 Ryan Haddad [macOS Debug] TestWebKitAPI.WKInspectorExtensionDelegate.InspectedPageNavigatedCallbacks is timing out https://bugs.webkit.org/show_bug.cgi?id=231847 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: Disable test in the debug configuration. 2021-11-17 Zixing Liu [GTK][WPE] Support getting and setting HTTP headers in custom URI scheme handlers https://bugs.webkit.org/show_bug.cgi?id=203273 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp: (testWebContextURIScheme): Added a new test to test getting and setting HTTP headers in custom URI scheme handlers 2021-11-16 Jonathan Bedard [webkitscmpy] Load secrets in kubernetes https://bugs.webkit.org/show_bug.cgi?id=233158 Reviewed by Dewei Zhu. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Environment. * Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py: (credentials): Use Environment instead of os.environ. * Scripts/libraries/webkitcorepy/webkitcorepy/environment.py: Added. (Environment): (Environment.instance): Construct a shared Environmant intance. (Environment.__init__): (Environment.load): Load secrets in file directory. (Environment.get): Check environment variable and then secret store. (Environment.__getitem__): (Environment.__setitem__): (Environment.keys): Iterate through secret store and environment variables. (Environment.values): Ditto. (Environment.items): Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/tests/environment_unittest.py: Added. (TestEnvironment): (TestEnvironment.test_basic): (TestEnvironment.test_scoped): (TestEnvironment.test_list): 2021-11-12 Jonathan Bedard [git-webkit] Mark landed changes as merged https://bugs.webkit.org/show_bug.cgi?id=233056 Reviewed by Dewei Zhu. For BitBucket and GitHub to recognize a pull-request as merged, the target branch must be updated with the exact commit to be merged as the merge occurs. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py: (Land.main): Update source branch when merging commits to target branch. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py: (BitBucket.PRGenerator.update): Only delete values if they exist. * Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py: (TestLand): (TestLandGitHub): (TestLandBitBucket): 2021-11-16 Chris Dumez Crash under WebKit::WebPageProxy::commitProvisionalPage() https://bugs.webkit.org/show_bug.cgi?id=233199 Reviewed by Youenn Fablet. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-11-16 Fujii Hironori [Win][MiniBrowser][WK2] Show a message box for a provisional navigation failure https://bugs.webkit.org/show_bug.cgi?id=233170 Reviewed by Don Olmstead. Show a MessageBox if a provisional navigation failed. * MiniBrowser/win/WebKitBrowserWindow.cpp: (WebKitBrowserWindow::WebKitBrowserWindow): (WebKitBrowserWindow::didFailProvisionalNavigation): * MiniBrowser/win/WebKitBrowserWindow.h: 2021-11-16 Zhifei Fang Make run-javascript-core-test and run-jsc-stress-tests support a customized identity file https://bugs.webkit.org/show_bug.cgi?id=232453 Reviewed by Ryan Haddad. * Scripts/run-javascriptcore-tests: Add idFilePath field for remote config. * Scripts/run-jsc-stress-tests: Add idFilePath field for remote config. * Scripts/webkitdirs.pm: (determineNativeArchitecture): Provide -i option to ssh 2021-11-16 Chris Dumez [iOS] Do not require the web browser entitlement to opt into captive portal mode https://bugs.webkit.org/show_bug.cgi?id=233191 Reviewed by Brent Fulgham. Update API test coverage accordingly. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-11-16 Andres Gonzalez Fix for accessibility/mac/replace-text-with-range-on-webarea-element.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=233160 Reviewed by Chris Fleizach. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::stringValue): (WTR::AccessibilityUIElement::replaceTextInRange): Dispatches to the AX thread the call to the wrapper's [accessibilityReplaceRange withText:] method. 2021-11-16 Brady Eidson Enable webpushd tests in the iOS simulator. https://bugs.webkit.org/show_bug.cgi?id=233149 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::testWebPushDaemonPList): Add a key to allow an OSLaunchdJob executable to break out of the simulator runtime root. 2021-11-16 Tyler Wilcock AX: Stop returning AccessibilityUIElements backed by a null pointer https://bugs.webkit.org/show_bug.cgi?id=233138 Reviewed by Andres Gonzalez. Prior to this patch, some callers of AccessibilityUIElement::create passed null `id`s, resulting in a seemingly valid AccessibilityUIElement that is actually backed by a null pointer. This makes writing tests harder, since you can't rely on common operations like `!myElement` to do the right thing. With this patch, we add a RELEASE_ASSERT to AccessibilityUIElement::create requiring the passed pointer to be valid. This patch also fixes up some callsites where we could (and did) pass null pointers. * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: (WTR::AccessibilityController::focusedElement): * WebKitTestRunner/InjectedBundle/win/AccessibilityControllerWin.cpp: (WTR::AccessibilityController::focusedElement): * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::focusedElement): Return RefPtr instead of Ref, since it's possible that no element is focused. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::create): Add RELEASE_ASSERT() to verify passed pointer is valid. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::focusedElement const): (WTR::AccessibilityUIElement::uiElementForSearchPredicate): * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (-[AccessibilityNotificationHandler _notificationReceived:]): * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::uiElementAttributeValue const): (WTR::AccessibilityUIElement::uiElementForSearchPredicate): (WTR::AccessibilityUIElement::cellForColumnAndRow): (WTR::AccessibilityUIElement::horizontalScrollbar const): (WTR::AccessibilityUIElement::verticalScrollbar const): Don't call AccessibilityUIElement::create with null pointers. 2021-11-15 Michael Catanzaro Make valgrind work properly without extra environment variables https://bugs.webkit.org/show_bug.cgi?id=230460 Reviewed by Carlos Garcia Campos. Exempt valgrind.h from the style checker. * Scripts/webkitpy/style/checker.py: 2021-11-14 Brady Eidson Get daemon API ready to work in the iOS simulator (starting with WebPushD) https://bugs.webkit.org/show_bug.cgi?id=232982 Reviewed by Geoff Garen. To get this working we needed to: - Have the Daemons installed in a simulator-runtime-root-visible path - Point the OSLaunchDJob plist to the simulator-relative path, not Mac-relative - Solve the "How do I kill existing instances to run a clean test?" problem within the simulator. This patch does those things. * TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements: * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (TestWebKitAPI::testWebPushDaemonPList): (TestWebKitAPI::setUpTestWebPushD): (TestWebKitAPI::cleanUpTestWebPushD): * TestWebKitAPI/cocoa/DaemonTestUtilities.h: * TestWebKitAPI/cocoa/DaemonTestUtilities.mm: (TestWebKitAPI::registerPlistWithLaunchD): (TestWebKitAPI::pidOfFirstDaemonInstance): (TestWebKitAPI::killFirstInstanceOfDaemon): 2021-11-13 Simon Fraser Implement UIScriptController.sendEventStream() for DumpRenderTree https://bugs.webkit.org/show_bug.cgi?id=233090 Reviewed by Wenson Hsieh. Implement UIScriptControllerMac::sendEventStream(), sharing some event dispatching code from EventSendingController. * DumpRenderTree/mac/EventSendingController.h: * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]): (-[EventSendingController sendScrollEventAt:deltaX:deltaY:units:wheelPhase:momentumPhase:timestamp:]): * DumpRenderTree/mac/UIScriptControllerMac.h: * DumpRenderTree/mac/UIScriptControllerMac.mm: (WTR::gesturePhaseFromString): (WTR::momentumPhaseFromString): (WTR::eventSenderFromView): (WTR::UIScriptControllerMac::sendEventStream): 2021-11-13 Jonathan Bedard Unreviewed, reverting r285772. Ownership issues in some XCode installs Reverted changeset: "[webkitpy] Symlink daemons into simulator runtime root" https://bugs.webkit.org/show_bug.cgi?id=233080 https://commits.webkit.org/r285772 2021-11-13 Tyler Wilcock AX: Make accessibility/mac/header.html test async to fix it for isolated tree mode https://bugs.webkit.org/show_bug.cgi?id=233017 Reviewed by Andres Gonzalez. This patch implements the `domIdentifier` attribute for DumpRenderTree elements. When making this test async, I wanted to use this attribute, hence the implementation in this patch. * DumpRenderTree/AccessibilityUIElement.cpp: (domIdentifierCallback): Added. (AccessibilityUIElement::getJSClass): Add "domIdentifer" entry to `staticValues[]`. * DumpRenderTree/AccessibilityUIElement.h: Add AccessibilityUIElement::domIdentifier const definition. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (AccessibilityUIElement::domIdentifier const): Added. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (AccessibilityUIElement::domIdentifier const): Added. * DumpRenderTree/win/AccessibilityUIElementWin.cpp: (AccessibilityUIElement::domIdentifier const):Added. 2021-11-12 Jonathan Bedard [webkitpy] Symlink daemons into simulator runtime root https://bugs.webkit.org/show_bug.cgi?id=233080 Reviewed by Brady Eidson. * Scripts/webkitpy/api_tests/manager.py: (Manager._initialize_devices): Symlink daemons in the WebKit.framework into simulator runtime root. * Scripts/webkitpy/common/system/filesystem.py: (FileSystem.symlink): * Scripts/webkitpy/common/system/filesystem_mock.py: (MockFileSystem.symlink): * Scripts/webkitpy/port/darwin.py: (DarwinPort.path_to_daemons): * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager.Runtime.__init__): Add root. (SimulatedDeviceManager._create_device_with_runtime): Pass runtime. (SimulatedDevice.__init__): Link to runtime. * Scripts/webkitpy/xcode/simulated_device_unittest.py: 2021-11-12 Darin Adler Make sort-Xcode-project-file idempotent https://bugs.webkit.org/show_bug.cgi?id=233077 Reviewed by Wenson Hsieh. * Scripts/sort-Xcode-project-file: (sortChildrenByFileName): Fix the "directories first" rule to work in a straightforward way that is symmetric, and make the rest of the rules fall through when two files are equal for the same reason. Also remove almost all names from the special list of filenames to treat as files even though they have no extension. For example, "jsc" is a directory in WebCore and it's not needed to sort products correctly in JavaScriptCore. And "minidom" is both a product and a directory. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Sorted. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Ditto. 2021-11-12 Jonathan Bedard [git-webkit] Checkout pull-requests https://bugs.webkit.org/show_bug.cgi?id=233042 Reviewed by Dewei Zhu. In GitHub, pull-requests are somewhat difficult to checkout because they're attached to a specific user's mirror of WebKit. Automate this process. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init.py__: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git): Add username:branch regex. (Git.checkout): Allow checking out of branches by username:branch. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: (Git.__init__): Add `git checkout -B`. (Git.checkout): `-B` will force checkout a branch, even if one already exists. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py: (GitHub): Embed error message in 404 response. * Scripts/libraries/webkitscmpy/webkitscmpy/program/checkout.py: (Checkout.main): Allow direct checkout of pull-request instead of relying exclusively on branches. * Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py: (Clean.main): Add newline. * Scripts/libraries/webkitscmpy/webkitscmpy/test/checkout_unittest.py: (TestCheckout.test_no_pr_github): (TestCheckout.test_no_pr_bitbucket): (TestCheckout.test_pr_github): (TestCheckout.test_pr_bitbucket): 2021-11-12 Sihui Liu Set default general storage directory to websiteDataDirectory https://bugs.webkit.org/show_bug.cgi?id=232985 Reviewed by Geoffrey Garen. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm: * TestWebKitAPI/Tests/WebKitCocoa/file-system-access.salt: Added. 2021-11-12 Peng Liu Promote WKPreferences._fullScreenEnabled to API https://bugs.webkit.org/show_bug.cgi?id=230784 Reviewed by Jer Noble. * MiniBrowser/mac/AppDelegate.m: (-[BrowserAppDelegate defaultConfiguration]): 2021-11-12 Chris Dumez Demote WKWebpagePreferences.captivePortalModeEnabled API to SPI https://bugs.webkit.org/show_bug.cgi?id=233059 Reviewed by Geoffrey Garen. Update API test accordingly. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-11-05 Jonathan Bedard [git-webkit] Open closed pull-request when running pr https://bugs.webkit.org/show_bug.cgi?id=232765 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py: (BitBucket.request): Ensure displayId is set when updating PR. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py: (GitHub.request): Make sure that new pull-requests are open. * Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py: (PullRequest.main): Open closed pull-requests. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.PRGenerator.update): Only set head if user specifies head. * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: 2021-11-12 Chris Dumez Disable MathML when in Captive Portal Mode https://bugs.webkit.org/show_bug.cgi?id=233013 Reviewed by Brent Fulgham. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-11-12 Chris Dumez WebKit is unable to recover if a WebProcess gets terminated while it is launching https://bugs.webkit.org/show_bug.cgi?id=233001 Reviewed by Brent Fulgham. Add API test coverage, this test was timing out before the fix. * TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm: (TEST): 2021-11-12 Chris Dumez Disable getUserMedia() when in Captive Portal Mode https://bugs.webkit.org/show_bug.cgi?id=233021 Reviewed by Brent Fulgham. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-11-11 Brent Fulgham [WebAuthn] Stop serializing BufferSource and Vector duplicates of identifiers https://bugs.webkit.org/show_bug.cgi?id=233011 Reviewed by Chris Dumez. The original WebAuthn logic converted WebCore::BufferSource objects to Vector during serialization, which created a weird design where some code dealt with BufferSource objects, and other with Vectors, and lots of converting to and from these types. It also caused WebAuthn data structures to have two places where this information might live, with the UIProcess using one representation, and the WebContent process using another. This patch revises the code as follows: 1. The identifiers are always stored as BufferSource, and the same member is used in UIProcess and WebContent process when accessing this information. 2. We now serialize BufferSource directly. Tested by existing WebAuthn test cases (API and Layout tests) * TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: (TestWebKitAPI::getTestCredentialRawIdBytes): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/U2fCommandConstructorTest.cpp: (TestWebKitAPI::constructMakeCredentialRequest): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-11-11 Andres Gonzalez Fix for crash in LayoutTests in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=233014 Reviewed by Chris Fleizach. This fixes the following tests in isolated tree mode: accessibility/image-link-inline-cont.html [ Crash ] accessibility/image-link.html [ Crash ] accessibility/internal-link-anchors2.html [ Crash ] * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::allAttributes): Need to retain the pointer returned by AccessibilityUIElement::descriptionOfValue. 2021-11-11 Chris Dumez REGRESSION: 26 InAppBrowserPrivacy API failures on iOS https://bugs.webkit.org/show_bug.cgi?id=233016 Reviewed by Brent Fulgham. In r285594, I have the browser entitlement to TestWebKit API to make my new API test work on iOS. However, it turns out that 26 InAppBrowserPrivacy API tests rely on the browser entitlement not being present. I am therefore reverting this part of my change. * TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-11-11 Andres Gonzalez Fix for thread deadlocks during layout tests in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=232999 Reviewed by Chris Fleizach. In isolated tree mode, AccessibilityUIElement calls into the AX API are dispatched to a secondary, mocked thread created by the AccessibilityController to simulate AT requests off of the main thread. The main thread, in which all AccessibilityUIElement methods are run, is blocked to wait for the results from the AX thread, to then continue execution of JS layout tests. The deadlocks arise when the AX API call cannot be fulfilled on the secondary thread and needs to be dispatched to the main thread that is now blocked. The main thread is waitng for the AccessibilityController's secondary mocked thread, and that thread is waitng for the main thread to compute results for the AX API request. This patch introduces a workaround by spinning the main thread run loop right after the API calls are dispatched to the AX thread. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::executeOnAXThreadAndWait): (WTR::AccessibilityController::spinMainRunLoop const): * WebKitTestRunner/InjectedBundle/AccessibilityController.h: 2021-11-11 Rachel Ginsberg Add support in WebCore for web app manifest icons https://bugs.webkit.org/show_bug.cgi?id=231339 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: (ApplicationManifestParserTest::parseIconFirstTopLevelProperty): Function to create JSON for icon attributes. This is necessary because icons are in a list, whereas all other attributes in app manifest are not. (ApplicationManifestParserTest::parseIconFirstTopLevelPropertyForSrc): Needed to make a slightly different version to add a src URL, since it is required for a given icon to be added to the vector. (ApplicationManifestParserTest::testIconsSrc): (ApplicationManifestParserTest::testIconsType): (ApplicationManifestParserTest::testIconsSizes): (ApplicationManifestParserTest::testIconsPurposes): Functions for each of the icon attributes. (TEST_F): Calls the various icon test functions with different input 2021-11-11 Kimmo Kinnunen REGRESSION (iOS 15, GPU Process): Fails to load texture map https://bugs.webkit.org/show_bug.cgi?id=231471 Reviewed by Tim Horton. Add a test that tries to assert that GraphicsContext::drawImageBuffer() does not increase memory footprint of the process. However, leave the test disabled as currently it seems that the WTF::memoryFootprint() measurement does not see all the memory releases the CG does. * TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp: (TestWebKitAPI::memoryFootprintChangedBy): (TestWebKitAPI::imageBufferPixelIs): (TestWebKitAPI::TEST): 2021-11-11 Jer Noble Infinite recursion under InjectedBundlePage::exitFullScreenForElement() https://bugs.webkit.org/show_bug.cgi?id=232948 Reviewed by Eric Carlson. When WebCore indicates an error in exiting fullscreen, WebKit will respond by attempting to close any outstanding fullscreen sessions by calling WebFullScreenManager::close(). If this occurs in the InjectedBundlePage client during a call into WKBundlePageWillExitFullScreen() or WKBundlePageWillDidFullScreen(), this call will recurse into InjectedBundlePage::exitFullScreenForElement(), and cause a stack overflow. Track the current state of fullscreen on a per-InjectedBundlePage basis, and bail out if the state has been modified due to recursion. Add a HashMap to map WKBundlePageRef onto InjectedBundlePages. Use that map to find the particular InjectedBundlePage being requested to enter fullscreen. Add an enumerated set of Fullscreen states and a private ivar for tracking that state. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::InjectedBundlePage): (WTR::InjectedBundlePage::~InjectedBundlePage): (WTR::InjectedBundlePage::enterFullScreenForElement): (WTR::InjectedBundlePage::exitFullScreenForElement): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: 2021-11-11 Chris Dumez Turn off various preferences when in captive portal mode https://bugs.webkit.org/show_bug.cgi?id=232958 Reviewed by Brent Fulgham. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-11-11 Philippe Normand [Flatpak] http server is not properly tear down https://bugs.webkit.org/show_bug.cgi?id=221554 Reviewed by Adrian Perez de Castro. In Linux when the layout tests are manually interrupted it might lead to Apache not being cleanly stopped. On the next run it would then fail to start, usually failing to setup its 'scoreboard' with SHM. The proposed solution is to look for stale SHM segments, eg. segments allocated but not attached to any process, and remove them, before starting the Apache process. * Scripts/webkitpy/layout_tests/servers/apache_http_server.py: (LayoutTestApacheHttpd._remove_stale_shm_segments): (LayoutTestApacheHttpd._spawn_process): 2021-11-11 Philippe Normand [GTK][WPE] webkit-flatpak-run-nightly infinite self-call loop https://bugs.webkit.org/show_bug.cgi?id=230400 Reviewed by Adrian Perez de Castro. Port the changes landed in r272712 for the webkit-bwrap script, which we can't directly use within webkit-flatpak-run-nightly because it's nice to keep it as standalone as possible. * Scripts/webkit-flatpak-run-nightly: 2021-11-10 Chris Dumez We should not kill all WebContent processes whenever the WebAuthn process crashes https://bugs.webkit.org/show_bug.cgi?id=232970 Reviewed by Geoff Garen. Update API test coverage to reflect behavior change. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-11-10 J Pascoe [WebAuthn] Unify _WKWebAuthenticationPanel SPI and AuthenticatorCoordinator's ClientDataJson generation https://bugs.webkit.org/show_bug.cgi?id=232965 Reviewed by Brent Fulgham. Update api tests to reflect different clientDataJson format from WebAuthenticationUtils * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-11-10 Tim Nguyen Remove non-standard -webkit-border-fit CSS property https://bugs.webkit.org/show_bug.cgi?id=229564 Reviewed by Simon Fraser. * LayoutReloaded/misc/LFC-passing-tests.txt: 2021-11-10 Myles C. Maxfield [Cocoa] Build WebGPU on our bots https://bugs.webkit.org/show_bug.cgi?id=232924 Reviewed by Dean Jackson and Alex Christensen. Simply tell the build script about the existence of WebGPU. * Scripts/build-webkit: 2021-11-10 Commit Queue Unreviewed, reverting r285603. https://bugs.webkit.org/show_bug.cgi?id=232963 broke the watchOS build Reverted changeset: "[Cocoa] Build WebGPU on our bots" https://bugs.webkit.org/show_bug.cgi?id=232924 https://commits.webkit.org/r285603 2021-11-10 Myles C. Maxfield [Cocoa] Build WebGPU on our bots https://bugs.webkit.org/show_bug.cgi?id=232924 Reviewed by Dean Jackson. Simply tell the build script about the existence of WebGPU. * Scripts/build-webkit: 2021-11-10 Alex Christensen Implement serialization and deserialization of redirect and modify headers actions for WKContentRuleList https://bugs.webkit.org/show_bug.cgi?id=232901 Reviewed by Timothy Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::TEST_F): 2021-11-10 Chris Dumez Add basic support for launching CaptivePortalMode WebProcesses https://bugs.webkit.org/show_bug.cgi?id=232737 Reviewed by Brent Fulgham. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2021-11-10 Tyler Wilcock AX: Make ancestor computation cheaper by setting flags upon child insertion https://bugs.webkit.org/show_bug.cgi?id=232466 Reviewed by Andres Gonzalez. This patch adds bit-flags (named AXAncestorFlags) to our accessibility objects, and sets these flags upon child insertion to enable cheap determination of whether any object has ancestors of certain types (e.g. a document role ancestor). Some AX clients need this information, and WebKit can compute it more efficiently than they can. The following flags are added in this patch: - HasDocumentRoleAncestor - HasWebApplicationAncestor - IsInDescriptionListDetail - IsInDescriptionListTerm - IsInCell * DumpRenderTree/AccessibilityUIElement.cpp: (hasDocumentRoleAncestorCallback): (hasWebApplicationAncestorCallback): (isInDescriptionListDetailCallback): (isInDescriptionListTermCallback): (isInCellCallback): Added all of the above. * DumpRenderTree/AccessibilityUIElement.h: * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (AccessibilityUIElement::hasDocumentRoleAncestor const): (AccessibilityUIElement::hasWebApplicationAncestor const): (AccessibilityUIElement::isInCell const): Added all of the above. (AccessibilityUIElement::isInDescriptionListDetail const): Added. (AccessibilityUIElement::isInDescriptionListTerm const): Added. (WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted. (WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (AccessibilityUIElement::hasDocumentRoleAncestor const): (AccessibilityUIElement::hasWebApplicationAncestor const): (AccessibilityUIElement::isInDescriptionListDetail const): (AccessibilityUIElement::isInDescriptionListTerm const): (AccessibilityUIElement::isInCell const): Added all of the above. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::hasDocumentRoleAncestor const): (WTR::AccessibilityUIElement::hasWebApplicationAncestor const): (WTR::AccessibilityUIElement::isInCell const): Added all of the above. (WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted. (WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted. (WTR::AccessibilityUIElement::isInDescriptionListDetail const): Added. (WTR::AccessibilityUIElement::isInDescriptionListTerm const): Added. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: Add new attributes hasDocumentRoleAncestor, hasWebApplicationAncestor, isInDescriptionListDetail, and isInDescriptionListTerm. Change isInTableCell() to be an attribute named isInCell. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::hasDocumentRoleAncestor const): Added. (WTR::AccessibilityUIElement::hasWebApplicationAncestor const): Added. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::hasDocumentRoleAncestor const): (WTR::AccessibilityUIElement::hasWebApplicationAncestor const): (WTR::AccessibilityUIElement::isInDescriptionListDetail const): (WTR::AccessibilityUIElement::isInDescriptionListTerm const): (WTR::AccessibilityUIElement::isInCell const): Added all of the above. 2021-11-10 Darin Adler [CF] Reduce duplication and unneeded buffer allocations and copying in URL code, also remove unused methods and functions https://bugs.webkit.org/show_bug.cgi?id=232220 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): Removed extra argument to URLWithUserTypedString/Deprecated. 2021-11-10 Philippe Normand [GLib] apply-build-revision fails when git-svn is not installed https://bugs.webkit.org/show_bug.cgi?id=232929 Reviewed by Michael Catanzaro. Attempt to get the build revision from the git log if the git-svn call failed, either because git-svn is not installed or the metadata in .git/svn is incomplete. * glib/apply-build-revision-to-files.py: (get_revision_from_most_recent_git_commit): (get_build_revision): 2021-11-10 Antti Koivisto Hasher should be able to hash pointers https://bugs.webkit.org/show_bug.cgi?id=232927 Reviewed by Kimmo Kinnunen. * TestWebKitAPI/Tests/WTF/Hasher.cpp: (TestWebKitAPI::TEST): 2021-11-09 Commit Queue Unreviewed, reverting r285536. https://bugs.webkit.org/show_bug.cgi?id=232915 causes API test crashes Reverted changeset: "[CF] Reduce duplication and unneeded buffer allocations and copying in URL code, also remove unused methods and functions" https://bugs.webkit.org/show_bug.cgi?id=232220 https://commits.webkit.org/r285536 2021-11-09 Alex Christensen Unify build of TestWebKitAPI/Tests/WebKitCocoa https://bugs.webkit.org/show_bug.cgi?id=232768 Reviewed by Tim Horton. I found that the Fullscreen.LayoutConstraints was not being built because FullscreenLayoutConstraints.mm was not being built. Now that it is being built it times out, so I disabled it. * TestWebKitAPI/DeprecatedGlobalValues.cpp: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm. (resetGlobalState): * TestWebKitAPI/DeprecatedGlobalValues.h: Copied from Tools/TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp. * TestWebKitAPI/DeprecatedGlobalValues.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm. * TestWebKitAPI/Scripts/generate-unified-sources.sh: * TestWebKitAPI/Sources.txt: * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm: * TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLs.mm: * TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm: * TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm: (-[TestAsyncNavigationDelegate webView:didFinishNavigation:]): (-[TestAsyncNavigationDelegate webView:didFailNavigation:withError:]): (-[TestAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]): * TestWebKitAPI/Tests/WebKitCocoa/BundleParameters.mm: * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (-[ChallengeDelegate webView:didFinishNavigation:]): (-[ClientCertificateDelegate webView:didFinishNavigation:]): (-[ProposedCredentialDelegate webView:didFinishNavigation:]): (-[ServerTrustDelegate webView:didFailProvisionalNavigation:withError:]): (-[ServerTrustDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]): * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm: (WebKit2_CommandBackForwardTestWKView::SetUp): (WebKit2_CommandBackForwardTestWKView::loadFiles): (TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm: * TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm: (-[TestContextMenuUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]): (-[TestContextMenuAPIBeforeSPIUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]): (-[TestContextMenuAPIBeforeSPIUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]): (-[TestContextMenuImageUIDelegate _webView:contextMenuConfigurationForElement:completionHandler:]): (-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]): * TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm: * TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm: (createWebViewWithCustomPasteboardDataEnabled): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm: (createWebViewWithCustomPasteboardDataEnabled): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm: * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm: (-[DecidePolicyForNavigationActionController webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm: * TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm: * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: * TestWebKitAPI/Tests/WebKitCocoa/DuplicateCompletionHandlerCalls.mm: (-[DuplicateCompletionHandlerCallsDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]): * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: * TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm: * TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm: * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: * TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm: * TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm: * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm: * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm: * TestWebKitAPI/Tests/WebKitCocoa/IDBObjectStoreInfoUpgradeToV2.mm: * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: (-[IPCTestingAPIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]): * TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (-[AppBoundDomainDelegate webView:didFailProvisionalNavigation:withError:]): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm: (-[DatabaseProcessKillMessageHandler userContentController:didReceiveScriptMessage:]): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm: * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBInPageCache.mm: * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm: * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm: * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBStructuredCloneBackwardCompatibility.mm: * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm: * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm: * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBUserDelete.mm: * TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm: (-[JSNavigationDelegate webView:didFinishNavigation:]): * TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm: (-[LoadAlternateHTMLStringFromProvisionalLoadErrorController webView:didStartProvisionalNavigation:]): * TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm: * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm: * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm: * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageNullEntries.mm: * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: (-[LocalStorageNavigationDelegate webView:didFinishNavigation:]): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageQuirkTest.mm: * TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm: * TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm: * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: (-[BroadcastChannelMessageHandler userContentController:didReceiveScriptMessage:]): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm: * TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: * TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm: * TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm: (emptyReleaseInfoCallback): * TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm: (createWebViewWithCustomPasteboardDataEnabled): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm: (createWebViewWithCustomPasteboardDataEnabled): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/PasteboardUtilities.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm. * TestWebKitAPI/Tests/WebKitCocoa/PasteboardUtilities.mm: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm. (createWebViewWithCustomPasteboardDataEnabled): * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: * TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]): (-[PSONNavigationDelegate webView:didStartProvisionalNavigation:]): (-[PSONNavigationDelegate webView:didCommitNavigation:]): (-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): * TestWebKitAPI/Tests/WebKitCocoa/ProvisionalURLNotChange.mm: * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (-[ProxyDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]): * TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm: * TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm: (-[QuickLookDelegate navigationError]): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/RequiresUserActionForPlayback.mm: * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: * TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm: (-[RunOpenPanelUIDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: (-[SafeBrowsingNavigationDelegate webView:didCommitNavigation:]): (-[WKWebViewGoBackNavigationDelegate webView:didFinishNavigation:]): * TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: (-[TestSWAsyncNavigationDelegate webView:didFinishNavigation:]): (-[TestSWAsyncNavigationDelegate webView:didFailNavigation:withError:]): (-[TestSWAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]): * TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm: (-[ShouldOpenExternalURLsInNewWindowActionsController webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm: (-[SpeechRecognitionNavigationDelegate webView:didFinishNavigation:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm: * TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm: * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: * TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm: * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[UITestDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): (-[ModalDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): * TestWebKitAPI/Tests/WebKitCocoa/UploadDirectory.mm: (-[UploadDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): * TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: * TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm: * TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm: * TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (resetInspectorGlobalState): (-[UIDelegateForTesting _webView:configurationForLocalInspector:]): (TEST): (resetGlobalState): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (resetGlobalState): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (resetGlobalState): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm: (resetGlobalState): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm: (-[NavigationResponseTestDelegate webView:didFinishNavigation:]): * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: (-[RedirectSchemeHandler webView:didReceiveServerRedirectForProvisionalNavigation:]): * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: (-[BasicNavigationDelegateWithoutCrashHandler webView:didStartProvisionalNavigation:]): * TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebSQLBasics.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (-[PopUpPoliciesDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): * TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm: * TestWebKitAPI/Tests/WebKitLegacy/ios/DateTimeInputsAccessoryViewTests.mm: * TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm: * TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm: * TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLPrepareDisplayOnWebThread.mm: * TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm: * TestWebKitAPI/Tests/WebKitLegacy/mac/ClosingWebView.mm: * TestWebKitAPI/Tests/WebKitLegacy/mac/DeallocWebViewInEventListener.mm: * TestWebKitAPI/Tests/WebKitLegacy/mac/DownloadThread.mm: * TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm: * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: (-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]): * TestWebKitAPI/Tests/mac/ContentFiltering.mm: 2021-11-09 Commit Queue Unreviewed, reverting r285246. https://bugs.webkit.org/show_bug.cgi?id=232907 Broke FixedVector Reverted changeset: "[JSC] Clean up StructureStubInfo initialization" https://bugs.webkit.org/show_bug.cgi?id=232652 https://commits.webkit.org/r285246 2021-10-28 Darin Adler [CF] Reduce duplication and unneeded buffer allocations and copying in URL code, also remove unused methods and functions https://bugs.webkit.org/show_bug.cgi?id=232220 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): Removed extra argument to URLWithUserTypedString/Deprecated. 2021-11-09 Myles C. Maxfield [WebGPU] Stub out methods in WebGPU.framework https://bugs.webkit.org/show_bug.cgi?id=232872 Reviewed by Dean Jackson. * Scripts/webkitpy/style/checker.py: 2021-11-09 Stephan Szabo [Windows] Non-find based status file finding in run-jsc-stress-tests needs to release status files https://bugs.webkit.org/show_bug.cgi?id=232851 Reviewed by Don Olmstead. Change the reading of status files in the non-find search to properly scope the file access to release the status files. * Scripts/run-jsc-stress-tests: 2021-11-09 Chris Dumez New spec: Block external protocol handler in sandboxed frames https://bugs.webkit.org/show_bug.cgi?id=231727 Reviewed by Brent Fulgham. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (TEST): 2021-11-09 Carlos Alberto Lopez Perez [EWS] Allow the optimization of running only the subset of failed tests on run-layout-tests-without-patch also for patches modifying the TestExpectations files https://bugs.webkit.org/show_bug.cgi?id=231265 Reviewed by Alexey Proskuryakov. On r274475 an optimization was applied to run-layout-tests-without-patch to only run the subset of tests that failed with patch instead of the whole layout tests. But this optimization had a corner case where it couldn't be applied. It seems that we can still apply this optimization in this corner case if we pass '--skipped=always' to run-webkit-tests so that Skipped tests are not run even if those are specified as arguments on the command-line. * CISupport/ews-build/steps.py: (RunWebKitTests.setLayoutTestCommand): (RunWebKitTestsWithoutPatch.setLayoutTestCommand): * CISupport/ews-build/steps_unittest.py: * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_ews_corner_case_failing_test): (RunTest): (RunTest.test_ews_corner_case_failing_directory): (RunTest.test_ews_corner_case_skipped_test): (RunTest.test_ews_corner_case_skipped_directory): * Scripts/webkitpy/port/test.py: 2021-11-08 Myles C. Maxfield Make WebGPU.xcodeproj and WebGPU.framework https://bugs.webkit.org/show_bug.cgi?id=231661 Reviewed by Dean Jackson and Robin Morisset. * Scripts/webkitpy/style/checker.py: * Scripts/webkitpy/style/checkers/sdkvariant.py: 2021-11-08 J Pascoe [WebAuthn] challenge does not get passed to -[_WKWebAuthenticationPanel getAssertionWithChallenge:origin:options:completionHandler:] https://bugs.webkit.org/show_bug.cgi?id=232836 rdar://85163927 Reviewed by Brent Fulgham. -[_WKWebAuthenticationPanel getAssertionWithChallenge:origin:options:completionHandler:] receives an empty challenge, causing _WKWebAuthenticationPanel to immediately close when using the new UNIFIED_ASC_AUTH_UI. This change encodes/decodes challenge in PublicKeyCredentialRequestOptions. Before this field was not used after xpc, but with the new UNIFIED_ASC_AUTH_UI it is. This change also adds an empty value for tests. * TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp: (TestWebKitAPI::TEST): 2021-11-08 Alex Christensen Parse redirect and modify-headers actions for WKContentRuleList https://bugs.webkit.org/show_bug.cgi?id=232838 Reviewed by Tim Hatcher. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::TEST_F): 2021-11-08 Devin Rousso webView.scrollView.indicatorStyle does not work on iOS 15 https://bugs.webkit.org/show_bug.cgi?id=232295 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/ios/WKScrollViewTests.mm: (TEST.WKScrollViewTests.IndicatorStyleSetByClient): Added. (TEST.WKScrollViewTests.BackgroundColorSetByClient): Added. 2021-11-08 Manuel Rego Casasnovas WPT test importer imports rel="mismatch" as the reference https://bugs.webkit.org/show_bug.cgi?id=207175 Reviewed by Jonathan Bedard. Setting "-expected-mismatch" suffix for references from WPT. * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.find_importable_tests): Adding "-mismatch" suffix as needed. * Scripts/webkitpy/w3c/test_parser.py: (TestParser.analyze_test): Store the reference type in test_info["type"]. * Scripts/webkitpy/w3c/test_parser_unittest.py: (test_analyze_test_reftest_one_mismatch): Add new test cases for the reference type. 2021-11-08 Kate Cheney [ iOS15 EWS ] TestWebKitAPI.AppPrivacyReport.LoadSimulatedRequest tests are timing out https://bugs.webkit.org/show_bug.cgi?id=232166 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: 2021-11-07 Simon Fraser Fix the CGEvent types used for wheel event generation from streams https://bugs.webkit.org/show_bug.cgi?id=232805 Reviewed by Sam Weinig. The set of enum values for wheel event types are confusing, and I used the wrong ones in r285390, so fix that. Values are all the same other than kCGMomentumScrollPhaseEnd which is now correct. Also relax parsing of event steam JSON to allow "continue" for momentumPhase; this is the name of the CG-level enum, but AppKit calls this "changed". This will ease conversion from eventSender in tests. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::cgScrollPhaseFromPhase): (WTR::cgMomentumPhaseFromPhase): (WTR::EventSenderProxy::sendWheelEvent): (WTR::cgGesturePhaseFromString): Deleted. * WebKitTestRunner/mac/UIScriptControllerMac.mm: (WTR::eventPhaseFromString): (WTR::UIScriptControllerMac::sendEventStream): 2021-11-08 Andres Gonzalez WTR::AccessibilityController::focusedElement() cannot get the focused object via WKAccessibilityFocusedObject in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=232756 Reviewed by Chris Fleizach. WTR::AccessibilityController::focusedElement() was getting the focused object from WKAccessibilityFocusedObject, which has to run on the main thread. WKAccessibilityFocusedObject was in turn calling AXObjectCache:: focusedUIElementForPage that tried to return the isolated focused object. The problem with this is that the isolated focused object can only be retrieved on the secondary thread. The solution in this patch is to retrieve the focused object from the root object as an AT client would do. Added AccessibilityUIElement::focusedElement in order to retrieve the focused object from the root object. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::focusedElement): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::focusedElement const): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::focusedElement const): * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::focusedElement const): 2021-11-07 Simon Fraser Implement UIScriptController.sendEventStream() on macOS for wheel events https://bugs.webkit.org/show_bug.cgi?id=232794 Reviewed by Tim Horton. eventSender.mouseScrollByWithWheelAndMomentumPhases() is problematic for timing-sensitive scrolling behaviors because the timestamps used are not under script control. It's also a rather unwieldy API. To make wheel event testing easier, implement enough of UIScriptController.sendEventStream() on macOS that it can generate a series of wheel events with predicable timestamps (currently hardcoded to be 16.6ms apart). * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::cgScrollPhaseFromPhase): (WTR::cgGesturePhaseFromString): (WTR::EventSenderProxy::sendWheelEvent): * WebKitTestRunner/mac/UIScriptControllerMac.h: * WebKitTestRunner/mac/UIScriptControllerMac.mm: (WTR::eventPhaseFromString): (WTR::UIScriptControllerMac::sendEventStream): 2021-11-06 David Kilzer Remove empty directories from from svn.webkit.org repository as of r285357 Unreviewed clean up. * WebKitTestRunner/WebKitTestRunnerApp/en.lproj: Removed. 2021-11-06 Tyler Wilcock AX: Rename usages DefinitionList to DescriptionList and DescriptionListDefinition to DescriptionListDetail https://bugs.webkit.org/show_bug.cgi?id=232775 Reviewed by Chris Fleizach. Rename usages of "definition list" to "description list" and DescriptionListDefinition to DescriptionListDetail, as the latter versions of each pair are what the corresponding HTML elements are actually called. https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element https://html.spec.whatwg.org/multipage/grouping-content.html#the-dd-element * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::isInDescriptionListDetail const): Added. (WTR::AccessibilityUIElement::isInDescriptionListTerm const): Added. (WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted. (WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: Rename isInDefinitionListDefinition to isInDescriptionListDetail and isInDefinitionListTerm to isInDescriptionListTerm. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::isInDescriptionListDetail const): Added. (WTR::AccessibilityUIElement::isInDescriptionListTerm const): Added. (WTR::AccessibilityUIElement::isInDefinitionListDefinition const): Deleted. (WTR::AccessibilityUIElement::isInDefinitionListTerm const): Deleted. 2021-11-05 Wenson Hsieh [iOS] Mail compose becomes unresponsive after pasting in text and attempting to type https://bugs.webkit.org/show_bug.cgi?id=232764 rdar://84669661 Reviewed by Geoff Garen. Add an API test that exercises the hang (and also verifies that we don't hit any debug assertions in the process). * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/InsertTextAlternatives.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/simple-editor.html: Added. * TestWebKitAPI/ios/UIKitSPI.h: Drive-by fixes: remove some old staging declarations for UIKit SPI that has long been in the internal iOS 15 SDK. Remove the staging categories and definitions, and move them to the non-internal SDK section instead. 2021-11-05 Ryan Haddad [steps.py] Update macOS versions in build_to_name_mapping https://bugs.webkit.org/show_bug.cgi?id=232732 Reviewed by Jonathan Bedard. * CISupport/ews-build/steps.py: (PrintConfiguration.convert_build_to_os_name): * CISupport/ews-build/steps_unittest.py: * CISupport/build-webkit-org/steps.py: (PrintConfiguration.convert_build_to_os_name): * CISupport/build-webkit-org/steps_unittest.py: 2021-11-05 Lauro Moura [Flatpak SDK] Print SDK version after update https://bugs.webkit.org/show_bug.cgi?id=232725 Reviewed by Adrian Perez de Castro. Print the actual installed version after the update step, even if nothing was updated. This should help tracking the SDK versions across builds on the bots. * flatpak/flatpakutils.py: (WebkitFlatpak.main): 2021-11-05 Ryan Haddad Bring up queues for Monterey https://bugs.webkit.org/show_bug.cgi?id=232186 Unreviewed follow-up fix. * CISupport/build-webkit-org/config.json: Should have used bot185, not bot186. 2021-11-05 Alex Christensen Restructure WKContentRuleList Action storage during compilation and interpretation https://bugs.webkit.org/show_bug.cgi?id=232692 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::testRequest): (TestWebKitAPI::TEST_F): (TestWebKitAPI::actionsEqual): (WebCore::ContentExtensions::operator<<): Deleted. 2021-11-05 Tim Horton generate-xcfilelists doesn't work if build path contains a `+` https://bugs.webkit.org/show_bug.cgi?id=232493 Reviewed by Simon Fraser. * Scripts/webkitpy/generate_xcfilelists_lib/generators.py: (BaseGenerator._generate_derived): (BaseGenerator._replaceSinglePrefix): (BaseGenerator._replacePrefix): (BaseGenerator._unexpand._try_unexpand): (BaseGenerator._replace): Deleted. The xcfilelist generator had a regex injection issue that resulted in paths with not-very-special characters causing it to infinitely regenerate the xcfilelists; we can just use simple string prefix replacement instead. 2021-11-05 Devin Rousso [css-values-4] viewport units should be floats https://bugs.webkit.org/show_bug.cgi?id=231644 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: (evaluateForNumber): (getElementHeight): (TEST.CSSViewportUnits.AllSame): (TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides): (TEST.CSSViewportUnits.SameUnobscuredSizeOverrides): (TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides): * TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm: (TEST.WebKit.ViewportSizeForViewportUnits): 2021-11-05 Jonathan Bedard [ic-stats.py] Change shebang to Python 3 https://bugs.webkit.org/show_bug.cgi?id=232721 Reviewed by Alexey Proskuryakov. * Scripts/ic-stats.py: 2021-11-05 Carlos Garcia Campos [GTK][a11y] Embedded objects are not correctly handled by text interface with ATSPI https://bugs.webkit.org/show_bug.cgi?id=232622 Reviewed by Andres Gonzalez. Add a test case to check handling of embedded objects by text interface. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testTextReplacedObjects): (beforeAll): 2021-11-03 Jonathan Bedard [git-webkit] Add land command https://bugs.webkit.org/show_bug.cgi?id=231821 Reviewed by Dewei Zhu. * Scripts/git-webkit: WebKit still uses Svn as it's canonical source of truth. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git._to_git_ref): Convert identifiers or revisions to git refs. (Git.checkout): Use shared _to_git_ref function. (Git.rebase): Support rebasing identifiers. (Git.pull): Generalize computation of the gmtoffset. (Git.diff_lines): Output diff between two refs. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: (Git.__init__): Add branch, push and diff commands. (Git.filter_branch): Support sed. (Git.pull): Mock `git pull` (Git.move_branch): Mock `git rebase`. (Git.push): Mock `git push`. (Git.reset): Mock `git reset HEAD~#`. * Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: (main): Add land command. * Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py: Added. (Land.parser): (Land.main): Rebase the current branch against it's root, assign the reviewer, check for 'oops' messages, rebase against target branch, update target branch ref, optionally canonicalize, push (or svn dcommit) and update and close pull-request with information on the landed commit. * Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py: (ScmBase.gmtoffset): Add shared computation of GMT offset. * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: (TestGit.test_commits): `git log` should exclude base ref. (TestGit.test_commits_branch): Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py: Added. (repository): (TestLand): (TestLandGitHub): (TestLandBitBucket): 2021-11-04 Jonathan Bedard [generate-webkit-css-docs] Change shebang to Python 3 https://bugs.webkit.org/show_bug.cgi?id=232714 Reviewed by Ryan Haddad. * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version. * Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/generate-webkit-css-docs: Use Python 3 shebang. * Scripts/libraries/resultsdbpy/setup.py: Bump version. 2021-11-04 Jonathan Bedard [run-webkit-websocketserver] Replace `/usr/bin/python` with `/usr/bin/env python` https://bugs.webkit.org/show_bug.cgi?id=232713 Reviewed by Ryan Haddad. * Scripts/run-webkit-websocketserver: (openWebSocketServer): (closeWebSocketServer): 2021-11-04 Andres Gonzalez Fix for crashes in layout tests in AX isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=232680 Reviewed by Chris Fleizach. Changed the return value of WTR::AccessibilityUIElement::attributeValue to be a RetainPtr instead of id. This guaranties that the ObjC object pointed by it is not freed when the value is computed on the AX thread and utilized on the main thread. The following tests were crashing before and now pass: accessibility/mac/internal-link-when-document-has-fragment.html accessibility/svg-remote-element.html accessibility/url-test.html accessibility/video-element-url-attribute.html The following tests were failing before and now pass: accessibility/add-children-pseudo-element.html accessibility/aria-selected.html accessibility/aria-table-with-presentational-elements.html accessibility/mac/aria-columnrowheaders.html accessibility/mac/aria-details.html accessibility/mac/children-in-navigation-order-returns-children.html accessibility/mac/descriptionlist-not-ignored.html accessibility/mac/id-class-attributes.html accessibility/mac/landmark-not-ignored.html accessibility/mac/line-index-for-textmarker.html accessibility/mac/table-visible-rows.html accessibility/mac/treeitem-row-delegation.html accessibility/math-has-non-presentational-children.html accessibility/math-multiscript-attributes.html accessibility/radio-button-group-members.html accessibility/table-column-headers-with-captions.html accessibility/table-header-calculation-for-header-rows.html accessibility/table-roles-hierarchy.html accessibility/treeitem-child-exposed.html The following tests were timing out and now pass: accessibility/aria-combobox-control-owns-elements.html accessibility/loading-iframe-sends-notification.html * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::attributeValue): (WTR::AccessibilityUIElement::descriptionOfValue const): (WTR::AccessibilityUIElement::attributeValue const): (WTR::AccessibilityUIElement::domIdentifier const): (WTR::AccessibilityUIElement::getLinkedUIElements): (WTR::AccessibilityUIElement::getDocumentLinks): (WTR::AccessibilityUIElement::getUIElementsWithAttribute const): (WTR::AccessibilityUIElement::children const): (WTR::AccessibilityUIElement::getChildren): (WTR::AccessibilityUIElement::rowHeaders const): (WTR::AccessibilityUIElement::columnHeaders const): (WTR::AccessibilityUIElement::elementForAttribute const): (WTR::AccessibilityUIElement::elementForAttributeAtIndex const): (WTR::AccessibilityUIElement::detailsElements const): (WTR::AccessibilityUIElement::errorMessageElements const): (WTR::AccessibilityUIElement::allAttributes): (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): (WTR::AccessibilityUIElement::stringAttributeValue): (WTR::AccessibilityUIElement::numberAttributeValue): (WTR::AccessibilityUIElement::uiElementAttributeValue const): (WTR::AccessibilityUIElement::boolAttributeValue): (WTR::AccessibilityUIElement::role): (WTR::AccessibilityUIElement::subrole): (WTR::AccessibilityUIElement::roleDescription): (WTR::AccessibilityUIElement::computedRoleString): (WTR::AccessibilityUIElement::title): (WTR::AccessibilityUIElement::description): (WTR::AccessibilityUIElement::orientation const): (WTR::AccessibilityUIElement::stringValue): (WTR::AccessibilityUIElement::language): (WTR::AccessibilityUIElement::helpText const): (WTR::AccessibilityUIElement::x): (WTR::AccessibilityUIElement::y): (WTR::AccessibilityUIElement::width): (WTR::AccessibilityUIElement::height): (WTR::AccessibilityUIElement::clickPointX): (WTR::AccessibilityUIElement::clickPointY): (WTR::AccessibilityUIElement::lineRectsAndText const): (WTR::AccessibilityUIElement::intValue const): (WTR::AccessibilityUIElement::minValue): (WTR::AccessibilityUIElement::maxValue): (WTR::AccessibilityUIElement::valueDescription): (WTR::AccessibilityUIElement::insertionPointLineNumber): (WTR::AccessibilityUIElement::isEnabled): (WTR::AccessibilityUIElement::isRequired const): (WTR::AccessibilityUIElement::isFocused const): (WTR::AccessibilityUIElement::isSelected const): (WTR::AccessibilityUIElement::isIndeterminate const): (WTR::AccessibilityUIElement::isExpanded const): (WTR::AccessibilityUIElement::currentStateValue const): (WTR::AccessibilityUIElement::sortDirection const): (WTR::AccessibilityUIElement::hierarchicalLevel const): (WTR::AccessibilityUIElement::classList const): (WTR::AccessibilityUIElement::speakAs): (WTR::AccessibilityUIElement::ariaIsGrabbed const): (WTR::AccessibilityUIElement::ariaDropEffects const): (WTR::AccessibilityUIElement::attributesOfColumnHeaders): (WTR::AccessibilityUIElement::attributesOfRowHeaders): (WTR::AccessibilityUIElement::attributesOfColumns): (WTR::AccessibilityUIElement::attributesOfRows): (WTR::AccessibilityUIElement::attributesOfVisibleCells): (WTR::AccessibilityUIElement::attributesOfHeader): (WTR::AccessibilityUIElement::indexInTable): (WTR::AccessibilityUIElement::rowIndexRange): (WTR::AccessibilityUIElement::columnIndexRange): (WTR::AccessibilityUIElement::horizontalScrollbar const): (WTR::AccessibilityUIElement::verticalScrollbar const): (WTR::AccessibilityUIElement::selectedTextRange): (WTR::AccessibilityUIElement::setSelectedChildAtIndex const): (WTR::AccessibilityUIElement::removeSelectionAtIndex const): (WTR::AccessibilityUIElement::documentEncoding): (WTR::AccessibilityUIElement::documentURI): (WTR::AccessibilityUIElement::url): (WTR::AccessibilityUIElement::isMultiSelectable const): (WTR::AccessibilityUIElement::isOnScreen const): (WTR::AccessibilityUIElement::embeddedImageDescription const): (WTR::AccessibilityUIElement::imageOverlayElements const): (WTR::AccessibilityUIElement::hasPopup const): (WTR::AccessibilityUIElement::popupValue const): (WTR::AccessibilityUIElement::selectedTextMarkerRange): (WTR::AccessibilityUIElement::resetSelectedTextMarkerRange): (WTR::AccessibilityUIElement::startTextMarker): (WTR::AccessibilityUIElement::endTextMarker): (WTR::AccessibilityUIElement::mathPostscriptsDescription const): (WTR::AccessibilityUIElement::mathPrescriptsDescription const): (WTR::AccessibilityUIElement::mathRootRadicand const): (WTR::AccessibilityUIElement::pathDescription const): 2021-11-03 Alex Christensen Remove QuickTimePluginReplacement and YouTubePluginReplacement https://bugs.webkit.org/show_bug.cgi?id=232400 Reviewed by Chris Dumez. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp: Removed. 2021-11-03 Yousuke Kimoto Use 0.0.0.0 when "--all-interfaces" is given for websocket_server https://bugs.webkit.org/show_bug.cgi?id=231798 Reviewed by Jonathan Bedard. When run-webkit-tests runs with "--all-interfaces", servers running on the host PC should use "0.0.0.0". It will help situations where host and target systems are discrete so that test programs can connect to test servers on the host PC. * Scripts/webkitpy/layout_tests/servers/websocket_server.py: (PyWebSocket.__init__): Fixed a style check error. (PyWebSocket._prepare_config): Added "0.0.0.0" for --all-interfaces. 2021-11-03 Yusuke Suzuki [JSC] Clean up StructureStubInfo initialization https://bugs.webkit.org/show_bug.cgi?id=232652 Reviewed by Saam Barati. * TestWebKitAPI/Tests/WTF/FixedVector.cpp: (TestWebKitAPI::TEST): 2021-11-03 Alex Christensen [ iOS Debug ] TestWebKitAPI.ResourceLoadStatistics.GrandfatherCallback is failing https://bugs.webkit.org/show_bug.cgi?id=232675 Reviewed by Kate Cheney. Clearing website data attempts a connection with the daemon. For now, just tell it not to connect to the daemon. * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): 2021-11-03 Chris Dumez _pasteboardWithName should be thread-safe https://bugs.webkit.org/show_bug.cgi?id=232670 Reviewed by Tim Horton. _pasteboardWithName should be thread-safe, to match [NSPasteboard _pasteboardWithName]. This was leading to flaky crashes in _pasteboardWithName getting called off the main thread from ShareKit code. * DumpRenderTree/mac/DumpRenderTreePasteboard.mm: (+[DumpRenderTreePasteboard _pasteboardWithName:]): (+[DumpRenderTreePasteboard releaseLocalPasteboards]): * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: (+[WebKitTestRunnerPasteboard _pasteboardWithName:]): (+[WebKitTestRunnerPasteboard releaseLocalPasteboards]): 2021-11-03 Ryan Haddad [EWS] Add more bots to iOS layout and API test queues https://bugs.webkit.org/show_bug.cgi?id=232678 Reviewed by Aakash Jain. * CISupport/ews-build/config.json: 2021-11-03 Simon Fraser Expose fuzzy match data in layout test results https://bugs.webkit.org/show_bug.cgi?id=232523 Reviewed by Jonathan Bedard. For a failing ref (or image) test, include the fuzzy matching data in full_results.json in the form "image_difference": { "max_difference": 13, "total_pixels": 167 }, and show that in the image comparison page that's written out for each test result. Fix some tests that relied on JSON property serialization ordering (we don't serialize with `sort_keys=True`). * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._save_json_files): * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py: (TestResultWriter.write_image_diff_files): * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py: (JSONResultsGenerator.generate_times_ms_file): * Scripts/webkitpy/layout_tests/models/test_failures.py: (FailureImageHashMismatch.formatted_diff_percent): (FailureImageHashMismatch): (FailureImageHashMismatch.formatted_fuzzy_data): (FailureImageHashMismatch.write_failure): (FailureReftestMismatch.message): (FailureReftestMismatch.formatted_diff_percent): (FailureReftestMismatch): (FailureReftestMismatch.formatted_fuzzy_data): (FailureReftestMismatch.write_failure): * Scripts/webkitpy/layout_tests/models/test_run_results.py: (_interpret_test_failures): * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py: (InterpretTestFailuresTest.test_interpret_test_failures): * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_retrying_force_pixel_tests): 2021-11-03 Kate Cheney [iOS] Need API for marking file requests as non-app-initiated https://bugs.webkit.org/show_bug.cgi?id=232506 Reviewed by Brent Fulgham. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: * TestWebKitAPI/Tests/WebKitCocoa/file-with-iframe.html: Added. 2021-11-03 Brady Eidson Fix iOS API tests after r285199 https://bugs.webkit.org/show_bug.cgi?id=232649 Unreviewed. * TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: Definitely not ready for these tests to start running. 2021-11-02 Tim Horton UnicodeDecodeError in write_reftest copying a non-UTF8 expected result file https://bugs.webkit.org/show_bug.cgi?id=232643 Reviewed by Alexey Proskuryakov. * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py: (TestResultWriter.write_reftest): If a reftest's -expected.html file is not valid UTF-8, and the test fails, when we copy the expected file from the layout tests directory to the test results directory, we attempt to parse it as UTF-8, resulting in an exception being thrown. Instead of needlessly reading in the file as a string and immediately writing it back out, just copy the file... I'm not sure there are any not-valid-UTF-8 *ref* tests in the tree, but there is at least one not-valid-UTF-8 *text* test, which can be run as a ref-test in some scenarios (see r285132), in which case this problem occurs: fast/css/line-height-determined-by-primary-font.html. Also, explicitly ensure the output directory exists before copying to avoid regressing r122505. Previously this was done inside _write_text_file. 2021-11-02 Per Arne REGRESSION (r268421): TestWebKitAPI.WebKit.PreferenceChanges* tests are flaky failures https://bugs.webkit.org/show_bug.cgi?id=221848 Reviewed by Brent Fulgham. After r268421, the preferences are set asynchronously in the WebContent process, which introduced this flakiness. This patch addresses this by modifying the flaky tests to loop until the preference value is equal to the expected value. * TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm: (TEST): 2021-11-02 Jonathan Bedard [webkitscmpy] Reduce autoinstalls on import https://bugs.webkit.org/show_bug.cgi?id=232574 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Remove whichcraft (webkitcorepy registers it). * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: Remove unused webkitscmpy imports. * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py: Remote unused webkitcorepy import. * Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py: Move whichcraft to function. * Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: Move jinja2 to function. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py: Move fasteners, xmltodict import to functions. 2021-11-02 Kate Cheney PCM: Safari on iOS and macOS are not sending ad click attribution reports for Private Click Measurement https://bugs.webkit.org/show_bug.cgi?id=228104 Reviewed by John Wilander. * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp: (TestWebKitAPI::TEST): 2021-11-02 Tim Horton dumpAsText() tests don't get the ref-test treatment when using --self-compare-with-header https://bugs.webkit.org/show_bug.cgi?id=232611 Reviewed by Jonathan Bedard. One oversight in r285132: a test can disable pixel dumping by calling dumpAsText(). This causes --self-compare-with-header to fall over because it expects every test to have pixel results (and that is the whole point). Add an un-overrideable `--force-dump-pixels` TestCommand argument, and adopt it for self-comparison tests. * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner._run_self_comparison_test): * Scripts/webkitpy/port/driver.py: (DriverInput.__init__): (DriverInput.__repr__): (Driver._command_from_driver_input): * TestRunnerShared/TestCommand.cpp: (WTR::parseInputLine): * TestRunnerShared/TestCommand.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::runTest): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::dumpResults): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/TestInvocation.h: 2021-11-02 Kate Cheney https://bugs.webkit.org/show_bug.cgi?id=232593 Remove isAppInitiated from _WKSessionState Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: 2021-11-02 Jonathan Bedard [webkitscmpy] Generalize pull-request title generation. https://bugs.webkit.org/show_bug.cgi?id=232463 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py: (PullRequest.title_for): Compute pull-request title for a set of commits. (PullRequest.main): Generalize pull-request title generation. 2021-11-02 Zixing Liu [GTK][WPE] Support setting status code and getting HTTP method in custom URI scheme handlers https://bugs.webkit.org/show_bug.cgi?id=231880 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp: (testWebContextURIScheme): Added tests to test new public APIs for WebKitGtk 2021-11-01 Fujii Hironori ImageDiff.cpp(74): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 2 has type 'size_t' https://bugs.webkit.org/show_bug.cgi?id=232596 Reviewed by Don Olmstead. Since r284764, MSVC reports the following warning and a suggestion. > Tools\ImageDiff\ImageDiff.cpp(74): warning C4477: 'fprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 2 has type 'size_t' > Tools\ImageDiff\ImageDiff.cpp(74): note: consider using '%zu' in the format string * ImageDiff/ImageDiff.cpp: (processImages): Use %zu for size_t. 2021-11-01 Jonathan Bedard [webkitscmpy] Only respect the latest review https://bugs.webkit.org/show_bug.cgi?id=231987 Reviewed by Dewei Zhu. GitHub will report the entire history of a review, we should only respect the latest review state. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.PRGenerator.reviewers): * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: (TestNetworkPullRequestGitHub.test_approved_edits): 2021-11-01 Sam Sneddon Improve LayoutTestFinder test coverage https://bugs.webkit.org/show_bug.cgi?id=232576 Reviewed by Jonathan Bedard. Some of these are largely copied from layout_tests/run_webkit_tests_integrationtest.py, but in unit test form for the test finder. * Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py: (LayoutTestFinderTests.__init__): (LayoutTestFinderTests): (LayoutTestFinderTests.setUp): (LayoutTestFinderTests.tearDown): (LayoutTestFinderTests.test_find_no_paths_specified): (LayoutTestFinderTests.test_find_no_paths_sorted): (LayoutTestFinderTests.test_find_all_no_paths): (LayoutTestFinderTests.test_includes_other_platforms): (LayoutTestFinderTests.test_find_one_test): (LayoutTestFinderTests.test_find_platform): (LayoutTestFinderTests.test_find_platform_self): (LayoutTestFinderTests.test_find_platform_other): (LayoutTestFinderTests.test_find_platform_specific): (LayoutTestFinderTests.test_find_platform_specific_directory): (LayoutTestFinderTests.test_find_directory_includes_platform_specific): (LayoutTestFinderTests.test_find_glob): (LayoutTestFinderTests.test_find_glob_mixed_file_type_sorted): (LayoutTestFinderTests.test_find_glob_directory): (LayoutTestFinderTests.test_find_glob_directory_b): (LayoutTestFinderTests.test_find_glob_directory_e): (LayoutTestFinderTests.test_find_directory): (LayoutTestFinderTests.test_find_directory_trailing_slash): (LayoutTestFinderTests.test_find_directory_star): (LayoutTestFinderTests.test_preserves_order): (LayoutTestFinderTests.test_preserves_order_multiple_times): (LayoutTestFinderTests.test_preserves_order_directories): (LayoutTestFinderTests.test_preserves_order_mixed_file_type): (LayoutTestFinderTests.test_preserves_order_mixed_file_type_b): (LayoutTestFinderTests.test_find_directory_multiple_times): (LayoutTestFinderTests.test_no_reference): (LayoutTestFinderTests.test_glob_no_references): (LayoutTestFinderTests.test_find_with_skipped_directories): (LayoutTestFinderTests.test_find_with_skipped_directories_2): (LayoutTestFinderTests.test_is_test_file): (LayoutTestFinderTests.test_is_w3c_resource_file): (LayoutTestFinderTests.make_finder): Deleted. * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.setUp): Re-enable tests on Python 3, as this now works (RunTest.test_child_processes_min): Also ignore tests in platform/ * Scripts/webkitpy/port/test.py: 2021-11-01 Tim Horton Add a run-webkit-tests mode to A/B test a given feature https://bugs.webkit.org/show_bug.cgi?id=232553 Reviewed by Jonathan Bedard. Add the argument --self-compare-with-header to run-webkit-tests, which can be used to test the impact of a given feature (or set of features; it accepts the standard test features header format). When tests are run in this mode, all tests are run in the ref-test style, but with the `expected` and `actual` results loading the same test file (ignoring the usual -expected.html or whatever); they differ only in the set of features/preferences enabled. This is especially useful for testing the impact of e.g. platform graphics features, where the difference between the shipping behavior and in-development behavior is more interesting than whether or not it actually makes the tests, as written, fail. * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner): (SingleTestRunner._run_comparison_test): Add the comparison test runner, and prefer it if requested. One note here: the run with the options derived from the given header is considered the "actual" result and the default configuration the "expected". * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): * Scripts/webkitpy/port/driver.py: (DriverInput.__init__): (DriverInput.__repr__): (Driver._command_from_driver_input): Pass the comparison test header along to the test runner. Also, fix a longstanding error where --dump-jsconsolelog-in-stderr could get inserted immediately after --pixel-test, causing the test runner to consume it as the expected image hash! And leave a comment so nobody else has to debug this again... * TestRunnerShared/TestCommand.cpp: (WTR::parseInputLine): * TestRunnerShared/TestCommand.h: * TestRunnerShared/TestFeatures.cpp: (WTR::parseTestHeaderString): (WTR::parseTestHeader): (WTR::featureDefaultsFromComparisonTestHeader): Factor out the parsing of the part of the test header inside the [ ], since we use this format for the value of --self-compare-with-header as well. * TestRunnerShared/TestFeatures.h: * WebKitTestRunner/Options.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::testOptionsForTest const): Merge the comparison header's options in to the test options before the test's own header, so that the comparison header wins. 2021-11-01 Jonathan Bedard webkitpy: Remove obsolete port name https://bugs.webkit.org/show_bug.cgi?id=169302 Reviewed by Alex Christensen. Removing a temporary workaround from r213654. * Scripts/webkitpy/common/config/ports.py: (DeprecatedPort.port): Remove mapping from 'ios' to 'ios-device.' 2021-11-01 Fujii Hironori TestWTF.WTF_CompactUniquePtrTuple.Subclassing is randomly failing on WinCairo tester bots https://bugs.webkit.org/show_bug.cgi?id=232556 Reviewed by Yusuke Suzuki. "EXPECT_NE(oldPointer, a.pointer())" of line 241 was randomly failing on WinCairo tester bots. This seems a simple mistake of the test case. 'oldPointer' should be updated before destructing the old value. * TestWebKitAPI/Tests/WTF/CompactUniquePtrTuple.cpp: (WTF_CompactUniquePtrTuple::Subclassing): 2021-11-01 Brady Eidson webpushd: Add mock in-memory registration, and the WKWebsiteDataStore SPI to manage them https://bugs.webkit.org/show_bug.cgi?id=232539 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: (-[NotificationPermissionDelegate _webView:requestNotificationPermissionForSecurityOrigin:decisionHandler:]): (-[NotificationPermissionDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TestWebKitAPI::then): 2021-11-01 Devin Rousso [ iOS15 EWS ] TestWebKitAPI.CSSViewportUnits.SameUnobscuredSizeOverrides flaky fails on EWS https://bugs.webkit.org/show_bug.cgi?id=232158 Reviewed by Megan Gardner. * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: (TEST.CSSViewportUnits.AllSame): (TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides): (TEST.CSSViewportUnits.SameUnobscuredSizeOverrides): (TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides): 2021-11-01 Simon Fraser ImageDiff no longer needs a --tolerance argument, and fix sometimes-black diff images https://bugs.webkit.org/show_bug.cgi?id=232522 Reviewed by Martin Robinson. ImageDiff no longer deals with tolerance, so remove `--tolerance` handling code in ImageDiff and the driving script. Also fix an issue where the diff image could be all black pixels even when there was a diff; we need to ensure that a pixel with any diff is non-zero before scaling, and we need to ensure that scaling by legacyDistanceMax doesn't overflow. * ImageDiff/ImageDiff.cpp: (processImages): (main): * ImageDiff/PlatformImage.cpp: (ImageDiff::PlatformImage::difference): * ImageDiff/PlatformImage.h: * ImageDiff/cg/PlatformImageCG.cpp: (ImageDiff::PlatformImage::createFromFile): * Scripts/webkitpy/port/image_diff.py: (ImageDiffer.diff_image): (ImageDiffer._start): No need to restart ImageDiff if the tolerance changed, since ImageDiff doesn't consult it. Tolerance in the python here just feeds into the ImageDiffResult. * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_diff_image): 2021-11-01 Aakash Jain Fix a typo in EWS emails Unreviewed minor fix. * CISupport/ews-build/steps.py: (AnalyzeCompileWebKitResults.send_email_for_new_build_failure): (AnalyzeLayoutTestsResults.send_email_for_new_test_failures): * CISupport/ews-build/steps_unittest.py: Unit-test fix after 243670@main. 2021-10-30 Wenson Hsieh Layer tree should not be stuck in frozen state after explicitly stopping a page load https://bugs.webkit.org/show_bug.cgi?id=232532 rdar://84522357 Reviewed by Tim Horton. Add support for `TestRunner.stopLoading()`, which immediately stops the page load, emulating what would normally happen if the user taps or clicks the "x" button to cancel loading in Safari. See the layout test for more details. * DumpRenderTree/TestRunner.cpp: (stopLoadingCallback): (TestRunner::staticFunctions): * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::stopLoading): * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::stopLoading): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::stopLoading): * WebKitTestRunner/InjectedBundle/TestRunner.h: 2021-10-30 Chris Dumez Improve error handling in sendWithAsyncReply() https://bugs.webkit.org/show_bug.cgi?id=232508 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm: (TEST): 2021-10-30 Sam Sneddon Ensure we stop LayoutTest servers without them becoming zombies https://bugs.webkit.org/show_bug.cgi?id=225189 Reviewed by Jonathan Bedard. Also increase the polling frequency in HttpServerBase._wait_for_action, as this is a major source of delay when running run-webkit-tests --dry-run due to the number of servers we're starting nowadays. * Scripts/webkitpy/common/system/executive_mock.py: (MockProcess.__init__): Rename self.returncode to _returncode (MockProcess.returncode): returncode should be None if process is still running * Scripts/webkitpy/layout_tests/servers/http_server.py: (Lighttpd._spawn_process): Store Popen object (Lighttpd._check_and_kill): Skip "kill" if process has returned (Lighttpd._is_server_running_on_all_ports): Correctly raise ServerError if it has returned * Scripts/webkitpy/layout_tests/servers/http_server_base.py: (HttpServerBase.start): Change polling frequency for cygwin from 0.1Hz to default (HttpServerBase._wait_for_action): Increase default polling frequency to 10Hz from 1Hz * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py: (WebPlatformTestServer._stop_running_server): Poll first so we don't have zombies keeping references to pipes 2021-10-30 Kate Cheney [iOS 15] Loads after WKWebView session restore are marked as app-initiated https://bugs.webkit.org/show_bug.cgi?id=232486 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: 2021-10-29 Stephan Szabo [PlayStation] Build fix after r285020 https://bugs.webkit.org/show_bug.cgi?id=232494 Unreviewed temporary Build Fix Remove test that requires unsupported WTF::FileSystem functions. * TestWebKitAPI/PlatformPlayStation.cmake: 2021-10-29 Alex Christensen Revert r285034 webkit.org/b/232166 The test still times out in EWS. * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: 2021-10-29 Alex Christensen Unreviewed, reverting r284917. Likely caused significant performance regression Reverted changeset: "Remove properties set by NSURLProtocol on NSURLRequest before serializing" https://bugs.webkit.org/show_bug.cgi?id=232332 https://commits.webkit.org/r284917 2021-10-29 Alex Christensen Fix AppleWin build after r285051 ​https://bugs.webkit.org/show_bug.cgi?id=232462 * DumpRenderTree/CMakeLists.txt: 2021-10-29 Alex Christensen [ Monterey iOS15 ] TestWebKitAPI.URLSchemeHandler.Ranges is a constant timeout https://bugs.webkit.org/show_bug.cgi?id=231394 Reviewed by Jer Noble. For some reason, AVFoundation used to play videos from custom schemes when you respond to range requests with 1 fewer byte than requested. They stopped successfully playing videos in such circumstances, which is fine. I had accidentally done that in my test. When I respond properly, the test starts passing again. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: 2021-10-29 John Pascoe Add last modified and creation time to +[_WKWebAuthenticationPanel getAllLocalAuthenticatorCredentials] https://bugs.webkit.org/show_bug.cgi?id=232390 Reviewed by Darin Adler. These fields (creation time and last modified) are useful for providing context about credentials. The modifications to the tests verify they are properly added. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-10-29 Alex Christensen Fix macOS clean build after r285047 https://bugs.webkit.org/show_bug.cgi?id=232462 * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/TestNetscapePlugIn: Removed. 2021-10-29 Jonathan Bedard [webkitscmpy] Assign PR to author https://bugs.webkit.org/show_bug.cgi?id=232348 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py: (GitHub.request): Add assignees. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.PRGenerator.create): Assign created PR to it's author. (GitHub.PRGenerator.update): Assign modified PR to it's editor. * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: Add assignees. 2021-10-29 Alex Christensen Re-enable two AppPrivacyReport tests webkit.org/b/232166 I ran them locally on iOS simulator and they ran fine. They were disabled during a tumultuous time, and the cause of their timeouts is likely resolved. I'll watch the bots and see if they agree. * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: 2021-10-29 Jonathan Bedard [webkitscmpy] Add fetch and rebase https://bugs.webkit.org/show_bug.cgi?id=232447 Reviewed by Dewei Zhu. To land commits, we need to be able to rebase a branch against another. Additionally, when rebasing, we need to discard stale cache bits. This is also true when pulling and rebasing against main. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.Cache.clear): Clear cache of a specific branch. (Git.rebase): Rebase a branch on top of another. (Git.fetch): Fetch specific branch ref. (Git.pull): Use generalized fetch command, clear cache for updated branch if that branch is not the default branch. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: (Git.__init__): Add rebase mock. (Git.rebase): * Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py: (PullRequest.main): Recompute branch-point after rebase. * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: (test_rebase): 2021-10-29 Takashi Komori WKAPI does not have any APIs to set cookie path to WKWebsiteDataStoreConfigurationRef https://bugs.webkit.org/show_bug.cgi?id=232336 Reviewed by Alex Christensen. Add cookie-path setting API for WKWebasiteDataStoreConfigurationRef. * TestWebKitAPI/PlatformPlayStation.cmake: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/Tests/WebKit/CookieStorageFile.cpp: Added. (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST_F): 2021-10-28 Jonathan Bedard [webkitscmpy] Fix commits set on branch https://bugs.webkit.org/show_bug.cgi?id=232443 Reviewed by Darin Adler. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.commits): We are appending to list of commits, not pre-pending. * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: (TestGitHub.test_commits_branch_ref): 2021-10-28 Andres Gonzalez Isolated tree mode: Dispatch all calls to [WebAccessibilityObjectWrapper accessibilityAttributeValue] in WTR::AccessibilityUIElement to the AX thread. https://bugs.webkit.org/show_bug.cgi?id=232415 Reviewed by Chris Fleizach. This is necessary to simulate running accessibility layout tests on the secondary AX thread. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::descriptionOfValue const): (WTR::descriptionOfElements): (WTR::AccessibilityUIElement::attributeValue const): (WTR::AccessibilityUIElement::domIdentifier const): (WTR::AccessibilityUIElement::getLinkedUIElements): (WTR::AccessibilityUIElement::getDocumentLinks): (WTR::AccessibilityUIElement::getUIElementsWithAttribute const): (WTR::AccessibilityUIElement::children const): (WTR::AccessibilityUIElement::getChildren): (WTR::AccessibilityUIElement::rowHeaders const): (WTR::AccessibilityUIElement::columnHeaders const): (WTR::AccessibilityUIElement::elementForAttribute const): (WTR::AccessibilityUIElement::elementForAttributeAtIndex const): (WTR::AccessibilityUIElement::detailsElements const): (WTR::AccessibilityUIElement::errorMessageElements const): (WTR::AccessibilityUIElement::allAttributes): (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): (WTR::AccessibilityUIElement::stringAttributeValue): (WTR::AccessibilityUIElement::numberAttributeValue): (WTR::AccessibilityUIElement::uiElementAttributeValue const): (WTR::AccessibilityUIElement::boolAttributeValue): (WTR::AccessibilityUIElement::role): (WTR::AccessibilityUIElement::subrole): (WTR::AccessibilityUIElement::roleDescription): (WTR::AccessibilityUIElement::computedRoleString): (WTR::AccessibilityUIElement::title): (WTR::AccessibilityUIElement::description): (WTR::AccessibilityUIElement::orientation const): (WTR::AccessibilityUIElement::stringValue): (WTR::AccessibilityUIElement::language): (WTR::AccessibilityUIElement::helpText const): (WTR::AccessibilityUIElement::x): (WTR::AccessibilityUIElement::y): (WTR::AccessibilityUIElement::width): (WTR::AccessibilityUIElement::height): (WTR::AccessibilityUIElement::clickPointX): (WTR::AccessibilityUIElement::clickPointY): (WTR::AccessibilityUIElement::lineRectsAndText const): (WTR::AccessibilityUIElement::intValue const): (WTR::AccessibilityUIElement::minValue): (WTR::AccessibilityUIElement::maxValue): (WTR::AccessibilityUIElement::valueDescription): (WTR::AccessibilityUIElement::insertionPointLineNumber): (WTR::AccessibilityUIElement::isEnabled): (WTR::AccessibilityUIElement::isRequired const): (WTR::AccessibilityUIElement::isFocused const): (WTR::AccessibilityUIElement::isSelected const): (WTR::AccessibilityUIElement::isIndeterminate const): (WTR::AccessibilityUIElement::isExpanded const): (WTR::AccessibilityUIElement::currentStateValue const): (WTR::AccessibilityUIElement::sortDirection const): (WTR::AccessibilityUIElement::hierarchicalLevel const): (WTR::AccessibilityUIElement::classList const): (WTR::AccessibilityUIElement::speakAs): (WTR::AccessibilityUIElement::ariaIsGrabbed const): (WTR::AccessibilityUIElement::ariaDropEffects const): (WTR::AccessibilityUIElement::attributesOfColumnHeaders): (WTR::AccessibilityUIElement::attributesOfRowHeaders): (WTR::AccessibilityUIElement::attributesOfColumns): (WTR::AccessibilityUIElement::attributesOfRows): (WTR::AccessibilityUIElement::attributesOfVisibleCells): (WTR::AccessibilityUIElement::attributesOfHeader): (WTR::AccessibilityUIElement::indexInTable): (WTR::AccessibilityUIElement::rowIndexRange): (WTR::AccessibilityUIElement::columnIndexRange): (WTR::AccessibilityUIElement::horizontalScrollbar const): (WTR::AccessibilityUIElement::verticalScrollbar const): (WTR::AccessibilityUIElement::selectedTextRange): (WTR::AccessibilityUIElement::setSelectedChildAtIndex const): (WTR::AccessibilityUIElement::removeSelectionAtIndex const): (WTR::AccessibilityUIElement::documentEncoding): (WTR::AccessibilityUIElement::documentURI): (WTR::AccessibilityUIElement::url): (WTR::AccessibilityUIElement::isMultiSelectable const): (WTR::AccessibilityUIElement::isOnScreen const): (WTR::AccessibilityUIElement::embeddedImageDescription const): (WTR::AccessibilityUIElement::imageOverlayElements const): (WTR::AccessibilityUIElement::hasPopup const): (WTR::AccessibilityUIElement::popupValue const): (WTR::AccessibilityUIElement::selectedTextMarkerRange): (WTR::AccessibilityUIElement::resetSelectedTextMarkerRange): (WTR::AccessibilityUIElement::startTextMarker): (WTR::AccessibilityUIElement::endTextMarker): (WTR::_convertMathMultiscriptPairsToString): (WTR::AccessibilityUIElement::mathPostscriptsDescription const): (WTR::AccessibilityUIElement::mathPrescriptsDescription const): (WTR::AccessibilityUIElement::mathRootRadicand const): (WTR::AccessibilityUIElement::pathDescription const): (WTR::descriptionOfValue): Deleted. (WTR::attributesOfElement): Deleted. 2021-10-28 Simon Fraser Prepare SingleTestRunnerTest to read fuzzy pixel matching data https://bugs.webkit.org/show_bug.cgi?id=232410 Reviewed by Martin Robinson. Add code to SingleTestRunnerTest to get fuzzy pixel matching data from the tag in a test in the case of a hash match failure[1]. In future this will be used to determine if the test can pass with acceptable fuzziness. [1] Strictly speaking this can result in wrong behavior; a test with is supposed to fail if the differences are below the minimum specified values, so for correct WPT behavior we would need to always look for the meta tag. But to avoid the perf impact of always parsing tests, for now only look for the tag in the case of hash failure. Add unit tests for the new functionality in SingleTestRunner. * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner): (SingleTestRunner._relative_reference_path): (SingleTestRunner._fuzzy_matching_values): (SingleTestRunner._test_passes_fuzzy_matching): (SingleTestRunner._compare_output_with_reference): * Scripts/webkitpy/layout_tests/controllers/single_test_runner_unittest.py: Added. (TestDriver): (TestDriver.run_test): (TestDriver.start): (TestDriver.stop): (SingleTestRunnerTest): (SingleTestRunnerTest._add_file): (SingleTestRunnerTest._make_test_runner): (SingleTestRunnerTest.test_fuzzy_matching_values): (SingleTestRunnerTest.test_fuzzy_matching_values_for_ref): 2021-10-28 Youenn Fablet Fix CARingBuffer mix mode https://bugs.webkit.org/show_bug.cgi?id=232427 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebCore/CARingBuffer.cpp: 2021-10-28 Simon Fraser Enhance test_parser.py to find fuzzy matching metadata https://bugs.webkit.org/show_bug.cgi?id=232399 Reviewed by Martin Robinson. w3c/test_parser is used by wpt import code, and it knows how to parse a file for various meta tags. Enhance it to find and return the data in test_info for future use by layout tests, using code copied from wpt/tools/manifest/sourcefile.py. Tested by new unit tests in test_parser_unittest.py * Scripts/webkitpy/w3c/test_parser.py: (TestParser.analyze_test): (TestParser.has_fuzzy_metadata): (TestParser): (TestParser.fuzzy_metadata): * Scripts/webkitpy/w3c/test_parser_unittest.py: (_test_info_from_test_with_contents): (test_simple_fuzzy_data): (test_nameless_fuzzy_data): (test_range_fuzzy_data): (test_nameless_range_fuzzy_data): (test_per_ref_fuzzy_data): 2021-10-28 David Kilzer [Tools] Enable -Wformat=2 warnings Reviewed by Darin Adler. * DumpRenderTree/mac/Configurations/Base.xcconfig: (WARNINGS_CFLAGS): * ImageDiff/cg/Configurations/Base.xcconfig: (WARNINGS_CFLAGS): * MiniBrowser/Configurations/Base.xcconfig: (WARNINGS_CFLAGS): * MobileMiniBrowser/Configurations/Base.xcconfig: (WARNINGS_CFLAGS): * TestWebKitAPI/Configurations/Base.xcconfig: (WARNINGS_CFLAGS): - Add -Wformat=2 switch, which includes -Wformat-nonliteral. * TestWebKitAPI/PlatformUtilities.h: (TestWebKitAPI::Util::waitForConditionWithLogging): - Add NS_FORMAT_FUNCTION() attribute. * TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm: (TEST): - Change type of format string to `NSString *const`. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h: (ServiceWorkerTCPServer::request): (ServiceWorkerTCPServer::requestWithLocalhost): (ServiceWorkerTCPServer::requestWithFragment): - Call -[NSString initWithFormat:] in each method so the format string is used directly in the method call. (ServiceWorkerTCPServer::respondToRequests): - Change type of format string to `NSString *const`, and fix placeholder for strlen() return value. (ServiceWorkerTCPServer::requestWithFormat): Delete. (ServiceWorkerTCPServer::requestWithURLString): - Rename from requestWithFormat() and take a `url` parameter instead of a `format` parameter. * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::request const): - Change switch statement to set the scheme for the URL, and move the format string into +[NSString stringWithFormat:]. * WebEditingTester/Configurations/Base.xcconfig: (WARNINGS_CFLAGS): * WebKitTestRunner/Configurations/Base.xcconfig: (WARNINGS_CFLAGS): - Add -Wformat=2 switch, which includes -Wformat-nonliteral. 2021-10-27 Jonathan Bedard [webkitscmpy] Generate commit message template https://bugs.webkit.org/show_bug.cgi?id=231023 Unreviewed follow-up fix. * Scripts/git-webkit: Match repository base, not folder containing repository. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: (Setup.git): Mark hook as executable. 2021-10-27 Alexey Proskuryakov AutoInstall should have separate install directories per CPU architecture https://bugs.webkit.org/show_bug.cgi?id=232403 Reviewed by Jonathan Bedard. * Scripts/webkitpy/__init__.py: 2021-10-27 Alex Christensen Use correct String constructor in PrivateClickMeasurement.FraudPrevention API test https://bugs.webkit.org/show_bug.cgi?id=232362 Reviewed by Darin Adler. The Vector received in the CompletionHandler given to Connection::receiveHTTPRequest is not null terminated, so we need to call the String constructor that takes a length instead of assuming the byte after the Vector buffer is 0. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): 2021-10-27 Kate Cheney REGRESSION: [iOS] TestWebKitAPI.InAppBrowserPrivacy.AppBoundDomainAllowsServiceWorkers is failing https://bugs.webkit.org/show_bug.cgi?id=227918 Unreviewed fix to unskip failing test that was fixed by https://commits.webkit.org/239967@main. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: 2021-10-27 Simon Fraser Preserve image diff precision until display time https://bugs.webkit.org/show_bug.cgi?id=232365 Reviewed by Martin Robinson. Keep the precise image diff percentage value, saving it in full_results.json, and only round it at presentation time in results.html. * Scripts/webkitpy/port/image_diff.py: (ImageDiffer._read): * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_diff_image_failed_with_rounded_diff): 2021-10-27 Dmitry Bezhetskov [WASM-Function-References] Add call_ref spec tests https://bugs.webkit.org/show_bug.cgi?id=229710 Reviewed by Yusuke Suzuki. Add a new routine to run typed function references spec tests. * Scripts/run-jsc-stress-tests: 2021-10-27 Simon Fraser Store WPT-style fuzzy pixel matching data in ImageDiffResult https://bugs.webkit.org/show_bug.cgi?id=232352 Reviewed by Martin Robinson. Always run ImageDiff with `--difference` so that it prints the "maxDifference=; totalPixels=" output, and parse and store this output in ImageDiffResult. * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_tolerance.ImageDiffTestPort.diff_image): * Scripts/webkitpy/port/image_diff.py: (ImageDiffResult.__init__): (ImageDiffResult.__eq__): (ImageDiffResult.__repr__): (ImageDiffer._start): (ImageDiffer._read): * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_diff_image.make_proc): (PortTestCase.test_diff_image): (PortTestCase.test_diff_image_passed): (PortTestCase.test_diff_image_passed_with_tolerance): (PortTestCase.test_diff_image_failed_with_rounded_diff): (PortTestCase.test_diff_image_failed): * Scripts/webkitpy/port/test.py: 2021-10-27 Jonathan Bedard [webkitscmpy] Ensure empty line before canonicalization https://bugs.webkit.org/show_bug.cgi?id=232103 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/message.py: (main): Handle empty lines around identifier links, add empty line before identifier links. * Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py: (TestCanonicalize.test_formated_identifier): (TestCanonicalize.test_existing_identifier): (TestCanonicalize.test_git_svn): (TestCanonicalize.test_git_svn_existing): (TestCanonicalize.test_branch_commits): (TestCanonicalize.test_number): 2021-10-27 Alexey Proskuryakov webkitdirs.pm should use JSON::XS when available https://bugs.webkit.org/show_bug.cgi?id=232354 Reviewed by Dewei Zhu. JSON::XS is faster than JSON::PP. While it doesn't matter for webkitdirs' own use, where JSONs are tiny, other scripts that import webkitdirs.pm do care. * Scripts/webkitdirs.pm: 2021-10-26 Alex Christensen Remove properties set by NSURLProtocol on NSURLRequest before serializing https://bugs.webkit.org/show_bug.cgi?id=232332 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm: (TestWebKitAPI::TEST): 2021-10-26 Roy Reapor webkitpy/autoinstalled/pyobjc_frameworks.py should not autoinstall frameworks if they can be imported without exceptions https://bugs.webkit.org/show_bug.cgi?id=232331 Reviewed by Jonathan Bedard. Avoid autointalling pyobjc frameworks if the installed frameworks can be imported without generating an exception. * Scripts/webkitpy/autoinstalled/pyobjc_frameworks.py: (_import_modules): 2021-10-26 Tim Horton [GPU Process] `DisplayList::Recorder::getCTM` should include the device scale factor https://bugs.webkit.org/show_bug.cgi?id=230647 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: (TestWebKitAPI::TEST): Add a test that getCTM returns the correct scale after applyDeviceScaleFactor is called. 2021-10-26 Jonathan Bedard [webkitscmpy] Comment and close pull-requests https://bugs.webkit.org/show_bug.cgi?id=232095 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py: (BitBucket.request): Add support for activities, opening and closing pull-request. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py: (GitHub.__init__): Add issues. (GitHub.request): Access issue underlying pull-request (which includes global comments). * Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py: (PullRequest.Exception): Added. (PullRequest.Comment): Added. (PullRequest.__init__): Add list of pull-request comments, metadata used by generator. (PullRequest.open): Re-open the pull-request. (PullRequest.close): Close the pull-request. (PullRequest.comment): Make a comment on the pull-request. (PullRequest.comments): List all comments on a pull-request. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py: (BitBucket.PRGenerator.update): Handle closing and opening of the pull-request. (BitBucket.PRGenerator.comment): Make a comment on a pull-request. (BitBucket.PRGenerator.comments): List all comments on a pull-request. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.PRGenerator.update): Handle closing and opening of the pull-request. (GitHub.PRGenerator.comment): Make a comment on a issue underpinning a pull-request. (GitHub.PRGenerator.comments): List all comments on the pull-request. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py: (Scm.PRGenerator.update): Add support for opening and closing a pull-request. (Scm.PRGenerator.comment): Make a comment on a pull-request. (Scm.PRGenerator.comments): List all comments for a pull-request * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: 2021-10-26 Simon Fraser The script should decide when an image diff cases, not ImageDiff https://bugs.webkit.org/show_bug.cgi?id=232225 Unreviewed; respond to review feedback. * Scripts/webkitpy/port/image_diff.py: (ImageDiffer._read): 2021-10-26 Alex Christensen Update PCM test public key to one with RSA-PSS OID https://bugs.webkit.org/show_bug.cgi?id=231048 Reviewed by John Wilander. In rdar://79069615 support for public keys with rsaEncryption OIDs was removed as stated on the blog at https://webkit.org/blog/11940/pcm-click-fraud-prevention-and-attribution-sent-to-advertiser/ This implements enough ASN1 serialization to serialize a public key in the form accepted by WebKit now, which is described at https://datatracker.ietf.org/doc/html/rfc8017#appendix-A.2.3 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/ASN1Utilities.cpp: Added. (ASN1::Object::sizeSerializedSize const): (ASN1::Object::serializeSize const): (ASN1::ObjectIdentifier::ObjectIdentifier): (ASN1::ObjectIdentifier::bytes const): (ASN1::Sequence::create): (ASN1::Sequence::Sequence): (ASN1::Sequence::elementEncodedLengthBytes const): (ASN1::IndexWrapper::IndexWrapper): (ASN1::Integer::Integer): (ASN1::BitString::BitString): (TestWebKitAPI::wrapPublicKeyWithRSAPSSOID): * TestWebKitAPI/Tests/WebCore/ASN1Utilities.h: Added. * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): 2021-10-26 Tim Horton DisplayList::Recorder's clipBounds() becomes empty if a flip is applied to the CTM https://bugs.webkit.org/show_bug.cgi?id=232134 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: (TestWebKitAPI::TEST): Add a test ensuring that our clipBounds and CG's match through a series of simple transforms. 2021-10-26 Brady Eidson Add helper classes and messaging infrastructure to launch webpushd and round trip a message to it https://bugs.webkit.org/show_bug.cgi?id=232262 Reviewed by Alex Christensen. * MiniBrowser/mac/AppDelegate.m: (persistentDataStore): * MiniBrowser/mac/WK2BrowserWindowController.m: (-[WK2BrowserWindowController _webView:requestNotificationPermissionForSecurityOrigin:decisionHandler:]): 2021-10-26 Simon Fraser The script should decide when an image diff cases, not ImageDiff https://bugs.webkit.org/show_bug.cgi?id=232225 Reviewed by Martin Robinson. Rather than have ImageDiff decide if the comparison passes or fails (with some built-in tolerance), have it just print the percentage difference, and have the script compare it against the tolerance. Code to prettify diff_percent is moved into the script (but should eventually move closer to display time). * ImageDiff/ImageDiff.cpp: (processImages): * Scripts/webkitpy/port/image_diff.py: (ImageDiffer._read): * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_diff_image.make_proc): (PortTestCase.test_diff_image_passed): (PortTestCase): (PortTestCase.test_diff_image_passed_with_tolerance): (PortTestCase.test_diff_image_failed_with_rounded_diff): (PortTestCase.test_diff_image_failed): 2021-10-26 Kate Cheney [ App Privacy Report ] Restoring a session after clearing the cache results in app initiated loads in Safari https://bugs.webkit.org/show_bug.cgi?id=232292 Reviewed by Brent Fulgham. Update API test in 2 ways. First, close the original WebView to destroy the page's document loader as if the application was being quit. Second, clear history to make sure there are no cached loads. * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: 2021-10-26 Simon Fraser Have ImageDiff print the diff image when any pixel is different https://bugs.webkit.org/show_bug.cgi?id=232294 Reviewed by Martin Robinson. ImageDiff currently only outputs the diff image when any pixel exceeds its built-in tolerance. To prepare for moving the "pass/fail" decision to script, have ImageDiff output the diff image when any pixel is different. Also have it write "#EOF" so that we're not reliant on the "diff:" line to terminate reading the output. Fix up webkitpy unit tests for #EOF parsing, presence of image when the test passes via tolerance, and to actually test which image data is present in the ImageDiffResult. * ImageDiff/ImageDiff.cpp: (processImages): (main): * ImageDiff/PlatformImage.cpp: (ImageDiff::PlatformImage::difference): Track legacyDistanceMax if any pixel diff is non-zero, since it's needed to scale the diff image. * Scripts/webkitpy/port/image_diff.py: (ImageDiffer._read): Look for "#EOF" to terminate the output. Save the diff image, even if the test passed. * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_diff_image.make_proc): (PortTestCase.test_diff_image): (PortTestCase.test_diff_image_passed): (PortTestCase.test_diff_image_failed): (PortTestCase.test_diff_image_crashed): 2021-10-26 Simon Fraser Don't run ImageDiff a second time to generate diff images https://bugs.webkit.org/show_bug.cgi?id=232288 Reviewed by Martin Robinson. Currently, for a ref test failure (which is always run with tolerance=0), we run ImageDiff a second time in FailureReftestMismatch.write_failure() with the intent of generating a diff image with zero tolerance. Fix by storing the ImageDiffResult in FailureReftestMismatch and FailureImageHashMismatch so we already have the diff image. We only regenerate it when the first diff was run with a non-zero tolerance (only relevant for pixel tests). To faciliate this, store the tolerance that was used inside ImageDiffResult too. * ImageDiff/ImageDiff.cpp: (main): Show tolerance in verbose logging. * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner._compare_image): (SingleTestRunner._compare_output_with_reference): * Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py: (TestResultWriterTest.test_reftest_diff_image.ImageDiffTestPort.diff_image): (TestResultWriterTest): (TestResultWriterTest.test_reftest_diff_image): * Scripts/webkitpy/layout_tests/models/test_failures.py: (FailureImageHashMismatch.__init__): (FailureReftestMismatch.__init__): (FailureReftestMismatch.write_failure): * Scripts/webkitpy/layout_tests/models/test_run_results.py: (_interpret_test_failures): * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py: (InterpretTestFailuresTest.test_interpret_test_failures): * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_tolerance.ImageDiffTestPort.diff_image): * Scripts/webkitpy/port/image_diff.py: (ImageDiffResult.__init__): (ImageDiffResult.__repr__): (ImageDiffer._read): * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_diff_image): 2021-10-25 Ryan Haddad Change default iOS simulator to one with a larger screen size https://bugs.webkit.org/show_bug.cgi?id=231844 Reviewed by Jonathan Bedard. * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_device_type_specific_listing): * Scripts/webkitpy/port/ios_simulator.py: (IOSSimulatorPort): (IPhoneSimulatorPort): 2021-10-25 Alexey Proskuryakov Add perl 5.30 to kill-old-processes https://bugs.webkit.org/show_bug.cgi?id=232290 Reviewed by Ryan Haddad. * CISupport/kill-old-processes: 2021-10-25 Kate Cheney Clean up App Bound Domains tests https://bugs.webkit.org/show_bug.cgi?id=232278 Reviewed by John Wilander. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (TEST): 2021-10-25 Simon Fraser webkitpy: Add an explicit ImageDiffResult.passed rather than relying on diff_image being non-None https://bugs.webkit.org/show_bug.cgi?id=232266 Reviewed by Jonathan Bedard. A ref test was considered failing if it ImageDiffResult.diff_image was not None, allowing for confusing unit tests that used a value of True for diff_image. Fix by giving ImageDiffResult an explicit 'passes' field, and testing it rather than diff_image. Also used named arguments when creating ImageDiffResults for readability. * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner._compare_image): Use `diff_result.passed` as truth for whether the test passed, and only store the error_string in failure cases (which allows ImageDiff to spew diagnostic errors without triggering failures). (SingleTestRunner._compare_output_with_reference): * Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py: (TestResultWriterTest.test_reftest_diff_image.ImageDiffTestPort.diff_image): (TestResultWriterTest): * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_tolerance.ImageDiffTestPort.diff_image): * Scripts/webkitpy/port/base.py: (Port.diff_image): * Scripts/webkitpy/port/image_diff.py: (ImageDiffResult.__init__): (ImageDiffResult.__eq__): (ImageDiffResult.__repr__): (ImageDiffer._read): * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.integration_test_image_diff): (PortTestCase.test_diff_image__missing_both): (PortTestCase.test_diff_image__missing_actual): (PortTestCase.test_diff_image__missing_expected): (PortTestCase.test_diff_image): (PortTestCase.test_diff_image_passed): (PortTestCase.test_diff_image_failed): (PortTestCase.test_diff_image_crashed): * Scripts/webkitpy/port/test.py: 2021-10-25 Alex Christensen WebKit ought to be able to play videos without Content-Length HTTP header fields and without range support https://bugs.webkit.org/show_bug.cgi?id=232174 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm: (TestWebKitAPI::TEST): 2021-10-25 Ryan Haddad Bring up queues for Monterey https://bugs.webkit.org/show_bug.cgi?id=232186 Reviewed by Alexey Proskuryakov. * CISupport/build-webkit-org/config.json: * CISupport/build-webkit-org/factories_unittest.py: (TestExpectedBuildSteps): * CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js: (WebKitBuildbot): * CISupport/build-webkit-org/wkbuild.py: (_should_file_trigger_build): 2021-10-25 Jonathan Bedard [webkitscmpy] Log based tests fail in different timezones https://bugs.webkit.org/show_bug.cgi?id=232197 Reviewed by Dewei Zhu. Tests based on `git log` need to be timezone aware. * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: * Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py: 2021-10-25 Wenson Hsieh REGRESSION (r284079): Audio continues playing on hulu.com in private browsing mode after closing the tab https://bugs.webkit.org/show_bug.cgi?id=232113 rdar://84399283 Reviewed by Chris Dumez. Add a new API test to verify that the GPU to web prcoess connection isn't leaked in the GPU process. See WebKit ChangeLog for more details. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: * TestWebKitAPI/Tests/WebKitCocoa/canvas-image-data.html: Added. * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView gpuToWebProcessConnectionCount]): 2021-10-25 Simon Fraser webkitpy: have diff_image() return a ImageDiffResult https://bugs.webkit.org/show_bug.cgi?id=232222 Reviewed by Jonathan Bedard. diff_image() returned a list which resulted in hard to read code. In addition, the presence of a diff_image is used to indicate failure; future patches will change this, so having diff_image() return a class makes that easier. * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: (SingleTestRunner._compare_image): (SingleTestRunner._compare_output_with_reference): * Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py: (TestResultWriterTest.test_reftest_diff_image.ImageDiffTestPort.diff_image): (TestResultWriterTest): * Scripts/webkitpy/layout_tests/models/test_failures.py: (FailureReftestMismatch.write_failure): * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_tolerance.ImageDiffTestPort.diff_image): * Scripts/webkitpy/port/base.py: (Port.diff_image): * Scripts/webkitpy/port/image_diff.py: (ImageDiffResult): (ImageDiffResult.__init__): (ImageDiffResult.__eq__): (ImageDiffResult.__ne__): (ImageDiffResult.__repr__): (ImageDiffer._read): * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.integration_test_image_diff): (PortTestCase.test_diff_image__missing_both): (PortTestCase.test_diff_image__missing_actual): (PortTestCase.test_diff_image__missing_expected): (PortTestCase.test_diff_image): (PortTestCase.test_diff_image_passed): (PortTestCase.test_diff_image_failed): (PortTestCase.test_diff_image_crashed): * Scripts/webkitpy/port/test.py: 2021-10-25 Carlos Alberto Lopez Perez [webkitpy] webkit-test-runner doesn't report all results when a test is run several times https://bugs.webkit.org/show_bug.cgi?id=231790 Reviewed by Jonathan Bedard. WTR was only picking one of the failure results when a test was run more than once (for example with the flag --repeat-each=X), so it was not reporting all the values that the test generated. This is a major issue when searching for flaky tests. This patch adds a dictionary to store all the results of a given test on the repeated repeats and then it ensures those values are taken into account when reporting the final results for the test. It marks the test as flaky if more than one different value was generated. * Scripts/webkitpy/layout_tests/models/test_run_results.py: (TestRunResults.__init__): (TestRunResults.add): (TestRunResults.merge): (summarize_results): 2021-10-25 Aakash Jain Add support for fast-cq mode to webkit-patch land-safely command https://bugs.webkit.org/show_bug.cgi?id=232196 Reviewed by Jonathan Bedard. * Scripts/webkitpy/tool/steps/postdiffforcommit.py: (PostDiffForCommit): (PostDiffForCommit.run): * Scripts/webkitpy/tool/commands/upload_unittest.py: Added unit-test. (test_land_safely_with_fast_cq): 2021-10-25 Sam Sneddon [Python] rename assertEquals/assertNotEquals https://bugs.webkit.org/show_bug.cgi?id=232214 Reviewed by Alexey Proskuryakov. This is assert(Not)?Equals -> assert(\1)Equal Python 3.11 (currently CPython main branch) removes the deprecated aliases assertEquals/assertNotEquals. These have long been deprecated, and the modern names exist all the way back to Python 2.7, hence there's no reason not to switch. * Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py: (TaskPoolUnittest.test_multiple): * Scripts/webkitpy/common/attribute_saver_unittest.py: (AttributeSaverTest.test_class): (AttributeSaverTest.test_normal_default): (AttributeSaverTest.test_normal_value): (AttributeSaverTest.test_normal_value_on_exception): (AttributeSaverTest.test_normal_value_on_normal_exit): (AttributeSaverTest.test_normal_value_with_finally_on_exception): (AttributeSaverTest.test_normal_value_with_finally_on_normal_exit): (AttributeSaverTest.test_normal_value_with_else_on_exception): (AttributeSaverTest.test_normal_value_with_else_on_normal_exit): * Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py: (StubRepositoryTest.test_find_checkout_root): * Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py: (TestConfigurationTest.test_eq): * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: (MiscTests.test_parse_warnings_are_logged_if_not_in_lint_mode): * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py: (SummarizedResultsTest.test_svn_revision_exists): (SummarizedResultsTest.test_svn_revision): (SummarizedResultsTest.test_svn_revision_git): * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (RunTest.test_tests_options): * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py: (TestHttpServer.test_win32_start_and_stop): * Scripts/webkitpy/port/driver_unittest.py: * Scripts/webkitpy/port/gtk_unittest.py: (GtkPortTest.test_gtk4_expectations_binary_only): (GtkPortTest.test_gtk3_expectations_binary_only): (GtkPortTest.test_gtk_expectations_both_binaries): * Scripts/webkitpy/style/checkers/test_expectations_unittest.py: (TestExpectationsTestCase.assert_lines_lint): * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py: * Scripts/webkitpy/w3c/test_converter_unittest.py: (verify_test_harness_paths): * Scripts/webkitpy/w3c/test_exporter_unittest.py: (TestExporterTest.test_export): (TestExporterTest.test_export_with_specific_branch): * Scripts/webkitpy/w3c/test_importer_unittest.py: * Scripts/webkitpy/w3c/test_parser_unittest.py: * Scripts/webkitpy/w3c/wpt_runner_unittest.py: (WPTRunnerTest.MockSpawnWPT.__call__): (WPTRunnerTest.test_prepare_wpt_checkout): (WPTRunnerTest.test_prepare_wpt_checkout_specified_path): * Scripts/webkitpy/xcode/device_type_unittest.py: (DeviceTypeTest.test_iphone_initialization): (DeviceTypeTest.test_ipad_initialization): (DeviceTypeTest.test_generic_ios_device): (DeviceTypeTest.test_watch_initialization): (DeviceTypeTest.test_tv_initialization): * Scripts/webkitpy/xcode/sdk_unittest.py: (SDKTest.test_iphoneos): (SDKTest.test_iphonesim): (SDKTest.test_macos): (SDKTest.test_appletvos): (SDKTest.test_appletvsim): (SDKTest.test_watchos): (SDKTest.test_watchsimulator): (SDKTest.test_prodos): * Scripts/webkitpy/xcode/simulated_device_unittest.py: 2021-10-24 Arcady Goldmints-Orlov REGRESSION(r282686) [GTK] Tests are flaky due to spurious "MainFrameView: mouseEnteredContentArea" messages in the log https://bugs.webkit.org/show_bug.cgi?id=232142 Add MockScrollAnimatorEnabled to the list of preferences to reset between tests in TestOptions.cpp. Reviewed by Carlos Garcia Campos. * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): 2021-10-23 Simon Fraser Add an ImageDiff option to print out WPT-style pixel differences https://bugs.webkit.org/show_bug.cgi?id=232212 Reviewed by Darin Adler. When passed `--difference`, ImageDiff will compute and print out the "maxDifference=;totalPixels=" values documented at https://web-platform-tests.org/writing-tests/reftests.html. With these values, there is no built-in tolerance as there is with the legacy difference computation. Rename variables related to the legacy computation. * ImageDiff/ImageDiff.cpp: (processImages): (main): * ImageDiff/PlatformImage.cpp: (ImageDiff::PlatformImage::difference): * ImageDiff/PlatformImage.h: 2021-10-24 Simon Fraser Allow ImageDiff to read from files https://bugs.webkit.org/show_bug.cgi?id=232201 Reviewed by Darin Adler. For improved hackability when working on pixel tolerance, allow ImageDiff to read from files by adding support for reading two file path arguments. Also add some nice --help output, and preliminary support for --verbose. * ImageDiff/ImageDiff.cpp: (processImages): (main): * ImageDiff/PlatformImage.h: * ImageDiff/cairo/PlatformImageCairo.cpp: (ImageDiff::PlatformImage::createFromFile): * ImageDiff/cg/PlatformImageCG.cpp: (ImageDiff::PlatformImage::createFromFile): 2021-10-23 Yusuke Suzuki [WTF] Replace current LLVM flang's Int128 with abseil-cpp's Int128 https://bugs.webkit.org/show_bug.cgi?id=232129 Reviewed by Darin Adler. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/Int128.cpp: (TestWebKitAPI::TYPED_TEST): (TestWebKitAPI::TEST): (TestWebKitAPI::ToNativeUInt128): (TestWebKitAPI::FromNativeUInt128): (TestWebKitAPI::ToNativeInt128): (TestWebKitAPI::FromNativeInt128): (TestWebKitAPI::TestBinaryUInt128): (TestWebKitAPI::TestBinaryInt128): (TestWebKitAPI::TestVsNativeUInt128): (TestWebKitAPI::TestVsNativeInt128): (TestWebKitAPI::TestUnary): Deleted. (TestWebKitAPI::TestBinary): Deleted. (TestWebKitAPI::ToNative): Deleted. (TestWebKitAPI::FromNative): Deleted. (TestWebKitAPI::TestVsNative): Deleted. * TestWebKitAPI/Tests/WTF/LeadingZeroBitCount.cpp: Removed. 2021-10-22 Simon Fraser Content offset in this codepen when switching tabs https://bugs.webkit.org/show_bug.cgi?id=231989 Reviewed by Tim Horton. API test that scrolls an iframe via wheel events, then detached and re-attaches the view. The two wheel scrolls are necessary to exercise the "stale ScrollingStateScrollingNode scroll position" issue. The scrolling tree dumps validate the layout viewport part of the fix. Also correct some functions where the sense of 'isWaitingForJavaScript' was flipped. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm: Added. (TestWebKitAPI::synthesizeWheelEvents): (TestWebKitAPI::waitForScrollEventAndReturnScrollY): (TestWebKitAPI::scrollingTreeElidingLastCommittedScrollPosition): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView objectByEvaluatingJavaScript:]): (-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]): (-[WKWebView objectByCallingAsyncFunction:withArguments:error:]): 2021-10-22 Ryan Haddad [ iOS15 EWS ] TestWebKitAPI.AppPrivacyReport.LoadSimulatedRequest tests are timing out https://bugs.webkit.org/show_bug.cgi?id=232166 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Disable these tests. 2021-10-22 Roy Reapor webkitpy/autoinstalled/pyobjc_frameworks.py should install wheel distribution https://bugs.webkit.org/show_bug.cgi?id=232156 Reviewed by Stephanie Lewis. Install wheel version of framweorks. * Scripts/webkitpy/autoinstalled/pyobjc_frameworks.py: 2021-10-22 Ayumi Kojima Unreviewed, reverting r284654. Reverting because this commit caused scrolling tests to fail Reverted changeset: "Content offset in this codepen when switching tabs" https://bugs.webkit.org/show_bug.cgi?id=231989 https://commits.webkit.org/r284654 2021-10-22 Carlos Garcia Campos [GTK][a11y] Localized role name doesn't work with ATSPI enabled https://bugs.webkit.org/show_bug.cgi?id=232136 Reviewed by Adrian Perez de Castro. Add a few tests for localized role name. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testAccessibleBasicHierarchy): 2021-10-22 Carlos Garcia Campos [GTK][a11y] Add implementation of text interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=230258 Reviewed by Adrian Perez de Castro. Add unit tests for the text interface. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (AtspiTextRangeDeleter::operator() const): (AccessibilityTest::startEventMonitor): (AccessibilityTest::stopEventMonitor): (AccessibilityTest::findEvent): (testTextBasic): (testTextSurrogatePair): (testTextIterator): (testTextExtents): (testTextSelections): (testTextAttributes): (testTextStateChanged): (beforeAll): 2021-10-22 Kimmo Kinnunen WebGL low-power and high-performance contexts should use different ANGLE Metal EGLDisplays https://bugs.webkit.org/show_bug.cgi?id=231012 Reviewed by Dean Jackson. Add a API test to test GraphicsContextGLOpenGL Cocoa implementation regarding the bug where the GraphicsContextGLOpenGL instances would use the GPU that was selected by the first instance. * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm: Added. (TestWebKitAPI::WebCore::TestedGraphicsContextGLOpenGL::create): (TestWebKitAPI::WebCore::TestedGraphicsContextGLOpenGL::TestedGraphicsContextGLOpenGL): (TestWebKitAPI::hasMultipleGPUs): (TestWebKitAPI::TEST): * TestWebKitAPI/WebCoreUtilities.h: Added. (TestWebKitAPI::ScopedSetAuxiliaryProcessTypeForTesting::ScopedSetAuxiliaryProcessTypeForTesting): (TestWebKitAPI::ScopedSetAuxiliaryProcessTypeForTesting::~ScopedSetAuxiliaryProcessTypeForTesting): Add a utility state setter to set the process type for the duration of a test. 2021-10-21 Ryan Haddad WebGL bot should run tests with GPU Process enabled https://bugs.webkit.org/show_bug.cgi?id=232107 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/config.json: * CISupport/build-webkit-org/factories_unittest.py: 2021-10-21 Simon Fraser Content offset in this codepen when switching tabs https://bugs.webkit.org/show_bug.cgi?id=231989 Reviewed by Tim Horton. API test that scrolls an iframe via wheel events, then detached and re-attaches the view. The two wheel scrolls are necessary to exercise the "stale ScrollingStateScrollingNode scroll position" issue. The scrolling tree dumps validate the layout viewport part of the fix. Also correct some functions where the sense of 'isWaitingForJavaScript' was flipped. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/ScrollingCoordinatorTests.mm: Added. (TestWebKitAPI::synthesizeWheelEvents): (TestWebKitAPI::waitForScrollEventAndReturnScrollY): (TestWebKitAPI::scrollingTreeElidingLastCommittedScrollPosition): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView objectByEvaluatingJavaScript:]): (-[WKWebView objectByEvaluatingJavaScriptWithUserGesture:]): (-[WKWebView objectByCallingAsyncFunction:withArguments:error:]): 2021-10-21 Fujii Hironori [Win] TestWTF.FileSystemTest.* are timing out if run-api-tests is run by a normal user https://bugs.webkit.org/show_bug.cgi?id=232065 Reviewed by Jonathan Bedard. run-api-tests script didn't pass TEMP and TMP env vars to TestWTF.exe. Then, generateTemporaryPath in wtf/win/FileSystemWin.cpp never finished because a normal user can't create a file in the Windows system directory. * Scripts/webkitpy/port/win.py: (WinPort.environment_for_api_tests): Added TEMP and TMP to the env var list to inherit. 2021-10-21 Fujii Hironori [Win Python] REGRESSION(r284398): run-api-tests: FileNotFoundError raised: [WinError 2] The system cannot find the file specified https://bugs.webkit.org/show_bug.cgi?id=232037 Reviewed by Jonathan Bedard. r284398 temporarily copied TestWTF program to ToBeListed to list test cases. However, on Windows, TestWTF.exe is just a wrapper program loading TestWTFLib.dll. If I just rename TestWTF.exe to ToBeListed.exe, ToBeListed.exe tries to load ToBeListedLib.dll. * Scripts/webkitpy/api_tests/manager.py: (Manager._collect_tests): Do not copy the test program to ToBeListed on Windows. 2021-10-21 Devin Rousso [css-values-4] Support small (sv*), large (lv*) and dynamic (dv*) viewport units https://bugs.webkit.org/show_bug.cgi?id=219287 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm: Added. (evaluateForInt): (getElementHeight): (TEST.CSSViewportUnits.AllSame): (TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides): (TEST.CSSViewportUnits.SameUnobscuredSizeOverrides): (TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides): * TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.html: Added. * TestWebKitAPI/Tests/WebCore/FloatSizeTests.cpp: (TEST.FloatSize.MinDimension): Added. (TEST.FloatSize.MaxDimension): Added. * TestWebKitAPI/Tests/WebCore/IntSizeTests.cpp: (TEST.IntSize.MinDimension): Added. (TEST.IntSize.MaxDimension): Added. Add utility/helper methods for returning the minimum/maximum of the width vs height. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2021-10-21 Chris Dumez WebKit should process-swap for initial navigation of a popup if it has no opener https://bugs.webkit.org/show_bug.cgi?id=231990 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): (-[PSONUIDelegate webViewDidClose:]): Updated existing API tests to reflect behavior change. Also extend an API test to make sure that a popup opened by JS can still close itself via JS (by calling window.close()), even in the case where we process swap. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): (WTR::InjectedBundle::outputText): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::dump): * WebKitTestRunner/TestController.cpp: (WTR::TestController::createOtherPage): (WTR::TestController::didReceivePageMessageFromInjectedBundle): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): We have some tests that open a new popup with 'noopener' and the popup would be the one to call `testRunner.notifyDone()`. This used to work fine when the popup would end up in the same WebProcess because the injected bundle would know which page is the main test page and use that one. However, now that we process-swap, the popup page would think it is the main test page and try to dump its own output. However, the UIProcess wasn't listening for messages from auxiliary pages' injected bundles. The UIProcess now listens for those messages and asks the main test page to dump its output when an auxiliary page in another process says the test is done. 2021-10-21 Simon Fraser run-webkit-tests --ios-simulator --print-expectations fails https://bugs.webkit.org/show_bug.cgi?id=232035 Reviewed by Jonathan Bedard. self._port.supported_device_types(), which _collect_tests() uses (despite its argument) returns a different set of devices than self._port.DEFAULT_DEVICE_TYPES which caused using those as hash keys to throw. So have print_expectations() and print_summary() just use self._port.supported_device_types(). * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager.print_expectations): (Manager.print_summary): 2021-10-21 Chris Lord [WPE][GTK] Enable smooth scrolling by default https://bugs.webkit.org/show_bug.cgi?id=220512 Reviewed by Carlos Garcia Campos. Smooth scrolling is default on on GTK now, so reverse the logic in the test for the efficacy of the related setting. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp: (testWebKitSettings): 2021-10-21 Sam Sneddon Move layout_test_finder to layout_test_finder_legacy https://bugs.webkit.org/show_bug.cgi?id=232018 Reviewed by Darin Adler. This is a simple rename; no further changes. * Scripts/open-layout-test: * Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py. (_is_reference_html_file): (_has_supported_extension): (LayoutTestFinder): (LayoutTestFinder.__init__): (LayoutTestFinder.find_tests): (LayoutTestFinder.find_tests_by_path): (LayoutTestFinder._expanded_paths): (LayoutTestFinder._real_tests): (LayoutTestFinder._is_test_file): (LayoutTestFinder._is_w3c_resource_file): (LayoutTestFinder._strip_test_dir_prefixes): (LayoutTestFinder._strip_test_dir_prefix): (LayoutTestFinder._read_test_names_from_file): (LayoutTestFinder._strip_comments): * Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py: Renamed from Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py. (MockLayoutTestFinder): (MockLayoutTestFinder._real_tests): (LayoutTestFinderTests): (LayoutTestFinderTests.make_finder): (LayoutTestFinderTests.test_supported_test_extensions): (LayoutTestFinderTests.test_is_reference_html_file): (LayoutTestFinderTests.test_find_no_paths_specified): (LayoutTestFinderTests.test_find_one_test): (LayoutTestFinderTests.test_find_glob): (LayoutTestFinderTests.test_find_with_skipped_directories): (LayoutTestFinderTests.test_find_with_skipped_directories_2): (LayoutTestFinderTests.test_is_test_file): (LayoutTestFinderTests.test_is_w3c_resource_file): * Scripts/webkitpy/layout_tests/controllers/manager.py: * Scripts/webkitpy/tool/commands/queries.py: 2021-10-21 Carlos Garcia Campos Unreviewed. Fix GTK build with old version of ATSPI after r284367. There's not API to check ATSPI version, so check if ATSPI_SCROLLTYPE_COUNT is defined to know if component scroll API is available. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (beforeAll): 2021-10-20 Brady Eidson WebKit Managed Notifications: Skeleton NotificationProvider https://bugs.webkit.org/show_bug.cgi?id=231786 Reviewed by Alex Christensen. * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): Disable BuiltInNotificationsEnabled for now. 2021-10-20 Beth Dakin and Dana Estra macOS key-driven smooth scrolling does not stop when focus changes https://bugs.webkit.org/show_bug.cgi?id=228302 Reviewed by Simon Fraser. This patch adds support for rawKeyUp and rawKeyDown to the macOS versions of WKTR and DRT. * DumpRenderTree/mac/EventSendingController.mm: (+[EventSendingController initialize]): (+[EventSendingController isSelectorExcludedFromWebScript:]): (+[EventSendingController webScriptNameForSelector:]): (-[EventSendingController rawKeyDown:withModifiers:withLocation:]): (-[EventSendingController rawKeyDownWrapper:withModifiers:withLocation:]): (-[EventSendingController rawKeyUp:withModifiers:withLocation:]): (-[EventSendingController rawKeyUpWrapper:withModifiers:withLocation:]): * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::createRawKeyDownMessageBody): (WTR::createRawKeyUpMessageBody): (WTR::EventSendingController::rawKeyDown): (WTR::EventSendingController::rawKeyUp): * WebKitTestRunner/InjectedBundle/EventSendingController.h: * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::rawKeyDown): (WTR::EventSenderProxy::rawKeyUp): * WebKitTestRunner/TestController.cpp: (WTR::TestController::didReceiveRawKeyDownMessageFromInjectedBundle): (WTR::TestController::didReceiveRawKeyUpMessageFromInjectedBundle): (WTR::TestController::didReceiveMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/TestController.h: * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::EventSenderProxy::rawKeyDown): (WTR::EventSenderProxy::rawKeyUp): * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::rawKeyDown): (WTR::EventSenderProxy::rawKeyUp): * WebKitTestRunner/win/EventSenderProxyWin.cpp: (WTR::EventSenderProxy::rawKeyDown): (WTR::EventSenderProxy::rawKeyUp): * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::EventSenderProxy::rawKeyDown): (WTR::EventSenderProxy::rawKeyUp): 2021-10-20 Alex Christensen REGRESSION (r284418): [iOS] TestWebKitAPI.HSTS.Basic, TestWebKitAPI.HSTS.CrossOriginRedirect, TestWebKitAPI.HSTS.ThirdParty, and TestWebKitAPI.WebKit.RedirectToPlaintextHTTPSUpgrade timing out https://bugs.webkit.org/show_bug.cgi?id=232003 Reviewed by Chris Dumez. I observed that sometimes the framer's nw_framer_input_handler_t is called after calling nw_framer_pass_through_input. To fix this, I instead call nw_framer_deliver_input_no_copy myself to pass through the data inside my nw_framer_input_handler_t. * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::proxyDefinition): 2021-10-20 Roy Reapor Benchmarks harness could fail if pyobjc-core module is upgraded without upgrading other pyobjc-frameworks https://bugs.webkit.org/show_bug.cgi?id=231983 Reviewed by Jonathan Bedard. * Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py: (OSXBrowserDriver.prepare_env): Use autoinstalled Quartz module (OSXBrowserDriver._terminate_processes): Use autoinstalled AppKit module 2021-10-20 Alex Christensen Fix iOS build after r284539 https://bugs.webkit.org/show_bug.cgi?id=232003 * TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm: 2021-10-20 Alex Christensen Skip timing out tests on iOS while I investigate. https://bugs.webkit.org/show_bug.cgi?id=232003 These tests are clearly timing out on iOS, but it'll take more than an hour or so to investigate. Keep the bots green while I look into a better solution. * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: * TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm: 2021-10-20 Michael Catanzaro Do not use strerror() https://bugs.webkit.org/show_bug.cgi?id=231913 Reviewed by Chris Dumez. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/Tests/WTF/SafeStrerror.cpp: Added. (TestWebKitAPI::TEST): 2021-10-20 John Pascoe [WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials https://bugs.webkit.org/show_bug.cgi?id=219813 Reviewed by Brent Fulgham. Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1 of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent and return a different error depending on consent was obtained. This adds a test to confirm a different path is taken whenever consent is obtained. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-10-20 Youenn Fablet Add support for requestVideoFrameCallback API and MediaStreamTrack-based backend support https://bugs.webkit.org/show_bug.cgi?id=231803 Reviewed by Eric Carlson. Disable rvfc on tests by default until we implement rvfc for usual video streaming. WebRTC tests enable rvfc themselves. * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2021-10-20 Carlos Garcia Campos [WPE] Reenable -fvisibility=hidden and -fvisibility-inlines-hidden https://bugs.webkit.org/show_bug.cgi?id=222860 Reviewed by Don Olmstead. * TestRunnerShared/CMakeLists.txt: * TestWebKitAPI/PlatformWPE.cmake: * TestWebKitAPI/glib/CMakeLists.txt: * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/PlatformWPE.cmake: 2021-10-20 Kimmo Kinnunen It should be possible to format C++ code to project style with WebKit tools https://bugs.webkit.org/show_bug.cgi?id=230397 Reviewed by Jonathan Bedard. Add capability to run clang-format for lines changed by a patch. Supports workflow of: webkit-patch format -g HEAD git commit -a --amend --no-edit * Scripts/webkitpy/tool/commands/__init__.py: * Scripts/webkitpy/tool/commands/format.py: Added. (Format): * Scripts/webkitpy/tool/steps/__init__.py: * Scripts/webkitpy/tool/steps/formatcppfiles.py: Added. (_is_formatted): (_ranges): (FormatCppFiles): (FormatCppFiles.options): (FormatCppFiles.__init__): (FormatCppFiles.run): * Scripts/webkitpy/tool/steps/options.py: (Options): 2021-10-19 Jonathan Bedard [webkitscmpy] Override http url with ssh url https://bugs.webkit.org/show_bug.cgi?id=231965 Reviewed by Ryan Haddad. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git): Exclude / from hostname. * Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: (Setup.git): Prompt user to switch to ssh checkout. * Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py: 2021-10-19 Ryan Haddad [EWS] Move EWS bots to iOS 15 / watchOS 8 / tvOS 15 https://bugs.webkit.org/show_bug.cgi?id=231925 Reviewed by Jonathan Bedard. * CISupport/ews-build/config.json: * CISupport/ews-build/factories_unittest.py: (TestExpectedBuildSteps): 2021-10-19 Jonathan Bedard [webkitscmpy] Generate commit message template (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=231023 Unreviewed follow-up fix. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: MarkupSafe is imported as markupsafe. 2021-10-14 Jonathan Bedard [webkitscmpy] Generate commit message template https://bugs.webkit.org/show_bug.cgi?id=231023 Reviewed by Dewei Zhu. * Scripts/git-webkit: Use prepare-ChangeLog to generate commit messages. * Scripts/hooks/prepare-commit-msg: Added. * Scripts/libraries/webkitscmpy/setup.py: Bump version, add jinja. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: (Git.__init__): Add unbound status mock. * Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: (main): Pass hooks to sub-programs. * Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: (Setup.git): iterate through the directory of provided hooks and render with jinja2. * Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg: Added. * Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py: (TestSetup.test_commit_message): 2021-10-19 Jonathan Bedard [webkitscmpy] Filter approvers by status https://bugs.webkit.org/show_bug.cgi?id=231843 Reviewed by Dewei Zhu. If a project defines statuses for it's contributors, we only want to allow reviewers to approve changes. * Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py: (Contributor): Add reviewer status. (Contributor.Mapping.load): Keep track of possible statuses. (Contributor.Mapping.__init__): Ditto. (Contributor.Mapping.add): Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py: (BitBucket.PRGenerator.PullRequest): If a project defines a reviewer status, enforce it. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.PRGenerator._contributor): Handle case where no name is defined. (GitHub.PRGenerator.reviewers): If a project defines a reviewer status, enforce it. * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: 2021-10-19 Alex Christensen Fix iOS API tests after r284304 https://bugs.webkit.org/show_bug.cgi?id=231829 Part of the original commit that told the tests to continue doing what they were doing before was omitted. This commits that. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (webViewWithResourceLoadStatisticsEnabledInNetworkProcess): 2021-10-19 Alex Christensen Use JSONValues instead of a JSC::VM to parse WKContentRuleLists https://bugs.webkit.org/show_bug.cgi?id=231704 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::TEST_F): 2021-10-19 Alex Christensen Re-disable WebKit.HTTPSProxy API test on iOS https://bugs.webkit.org/show_bug.cgi?id=231396 Yesterday's attempt at making it not time out does not appear to have worked. * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: 2021-10-19 Yusuke Suzuki DumpRenderTree should not use WK methods https://bugs.webkit.org/show_bug.cgi?id=231910 Reviewed by Alex Christensen. DumpRenderTree functions can be called on WebThread if ios simulator is used. If we first use WK functions on that, it causes WebKit initialization on non main thread. We should not mix WK functions with DumpRenderTree. * DumpRenderTree/mac/DumpRenderTree.mm: (dumpFramesAsText): 2021-10-18 Commit Queue Unreviewed, reverting r284413. https://bugs.webkit.org/show_bug.cgi?id=231936 BrokeSafariBuildByAddingANewEnum Reverted changeset: "[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials" https://bugs.webkit.org/show_bug.cgi?id=219813 https://commits.webkit.org/r284413 2021-10-18 Jonathan Bedard Unreviewed, reverting r284399. Breaks commit message generation Reverted changeset: "[webkitperl] Stop using LoadAsModule.pm" https://bugs.webkit.org/show_bug.cgi?id=231868 https://commits.webkit.org/r284399 2021-10-18 Alex Christensen Remove TCPServer https://bugs.webkit.org/show_bug.cgi?id=231912 Reviewed by Chris Dumez. It has been replaced by HTTPServer, which doesn't time out in its destructor when not everything is perfect, and which does its logic on the main thread. It also doesn't use boringssl directly, so we can compile it on watchOS and tvOS. * TestWebKitAPI/Sources.txt: * TestWebKitAPI/TCPServer.cpp: Removed. * TestWebKitAPI/TCPServer.h: Removed. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (testCertificate): (testIdentity): * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm: (TestWebKitAPI::hstsWebViewAndDelegate): (TestWebKitAPI::hstsServer): (TestWebKitAPI::TEST): (TestWebKitAPI::hasRadar80550123): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h: (ServiceWorkerTCPServer::respondToRequests): * TestWebKitAPI/cocoa/HTTPServer.h: * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::testCertificate): (TestWebKitAPI::HTTPServer::testPrivateKey): 2021-10-18 Jonathan Bedard [Python-3] Invoke webkit-patch with Python 3 by default (Revert) https://bugs.webkit.org/show_bug.cgi?id=231591 Reverted to fix webkitbot. * Scripts/webkit-patch: 2021-10-18 John Pascoe [WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials https://bugs.webkit.org/show_bug.cgi?id=219813 Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1 of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent and return a different error depending on consent was obtained. This adds a test to confirm a different path is taken whenever consent is obtained. Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (-[TestWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:]): (TestWebKitAPI::TEST): 2021-10-18 Alex Christensen [ iOS15 ] TestWebKitAPI.WebKit.HTTPSProxy is a flaky, but frequent, timeout https://bugs.webkit.org/show_bug.cgi?id=231396 Reviewed by Chris Dumez. Something was happening that was very timing dependent that was causing this test to time out. I think it was because the proxy framer was receiving an incomplete HTTP request. To fix this, I look at the bytes received and if it wasn't a complete HTTP request, wait for the rest of the message. I was unable to reproduce the timeout after this change and only rarely reproduced the timeout without this change. * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::proxyDefinition): 2021-10-18 Chris Dumez Add a callback to know when the service worker loads via -[WKWebView _loadServiceWorker:] https://bugs.webkit.org/show_bug.cgi?id=231771 Reviewed by Alex Christensen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2021-10-18 Basuke Suzuki [webkitperl] Fix webkitperl on Windows https://bugs.webkit.org/show_bug.cgi?id=231374 Reviewed by Fujii Hironori. Set WEBKIT_LIBRARIES environment variable before run if it is not defined. Shell-style environment variables settings are not available on Windows. Replace them by setting %ENV directly. * Scripts/test-webkitperl: * Scripts/webkitperl/auto-version_unittest/autoVersionTests.pl: * Scripts/webkitperl/auto-version_unittest/versionStampTests.pl: 2021-10-18 Basuke Suzuki [webkitperl] Stop using LoadAsModule.pm https://bugs.webkit.org/show_bug.cgi?id=231868 Reviewed by Jonathan Bedard. This module load a script file as module with a bit tricky way. It prevents the proper usage of package after all. The purpose of this module is to test routines defined in the script. It just be wrong with such way. If you have something to test, it should be separated as a module and be imported to the script. Then unit test can load the module and can test without any sort of trouble. * Scripts/filter-build-webkit: (setOutputFormatOption): (shouldShowSubsequentLine): Moved to webkitperl/build/output.pm. (shouldIgnoreLine): Ditto. * Scripts/prepare-ChangeLog: (generateFunctionLists): (fetchBugXMLData): (openChangeLogs): (method_decl_to_selector): (diffCommand): (statusCommand): (propertyChangeDescription): (normalizeLineEndings): (actuallyGenerateFunctionLists): Moved to webkitperl/changelog. (computeModifiedFunctions): Ditto. (fetchBugDescriptionFromBugXMLData): Ditto. (fetchRadarURLFromBugXMLData): Ditto. (get_function_line_ranges): Ditto. (get_function_line_ranges_for_cpp): Ditto. (delete_namespaces_from_ranges_for_cpp): Ditto. (is_function_in_namespace): Ditto. (get_function_line_ranges_for_java): Ditto. (get_function_line_ranges_for_javascript): Ditto. (get_function_line_ranges_for_perl): Ditto. (get_function_line_ranges_for_python): Ditto. (get_selector_line_ranges_for_css): Ditto. (get_function_line_ranges_for_swift): Ditto. (parseSwiftFunctionArgs): Ditto. (attributeCommand): Ditto. (extractLineRangeAfterChange): Ditto. (extractLineRangeBeforeChange): Ditto. (decodeEntities): Ditto. * Scripts/run-leaks: (main): (removeMatchingRecords): (runLeaks): Moved to webkitperl/leaks.pm. (parseLeaksOutput): Ditto. (reportError): Deleted. Use Carp::croak instead. * Scripts/webkitdirs.pm: (determineBaseProductDir): (determineCurrentSVNRevision): (chdirWebKit): (determineSourceDir): Moved to webkitperl/dirs.pm. (setSourceDir): Ditto. (sourceDir): Ditto. * Scripts/webkitperl/LoadAsModule.pm: Removed. * Scripts/webkitperl/build/output.pm: Extracted from Tools/Scripts/filter-build-webkit. (shouldShowSubsequentLine): (shouldIgnoreLine): * Scripts/webkitperl/changelog.pm: Extracted from Tools/Scripts/prepare-ChangeLog. (actuallyGenerateFunctionLists): (extractLineRangeAfterChange): (extractLineRangeBeforeChange): (attributeCommand): (fetchBugDescriptionFromBugXMLData): (fetchRadarURLFromBugXMLData): (computeModifiedFunctions): (get_function_line_ranges): (get_function_line_ranges_for_cpp): (delete_namespaces_from_ranges_for_cpp): (is_function_in_namespace): (get_function_line_ranges_for_java): (get_function_line_ranges_for_javascript): (get_function_line_ranges_for_perl): (get_function_line_ranges_for_python): (get_selector_line_ranges_for_css): (get_function_line_ranges_for_swift): (parseSwiftFunctionArgs): (decodeEntities): * Scripts/webkitperl/dirs.pm: Extracted from Tools/Scripts/webkitdirs. (sourceDir): (setSourceDir): (determineSourceDir): * Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl: * Scripts/webkitperl/leaks.pm: Copied from Tools/Scripts/run-leaks. (runLeaks): (parseLeaksOutput): * Scripts/webkitperl/prepare-ChangeLog_unittest/extractLineRangeBeforeAndAfterChange.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/fetchRadarURLFromBugXMLData.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/filenameWithParentheses.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/generateFunctionLists.pl: * Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl: (convertAbsolutePathToRelativeUnixPath): * Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl: * Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-new.pl: * Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl: 2021-10-18 Jonathan Bedard [run-api-tests] Use temporary symlink when listing tests https://bugs.webkit.org/show_bug.cgi?id=230560 Reviewed by Dewei Zhu. * Scripts/webkitpy/api_tests/manager.py: (Manager._collect_tests): Copy binary when listing tests to make debuging easier. * Scripts/webkitpy/common/system/filesystem.py: (FileSystem.copyfile): Return copyfile result. (FileSystem.copymode): Invoke shutil.copymode. * Scripts/webkitpy/common/system/filesystem_mock.py: (MockFileSystem.copymode): 2021-10-18 Andres Gonzalez Set isolated tree mode to secondary AX thread in LayoutTests. https://bugs.webkit.org/show_bug.cgi?id=231763 Reviewed by Chris Fleizach. Isolated tree mode was enabled for LayoutTests but set to run on the main thread. Change it to run on the AX thread. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::updateIsolatedTreeMode): 2021-10-18 Alex Christensen [ iOS15 Monterey ] TestWTF.WTF_URLExtras.URLExtras is a constant failure https://bugs.webkit.org/show_bug.cgi?id=231454 Reviewed by Chris Dumez. The behavior of NSURL changed to disallow empty punycode in the host. This is fine, but we need to update our test expectations. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): 2021-10-18 Jonathan Bedard [webkitscmpy] Allow repositories to define custom setup commands (Follow0-up) https://bugs.webkit.org/show_bug.cgi?id=231345 Unreviewed follow-up fix. * Scripts/git-webkit: Do not specify OpenSource in Tools/Scripts path. 2021-10-18 Alex Christensen Regression (r284304) : [ iOS 15 Release ] http/tests/privateClickMeasurement tests are failing https://bugs.webkit.org/show_bug.cgi?id=231898 Use the SPI I made to keep the tests having old behavior of using the network process instead of the daemon. * WebKitTestRunner/TestController.cpp: (WTR::TestController::configureWebsiteDataStoreTemporaryDirectories): 2021-10-18 Philippe Normand [GStreamer] fast/mediastream/video-rotation tests are failing due to missing TestController::takeViewPortSnapshot https://bugs.webkit.org/show_bug.cgi?id=231059 Reviewed by Xabier Rodriguez-Calvar. Implement takeViewPortSnapshot for WPE and GTK, the WebView snapshot is exported to PNG and serialized as a data URL. * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/gtk/TestControllerGtk.cpp: (WTR::TestController::takeViewPortSnapshot): * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::takeViewPortSnapshot): 2021-10-18 Carlos Garcia Campos [GTK][a11y] Add implementation of component interface when building with ATSPI https://bugs.webkit.org/show_bug.cgi?id=230257 Reviewed by Adrian Perez de Castro. Add unit tests for component interface. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testComponentHitTest): (testComponentScrollTo): (beforeAll): 2021-10-18 Yusuke Suzuki Remove AVOID_NATIVE_INT128_T https://bugs.webkit.org/show_bug.cgi?id=231888 Reviewed by Mark Lam. We can test Int128 without AVOID_NATIVE_INT128_T. * TestWebKitAPI/Tests/WTF/Int128.cpp: (TestWebKitAPI::TestUnary): (TestWebKitAPI::TestBinary): (TestWebKitAPI::ToNative): (TestWebKitAPI::FromNative): (TestWebKitAPI::TestVsNative): (TestWebKitAPI::TEST): 2021-10-17 David Kilzer Add tests for WTF::OSObjectPtr/adoptOSObject in Cocoa with and without ARC Reviewed by Darin Adler. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: - Add OSObjectPtrCocoa.mm and OSObjectPtrCocoaARC.mm source files to the project. * TestWebKitAPI/Tests/WTF/darwin/OSObjectPtr.cpp: (TestWebKitAPI::TEST): - Make code work when compiled with ARC enabled. - Fix a pre-existing leak of dispatch_queue_t in RetainRelease test. * TestWebKitAPI/Tests/WTF/darwin/OSObjectPtrCocoa.mm: Add. * TestWebKitAPI/Tests/WTF/darwin/OSObjectPtrCocoaARC.mm: Add. - Add test files that #include OSObjectPtr.cpp. 2021-10-17 BJ Burg [Cocoa] Web Inspector: remove _WKInspectorExtensionPrivateForTesting https://bugs.webkit.org/show_bug.cgi?id=231784 Reviewed by Timothy Hatcher. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): 2021-10-16 Simon Fraser Page zoom is messed up after navigating back from a PDF https://bugs.webkit.org/show_bug.cgi?id=231841 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/PageZoom.mm: (TestWebKitAPI::TEST): 2021-10-15 Basuke Suzuki Add flag to turn off Iso heap https://bugs.webkit.org/show_bug.cgi?id=231823 Reviewed by Yusuke Suzuki. Added --(no-)iso-malloc feature flag for cmake build. * Scripts/webkitperl/FeatureList.pm: 2021-10-15 Alex Christensen Start using adattributiond on iOS https://bugs.webkit.org/show_bug.cgi?id=231829 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::configurationWithoutUsingDaemon): (TestWebKitAPI::webViewWithoutUsingDaemon): (TestWebKitAPI::runBasicPCMTest): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (webViewWithResourceLoadStatisticsEnabledInNetworkProcess): * WebKitTestRunner/TestController.cpp: (WTR::TestController::configureWebsiteDataStoreTemporaryDirectories): 2021-10-15 Alex Christensen Use attributedBundleIdentifier instead of applicationBundleIdentifier when present for handling PCM attribution https://bugs.webkit.org/show_bug.cgi?id=231827 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::runBasicPCMTest): (TestWebKitAPI::TEST): 2021-10-15 Ross Kirsling Realize Mac CMake build of WebCore and WebKit https://bugs.webkit.org/show_bug.cgi?id=231749 Reviewed by Alex Christensen. * PlatformMac.cmake: 2021-10-15 Jonathan Bedard [webkitscmpy] Allow repositories to define custom setup commands https://bugs.webkit.org/show_bug.cgi?id=231345 Reviewed by Dewei Zhu. * Scripts/git-webkit: Define changelog conflict resolver. * Scripts/libraries/webkitscmpy/setup.py: Add inspect2 as dependency, bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: (main): Attempt to resolve additional_setup function. * Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: (Setup.github): Invoke additional_setup function, if it exists. (Setup.git): Ditto. 2021-10-15 BJ Burg [Cocoa] Web Inspector: handle Promise objects returned from evaluateScriptInExtensionTab https://bugs.webkit.org/show_bug.cgi?id=231709 Reviewed by Timothy Hatcher. Add a new test: WKInspectorExtension.EvaluateScriptInExtensionTabCanReturnPromises * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): 2021-10-15 Jonathan Bedard [webkitscmpy] Refactor PR branch management (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=230432 Reviewed by Stephanie Lewis. When we are uploading a change that includes multiple commits, the second commit will be on the same branch as the first, but that branch will be editable. We should not declare that "no commits have been found on an editable branch," because that's not true. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py: (Branch.branch_point): Log the found commit for branches with multiple commits. 2021-10-15 Aakash Jain Make submit to ews error messages readable https://bugs.webkit.org/show_bug.cgi?id=231824 Reviewed by Ryan Haddad. * CISupport/ews-app/ews/views/submittoews.py: (SubmitToEWS.post): 2021-10-15 Wenson Hsieh REGRESSION (r284079): [Debug] IPCTestingAPI.CanReceiveSharedMemory is timing out https://bugs.webkit.org/show_bug.cgi?id=231701 Reviewed by Tim Horton. Fix the failing API test by using the new `sendSyncMessage()` method on JSIPCStreamClientConnection to send the "RemoteRenderingBackend::UpdateSharedMemoryForGetPixelBuffer" stream message and decode the result into a buffer of shared memory. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: (TEST): 2021-10-14 John Wilander TestWebKitAPI.PrivateClickMeasurement.FraudPrevention is a constant timeout https://bugs.webkit.org/show_bug.cgi?id=231393 Reviewed by Alex Christensen and Kate Cheney as part of https://bugs.webkit.org/show_bug.cgi?id=231553. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): PrivateClickMeasurement.FraudPrevention fixed. It was missing a call to _setPrivateClickMeasurementAppBundleIDForTesting() so that the app bundle ID for the triggering event matches the app bundle ID where the click happened. 2021-10-14 Lauro Moura [webkitpy] Occasional exception thrown in change_result_to_failure when repeating flaky layout tests https://bugs.webkit.org/show_bug.cgi?id=229788 Reviewed by Jonathan Bedard. When a iterated/repeated flaky test moves from an unexpected Failure to successive unexpected Pass, the currently stored result is still the Failure (likely due to r235467). This may cause change_result_to_failure to raise KeyError trying to forcibly remove() the Failure result from the test_by_expectations set twice. This commit relaxes the behavior to just ask to discard the value from the set. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py: (LayoutTestRunnerTests.test_update_summary_with_result): Added test case. * Scripts/webkitpy/layout_tests/models/test_run_results.py: (TestRunResults.change_result_to_failure): Use set.discard to avoid KeyErrors. 2021-10-14 Chris Dumez Service workers running on the main thread should use the main VM https://bugs.webkit.org/show_bug.cgi?id=231753 Reviewed by Geoffrey Garen. Extend API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerPagePlugIn.mm: (-[ServiceWorkerPagePlugIn webProcessPlugInBrowserContextController:serviceWorkerGlobalObjectIsAvailableForFrame:inScriptWorld:]): 2021-10-14 Wenson Hsieh [JS IPC] Implement a way to synchronously wait for an incoming IPC message https://bugs.webkit.org/show_bug.cgi?id=231745 Reviewed by Tim Horton. Adjust an existing JS IPC test, IPCTestingAPI.CanReceiveIPCSemaphore, so that it uses the new JSIPC method to wait for RemoteRenderingBackend's IPC stream wakeup semaphore to arrive. This fixes IPCTestingAPI.CanReceiveIPCSemaphore (which is one of the two IPC tests that time out after r284079). We also adjust IPCTestingAPI.CanReceiveSharedMemory to wait for and install the wakeup semaphore into the IPC stream connection; however, this alone isn't sufficient to fix the test, since the test also requires the ability to send synchronous messages through the IPC stream. See WebKit ChangeLog for more details. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: (TEST): 2021-10-14 Alex Christensen Fix some iOS builds after r284203 https://bugs.webkit.org/show_bug.cgi?id=231718 * TestWebKitAPI/cocoa/DaemonTestUtilities.h: * TestWebKitAPI/cocoa/DaemonTestUtilities.mm: Linker couldn't find OSLaunchdJob. It's only used on macOS, so only build it on macOS. 2021-10-14 Alex Christensen Reduce memory use of AdAttributionDaemon https://bugs.webkit.org/show_bug.cgi?id=231523 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST): 2021-10-14 Yusuke Suzuki Fix build failures with newer clang https://bugs.webkit.org/show_bug.cgi?id=231783 Reviewed by Chris Dumez. Since this is Objective-C (not Objective-C++), we cannot use `static const uint32_t` value for array size. Use enum hack instead. * DumpRenderTree/mac/LayoutTestHelper.m: (displayUUIDStrings): 2021-10-14 Peng Liu Promote WKPreferences._needsSiteSpecificQuirks to API https://bugs.webkit.org/show_bug.cgi?id=230721 Reviewed by Jer Noble. Updated API tests to use the new API. * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (TEST): 2021-10-14 Alex Christensen Share IPC communication code between webpushd and adattributiond https://bugs.webkit.org/show_bug.cgi?id=231718 Reviewed by Brady Eidson. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::testDaemonPList): (TestWebKitAPI::currentExecutableLocation): Deleted. (TestWebKitAPI::currentExecutableDirectory): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: Added. (TestWebKitAPI::testWebPushDaemonLocation): (TestWebKitAPI::testWebPushDaemonPList): (TestWebKitAPI::setUpTestWebPushD): (TestWebKitAPI::cleanUpTestWebPushD): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/DaemonTestUtilities.h: Renamed from Source/WebKit/Shared/EntryPointUtilities/Cocoa/Daemon/webpushd.c. * TestWebKitAPI/cocoa/DaemonTestUtilities.mm: Added. (TestWebKitAPI::currentExecutableLocation): (TestWebKitAPI::currentExecutableDirectory): (TestWebKitAPI::registerPlistWithLaunchD): 2021-10-14 Wenson Hsieh [JS IPC] Make it possible to establish a stream connection using the JS IPC testing API https://bugs.webkit.org/show_bug.cgi?id=231710 Reviewed by Tim Horton. See WebKit ChangeLog for more details. * TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: Adjust these two API tests so that they actually end up creating a new remote rendering backend in the GPU process, instead of failing to decode because we're missing a StreamConnectionBuffer. This allows us to make it to `GPUConnectionToWebProcess::createRenderingBackend` and actually create the corresponding rendering backend; however, this is still insufficient to fix the failing API tests, since there is still no mechanism to (1) wait for and receive the stream wakeup semaphore in the web process, and (2) send stream messages using an instance of the stream client connection. 2021-10-14 Carlos Alberto Lopez Perez [webkitpy] The actual results reported for a flaky tests shouldn't include the expectation https://bugs.webkit.org/show_bug.cgi?id=231241 Reviewed by Jonathan Bedard. When a test is marked as flaky and fails the expectations on the first run but passes on the second run (the retry) the current code was adding the expectations to the actual results. This is missleading and makes really hard to detect when a test stops giving a specific expectation. Instead of doing that report the actual results of the test on both runs. * Scripts/webkitpy/layout_tests/models/test_run_results.py: (TestRunResults.__init__): (TestRunResults.add): (TestRunResults.merge): (summarize_results): * Scripts/webkitpy/layout_tests/views/buildbot_results.py: (BuildBotPrinter.print_unexpected_results): 2021-10-14 Myles C. Maxfield All the SDKVariant.xcconfig files should match https://bugs.webkit.org/show_bug.cgi?id=231663 Reviewed by Youenn Fablet. * ContentExtensionTester/Configurations/SDKVariant.xcconfig: * DumpRenderTree/mac/Configurations/SDKVariant.xcconfig: * ImageDiff/cg/Configurations/SDKVariant.xcconfig: * MiniBrowser/Configurations/SDKVariant.xcconfig: * MobileMiniBrowser/Configurations/SDKVariant.xcconfig: * TestWebKitAPI/Configurations/SDKVariant.xcconfig: * WebEditingTester/Configurations/SDKVariant.xcconfig: * WebKitTestRunner/Configurations/SDKVariant.xcconfig: * lldb/lldbWebKitTester/Configurations/SDKVariant.xcconfig: 2021-10-14 Chris Dumez [WKWebView _loadServiceWorkerURL] ends up lowercasing URL host https://bugs.webkit.org/show_bug.cgi?id=231742 Reviewed by Timothy Hatcher. Extend test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2021-10-14 Chris Dumez [ iOS Release ] TestWebKitAPI.WebKit.TryUsingPrewarmedProcessThatJustCrashed is a flaky timeout https://bugs.webkit.org/show_bug.cgi?id=229260 Reviewed by Youenn Fablet. WebKit's default crash handler simply calls [webview reload] which does not reliably work here because the WebProcess gets terminated so early in the page load. To make the test pass reliably, it now provides its own crash handler which loads the same request again. * TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm: (TEST): 2021-10-14 Jonathan Bedard [git-webkit] Reset author time when editing commits (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=230224 Reviewed by Dewei Zhu. update-ref creates a sticky ref file, which is not what we want. Use 'fetch' instead. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.pull): Use fetch instead of update-ref. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: 2021-10-14 Aakash Jain Disable django admin url on ews.webkit.org https://bugs.webkit.org/show_bug.cgi?id=231739 Reviewed by Jonathan Bedard. * CISupport/ews-app/ews-app/urls.py: 2021-10-14 Carlos Garcia Campos [GTK][WPE] Move getCurrentExecutablePath() and getCurrentExecutableName() to FileSystem https://bugs.webkit.org/show_bug.cgi?id=231732 Reviewed by Michael Catanzaro. * TestWebKitAPI/glib/WebKitGLib/TestMain.cpp: (main): * WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp: * WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp: (WTR::topLevelPath): * WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp: (WTR::topLevelPath): 2021-10-13 Chris Dumez Drop makeWeakPtr() and use WeakPtr { } directly https://bugs.webkit.org/show_bug.cgi?id=231679 Reviewed by Darin Adler. * Scripts/webkitpy/style/checkers/cpp.py: (check_callonmainthread): (process_line): (check_makeweakptr): Deleted. * TestWebKitAPI/Tests/WTF/Observer.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::makeWeakPtr): 2021-10-13 Jean-Yves Avenard Clearly distinguish serial from concurrent WorkQueue https://bugs.webkit.org/show_bug.cgi?id=231418 rdar://problem/84021977 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: (TestWebKitAPI::TEST): 2021-10-13 Ryan Haddad Disable failing API tests https://bugs.webkit.org/show_bug.cgi?id=231700 Unreviewed test gardening. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDoesNotLogDuringInitialization.mm: * TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm: 2021-10-13 Jonathan Bedard [webkitscmpy] List reviewers for pull-request https://bugs.webkit.org/show_bug.cgi?id=231577 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py: (BitBucket.request): Add state to created pull-reqest. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py: (GitHub): (GitHub._users): Vend json representation of user for username. (GitHub.request): Filter review details, add users endpoint. * Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py: (PullRequest.main): Match both closed and opened pull-requests. * Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py: (PullRequest): Remove state. (PullRequest.__init__): Add opened flag, reviewers and generator. (PullRequest.reviewers): List the users who are reviewing this change. (PullRequest.approvers): List the users who have aproved this change. (PullRequest.blockers): List the users that are blocking this change from landing. (PullRequest.opened): Check the pull-request is opened. (PullRequest.State): Deleted. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py: (BitBucket.PRGenerator.PullRequest): Set opened flag, specify reviewers. (BitBucket.PRGenerator.find): Filter by opened flag instead of state. (BitBucket.PRGenerator.update): Set generator. (BitBucket.PRGenerator.reviewers): Set reviewer lists. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.PRGenerator.PullRequest): Set opened flag, pass generator. (GitHub.PRGenerator.find): Filter by opened flag instead of state. (GitHub.PRGenerator.update): Set generator and opened flag. (GitHub.PRGenerator._contributor): Find contributor matching username. (GitHub.PRGenerator.reviewers): Populate lists of reviewers for a pull-request. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py: (Scm.PRGenerator.find): Filter via opened flag instead of state. (Scm.PRGenerator.reviewers): Function which populates reviewer lists for a pull-request. * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: 2021-10-13 Alex Christensen Remove WTF::Variant and WTF::get https://bugs.webkit.org/show_bug.cgi?id=231675 Reviewed by Chris Dumez. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/Variant.cpp: Removed. * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (addValuesToTable): 2021-10-13 Angelos Oikonomopoulos Debugging code for jscore-test hang https://bugs.webkit.org/show_bug.cgi?id=231573 Reviewed by Jonathan Bedard. Occasionally, jscore-test will just hang ("1200 seconds without output"). When that happens, send SIGTERM first and have run-jsc-stress-tests print a backtrace when that happens, so that we can hopefully get an idea of what went wrong. * CISupport/ews-build/steps.py: (RunJavaScriptCoreTests.__init__): * Scripts/run-jsc-stress-tests: 2021-10-12 Jonathan Bedard [AppleSilicon] Support native simulator testing https://bugs.webkit.org/show_bug.cgi?id=231639 Reviewed by Tim Horton. * Scripts/webkitpy/port/ios_simulator.py: (IOSSimulatorPort): Add arm64 as possible architecture. (IOSSimulatorPort.architecture): Return the native system's architecture. * Scripts/webkitpy/port/watch_simulator.py: (WatchSimulatorPort): Add arm64_32. (WatchSimulatorPort.architecture): Return the native system's 32 bit architecture. 2021-10-12 Garrett Davidson Adopt platform UI for WebAuthn https://bugs.webkit.org/show_bug.cgi?id=230906 Reviewed by David Kilzer. Update the timeout test to expect NotAllowedError, which is the expected error code when a timeout occurs, per Step 21 of the "Create a New Credential" algorithm. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-10-12 Sihui Liu Implement FileSystemSyncAccessHandle read() and write() https://bugs.webkit.org/show_bug.cgi?id=231466 Reviewed by Youenn Fablet. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm: Added. (-[FileSystemAccessMessageHandler userContentController:didReceiveScriptMessage:]): (test): 2021-10-12 Alex Christensen Rename AdAttributionDaemon to adattributiond https://bugs.webkit.org/show_bug.cgi?id=231620 Reviewed by Kate Cheney. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::testPCMDaemonLocation): (TestWebKitAPI::cleanUpDaemon): 2021-10-12 Myles C. Maxfield [GPU Process] Unique RenderingResourceIdentifiers Part 9: Finish migrating RemoteResourceCache to QualifiedRenderingResourceIdentifier https://bugs.webkit.org/show_bug.cgi?id=231414 Reviewed by Said Abou-Hallawa. * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): 2021-10-12 Gabriel Nava Marino WebKitTestRunner should check mainFrameURL exists in InjectedBundlePage::willSendRequestForFrame https://bugs.webkit.org/show_bug.cgi?id=231401 Reviewed by Youenn Fablet. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::willSendRequestForFrame): Add mainFrameURL check in case of loading a non localhost URL with WebKitTestRunner. 2021-10-12 Alex Christensen Use STL instead of WTF::get_if, WTF::Monostate, WTF::visit, and WTF::holds_alternative https://bugs.webkit.org/show_bug.cgi?id=231582 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/Variant.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (addValuesToTable): 2021-10-12 Jonathan Bedard Reverting r282216 becasue unauthenticated GitHub requests have low rate limits https://bugs.webkit.org/show_bug.cgi?id=230095 Reviewed by Ryan Haddad. * CISupport/ews-build/factories.py: (WatchListFactory.__init__): * CISupport/ews-build/factories_unittest.py: (TestExpectedBuildSteps): 2021-10-12 Jonathan Bedard [Python-3] Invoke webkit-patch with Python 3 by default https://bugs.webkit.org/show_bug.cgi?id=231591 Reviewed by Michael Catanzaro. * Scripts/webkit-patch: Change shebang to Python 3. 2021-10-12 Yusuke Suzuki Unreviewed, run-benchmark fix after r283936 https://bugs.webkit.org/show_bug.cgi?id=231512 import sys is necessary. * Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py: 2021-10-12 Tim Horton Borders are not drawn when using BifurcatedGraphicsContext https://bugs.webkit.org/show_bug.cgi?id=230976 Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: (TestWebKitAPI::TEST): Add a test for line drawing. 2021-10-12 Jonathan Bedard Move few scripts from python 2 to python3 (Follow-up) https://bugs.webkit.org/show_bug.cgi?id=229817 Reviewed by Alexey Proskuryakov. * CISupport/clean-build: Invoke clean-webkit with Python 3. 2021-10-12 Alex Christensen Remove non-HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE) code https://bugs.webkit.org/show_bug.cgi?id=231579 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (TestWebKitAPI::TEST): 2021-10-11 Diego Pino Garcia [GTK] Unreviewed build fix. Fix build for Debian 10 (Buster) * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp: * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp: * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp: 2021-10-11 Myles C. Maxfield [GPU Process] Unique RenderingResourceIdentifiers Part 8: Consolidate DisplayList::ResourceHeap https://bugs.webkit.org/show_bug.cgi?id=231411 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): 2021-10-11 Darin Adler Slightly better idiom for ARC debug autorelease workaround https://bugs.webkit.org/show_bug.cgi?id=231435 Reviewed by David Kilzer. * TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm: (TestWebKitAPI::TEST): Use one macro instead of two, with traditional indentation instead of left flush style. * TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: (TestWebKitAPI::TEST): Ditto. 2021-10-11 Jonathan Bedard [build-imagediff] Build universal binaries by default https://bugs.webkit.org/show_bug.cgi?id=231527 Reviewed by Ryan Haddad. * Scripts/build-imagediff: 2021-10-11 Jonathan Bedard [run-benchmark] Make Python 3 compatible https://bugs.webkit.org/show_bug.cgi?id=231512 Reviewed by Dewei Zhu. * Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py: (LinuxBrowserDriver.launch_url): Encode Popen call if Python 3. * Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py: (OSXSafariDriver.launch_url): Ditto. 2021-10-11 Alex Christensen Reduce use of TCPServer https://bugs.webkit.org/show_bug.cgi?id=231518 Reviewed by Chris Dumez. HTTPServer runs its logic on the main thread and doesn't hang in its destructor when the number of connections and requests isn't exactly what was expected. verifyCertificateAndPublicKey needed its expected bytes to be changed because it is using the identity from TCPServer::testCertificate instead of TCPServer::startSecureConnection now. I also moved the proxy basic authentication check from proxyAuthenticationServer to proxyDefinition. * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (TEST): (verifyCertificateAndPublicKey): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (TestWebKitAPI::proxyAuthenticationServer): (TestWebKitAPI::webViewAndDelegate): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.h: * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::proxyDefinition): (TestWebKitAPI::shouldDisableTLS): (TestWebKitAPI::HTTPServer::listenerParameters): (TestWebKitAPI::statusText): (TestWebKitAPI::HTTPServer::request const): 2021-10-11 Ryan Haddad Bring up an iOS GPU Process tester https://bugs.webkit.org/show_bug.cgi?id=231515 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/config.json: * CISupport/build-webkit-org/factories_unittest.py: 2021-10-11 Alex Christensen Prepare to switch from WTF::Variant to std::variant https://bugs.webkit.org/show_bug.cgi?id=231239 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WTF/Hasher.cpp: (TestWebKitAPI::add): * TestWebKitAPI/Tests/WTF/Variant.cpp: (TestWebKitAPI::TEST): 2021-10-11 Jonathan Bedard [build.webkit.org] Build iOS 15 as universal binary (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=231389 Reviewed by Ryan Haddad. * CISupport/build-webkit-org/config.json: Use universal iOS 15 Simulator Release build. 2021-10-10 Michael Catanzaro [WPE] Expose WKTextCheckerSetContinuousSpellCheckingEnabled and use it from WKTR https://bugs.webkit.org/show_bug.cgi?id=231446 Reviewed by Philippe Normand. * WebKitTestRunner/gtk/TestControllerGtk.cpp: * WebKitTestRunner/gtk/UIScriptControllerGtk.cpp: * WebKitTestRunner/gtk/main.cpp: * WebKitTestRunner/wpe/UIScriptControllerWPE.cpp: (WTR::UIScriptControllerWPE::setContinuousSpellCheckingEnabled): 2021-10-09 Beth Dakin Pull modifier key extraction into TestRunnerShared https://bugs.webkit.org/show_bug.cgi?id=231267 Reviewed by Tim Horton. This patch pulls the code to extract modifier key information is pulled into a little class called ModifierKeys in TestRunnerShared. That code is now shared between DRT and WKTR for the existing implementations of keyDown. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController keyDown:withModifiers:withLocation:]): * TestRunnerShared/cocoa/ModifierKeys.h: Added. * TestRunnerShared/cocoa/ModifierKeys.mm: Added. (-[ModifierKeys init]): (-[ModifierKeys dealloc]): (+[ModifierKeys modifierKeysWithKey:modifiers:keyLocation:]): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::keyDown): 2021-10-08 BJ Burg [Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be notified when the inspected page navigates https://bugs.webkit.org/show_bug.cgi?id=231338 Reviewed by Devin Rousso. Add a new test to verify that triggering a navigation on the inspected WKWebView causes the -extension:inspectedPageDidNavigate: method of _WKInspectorExtensionDelegate to fire. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm: (resetGlobalState): (-[InspectorExtensionDelegateForTesting inspectorExtension:inspectedPageDidNavigate:]): (TEST): 2021-10-08 Tadeu Zagallo Implement the WebAssembly exception handling proposal https://bugs.webkit.org/show_bug.cgi?id=229681 Reviewed by Keith Miller. * Scripts/run-jsc-stress-tests: 2021-10-08 Jer Noble [Build-time perf] Forward-declare more things in Element.h https://bugs.webkit.org/show_bug.cgi?id=231283 Reviewed by Myles C. Maxfield. Include ArrayBuffer.h in various necessary places. * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: 2021-10-08 Truitt Savell Reverting r283824 becasue it broke baseline search paths https://bugs.webkit.org/show_bug.cgi?id=230540 Unreviewed revert. * Scripts/libraries/webkitcorepy/webkitcorepy/tests/version_unittest.py: (VersionTestCase.test_int_constructor): * Scripts/libraries/webkitcorepy/webkitcorepy/version.py: (Version.from_iterable): (Version.__init__): (Version.__setitem__): (Version.__contains__): (Version.__hash__): (Version.__cmp__): 2021-10-08 Wenson Hsieh Split DisplayList::Recorder into an abstract base class and a concrete implementation https://bugs.webkit.org/show_bug.cgi?id=231404 Reviewed by Myles Maxfield. See WebCore/ChangeLog for more details. * TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: (TestWebKitAPI::TEST): 2021-10-08 Jonathan Bedard [webkitscmpy] Allow caller to differentiate remote branches https://bugs.webkit.org/show_bug.cgi?id=231450 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.branches): Change _branches_for to branches_for. (Git.branches_for): Allow call to differentiate remote branches to be returned, or return dictionary of all remotes. (Git.commit): Change _branches_for to branches_for. (Git._branches_for): Renamed branches_for. 2021-10-08 Michael Catanzaro Ensure webkitpy secret storage works successfully on Linux using only autoinstalled libraries https://bugs.webkit.org/show_bug.cgi?id=231381 Reviewed by Jonathan Bedard. Update to the latest python-keyring and python-secretstorage when using python 3.6 or newer. Otherwise, use the latest version that still supports python2. This version is broken on Linux, but that's OK because we do not care about python2 or python 3.5 anymore. I'm just trying to avoid gratuitous breakage. Autoinstall python-jeepey, a D-Bus library required by python-secretstorage. Update to a newer version of importlib_metadata when using python 3.6 or newer. For older versions of python, stick to the older version. There are some API breaks in this library that I hope only affect python-keyring. We have other software that depends on this library, but I think it's OK with either version. test-webkitpy will be the arbiter of that. * Scripts/libraries/webkitcorepy/setup.py: * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: * Scripts/webkitpy/__init__.py: 2021-10-08 Fujii Hironori [Win][MiniBrowser][WK2] Implement Show Layer Tree to dump the GraphicsLayer tree https://bugs.webkit.org/show_bug.cgi?id=231409 Reviewed by Don Olmstead. MiniBrower has Show Layer Tree to dump the GraphicsLayer tree. It's useful, but worked only in WebKit1. It should work for WebKit2. The layer tree are dumped to the debug console of WebProcess by using OutputDebugString. You need to attach a debugger to it to see the message. I'd like to recommend to install Child Process Debugging Power Tool to your Visual Studio. * MiniBrowser/win/CMakeLists.txt: * MiniBrowser/win/Common2.cpp: Added. (createString): * MiniBrowser/win/Common2.h: Added. * MiniBrowser/win/InjectedBundle.cpp: Added. (didReceiveMessageToPage): (WKBundleInitialize): * MiniBrowser/win/WebKitBrowserWindow.cpp: (injectedBundlePath): (WebKitBrowserWindow::create): (WebKitBrowserWindow::showLayerTree): 2021-10-08 Jonathan Bedard [contributors.json] Support GitHub usernames https://bugs.webkit.org/show_bug.cgi?id=231400 Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py: (Contributor.Encoder.default): Add GitHub and BitBucket username. (Contributor.Mapping.load): Ditto. (Contributor.Mapping.add): Ditto. (Contributor.__init__): Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py: (TestContributor): (TestContributor.test_github): (TestContributor.test_bitbucket): * Scripts/webkitpy/common/config/committers.py: (Contributor.__init__): Add GitHub username. (Contributor.as_dict): Ditto. (Committer.__init__): Ditto. (Reviewer.__init__): Ditto. (Bot.__init__): Ditto. (CommitterList.load_json): Ditto. 2021-10-08 Jonathan Bedard [webkitcorepy] Not possible to autoinstall a package with micro version 0 https://bugs.webkit.org/show_bug.cgi?id=230540 Reviewed by Michael Catanzaro. * Scripts/libraries/webkitcorepy/setup.py: Bump version. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto. * Scripts/libraries/webkitcorepy/webkitcorepy/tests/version_unittest.py: (VersionTestCase.test_int_constructor): Default values are 'None.' * Scripts/libraries/webkitcorepy/webkitcorepy/version.py: (Version.from_iterable): (Version.__init__): Use 'None' as the default value instead of 0. (Version.__setitem__): Support 'None' as a version value. (Version.__contains__): Ditto. (Version.__hash__): Ditto. (Version.__cmp__): Ditto. 2021-10-08 Andres Gonzalez AX: AXMathRootRadicand should return an array of elements, not just the first https://bugs.webkit.org/show_bug.cgi?id=230986 Reviewed by Chris Fleizach. Added AccessibilityUIElement::mathRootRadicand as a readonly property to be used in LayoutTests. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::mathRootRadicand const): 2021-10-08 Antti Koivisto Make WTF::IteratorRange reversible https://bugs.webkit.org/show_bug.cgi?id=231415 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/IteratorRange.cpp: (TestWebKitAPI::TEST): 2021-10-08 Carlos Garcia Campos [WebDriver] Update w3c and selenium tests https://bugs.webkit.org/show_bug.cgi?id=230551 Reviewed by Jonathan Bedard. * CISupport/build-webkit-org/steps.py: (RunWebDriverTests): Run run-webdriver-tests with python3. * Scripts/run-webdriver-tests: Run with python3. * Scripts/webkitpy/__init__.py: Use a newer version of pytest and its dependencies to match what tests expect. * Scripts/webkitpy/webdriver_tests/pytest_runner.py: (collect): Use contextlib to redirect stdout to /dev/null while collecting tests. (run): Use ExitCode new enum added to pytest. * Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py: (WebDriverSeleniumExecutor.__init__): Do not encode paths. * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.collect_tests): Use items() instead of iteritems() that doesn't exist in python3. * Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py: (WebKitDriverServer.__init__): (WebDriverW3CExecutor.__init__): (WebDriverW3CExecutor.setup): (WebDriverW3CExecutor._runner): 2021-10-08 Youenn Fablet Add support for processing push events without service worker clients https://bugs.webkit.org/show_bug.cgi?id=231285 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm: 2021-10-07 Jonathan Bedard [webkitscmpy] Library should own contributors.json loading https://bugs.webkit.org/show_bug.cgi?id=231310 Unreviewed follow-up fix. * Scripts/git-webkit: Fix imports. 2021-10-07 Jonathan Bedard [webkitscmpy] Library should own contributors.json loading https://bugs.webkit.org/show_bug.cgi?id=231310 Reviewed by Dewei Zhu. * Scripts/git-webkit: Do not load contributors from webkitpy. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py: (Contributor.Encoder.default): Save contributor status to json. (Contributor.Mapping.load): contributors.json is a list, may include status, aliases and nicks. (Contributor.Mapping.save): Save contributors to json file. (Contributor.Mapping.__iter__): Iterate through all contributors. (Contributor.__init__): Add status to contributor. * Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py: (Scm.__init__): Attempt to load contributors. * Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py: (Svn.__init__): Set root_path before constructing base class. * Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py: (ScmBase.__init__): Only reset path if it's not already defined. * Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py: (TestContributor.test_iteration): 2021-10-07 Jonathan Bedard [webkitscmpy] Share cache between processes https://bugs.webkit.org/show_bug.cgi?id=231176 Reviewed by Dewei Zhu. Generating the identifier cache is more expensive than reading a file with that cache in it. This is particularly relevant for webservers, which are likely running multiple processes. Reviewed by Dewei Zhu. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.Cache.__init__): Move cache loading into "load" function. (Git.Cache.load): Open cache file. (Git.Cache.to_hash): If we fail to find a match, attempt to load the file before populating the file. (Git.Cache.to_revision): Ditto. (Git.Cache.to_identifier): Ditto. 2021-10-07 Jonathan Bedard [contributors.json] Relocation (Part 7) https://bugs.webkit.org/show_bug.cgi?id=229690 Reviewed by Dewei Zhu. * Scripts/webkitpy/common/config/contributors.json: Removed. 2021-10-07 Jonathan Bedard [tvOS] Build simulator for arm64 https://bugs.webkit.org/show_bug.cgi?id=231390 Reviewed by Alexey Proskuryakov. * CISupport/build-webkit-org/config.json: Change tvOS simulator build to arm64. * CISupport/ews-build/config.json: Ditto. 2021-10-07 Tim Horton BifurcatedGraphicsContext doesn't bifurcate draw{Tiled}Image https://bugs.webkit.org/show_bug.cgi?id=231385 Reviewed by Devin Rousso. * TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: (TestWebKitAPI::TEST): Add some test. 2021-10-07 Jonathan Bedard [build.webkit.org] Build iOS 15 as universal binary https://bugs.webkit.org/show_bug.cgi?id=231389 Reviewed by Ryan Haddad. * CISupport/build-webkit-org/config.json: Make iOS 15 Simulator Release build universal. 2021-10-07 Stephan Szabo [WinCairo] Support run-jsc-stress-tests without posix commands https://bugs.webkit.org/show_bug.cgi?id=231101 Reviewed by Adrian Perez de Castro. Add support for collecting the test result files when not on a posix host platform by roughly emulating the find command current used in ruby code when using the ruby-runner or for playstation. * Scripts/run-jsc-stress-tests: 2021-10-07 Jonathan Bedard [WebKitBot] Land local changes on production host https://bugs.webkit.org/show_bug.cgi?id=231388 Reviewed by Yusuke Suzuki. * WebKitBot/src/Commit.mjs: Add Slack ID integration. * WebKitBot/src/Contributors.mjs: Ditto. * WebKitBot/src/Utility.mjs: * WebKitBot/src/WebKitBot.mjs: Add "hi" and "yt" commands. * WebKitBot/src/index.mjs: 2021-10-07 Michael Catanzaro Misc compiler warning fixes, October 2021 https://bugs.webkit.org/show_bug.cgi?id=231377 Reviewed by Adrian Perez de Castro. Stop testing the default value of the XSS auditor setting. I could have used IGNORE_DEPRECATED_DECLARATIONS_BEGIN instead, but I see no point in testing the default value of a setting that no longer does anything. * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp: (TestWebKitAPI::TEST): 2021-10-07 BJ Burg Web Inspector: WebInspectorExtensionTabContentView should not reload its iframe when detached https://bugs.webkit.org/show_bug.cgi?id=230758 Reviewed by Timothy Hatcher. Add a new test to verify that re-selecting an extension tab does not cause it to reload. * TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html: * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm: (TEST): 2021-10-07 Youenn Fablet REGRESSION (r283613): [ macOS ] TestWebKitAPI.ResourceLoadDelegate.LoadInfo is failing https://bugs.webkit.org/show_bug.cgi?id=231303 Reviewed by Chris Dumez. Make sure to clear all data store at the end of PushAPI test, as well as at the beginning of ResourceLoadDelegate test. * TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm: * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm: 2021-10-07 David Kilzer Add back RetainPtrARC and TypeCastsCocoaARC tests to TestWTF Reviewed by Darin Adler. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: - Add RetainPtrARC.mm and TypeCastsCocoaARC.mm to the project. * TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm: (TestWebKitAPI::TEST): - Modify tests to clean up autoreleased objects in Debug builds that are optimized out of Release builds. * TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoaARC.mm: Add. * TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: (TestWebKitAPI::TEST): - Modify tests to clean up autoreleased objects in Debug builds that are optimized out of Release builds. * TestWebKitAPI/Tests/WTF/ns/RetainPtrARC.mm: Add. 2021-10-07 Chris Dumez ASSERTION FAILED: This HTTPServer does not know how to respond to a request for /popup-after-redirection.html https://bugs.webkit.org/show_bug.cgi?id=231256 Reviewed by Alex Christensen. Stop hardcoding the HTTPServer port in COOP API tests to address flakiness. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: * TestWebKitAPI/cocoa/HTTPServer.h: * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::addResponse): 2021-10-07 Carlos Garcia Campos [GTK] Reenable -fvisibility=hidden https://bugs.webkit.org/show_bug.cgi?id=181916 Reviewed by Michael Catanzaro. * TestWebKitAPI/PlatformGTK.cmake: 2021-10-06 Fujii Hironori Python 3: run-inspector-generator-tests and generate-inspector-protocol-bindings.py https://bugs.webkit.org/show_bug.cgi?id=231055 Reviewed by Jonathan Bedard. * Scripts/run-inspector-generator-tests: * Scripts/webkitpy/inspector/main.py: (InspectorGeneratorTests.generate_from_json): Use sys.executable to invoke generate-inspector-protocol-bindings.py because 'python' is python2. 2021-10-06 Wenson Hsieh Move FlushIdentifier out of the DisplayList namespace https://bugs.webkit.org/show_bug.cgi?id=231263 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: (TestWebKitAPI::TEST): 2021-10-06 Alex Christensen [ iOS15 Release ] TestWebKitAPI.WebSocket.CloseCode https://bugs.webkit.org/show_bug.cgi?id=231306 Reviewed by Chris Dumez. This test starts by navigating, opening a websocket connection, then navigating away. Sometimes in release builds we only get one didFinishNavigation callback. The important thing about this test is that the server receives the expected close code whenever the page is navigated away from, so drop the two didFinishNavigation checks. I manually verified that on iOS15 simulator release builds the test would time out here, and that it doesn't any more. * TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm: (TestWebKitAPI::TEST): 2021-10-06 Philip Chimento Style checker should check spacing inside braces with elements in them https://bugs.webkit.org/show_bug.cgi?id=231199 In order to automate this and prevent reviewers from having to comment on it, ensure that spaces are required by webkit-check-style inside of braces with elements in them (e.g., initializer lists.) In order to avoid false positives, ignore brace spacing if the braces are surrounded by double-quotes on the same line, assuming that means it's likely the braces are inside a string. Reviewed by Jonathan Bedard. * Scripts/webkitpy/style/checkers/cpp.py: (check_spacing): * Scripts/webkitpy/style/checkers/cpp_unittest.py: (CppStyleTest): (NoNonVirtualDestructorsTest): (WebKitStyleTest.test_indentation): 2021-10-06 Youenn Fablet Implement https://w3c.github.io/push-api/#receiving-a-push-message https://bugs.webkit.org/show_bug.cgi?id=231070 Reviewed by Chris Dumez. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm: Added. 2021-10-06 Carlos Garcia Campos Unreviewed. [GTK] Fix /webkit/WebKitAccessibility/accessible/state with ATSPI Add missing #else I didn't add by mistake in r283361. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testAccessibleState): 2021-10-06 Carlos Garcia Campos [WPE][GTK] TestJSC incorrectly expects garbage collector to collect variables still on the stack https://bugs.webkit.org/show_bug.cgi?id=222972 Reviewed by Michael Catanzaro. Include JSCContextInternal.h instead of JSCContextPrivate.h and remove the jscContextGarbageCollect() implementation. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCWeakValue): Call sanitizeStackForVM() before the garbage collection. (jscContextGarbageCollect): Deleted. 2021-10-06 Jer Noble [Build-time perf] Forward declare JS TypedArrays https://bugs.webkit.org/show_bug.cgi?id=231196 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: 2021-10-05 Alex Christensen [ iOS15 ] TestWebKitAPI.ResourceLoadStatistics.DataTaskIdentifierCollision is a constant crash https://bugs.webkit.org/show_bug.cgi?id=231246 Reviewed by Chris Dumez. For a reason that is mysterious to me, this test was timing out on iOS in the call to synchronouslyLoadHTMLString unless I added "addToWindow:NO" to the TestWKWebView initialization. For a reason that is also mysterious to me, the test was crashing when closing because of something in the autoreleasepool, but using Vector instead of RetainPtr> in DataTaskIdentifierCollisionDelegate makes that stop crashing. I've looked quite closely and don't see why this fixes it, but I verified that it does. While I was at it, I migrated from TCPServer to HTTPServer to be more robust against timeouts, because the TCPServer destructor waits forever for threads to join, and if not everything is perfect it will make the tests time out, which isn't great. HTTPServer does everything on the main thread with callbacks instead. * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (-[DataTaskIdentifierCollisionDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (-[DataTaskIdentifierCollisionDelegate waitForMessages:]): (waitUntilTwoServersConnected): (TEST): 2021-10-05 Alex Christensen Add an entitlement check to only allow AdAttributionDaemon to be connected to by the network process https://bugs.webkit.org/show_bug.cgi?id=231248 Reviewed by Alexey Proskuryakov. Also add a system call to "launchctl unload" to clear any residual state in launchd before starting the unit test. Otherwise we could get into a state where the plist is registered with launchd from an old test that registered it but didn't start the daemon, causing the test to time out until you reboot the machine. This makes it recover nicely. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::attemptConnectionInProcessWithoutEntitlement): (TestWebKitAPI::setInjectedBundleClient): Deleted. (TestWebKitAPI::webViewWithOpenInspector): Deleted. 2021-10-05 Alex Christensen TestWebKitAPI.PrivateClickMeasurement.DaemonBasicFunctionality is timing out https://bugs.webkit.org/show_bug.cgi?id=231257 * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: Originally reviewed as part of https://bugs.webkit.org/show_bug.cgi?id=231248 this should fix the error that happens when a previous test run has registered the test AdAttributionDaemon but then failed before it was started, which leaves launchd in a state of having already loaded a plist for the mach service named "org.webkit.pcmtestdaemon.service" so it refuses to load another. The solution is just to try unloading any previously loaded plist before loading another to clear state in launchd. 2021-10-05 Tim Horton should be draggable, similar to https://bugs.webkit.org/show_bug.cgi?id=229246 Reviewed by Wenson Hsieh. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/cube.usdz: Added. * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (-[ModelLoadingMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::TEST): Add a test that ensures that dragging a works. 2021-10-05 Alex Christensen Implement missing functions in PrivateClickMeasurementDaemonClient https://bugs.webkit.org/show_bug.cgi?id=231060 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::testDaemonPList): (TestWebKitAPI::cleanUpDaemon): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestUIDelegate.h: * TestWebKitAPI/cocoa/TestUIDelegate.mm: (-[TestUIDelegate _webView:didAttachLocalInspector:]): (-[TestUIDelegate waitForInspectorToShow]): (-[WKWebView _test_waitForInspectorToShow]): 2021-10-05 David Kilzer REGRESSION (r283476): [ iOS macOS Debug ] TestWTF failures in RetainPtrARC and TypeCastsCocoaARC Unreviewed partial revert of r283476. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: - Remove RetainPtrARC.mm and TypeCastsCocoaARC.mm from the project. * TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoaARC.mm: Delete. * TestWebKitAPI/Tests/WTF/ns/RetainPtrARC.mm: Delete. - Remove these tests until issues can be fixed. 2021-10-05 David Kilzer Follow-up #2: WTF::RetainPtr<> allows assignment of two pointer types that are not assignable Unreviewed attempt to fix API tests. * TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm: (TestWebKitAPI::TEST): - Revert code back to using objectNS.get() for checked_objc_cast<> tests since it always worked. 2021-10-04 Jonathan Bedard [ews-build.webkit.org] check-patch-relevance can get stuck https://bugs.webkit.org/show_bug.cgi?id=231190 Reviewed by Alexey Proskuryakov. * CISupport/ews-build/steps.py: (CheckPatchRelevance): Compute all regexes in advance. (CheckPatchRelevance._patch_is_relevant): Rely on pre-computed regexes, limit the number of characters to check in a line to 250 and include a hard-timeout so that a patch can never get EWS stuck. 2021-10-04 Chris Dumez Add SPI to launch a service service worker in a WKWebView and expose service worker to injected bundle https://bugs.webkit.org/show_bug.cgi?id=231045 Reviewed by Geoff Garen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: (-[ServiceWorkerSchemeHandler initWithBytes:]): (-[ServiceWorkerSchemeHandler addMappingFromURLString:toData:]): (-[ServiceWorkerSchemeHandler webView:startURLSchemeTask:]): (-[ServiceWorkerSchemeHandler webView:stopURLSchemeTask:]): (-[ServiceWorkerPageRemoteObject serviceWorkerGlobalObjectIsAvailable]): * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerPagePlugIn.mm: Added. (-[ServiceWorkerPagePlugIn webProcessPlugInBrowserContextController:serviceWorkerGlobalObjectIsAvailableForFrame:inScriptWorld:]): (-[ServiceWorkerPagePlugIn webProcessPlugIn:didCreateBrowserContextController:]): * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerPageProtocol.h: Added. 2021-10-04 David Kilzer Follow-up: WTF::RetainPtr<> allows assignment of two pointer types that are not assignable Unreviewed attempt to fix api-ios tests. * TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm: (TestWebKitAPI::TEST): - Work around TestWTF.TypeCastsCocoa.checked_objc_cast test failures on iOS Simulator by using @autoreleasepool. 2021-10-04 John Pascoe [WebAuthn] Prefer internal user verification if available over pin entry. https://bugs.webkit.org/show_bug.cgi?id=213903 Reviewed by Brent Fulgham. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-internal-uv.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-internal-uv.html: Added. 2021-10-04 John Pascoe [WebAuthn] Add SPI to change username of credential https://bugs.webkit.org/show_bug.cgi?id=230956 Reviewed by Brent Fulgham. API test coverage for updating the username of a webauthn credential. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): 2021-10-04 Aakash Jain Send EWS exception emails to bot watchers instead of Aakash Unreviewed. * CISupport/ews-build/master.cfg: 2021-10-03 David Kilzer WTF::RetainPtr<> allows assignment of two pointer types that are not assignable Reviewed by Darin Adler. * DumpRenderTree/mac/DumpRenderTree.mm: (dump): - Use bridge_cast() to fix assignment. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: - Add RetainPtrARC.mm and TypeCastsCocoaARC.mm to the project. * TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm: - Update for dual compilation with MRR and with ARC. Change -retainCount methods to CFGetRetainCount(). - Add @autoreleasepool blocks around groups of tests to find over-released bugs sooner (for future changes). - Add more CFGetRetainCount() to catch unexpected auto-released objects as well as leaks. (TestWebKitAPI::helloWorldCStringLength): Add. (TestWebKitAPI::TEST): - Add tests for bridge_cast() and bridge_id_cast(). - Remove invalid tests after changing RetainPtr<> move constructor to check types. * TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoaARC.mm: Add. - Run tests in TypeCastsCocoa.mm with ARC enabled. * TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: (TestWebKitAPI::TEST): - Update for dual compilation with MRR and with ARC. Change -retainCount methods to CFGetRetainCount(). - Make it possible to name tests differently for MRR vs. ARC using RETAIN_PTR_TEST_NAME macro. * TestWebKitAPI/Tests/WTF/ns/RetainPtrARC.mm: Add. - Run tests in RetainPtr.mm with ARC enabled. * TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm: (readFile): - Use bridge_cast() to fix assignment. - Drive-by fix to keep NSData out of autoreleasePool. 2021-10-03 Myles C. Maxfield Some layout tests with Japanese glyphs fail if Japanese is included in the system "Preferred Languages" settings https://bugs.webkit.org/show_bug.cgi?id=231112 Reviewed by Simon Fraser. Simply set the default locale to en-US. Tests can still override it. * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): 2021-10-02 Alex Christensen Migrate some tests from TCPServer to HTTPServer https://bugs.webkit.org/show_bug.cgi?id=231130 Reviewed by Chris Dumez. The former runs logic on a non-main thread and has a destructor that waits for all threads to join, which often causes timeouts in tests. This is progress towards removing TCPServer, which has been replaced by HTTPServer. * TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm: * TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * TestWebKitAPI/Tests/WebKitCocoa/UploadDirectory.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): (respondToRangeRequests): 2021-10-01 Chris Dumez Drop support for macOS < 10.15 https://bugs.webkit.org/show_bug.cgi?id=231085 Reviewed by Darin Adler. * TestRunnerShared/spi/AppKitTestSPI.h: * TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/Preconnect.mm: * TestWebKitAPI/config.h: 2021-10-01 Jonathan Bedard [webkitpy] Add a delay between successive iOS simulator boots (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=226376 Unreviewed infrastrucutre fix. * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager._boot_device): Increase delay to support iOS 15. 2021-10-01 Jonathan Bedard [webkitscmpy] Get pull-request by number https://bugs.webkit.org/show_bug.cgi?id=231039 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py: (GitHub.request): Add pull-request access by number. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py: (BitBucket.PRGenerator.PullRequest): Shared JSON pull-request generator. (BitBucket.PRGenerator.get): Get pull-request by number. (BitBucket.PRGenerator.find): Use shared pull-request generator. (BitBucket.PRGenerator.create): Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py: (GitHub.PRGenerator.PullRequest): Shared JSON pull-request generator. (GitHub.PRGenerator.get): Get pull-request by number. (GitHub.PRGenerator.find): Use shared pull-request generator. (GitHub.PRGenerator.create): * Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py: (Scm.PRGenerator.get): * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py: (TestNetworkPullRequestGitHub): Added. 2021-10-01 Alex Christensen Implement HTTPS proxy in HTTPServer https://bugs.webkit.org/show_bug.cgi?id=231109 Reviewed by Geoff Garen. Previously we used TCPServer for this, which is picky about the exact number of connections, requests, and replies. If everything isn't perfect, it hangs in the TCPServer destructor. It also doesn't run the server logic on the main thread. This will allow migration to HTTPServer, the replacement for TCPServer. * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.h: * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::proxyDefinition): (TestWebKitAPI::HTTPServer::listenerParameters): (TestWebKitAPI::HTTPServer::respondWithOK): (TestWebKitAPI::HTTPServer::request const): 2021-10-01 Jonathan Bedard [webkitcorepy] Add TaskPool (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=220547 Unreviewed pip install modification. * Scripts/libraries/webkitcorepy/setup.py: Bump version, add tblib. * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version,]. 2021-10-01 Chris Dumez Drop legacy USE(LEGACY_CFNETWORK_DOWNLOADS) code paths https://bugs.webkit.org/show_bug.cgi?id=231081 Reviewed by Alex Christensen. Drop legacy USE(LEGACY_CFNETWORK_DOWNLOADS) code paths, as we no longer support Mac OS 14 Mojave. * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: 2021-10-01 Jonathan Bedard [webkitscmpy] Linkify http urls in pull-requests https://bugs.webkit.org/show_bug.cgi?id=230655 Reviewed by Stephanie Lewis. * Scripts/libraries/webkitscmpy/setup.py: Bump version. * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py: (PullRequest): (PullRequest.escape_html): Escape any html and linkify http urls. (PullRequest.unescape_html): Unescape escaped html and strip links from http urls. (PullRequest.create_body): Use
 and escape html in commit messages.
        (PullRequest.parse_body): Match both 
 and ```, escape html if 
 was used.
        * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
        (BitBucket.PRGenerator.create): Opt out of linkifying http in comment body.
        (BitBucket.PRGenerator.update): Ditto.
        * Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

2021-10-01  Kimmo Kinnunen  

        Add Kimmo Kinnunen as reviewer
        https://bugs.webkit.org/show_bug.cgi?id=231072

        Unreviewed.

        Add myself as a reviewer

        * Scripts/webkitpy/common/config/contributors.json:

2021-10-01  Sam Sneddon  

        Remove most deprecated webkit-patch commands
        https://bugs.webkit.org/show_bug.cgi?id=231032

        Reviewed by Jonathan Bedard.

        This removes all currently deprecated commands except for
        rebaseline-server (to be decided about) and land-cowhand (see
        https://bugs.webkit.org/show_bug.cgi?id=227980).

        This undoubtedly leaves dead code elsewhere in webkitpy, but tidying that is a task for the
        future (due to dynamic typing, determining what is or is not dead is non-trivial).

        * Scripts/webkitpy/tool/bot/retrylogic_unittest.py:
        (MockJSCEarlyWarningSystem):
        Rewrite to directly be a EarlyWarningSystemTaskDelegate subclass.
        (MockJSCEarlyWarningSystem.__init__):
        (MockJSCEarlyWarningSystem.group):
        * Scripts/webkitpy/tool/commands/__init__.py:
        * Scripts/webkitpy/tool/commands/adduserstogroups.py: Removed.
        * Scripts/webkitpy/tool/commands/analyzechangelog.py: Removed.
        * Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py: Removed.
        * Scripts/webkitpy/tool/commands/applywatchlistlocal.py:
        * Scripts/webkitpy/tool/commands/bugfortest.py: Removed.
        * Scripts/webkitpy/tool/commands/bugsearch.py: Removed.
        * Scripts/webkitpy/tool/commands/download.py:
        (Update): Deleted.
        (Build): Deleted.
        (Build._prepare_state): Deleted.
        (CheckPatchRelevance): Deleted.
        (LandCowboy): Deleted.
        (LandCowboy._prepare_state): Deleted.
        (BuildAttachment): Deleted.
        (ApplyWatchList): Deleted.
        (LandFromURL): Deleted.
        (PrepareRollout): Deleted.
        (PrepareRollout._prepare_state): Deleted.
        (CreateRollout): Deleted.
        (CreateRollout._prepare_state): Deleted.
        (Rollout): Deleted.
        (Rollout._prepare_state): Deleted.
        * Scripts/webkitpy/tool/commands/download_unittest.py:
        (DownloadCommandsTest.test_build): Deleted.
        (DownloadCommandsTest.test_apply_watch_list): Deleted.
        (test_land): Deleted.
        (test_build_attachment): Deleted.
        (test_land_from_url): Deleted.
        (test_prepare_revert): Deleted.
        * Scripts/webkitpy/tool/commands/earlywarningsystem.py: Removed.
        * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: Removed.
        * Scripts/webkitpy/tool/commands/findusers.py: Removed.
        * Scripts/webkitpy/tool/commands/gardenomatic.py: Removed.
        * Scripts/webkitpy/tool/commands/openbugs.py: Removed.
        * Scripts/webkitpy/tool/commands/openbugs_unittest.py: Removed.
        * Scripts/webkitpy/tool/commands/queries.py:
        (BugsToCommit): Deleted.
        (BugsToCommit.execute): Deleted.
        (PatchesInCommitQueue): Deleted.
        (PatchesInCommitQueue.execute): Deleted.
        (PatchesToCommitQueue): Deleted.
        (PatchesToCommitQueue.__init__): Deleted.
        (PatchesToCommitQueue._needs_commit_queue): Deleted.
        (PatchesToCommitQueue.execute): Deleted.
        (PatchesToReview): Deleted.
        (PatchesToReview.__init__): Deleted.
        (PatchesToReview._print_report): Deleted.
        (PatchesToReview._generate_report): Deleted.
        (PatchesToReview.execute): Deleted.
        (WhatBroke): Deleted.
        (WhatBroke._print_builder_line): Deleted.
        (WhatBroke._print_blame_information_for_builder): Deleted.
        (WhatBroke.execute): Deleted.
        (ResultsFor): Deleted.
        (ResultsFor._print_layout_test_results): Deleted.
        (ResultsFor.execute): Deleted.
        (FailureReason): Deleted.
        (FailureReason._blame_line_for_revision): Deleted.
        (FailureReason._print_blame_information_for_transition): Deleted.
        (FailureReason._explain_failures_for_builder): Deleted.
        (FailureReason._builder_to_explain): Deleted.
        (FailureReason._done_explaining): Deleted.
        (FailureReason.execute): Deleted.
        (FindFlakyTests): Deleted.
        (FindFlakyTests._find_failures): Deleted.
        (FindFlakyTests._increment_statistics): Deleted.
        (FindFlakyTests._print_statistics): Deleted.
        (FindFlakyTests._walk_backwards_from): Deleted.
        (FindFlakyTests._builder_to_analyze): Deleted.
        (FindFlakyTests.execute): Deleted.
        (TreeStatus): Deleted.
        (execute): Deleted.
        (CrashLog): Deleted.
        (PrintExpectations): Deleted.
        (PrintExpectations.__init__): Deleted.
        (PrintExpectations.execute): Deleted.
        (PrintExpectations._filter_tests): Deleted.
        (PrintExpectations._format_lines): Deleted.
        (PrintExpectations._model): Deleted.
        (PrintBaselines): Deleted.
        (PrintBaselines.__init__): Deleted.
        (PrintBaselines.execute): Deleted.
        (PrintBaselines._print_baselines): Deleted.
        (PrintBaselines._platform_for_path): Deleted.
        (FindResolvedBugs): Deleted.
        (FindResolvedBugs.execute): Deleted.
        * Scripts/webkitpy/tool/commands/queries_unittest.py: Removed.
        * Scripts/webkitpy/tool/commands/rebaseline.py: Removed.
        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py: Removed.
        * Scripts/webkitpy/tool/commands/upload.py:
        (CommitMessageForCurrentDiff): Deleted.
        (CommitMessageForCurrentDiff.__init__): Deleted.
        (CommitMessageForCurrentDiff.execute): Deleted.
        (CleanPendingCommit): Deleted.
        (CleanPendingCommit._flags_to_clear_on_patch): Deleted.
        (CleanPendingCommit.execute): Deleted.
        (CleanReviewQueue): Deleted.
        (CleanReviewQueue.execute): Deleted.
        (AssignToCommitter): Deleted.
        (AssignToCommitter._patches_have_commiters): Deleted.
        (AssignToCommitter._assign_bug_to_last_patch_attacher): Deleted.
        (AssignToCommitter.execute): Deleted.
        (ObsoleteAttachments): Deleted.
        (ObsoleteAttachments._prepare_state): Deleted.
        (AttachToBug): Deleted.
        (AttachToBug._prepare_state): Deleted.
        (HasLanded): Deleted.
        (PostCommits): Deleted.
        (PostCommits.__init__): Deleted.
        (PostCommits._comment_text_for_commit): Deleted.
        (PostCommits.execute): Deleted.
        (CreateBug): Deleted.
        (CreateBug.__init__): Deleted.
        (CreateBug.create_bug_from_commit): Deleted.
        (CreateBug.create_bug_from_patch): Deleted.
        (CreateBug.prompt_for_bug_title_and_comment): Deleted.
        (CreateBug.execute): Deleted.
        (WPTChangeExport): Deleted.
        (WPTChangeExport._prepare_state): Deleted.
        * Scripts/webkitpy/tool/commands/upload_unittest.py:
        (UploadCommandsTest.test_commit_message_for_current_diff): Deleted.
        (UploadCommandsTest.test_clean_pending_commit): Deleted.
        (UploadCommandsTest.test_assign_to_committer): Deleted.
        (test_obsolete_attachments): Deleted.
        (test_post): Deleted.
        (test_attach_to_bug): Deleted.
        (test_attach_to_bug_no_description_or_comment): Deleted.

2021-10-01  Carlos Garcia Campos  

        [GTK][a11y] Add initial implementation of accessible interface when building with ATSPI
        https://bugs.webkit.org/show_bug.cgi?id=230256

        Reviewed by Adrian Perez de Castro.

        Add more unit tests for the accessible interface.

        * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
        (AtspiEventDeleter::operator() const):
        (AccessibilityTest::startEventMonitor):
        (AccessibilityTest::stopEventMonitor):
        (AccessibilityTest::stateSetSize):
        (testAccessibleBasicHierarchy):
        (testAccessibleIgnoredObjects):
        (testAccessibleChildrenChanged):
        (testAccessibleAttributes):
        (testAccessibleState):
        (testAccessibleStateChanged):
        (beforeAll):
        (testAtspiBasicHierarchy): Deleted.

2021-09-30  Alex Christensen  

        Stop making a file named null when running API tests
       ​https://bugs.webkit.org/show_bug.cgi?id=230191

        r283298 did the trick, but I need to pipe stderr to /dev/null instead of null

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

2021-09-30  Fujii Hironori  

        Python 3 fails to run run-builtins-generator-tests : ModuleNotFoundError: No module named 'builtins_model'
        https://bugs.webkit.org/show_bug.cgi?id=230870

        Reviewed by Jonathan Bedard.

        After r282424 (Bug 229879) switched to python3 for running
        run-builtins-generator-tests on Buildbot, only WinCairo buildbot
        was failing run-builtins-generator-tests.

        run-builtins-generator-tests was invoking generate-js-builtins.py
        explictly with 'python'. This is Python 2 on other bots.

        Use sys.executable instead of 'python' to invoke
        generate-js-builtins.py.

        * Scripts/webkitpy/codegen/main.py:
        (BuiltinsGeneratorTests.generate_from_js_builtins):

2021-09-30  John Wilander  

        PCM: Take app bundle ID into consideration when matching triggering events with pending clicks
        https://bugs.webkit.org/show_bug.cgi?id=230778
        

        Reviewed by Alex Christensen.

        https://commits.webkit.org/r282884 added app bundle IDs to unattributed
        and attributed clicks in PCM. This patch makes sure we take those IDs
        into consideration in PCM::Database::attributePrivateClickMeasurement().

        The TestRunner changes are all test infrastructure to enable different
        app bundle IDs in the eyes of PCM. The API test changes are to make use
        of the app bundle ID test infrastructure.

        * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
        (TestWebKitAPI::runBasicEventAttributionTest):
        (TestWebKitAPI::TEST):
        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
        (WTR::TestRunner::setPrivateClickMeasurementAppBundleIDForTesting):
        * WebKitTestRunner/InjectedBundle/TestRunner.h:
        * WebKitTestRunner/TestController.cpp:
        (WTR::TestController::setPrivateClickMeasurementAppBundleIDForTesting):
        * WebKitTestRunner/TestController.h:
        * WebKitTestRunner/TestInvocation.cpp:
        (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

2021-09-30  Alex Christensen  

        Clean up PrivateClickMeasurement
        https://bugs.webkit.org/show_bug.cgi?id=230978

        Reviewed by Kate Cheney.

        I removed the InvalidSourceID test because it is now impossible to make an invalid source ID
        because it uses a uint8_t and allows the values 0-255.

        * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
        (TestWebKitAPI::TEST):
        * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
        (TestWebKitAPI::TEST):

2021-09-29  Alex Christensen  

        Terminate PCM daemon before and after unit test that uses it
        https://bugs.webkit.org/show_bug.cgi?id=230191

        In r282368 I added a unit test that creates a daemon, uses it, then terminates it.
        On some bots it has been timing out.  Once it starts timing out, it probably won't stop because
        it won't get to the part of the test that terminates the problematic daemon.

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

2021-09-29  Chris Dumez  

        Add support for running service workers on the main thread
        https://bugs.webkit.org/show_bug.cgi?id=230649

        Reviewed by Alex Christensen.

        Add API test coverage.

        * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

2021-09-29  Jonathan Bedard  

        [webkitscmpy] Contributors may be undefined
        https://bugs.webkit.org/show_bug.cgi?id=230997
        

        Reviewed by Dewei Zhu.

        * Scripts/libraries/webkitscmpy/setup.py: Bump version.
        * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
        * Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
        (main): Ensure that repositories always have defined contributors.

2021-09-29  Basuke Suzuki  

        [webkitpy] LOG_CHANNEL is widely used in the codebase and shouldn't be treated as error
        https://bugs.webkit.org/show_bug.cgi?id=230995

        Reviewed by Jonathan Bedard.

        LOG_CHANNEL is the macro which is defined in each framework to define list of all channels
        in the framework.

        * Scripts/webkitpy/style/checkers/cpp.py:
        (check_identifier_name_in_declaration):

2021-09-29  Alex Christensen  

        Update PCM Daemon name
        https://bugs.webkit.org/show_bug.cgi?id=230516

        In r282883 I updated the daemon name but not in this one place.
        I think this might cause TestWebKitAPI.EventAttribution.Daemon to stop timing out on one of the bots.

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

2021-09-29  BJ Burg  

        [Cocoa] add _WKInspectorExtension SPI to evaluate script on an extension tab
        https://bugs.webkit.org/show_bug.cgi?id=230646
        

        Reviewed by Devin Rousso.

        Add a new test to exercise the SPI. The test sets up an _WKInspectorExtension,
        creates a tab, evaluates script on the tab, and later reads back the stored value.

        Notably, this test would fail if the extension tab is not currently showing.
        This is a bug and will be addressed as part of https://bugs.webkit.org/show_bug.cgi?id=230758.

        * TestWebKitAPI/SourcesCocoa.txt:
        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
        Add new files.

        * TestWebKitAPI/Tests/WebKitCocoa/InspectorExtension-basic-tab.html:
        Add inline