2020-07-06 Carlos Garcia Campos [GTK][WPE] Enable storageAccess tests https://bugs.webkit.org/show_bug.cgi?id=213881 Reviewed by Adrian Perez de Castro. * WebKitTestRunner/TestController.cpp: (WTR::TestController::getAllStorageAccessEntries): Use the right website data store. 2020-07-06 Carlos Garcia Campos [GTK][WPE] Change the cookies accept policy when ITP is enabled https://bugs.webkit.org/show_bug.cgi?id=213502 Reviewed by Michael Catanzaro. Add tests to check the policy is changed and restored correctly when ITP is enabled and disabled. * TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp: (testCookieManagerAcceptPolicy): 2020-07-06 Philippe Normand [Flatpak SDK] Misc updates https://bugs.webkit.org/show_bug.cgi?id=213968 Reviewed by Sergio Villar Senin. * buildstream/README.rst: ReST format fixes and doc additions. * buildstream/elements/sdk/perl-term-readkey.bst: Remove perllocal.pod as it can clash with other recipes. * flatpak/flatpakutils.py: (run_in_sandbox_if_available): Add --flatpak- option pass-through support. This was lost after the migration of run-minibrowser to python. 2020-07-05 Commit Queue Unreviewed, reverting r263960. https://bugs.webkit.org/show_bug.cgi?id=213980 Re-land, because r263959 somehow fixed the build issue caused by r263953 Reverted changeset: "Unreviewed, reverting r263953 and r263959." https://bugs.webkit.org/show_bug.cgi?id=213979 https://trac.webkit.org/changeset/263960 2020-07-05 Commit Queue Unreviewed, reverting r263953 and r263959. https://bugs.webkit.org/show_bug.cgi?id=213979 Broke internal build Reverted changesets: "[Cocoa] Move almost all features from FeatureDefines.xcconfig to PlatformEnableCocoa.h" https://bugs.webkit.org/show_bug.cgi?id=212542 https://trac.webkit.org/changeset/263953 "[Cocoa] Remove FEATURE_DEFINES from the Cocoa/Xcode build system" https://bugs.webkit.org/show_bug.cgi?id=213976 https://trac.webkit.org/changeset/263959 2020-07-05 Darin Adler [Cocoa] Remove FEATURE_DEFINES from the Cocoa/Xcode build system https://bugs.webkit.org/show_bug.cgi?id=213976 Reviewed by Sam Weinig. * Scripts/webkitpy/style/checkers/featuredefines.py: Removed all FeatureDefines.xcconfig files except for the two that remain, WebCore and WebKit. * TestWebKitAPI/Configurations/Base.xcconfig: Removed FEATURE_DEFINES. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed. * TestWebKitAPI/Configurations/TestWTF.xcconfig: Removed include of FeatureDefines.xcconfig. * TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig: Ditto. * TestWebKitAPI/Configurations/TestWebKitAPILibrary.xcconfig: Ditto. * TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Ditto. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Removed FeatureDefines.xcconfig. 2020-07-05 Sihui Liu Text manipulation: add a new heuristic to decide paragraph boundary https://bugs.webkit.org/show_bug.cgi?id=213918 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-07-05 Darin Adler [Cocoa] Move almost all features from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=212542 Reviewed by Sam Weinig. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Delete everything except ENABLE_EXPERIMENTAL_FEATURES and ENABLE_WEBRTC. * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Added include of WebKitTargetConditionals.xcconfig. 2020-07-05 Philippe Normand [WPE] run-wpe-tests Python3 compatibility https://bugs.webkit.org/show_bug.cgi?id=213969 Reviewed by Sam Weinig. * Scripts/run-wpe-tests: 2020-07-05 Said Abou-Hallawa [macOS] Allow selecting HEIF images if the 'accept' attribute includes an image MIME type that the platform can transcode the HEIF to https://bugs.webkit.org/show_bug.cgi?id=212489 Reviewed by Darin Adler. The scope of this enhancement will be scaled down. No UI change will be done for now. Only allow HEIF/HEIC images to be selected if the 'accept' attribute include a mime type which CG supports transcoding the HEIF/HEIC images to. * MiniBrowser/mac/WK2BrowserWindowController.m: (-[WK2BrowserWindowController dealloc]): (-[WK2BrowserWindowController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[FileExtensionsPopupTarget initWithOpenPanel:allowedFileExtensions:]): Deleted. (-[FileExtensionsPopupTarget popupAction:]): Deleted. (-[FileExtensionsPopupTarget dealloc]): Deleted. (-[WK2BrowserWindowController createFilterView:popupTarget:]): Deleted. 2020-07-04 Darin Adler [Cocoa] Remove all features from FeatureDefines.xcconfig that are already mentioned in PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213962 Reviewed by Sam Weinig. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. 2020-07-04 Darin Adler [Cocoa] Remove unconditional features from FeatureDefines.xcconfig, making sure they are covered in PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=212418 Reviewed by Sam Weinig. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed features that are either unconditionally not enabled, or unconditionally enabled. Double checked that all the enabled ones are either in PlatformEnable.h or PlatformEnableCocoa.h. 2020-07-04 Sam Weinig Part 1 of SimpleColor and SRGBA are essentially the same - let's converge them https://bugs.webkit.org/show_bug.cgi?id=213948 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): Adapt tests to use templatized toSRGBALossy. 2020-07-04 Sergio Villar Senin [Flatpak SDK] Require OpenXR 1.0.9 https://bugs.webkit.org/show_bug.cgi?id=213930 Reviewed by Philippe Normand. * buildstream/elements/sdk/openxr.bst: 2020-07-04 Darin Adler Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable https://bugs.webkit.org/show_bug.cgi?id=212420 * Scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. 2020-07-04 Lauro Moura [WebDriver][WPE] Allow running Selenium tests with the WPE WebDriver https://bugs.webkit.org/show_bug.cgi?id=213500 Reviewed by Carlos Garcia Campos. Add missing method used to discover the selenium name of the WPE webdriver. Proper gardening/triaging of failures will come in following commits. * Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py: (WebDriverWPE.selenium_name): 2020-07-04 Darin Adler Update comment in FeatureDefines.xcconfig since PlatformEnableCocoa.h should be used instead https://bugs.webkit.org/show_bug.cgi?id=213952 Reviewed by Sam Weinig. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Updated comment. 2020-07-03 Wenson Hsieh [macOS] Tests that show system menu popups may fail when run concurrently https://bugs.webkit.org/show_bug.cgi?id=213950 Reviewed by Darin Adler. Make it possible to run tests that present system modal popups simultaneously, without the possibility of these tests interfering with each other. Examples include context menus, select menus, and the DOM paste popup. To do this, we swizzle out codepaths for showing and dimissing popups, and instead dispatch notifications and the appropriate NSMenuDelegate methods ourselves. This change has the side effect of fixing several layout tests that are currently timing out only on arm64e macOS, due to reasons detailed in . * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::setSwizzledPopUpMenu): (WTR::swizzledPopUpContextMenu): (WTR::swizzledPopUpMenu): (WTR::swizzledCancelTracking): (WTR::TestController::platformInitialize): 2020-07-03 Sam Weinig Remove support for ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE https://bugs.webkit.org/show_bug.cgi?id=213932 Reviewed by Darin Adler. Removes support for non-standard , currently being guarded by the macro ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE. This macro, was added back in 2013 as a temporary measure to support some engines who shipped support for . It is currently not enabled for any ports so now seems like as good a time as any to remove it. * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-07-03 Sam Weinig Split color conversion functions out of ColorUtilities.h/cpp into their own file. https://bugs.webkit.org/show_bug.cgi?id=213803 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: Update to include ColorConversion.h and ColorTypes.h rather than ColorUtilities.h 2020-07-03 Carlos Alberto Lopez Perez [WPE][webkitpy] Use headless driver instead of wayland driver https://bugs.webkit.org/show_bug.cgi?id=213914 Reviewed by Philippe Normand. WPE now supports running tests completely headless, but we are still using the webkitpy WaylandDriver to run the tests. This causes an error if the environment doesn't have defined the WAYLAND_DISPLAY or WAYLAND_SOCKET environment variables. Switch the driver to HeadlessDriver. * Scripts/webkitpy/port/wpe.py: (WPEPort._driver_class): 2020-07-03 Carlos Garcia Campos REGRESSION(r261779): [GTK][WPE] http/tests/resourceLoadStatistics/third-party-cookie-blocking-ephemeral.html is failing https://bugs.webkit.org/show_bug.cgi?id=212017 Reviewed by Michael Catanzaro. Use the ephemeral data store when useEphemeralSession option is enabled. * WebKitTestRunner/TestController.cpp: (WTR::TestController::platformInitializeDataStore): 2020-07-02 Alex Christensen Update Mac CMake build * DumpRenderTree/PlatformMac.cmake: * WebKitTestRunner/PlatformMac.cmake: 2020-07-02 Alex Christensen Add testing infrastructure and SPI declaration for HTTP/2 ping https://bugs.webkit.org/show_bug.cgi?id=213913 Reviewed by Jer Noble. * TestWebKitAPI/Tests/WebKitCocoa/Preconnect.mm: (-[SessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): (TestWebKitAPI::pingPong): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.h: (TestWebKitAPI::H2::Frame::Frame): (TestWebKitAPI::H2::Frame::type const): (TestWebKitAPI::H2::Frame::flags const): (TestWebKitAPI::H2::Frame::streamID const): (TestWebKitAPI::H2::Frame::payload const): (TestWebKitAPI::H2::Connection::create): (TestWebKitAPI::H2::Connection::Connection): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::listenerParameters): (TestWebKitAPI::dataFromVector): (TestWebKitAPI::vectorFromData): (TestWebKitAPI::HTTPServer::request const): (TestWebKitAPI::Connection::receiveBytes const): (TestWebKitAPI::Connection::receiveHTTPRequest const): (TestWebKitAPI::Connection::send const): (TestWebKitAPI::H2::Connection::send const): (TestWebKitAPI::H2::Connection::receive const): 2020-07-02 Kate Cheney Custom URL schemes should be treated as app-bound https://bugs.webkit.org/show_bug.cgi?id=213889 Reviewed by Brent Fulgham. Added custom schemes to TestWebKitAPI's Info.plist for testing duplicate values and the max of 10 domains/schemes. Added two API tests to check that schemes are properly read from the Info.plist and that content loaded using a specified app-bound scheme has restricted API use. * TestWebKitAPI/Info.plist: * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (TEST): 2020-07-02 Philippe Normand REGRESSION(r263625): run-minibrowser fails on mac https://bugs.webkit.org/show_bug.cgi?id=213876 Reviewed by Darin Adler. * Scripts/webkitpy/port/base.py: (Port.run_minibrowser): _run_script() expects a string as first argument. Command-line args are passed through a keyword. 2020-07-02 Carlos Garcia Campos Unreviewed. Fix GTK4 build * MiniBrowser/gtk/BrowserSettingsDialog.c: (browser_settings_dialog_init): 2020-07-02 Philippe Normand [Flatpak SDK] Add perl-term-readkey https://bugs.webkit.org/show_bug.cgi?id=213787 Reviewed by Adrian Perez de Castro. This is yet another git-svn runtime dependency. * buildstream/elements/sdk-platform.bst: * buildstream/elements/sdk/perl-term-readkey.bst: Added. 2020-07-01 Wenson Hsieh Fix the WebKit build after https://bugs.webkit.org/show_bug.cgi?id=213832 Reviewed by Tim Horton. Additionally, fix a naming conflict that will result from `WebArchivePboardType` being declared in both `` and DumpRenderTree, by making the latter a local variable instead. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::imageCountInGeneralPasteboard const): 2020-07-01 Daniel Bates [iOS] Implement support for UIWKDocumentRequestSpatialAndCurrentSelection https://bugs.webkit.org/show_bug.cgi?id=213704 Reviewed by Wenson Hsieh. Add some tests. * TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm: (TEST): * TestWebKitAPI/ios/UIKitSPI.h: Define the enumerator using a macro just like what was done for UIWKDocumentRequestMarkedTextRects. The reason for the macro instead of modifying the enumeration definition in this file is to 1) avoid breaking the build for Apple engineers that haven't picked up and to 2) avoid breaking the OpenSource build. 2020-07-01 Kate Cheney WKUserScripts injecting into all frames seem to violate app-bound domains https://bugs.webkit.org/show_bug.cgi?id=213816 Reviewed by Brady Eidson. Added API test coverage. Sets up a tree like so: [app-bound domain, non-app-bound domain, app-bound domain]. Script injection should only be successful in the top frame. Since message handlers are disabled for non- app-bound domains, this test injects script which loads an image using a custom url scheme. If the load succeeds, we increment a counter, and expect only one successful script load (the main frame). * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (-[InAppBrowserSchemeHandler webView:startURLSchemeTask:]): 2020-06-30 Sam Weinig Split Color serialization out of Color classes https://bugs.webkit.org/show_bug.cgi?id=213820 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): Update tests to use ColorSerialization.h 2020-06-30 Wenson Hsieh Several key event tests in fast/events/ios are failing after https://bugs.webkit.org/show_bug.cgi?id=213821 Reviewed by Megan Gardner. After the UIKit changes in , double tapping the Option key now enters dictation mode by default, and additionally displays a modal popup prompting the user to set up dictation. Both of these behaviors interfere with layout tests that attempt to press the option key twice in rapid succession, causing them to time out or fail. Fix this by setting the default that determines the modifier key to use as the dictation shortcut to -1, which disables the dictation keyboard shortcut altogether. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): 2020-06-30 Geoffrey Garen [Cocoa] [GTK] RunLoop::Timer::isActive() is incorrect for timers while they are firing https://bugs.webkit.org/show_bug.cgi?id=213771 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/RunLoop.cpp: (TestWebKitAPI::DerivedOneShotTimer::fired): (TestWebKitAPI::DerivedRepeatingTimer::fired): 2020-06-30 Brady Eidson App-bound JavaScript and Navigation failures should have specific error codes. and https://bugs.webkit.org/show_bug.cgi?id=213808 Reviewed by Tim Hatcher. (Informally by Kate Cheney) * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (TEST): 2020-06-30 Peng Liu Enable the support of FULLSCREEN_API in WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=213774 Reviewed by Youenn Fablet. Replace the definition of ENABLE_FULLSCREEN_API in FeatureDefines.xcconfig with the one in PlatformEnableCocoa.h. We have to do that because WebKitTestRunner does not have a FeatureDefines.xcconfig but it uses "ENABLE(FULLSCREEN_API)" to conditionally compile code to test the element fullscreen API. WebKitTestRunner can use the macro defined in PlatformEnableCocoa.h. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-06-30 Alex Christensen Remove WTF::MD5 https://bugs.webkit.org/show_bug.cgi?id=213766 Reviewed by Youenn Fablet. * DumpRenderTree/PlatformWin.cmake: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/MD5.cpp: Removed. * WebKitTestRunner/cg/TestInvocationCG.cpp: (WTR::computeSHA1HashStringForContext): (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): (WTR::computeMD5HashStringForContext): Deleted. 2020-06-30 Jonathan Bedard [TestExpectations] Add architecture for Apple's ports https://bugs.webkit.org/show_bug.cgi?id=213769 Rubber-stamped by Aakash Jain. * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser): Add architectures for Apple's ports. 2020-06-30 Andy Estes [Xcode] Enable the "My Mac (Mac Catalyst)" destination in WebKit Xcode projects https://bugs.webkit.org/show_bug.cgi?id=213740 Reviewed by Darin Adler. * DumpRenderTree/mac/Configurations/Base.xcconfig: * ImageDiff/cg/Configurations/Base.xcconfig: * MiniBrowser/Configurations/Base.xcconfig: * TestWebKitAPI/Configurations/Base.xcconfig: * WebKitTestRunner/Configurations/Base.xcconfig: Set SUPPORTS_MACCATALYST to YES to tell Xcode that these projects support building for Mac Catalyst. * MiniBrowser/Configurations/MiniBrowser.xcconfig: Excluded all source files on Mac Catalyst so that schemes that include MiniBrowser can build for Mac Catalyst. 2020-06-30 Philippe Normand [WPE][GTK] Port API test harness to Python3 https://bugs.webkit.org/show_bug.cgi?id=213784 Reviewed by Carlos Alberto Lopez Perez. At least now the import chain starting from run-gtk-tests succeeds when the host Python version is 3. Within the SDK the harness is still executed under Python2 though, for now. * Scripts/run-gtk-tests: (GtkTestRunner._setup_testing_environment): * glib/api_test_runner.py: (TestRunner._run_test_qt): * glib/glib_test_runner.py: (GLibTestRunner._read_from_pipe): (GLibTestRunner._read_from_stderr): * jhbuild/jhbuildutils.py: 2020-06-30 Jonathan Bedard [webkitperl] nativeArchitecture() needs to support remote devices https://bugs.webkit.org/show_bug.cgi?id=213727 Reviewed by Aakash Jain. * Scripts/run-javascriptcore-tests: Determine the machine actually running tests and pass that to nativeArchitecture(...). (runTest): Pass nativeTarget and nativePort. (runJSCStressTests): Ditto. * Scripts/webkitdirs.pm: (determineNativeArchitecture): Native architecture is dependent on the target device. (determineArchitecture): Call nativeArchitecture() instead of accessing the variable directly. (nativeArchitecture): Ensure that we return only the architecture of the specified target. 2020-06-30 Diego Pino Garcia [GTK] Unreviewed API test gardening. Update test expectations after r263738. * TestWebKitAPI/glib/TestExpectations.json: 2020-06-30 Philippe Normand [Flatpak SDK] Add libserf https://bugs.webkit.org/show_bug.cgi?id=213682 Reviewed by Carlos Alberto Lopez Perez. Subversion depends on SERF, which requires SCons for its build (the SERF CMake support is incomplete)... * buildstream/elements/sdk-build-depends/scons.bst: Added. * buildstream/elements/sdk/libserf.bst: Added. * buildstream/elements/sdk/subversion.bst: 2020-06-29 Brady Eidson JavaScript cannot be injected into iframes and https://bugs.webkit.org/show_bug.cgi?id=213556 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm: (TEST): (-[FramesMessageHandler userContentController:didReceiveScriptMessage:]): * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView objectByCallingAsyncFunction:withArguments:error:]): 2020-06-29 Jonathan Bedard [TestExpectations] Remove --csv option https://bugs.webkit.org/show_bug.cgi?id=213762 Reviewed by Alexey Proskuryakov. * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationLine.to_csv): Deleted. * Scripts/webkitpy/tool/commands/queries.py: (PrintExpectations.__init__): Remove --csv option. (PrintExpectations._format_lines): Ditto. (PrintBaselines.__init__): Ditto. (PrintBaselines.execute): Ditto. (PrintBaselines._print_baselines): Ditto. * Scripts/webkitpy/tool/commands/queries_unittest.py: (PrintExpectationsTest.run_test): (PrintExpectationsTest.test_include): (PrintBaselinesTest.test_basic): (PrintBaselinesTest.test_multiple): (PrintExpectationsTest.test_csv): Deleted. (PrintBaselinesTest.test_csv): Deleted. 2020-06-29 Tetsuharu Ohzeki Remove ENABLE_STREAMS_API compilation flag https://bugs.webkit.org/show_bug.cgi?id=213728 Reviewed by Sam Weinig. * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-06-29 Wenson Hsieh [iOS] editing/selection/ios/select-text-after-changing-focus.html sometimes fails https://bugs.webkit.org/show_bug.cgi?id=213745 Work towards Reviewed by Tim Horton. See WebKit/ChangeLog for more details. If this test happens to be run after another test that has written something to the pasteboard, it will still fail due to the callout menu showing up with the option to paste. Mitigate this by clearing the contents of the system pasteboard between tests, such that content copied from previous tests doesn't change the behavior of subsequent tests. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): 2020-06-29 Fujii Hironori [Win] run-webkit-tests is failing to run DRT and WTR without --architecture x86_64 https://bugs.webkit.org/show_bug.cgi?id=213688 Reviewed by Jonathan Bedard. * Scripts/webkitpy/port/win.py: (WinPort._port_flag_for_scripts): (WinPort._build_path): (WinPort._ntsd_location): Replaced self.get_option('architecture') with self.architecture(). 2020-06-29 Jonathan Bedard run-javascriptcore-tests: Support Apple Silicon running x86 processes https://bugs.webkit.org/show_bug.cgi?id=213487 Unreviewed infrastructure fix. * Scripts/webkitdirs.pm: (architecturesForProducts): Return architecutre(), not determineArchitecture(). 2020-06-29 Xabier Rodriguez Calvar [webkitpy] PHP7.4 support on Debian platforms https://bugs.webkit.org/show_bug.cgi?id=213721 Reviewed by Carlos Garcia Campos. * Scripts/webkitpy/port/base.py: (Port._debian_php_version): 2020-06-29 Philippe Normand REGRESSION(r263625): [WPE][GTK] MiniBrowser output no longer includes stderr and stdout https://bugs.webkit.org/show_bug.cgi?id=213696 Reviewed by Žan Doberšek. This patch adds a new optional argument to Executive.run_command() to control stdout output. By default the subprocess.PIPE value is used, to keep backward compatibility. Set the stdout argument to None to display the output on the terminal tty. The GTK and WPE run_minibrowser() implementations now use this new argument, along with setting return_stderr to False to indicate we also want stderr displayed on the terminal tty. * Scripts/webkitpy/common/system/abstractexecutive.py: (AbstractExecutive.run_command): * Scripts/webkitpy/common/system/executive.py: (Executive.run_command): * Scripts/webkitpy/common/system/executive_mock.py: (MockExecutive.run_command): * Scripts/webkitpy/port/gtk.py: (GtkPort.run_minibrowser): * Scripts/webkitpy/port/wpe.py: (WPEPort.run_minibrowser): 2020-06-29 Philippe Normand REGRESSION(r263625): run-minibrowser --debug/--release options gone https://bugs.webkit.org/show_bug.cgi?id=213697 Reviewed by Žan Doberšek. * Scripts/webkitpy/minibrowser/run_webkit_app.py: (main): Explicitely skip the --target option. Previous code was also skipping --release and --debug options because their `dest` is the same as with the --target option. 2020-06-29 Carlos Garcia Campos [GTK][WPE] Add webkit_authentication_request_get_security_origin https://bugs.webkit.org/show_bug.cgi?id=213596 Reviewed by Michael Catanzaro. Update the unit tests to check the new API. * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: (testWebViewAuthenticationRequest): (testWebViewAuthenticationProxy): (testWebViewAuthenticationProxyHTTPS): 2020-06-28 Geoffrey Garen Rename initializeThreading to initialize https://bugs.webkit.org/show_bug.cgi?id=213674 Reviewed by Mark Lam. * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: (ApplicationManifestParserTest::SetUp): * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp: (TestWebKitAPI::ComplexTextControllerTest::SetUp): * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::ContentExtensionTest::SetUp): * TestWebKitAPI/Tests/WebCore/StringUtilities.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm: (TestWebKitAPI::WebCoreNSURLSessionTest::SetUp): * TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp: (WebKitTestServer::WebKitTestServer): * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): 2020-06-27 Daniel Bates Revert r262654 because it caused . Moreover it is no longer necessary as the embedding client changes selection through a different SPI after focusing. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TestWebKitAPI::TEST): 2020-06-27 Keith Miller compare-results should be able to parse multiple JSONs at once by merging them https://bugs.webkit.org/show_bug.cgi?id=213685 Reviewed by Saam Barati. This patch improves the compare-results script to enable it to merge JSON output files. This is handy when running scripts by hand where you'll get many a and b JSONs. To do the merging this patch moves the logic of merge-result-jsons into a shared library. compare-results can take multiple files sequentally or by passing the '-a'/'-b' flags multiple times. e.g. `/compare-results -a OG-1.json -a OG-2.json -a OG-3.json -a OG-4.json -b MC-1.json MC-2.json MC-3.json MC-4.json` will behave as you'd expect; combining all the OG JSONs and the MC JSONs before computing the result. Lastly, the benchmark_results script now can handle duplicates of an aggregator in the aggregator list. This is useful because otherwise the logic of merging JSONs is significantly more complicated. * Scripts/compare-results: (getOptions): (main): * Scripts/merge-result-jsons: (readJSONFile): (deepAppend): Deleted. (mergeJSONs): Deleted. * Scripts/webkitpy/benchmark_runner/benchmark_json_merge.py: Copied from Tools/Scripts/merge-result-jsons. (deepAppend): (mergeJSONs): * Scripts/webkitpy/benchmark_runner/benchmark_results.py: (BenchmarkResults._aggregate_results_for_test): (BenchmarkResults._lint_subtest_results): * Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py: 2020-06-27 Jer Noble iOS Safari incorrectly reports "AppleCoreMedia" as UA string https://bugs.webkit.org/show_bug.cgi?id=213245 Reviewed by Youenn Fablet. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm: Added. (TestWebKitAPI::parseUserAgent): (TestWebKitAPI::TEST): 2020-06-27 Philippe Normand Migrate run-minibrowser to webkitpy https://bugs.webkit.org/show_bug.cgi?id=213431 Reviewed by Jonathan Bedard. The perl version was renamed to old-run-minibrowser and remains used by the Mac ports. run-minibrowser is now a Python script hooking into webkitpy and the Port infrastructure. Both WPE and GTK ports will now use the pure python implementation. * Scripts/old-run-minibrowser: Copied from Tools/Scripts/run-minibrowser. * Scripts/run-minibrowser: * Scripts/webkitpy/minibrowser/run_minibrowser.py: Added. (main): (parse_args): * Scripts/webkitpy/port/base.py: (Port.run_minibrowser_arguments): (Port): (Port.run_minibrowser): * Scripts/webkitpy/port/darwin.py: (DarwinPort.environment_for_api_tests): (DarwinPort): (DarwinPort.run_minibrowser_arguments): * Scripts/webkitpy/port/gtk.py: (GtkPort.show_results_html_file): (GtkPort.configuration_for_upload): (GtkPort): (GtkPort.run_minibrowser): * Scripts/webkitpy/port/wpe.py: (WPEPort.show_results_html_file): (WPEPort.configuration_for_upload): (WPEPort): (WPEPort.run_minibrowser): 2020-06-27 Stephan Szabo [PlayStation] Update test runner for changes to Options and signing https://bugs.webkit.org/show_bug.cgi?id=213650 Reviewed by Don Olmstead. * Scripts/webkitdirs.pm: Update extension for PlayStation binary 2020-06-26 Jonathan Bedard [webkitpy] Allow callers to override the reported model (Part 1) https://bugs.webkit.org/show_bug.cgi?id=213677 Reviewed by Dewei Zhu. * Scripts/webkitpy/port/base.py: (Port.configuration_for_upload): Set the model based on --model. * Scripts/webkitpy/port/factory.py: (configuration_options): Add --model option, drive-by fix for --architecture. * Scripts/webkitpy/port/mac.py: (MacPort.configuration_for_upload): --model overrides detected model. 2020-06-26 Jonathan Bedard [webkitpy] Automatically detect hw architecture for supporting Apple Silicon https://bugs.webkit.org/show_bug.cgi?id=213653 Rubber-stamped by Aakash Jain. * Scripts/webkitpy/common/config/ews.json: iOS has the correct defaults, no need to override them. * Scripts/webkitpy/common/system/platforminfo.py: (PlatformInfo): (PlatformInfo.architecture): Retrieve the current system's architecture. * Scripts/webkitpy/common/system/platforminfo_mock.py: (MockPlatformInfo.__init__): (MockPlatformInfo.architecture): * Scripts/webkitpy/port/base.py: (Port.__init__): Remove 'did_override_architecture', should be implied by architecture compared with DEFAULT_ARCHITECTURE. (Port.architecture): Return the architecture specified by the user, if it exists. (Port.set_architecture): Remove 'did_override_architecture'. * Scripts/webkitpy/port/factory.py: (configuration_options): Add --arm and --architecture flags. * Scripts/webkitpy/port/mac.py: (MacPort): Add arm64 to supported architectures. (MacPort.architecture): Convert arm64e to arm64, check the host's architecture. (MacPort._build_driver_flags): Always specify the build architecture since it may be x86_64 or arm64. * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_64bit): (MacTest): (MacTest.test_arm): (MacTest.test_default): * Scripts/webkitpy/tool/commands/earlywarningsystem.py: (AbstractEarlyWarningSystem.run_command): Remove did_override_architecture. 2020-06-26 Jonathan Bedard [Big Sur] Handle baseline search path (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=213639 Unreviewed follow-up fix. * Scripts/webkitpy/port/mac.py: (MacPort.default_baseline_search_path): Copy reference version by value, not by reference. 2020-06-26 Geoffrey Garen Initializing the main thread should initialize the main run loop https://bugs.webkit.org/show_bug.cgi?id=213637 Reviewed by Anders Carlsson. Updated TestWebKitAPI to stop using RunLoop::initializeMain directly. * TestWebKitAPI/Tests/WTF/RefPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/RunLoop.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: (ApplicationManifestParserTest::SetUp): * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp: (TestWebKitAPI::ComplexTextControllerTest::SetUp): * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::ContentExtensionTest::SetUp): * TestWebKitAPI/Tests/WebCore/DNS.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (initializeInAppBrowserPrivacyTestSettings): * TestWebKitAPI/TestsController.cpp: (TestWebKitAPI::TestsController::TestsController): * WebKitTestRunner/TestController.cpp: (TestController::initialize): 2020-06-26 Jonathan Bedard run-javascriptcore-tests: Support Apple Silicon running x86 processes https://bugs.webkit.org/show_bug.cgi?id=213487 Reviewed by Saam Barati. * Scripts/run-javascriptcore-tests: (configurationForUpload): Add --architecture flag. (runTest): Run test suite with specific architecture. (runJSCStressTests): Pass architecture to run-jsc-stress-tests. * Scripts/run-jsc-stress-tests: Add --force-architecture flag. * Scripts/webkitdirs.pm: (determineNativeArchitecture): Add function to determine machine's native architecture. (determineArchitecture): Leverage the nativeArchitecture instead of hard-coding simulator architectures. (architecturesForProducts): Determine the architectures supported by a given build. (nativeArchitecture): Return nativeArchitecture. 2020-06-26 Sihui Liu Text manipulation should observe adjacent elements with new renderer together https://bugs.webkit.org/show_bug.cgi?id=213333 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-26 Jonathan Bedard [Big Sur] Handle baseline search path https://bugs.webkit.org/show_bug.cgi?id=213639 Rubber-stamped by Aakash Jain. * Scripts/webkitpy/port/mac.py: (MacPort): (MacPort.default_baseline_search_path): Break infinite loop for major version bump. * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_big_sur_baseline_search_path): Test Big Sur baseline search path. 2020-06-26 Carlos Alberto Lopez Perez generate-jsc-bundle should fail if passed an invalid remote-config-file parameter https://bugs.webkit.org/show_bug.cgi?id=213615 Reviewed by Žan Doberšek. Raise an exception if the parameter passed as remote-config-file is not a file. * Scripts/generate-jsc-bundle: (main): 2020-06-26 Takashi Komori Add myself to contributors.json Unreviewed. * Scripts/webkitpy/common/config/contributors.json: 2020-06-25 Ryan Haddad [Big Sur] Regression tests fail to run due to failed assert: self._os_version.major == 10 https://bugs.webkit.org/show_bug.cgi?id=213639 Reviewed by Jonathan Bedard. * Scripts/webkitpy/port/mac.py: (MacPort.__init__): Remove the assert since it is no longer valid. 2020-06-25 Commit Queue Unreviewed, reverting r263537. https://bugs.webkit.org/show_bug.cgi?id=213640 Broke watchOS and tvOS builds Reverted changeset: "iOS Safari incorrectly reports "AppleCoreMedia" as UA string" https://bugs.webkit.org/show_bug.cgi?id=213245 https://trac.webkit.org/changeset/263537 2020-06-25 Alex Christensen REGRESSION(r256166, r260596) WKNavigationAction.request.allHTTPHeaderFields needs to contain User-Agent and Accept https://bugs.webkit.org/show_bug.cgi?id=213626 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (TEST): 2020-06-25 Jer Noble iOS Safari incorrectly reports "AppleCoreMedia" as UA string https://bugs.webkit.org/show_bug.cgi?id=213245 Reviewed by Youenn Fablet. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm: Added. (TestWebKitAPI::parseUserAgent): (TestWebKitAPI::TEST): 2020-06-25 Daniel Bates [iOS] -_requestTextInputContextsInRect cannot find empty Quip spreadsheet title https://bugs.webkit.org/show_bug.cgi?id=213564 Reviewed by Simon Fraser. Add some tests. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TestWebKitAPI::TEST): 2020-06-25 Sam Weinig Add a new templated string type to help write more idiomatic parsing code https://bugs.webkit.org/show_bug.cgi?id=213588 Reviewed by Darin Adler. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/StringParsingBuffer.cpp: Added. (TestWebKitAPI::TEST): Added new tests for new class. 2020-06-25 Wenson Hsieh Text manipulation should exclude text rendered using icon-only fonts https://bugs.webkit.org/show_bug.cgi?id=213446 Reviewed by Myles Maxfield. Add a new API test. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/Ahem.ttf: Added. * TestWebKitAPI/Tests/WebKitCocoa/SpaceOnly.otf: Added. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-25 Aakash Jain [ews] Share more bots between EWS builder and testers https://bugs.webkit.org/show_bug.cgi?id=213521 Reviewed by Jonathan Bedard. * BuildSlaveSupport/ews-build/config.json: 2020-06-25 Aakash Jain [ews] Improve handling of invalid changelog https://bugs.webkit.org/show_bug.cgi?id=213609 Reviewed by Jonathan Bedard. * Scripts/webkitpy/tool/steps/validatereviewer.py: (ValidateReviewer.run): 2020-06-24 Alexey Proskuryakov macOS Big Sur build fix. Remove long obsolete checks for Mac OS X 10.6 that didn't respect the major version. * MiniBrowser/Makefile: * TestWebKitAPI/Makefile: * WebKitTestRunner/Makefile: 2020-06-24 Alex Christensen REGRESSION(r262341) Use UTF-8 to decode CFURLRefs from IPC https://bugs.webkit.org/show_bug.cgi?id=213565 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm: (TestWebKitAPI::TEST): 2020-06-24 Umar Iqbal We should resurrect the older patch that collects some statistics of web API calls https://bugs.webkit.org/show_bug.cgi?id=213319 Reviewed by Brent Fulgham. + Enabled ENABLE_WEB_API_STATISTICS flag. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-06-24 Andy Estes [iOS] Open element actions sometimes result in a hover instead of a click https://bugs.webkit.org/show_bug.cgi?id=213530 Reviewed by Darin Adler. Added an API test. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/ElementActionTests.mm: Added. * TestWebKitAPI/Tests/ios/link-with-hover-menu.html: Added. 2020-06-24 Caitlin Potter [JSC] add microbenchmark for op_get_private_name https://bugs.webkit.org/show_bug.cgi?id=213544 Reviewed by Yusuke Suzuki. Add machinery to add --usePrivateClassFields flag in a family of microbenchmarks. * Scripts/run-jsc-benchmarks: 2020-06-24 Carlos Garcia Campos [GTK][WPE] Add API to allow applications to handle the HTTP authentication credential storage https://bugs.webkit.org/show_bug.cgi?id=213177 Reviewed by Michael Catanzaro. Update the authentication tests to check the new API. * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: (testWebViewAuthenticationCancel): (testWebViewAuthenticationLoadCancelled): (testWebViewAuthenticationFailure): (testWebViewAuthenticationNoCredential): (testWebViewAuthenticationEphemeral): (testWebViewAuthenticationStorage): (testWebViewAuthenticationSuccess): (testWebViewAuthenticationEmptyRealm): (serverCallback): (beforeAll): 2020-06-23 Alex Christensen Make HTTP/3 experimental feature work on iOS and only create storage directory if enabled https://bugs.webkit.org/show_bug.cgi?id=213527 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2020-06-23 Jonathan Bedard [Big Sur] Add 11.0 version to scripts https://bugs.webkit.org/show_bug.cgi?id=213532 Reviewed by Tim Horton. * Scripts/run-javascriptcore-tests: (configurationForUpload): Make version checks more explicit, add Big Sur. * Scripts/webkitpy/common/version_name_map.py: (VersionNameMap.__init__): Add Big Sur. * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser): Ditto. 2020-06-23 Wenson Hsieh REGRESSION (r244633): Mail flashes when copying text in an email https://bugs.webkit.org/show_bug.cgi?id=213529 Reviewed by Tim Horton. Add an API test to verify that temporarily changing the height of the document before restoring it to the original value does not cause intrinsic content size to be invalidated. * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: (-[AutoLayoutWKWebView invalidateIntrinsicContentSize]): (-[AutoLayoutWKWebView setInvalidatedIntrinsicContentSizeBlock:]): (-[AutoLayoutWKWebView invalidatedIntrinsicContentSizeBlock]): 2020-06-23 Diego Pino Garcia [ews] Allow archiving 'jsc' product https://bugs.webkit.org/show_bug.cgi?id=213518 Reviewed by Aakash Jain. * BuildSlaveSupport/built-product-archive: (archiveBuiltProduct): 2020-06-23 Alex Christensen Expose already-available WKNavigationAction.request.HTTPBody through the API https://bugs.webkit.org/show_bug.cgi?id=179077 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (TEST): 2020-06-23 Alicia Boya García [GStreamer] Add GStreamer patch to fix EWS glupload racy crash https://bugs.webkit.org/show_bug.cgi?id=210498 Reviewed by Philippe Normand. This WebKit patch backports a patch from GStreamer 1.17 that prevents the crashes in the attached bug to our flatpak build. * buildstream/elements/sdk/gst-plugins-base.bst: * buildstream/patches/gst-plugins-base-0003-glbasefilter-add-support-for-changing-the-display.patch: Added. 2020-06-23 Alicia Boya García [flatpak] Ensure en_US.UTF-8 locale https://bugs.webkit.org/show_bug.cgi?id=212459 Reviewed by Philippe Normand. When developing WebKit we want as few system differences as possible to make tests reproducible. en_US.UTF-8 is indeed the only locale installed in our development flatpak, but our scripts were not correctly clearing most locale environment variables, which resulted in warnings when running some tools (notably perl) when the user OS has a different locale. This patch ensures all locale environment variables are cleared and LANG is set to en_US.UTF-8. It also removes now redundant code from flatpakutils.py. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): * flatpak/webkit-bwrap: 2020-06-23 Simon Fraser [ Catalina Debug WK2 ] fast/events/platform-wheelevent-in-scrolling-div.html is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=213351 Reviewed by Tim Horton. The variadic CGEventCreateScrollWheelEvent() seems to have an issue that causes the resulting event to rarely put the x value into the deltaY. Change to the non-variadic CGEventCreateScrollWheelEvent2() to avoid this. * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController mouseScrollByX:andY:continuously:]): (-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]): * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseScrollBy): (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): 2020-06-23 Diego Pino Garcia [ews] Rename 'JSCTestsFactory' to 'JSCBuildAndTestsFactory' https://bugs.webkit.org/show_bug.cgi?id=213503 Reviewed by Aakash Jain. * BuildSlaveSupport/ews-build/config.json: * BuildSlaveSupport/ews-build/factories.py: (JSCBuildAndTestsFactory): (JSCTestsFactory): Deleted. (JSCTestsFactory.__init__): Deleted. * BuildSlaveSupport/ews-build/loadConfig.py: 2020-06-23 Aakash Jain [ews] Add JSC-Only builders for MIPS and ARMv7 architectures (follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=213366 Unreviewed follow-up fix. Remove unused runTests parameter. * BuildSlaveSupport/ews-build/factories.py: 2020-06-23 Philippe Normand [Flatpak SDK] relax restriction on build-webkit script name https://bugs.webkit.org/show_bug.cgi?id=213432 Reviewed by Žan Doberšek. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): Match the build-webkit string in the whole command-line argument and thus allow alternative implementations of build-webkit. Also let the MAX_CPU_LOAD env var in the sandbox. 2020-06-22 Carlos Garcia Campos [GTK] MiniBrowser: set a base directory for website data and cache https://bugs.webkit.org/show_bug.cgi?id=213368 Reviewed by Michael Catanzaro. Stop using the default ones. * MiniBrowser/gtk/main.c: (activate): 2020-06-22 Carlos Garcia Campos [GTK][WPE] Add API to configure and handle DOM cache to WebKitWebsiteDataManager https://bugs.webkit.org/show_bug.cgi?id=213337 Reviewed by Adrian Perez de Castro. Handle new website data in MiniBrowser and add a unit test. * MiniBrowser/gtk/main.c: (gotWebsiteDataCallback): * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp: (testWebsiteDataConfiguration): (testWebsiteDataDOMCache): (beforeAll): * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::Test): 2020-06-22 Diego Pino Garcia [ews] Add JSC-Only builders for MIPS and ARMv7 architectures https://bugs.webkit.org/show_bug.cgi?id=213366 Reviewed by Aakash Jain. In a follow-up patch the built product of these bots will be consumed by the EWS JSC-Only testing bots. * BuildSlaveSupport/ews-build/config.json: * BuildSlaveSupport/ews-build/factories.py: (JSCBuildFactory): (JSCBuildFactory.__init__): * BuildSlaveSupport/ews-build/factories_unittest.py: (TestBuildFactory): (TestBuildFactory.test_jsc_mipsel_factory): (TestBuildFactory.test_jsc_armv7_factory): * BuildSlaveSupport/ews-build/loadConfig.py: 2020-06-22 Fujii Hironori [Win] fast/dom/Window/alert-with-unmatched-utf16-surrogate-should-not-crash.html is failing https://bugs.webkit.org/show_bug.cgi?id=213452 Reviewed by Yusuke Suzuki. If window.alert() was given an invalid UTF-16 sequence, Windows DumpRenderTree output it without any conversions. It should output "(null)" to match with WebKitTestRunner behavior. * DumpRenderTree/win/UIDelegate.cpp: (toMessage): Added (UIDelegate::runJavaScriptAlertPanelWithMessage): (UIDelegate::runJavaScriptConfirmPanelWithMessage): (UIDelegate::runJavaScriptTextInputPanelWithPrompt): (UIDelegate::runBeforeUnloadConfirmPanelWithMessage): (UIDelegate::setStatusText): 2020-06-22 Jer Noble [ macOS iOS ] (r263321): TestWebKitAPI.SleepDisabler.Load & TestWebKitAPI.SleepDisabler.Reload are constant failures https://bugs.webkit.org/show_bug.cgi?id=213475 Reviewed by Eric Carlson. Looks like the SleepDisabler can come and go while the TestWebKitAPI process is spinning, so make the Reload and Load tests more deterministic by only checking SleepDisabler after getting a "playing" message from the WebContent process. * TestWebKitAPI/Tests/WebKit/SleepDisabler.mm: (SleepDisabler::runAndWaitUntilPlaying): (SleepDisabler::loadPlayingPage): (TEST_F): 2020-06-22 Jonathan Bedard resultsdbpy: Make architecture differences explicit https://bugs.webkit.org/show_bug.cgi?id=213473 Rubber-stamped by Aakash Jain. * resultsdbpy/resultsdbpy/view/static/js/configuration.js: (Configuration.prototype.toString): 2020-06-22 Tim Horton Update macOS version macros https://bugs.webkit.org/show_bug.cgi?id=213484 Reviewed by Alexey Proskuryakov. * ContentExtensionTester/Configurations/Base.xcconfig: * ContentExtensionTester/Configurations/DebugRelease.xcconfig: * DumpRenderTree/mac/Configurations/Base.xcconfig: * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: * ImageDiff/cg/Configurations/Base.xcconfig: * ImageDiff/cg/Configurations/DebugRelease.xcconfig: * MiniBrowser/Configurations/Base.xcconfig: * MiniBrowser/Configurations/DebugRelease.xcconfig: * TestWebKitAPI/Configurations/Base.xcconfig: * TestWebKitAPI/Configurations/DebugRelease.xcconfig: * WebEditingTester/Configurations/Base.xcconfig: * WebEditingTester/Configurations/DebugRelease.xcconfig: * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/Configurations/DebugRelease.xcconfig: * lldb/lldbWebKitTester/Configurations/Base.xcconfig: * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: 2020-06-22 Tim Horton API Test WeakLinking.WeakImport fails on arm64 https://bugs.webkit.org/show_bug.cgi?id=213477 Reviewed by Alexey Proskuryakov. * TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS-v2.tbd: * TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-iOS.tbd: * TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-macOS-v2.tbd: * TestWebKitAPI/Tests/WTF/darwin/libTestWTFAlwaysMissing-macOS.tbd: Add this architecture to the TBD files. 2020-06-22 Jonathan Bedard Bring up watchOS/tvOS on build.webkit.org (Follow-up fix x3) https://bugs.webkit.org/show_bug.cgi?id=213402 Reviewed by Alexey Proskuryakov. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: (WebKitBuildbot): 64 bit is more correct for watchOS embedded builds. 2020-06-22 Aakash Jain [ews] Switch contributors.json url from trac to svn server https://bugs.webkit.org/show_bug.cgi?id=213457 Reviewed by Jonathan Bedard. * BuildSlaveSupport/ews-build/steps.py: (ValidateCommiterAndReviewer): (ValidateCommiterAndReviewer.load_contributors_from_trac): 2020-06-22 Philippe Normand [Flatpak SDK] Persist sccache auth token across flatpak updates https://bugs.webkit.org/show_bug.cgi?id=213427 Reviewed by Žan Doberšek. After a successful flatpak update check if an sccache auth token exists and reuse it when updating the sccache config file. * flatpak/flatpakutils.py: (WebkitFlatpak.save_config): 2020-06-21 Yusuke Suzuki [WTF] URL should support dataLog https://bugs.webkit.org/show_bug.cgi?id=213450 Reviewed by Mark Lam. Add test for URL::dump. * TestWebKitAPI/Tests/WTF/URL.cpp: (TestWebKitAPI::TEST_F): 2020-06-21 Philippe Normand [Flatpak] Nightly runner fails to extract zip files https://bugs.webkit.org/show_bug.cgi?id=213445 Reviewed by Darin Adler. * Scripts/webkit-flatpak-run-nightly: Ensure the buffered zip data is written to disk before extraction. 2020-06-21 Jer Noble WebKit fails to leave audio routing arbitration during navigation, closing. https://bugs.webkit.org/show_bug.cgi?id=213426 Reviewed by Eric Carlson. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/AudioRoutingArbitration.mm: Added. (AudioRoutingArbitration::statusShouldBecomeEqualTo): (TEST_F): 2020-06-20 Jer Noble REGRESSION(r259219): Sleep assertion remains active if WKWebView is closed or WebContent process crashes https://bugs.webkit.org/show_bug.cgi?id=213434 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKit/SleepDisabler.mm: (SleepDisabler::loadPlayingPage): (SleepDisabler::hasSleepDisablerShouldBecomeEqualTo): (TEST_F): 2020-06-20 Jonathan Bedard Bring up watchOS/tvOS on build.webkit.org (Follow-up fix x2) https://bugs.webkit.org/show_bug.cgi?id=213402 Unreviewed test fix. * Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl: Native Macs never use 32 bit tool binaries. 2020-06-19 Jonathan Bedard Bring up watchOS/tvOS on build.webkit.org (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=213402 Unreviewed build-fix. * BuildSlaveSupport/build.webkit.org-config/config.json: Use arm64_32 to build watchOS device. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: (WebKitBuildbot): watchOS device should be considered 32 bit. * Scripts/configure-xcode-for-embedded-development: Force-copy MediaAccessibility.framework. * Scripts/webkitdirs.pm: (extractNonMacOSHostConfiguration): Native Macs never use 32 bit tool binaries. 2020-06-19 Aakash Jain Delete dead code for old ews api tests https://bugs.webkit.org/show_bug.cgi?id=213421 Rubber-stamped by Alexey Proskuryakov. * Scripts/webkitpy/common/config/ports.py: (DeprecatedPort.run_api_tests_command): Deleted. * Scripts/webkitpy/common/net/apitestresults.py: Removed. * Scripts/webkitpy/common/net/apitestresults_unittest.py: Removed. * Scripts/webkitpy/port/base.py: (Port.bindings_results_directory): (Port.api_results_directory): Deleted. * Scripts/webkitpy/tool/bot/apitestresultsreader.py: Removed. * Scripts/webkitpy/tool/steps/runtests.py: (RunTests._run_api_tests): Deleted. * Scripts/webkitpy/tool/steps/steps_unittest.py: (test_runtests_api_debug): Deleted. 2020-06-19 Jonathan Bedard Bring up watchOS/tvOS on build.webkit.org https://bugs.webkit.org/show_bug.cgi?id=213402 Unreviewed infrastructure fix. * BuildSlaveSupport/build.webkit.org-config/wkbuild.py: (_should_file_trigger_build): Add tvOS and watchOS. * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py: (ShouldBuildTest): (ShouldBuildTest.test_should_build): 2020-06-19 Jiewen Tan [WebAuthn] Provide a _WKWebAuthenticationPanelUpdatePINInvalid update to UI clients if the returned PIN from the client is not valid https://bugs.webkit.org/show_bug.cgi?id=213404 Reviewed by Brent Fulgham. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-fake-pin-invalid-error-retry.html: Added. 2020-06-19 Jonathan Bedard Bring up watchOS/tvOS on build.webkit.org https://bugs.webkit.org/show_bug.cgi?id=213402 Reviewed by Aakash Jain. * BuildSlaveSupport/build.webkit.org-config/config.json: Add AppleTV and watchOS builders. * BuildSlaveSupport/build.webkit.org-config/factories.py: (BuildFactory.__init__): Support AppleTV and watchOS. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/TvOS13.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/TvOS13@2x.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/TvOS13Simulator.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/TvOS13Simulator@2x.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/WatchOS6.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/WatchOS6@2x.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/WatchOSSimulator6.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/WatchOSSimulator6@2x.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js: * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css: * BuildSlaveSupport/build.webkit.org-config/steps.py: * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: 2020-06-19 Saam Barati Have a memory monitor thread in jsc shell when running tests using --memory-limited https://bugs.webkit.org/show_bug.cgi?id=213389 Reviewed by Mark Lam. * Scripts/run-jsc-stress-tests: * Scripts/webkitruby/jsc-stress-test-writer-default.rb: * Scripts/webkitruby/jsc-stress-test-writer-ruby.rb: 2020-06-19 Chris Fleizach AX: Make isolated tree enablement status dependent on client preference https://bugs.webkit.org/show_bug.cgi?id=213355 Reviewed by Zalan Bujtas. * MiniBrowser/mac/AppDelegate.m: (-[BrowserAppDelegate defaultConfiguration]): 2020-06-19 Aakash Jain Improve handling of trac downtime by commit-queue https://bugs.webkit.org/show_bug.cgi?id=213377 Reviewed by Jonathan Bedard. * BuildSlaveSupport/ews-build/steps.py: Load contributors.json from disk when loading from trac fails. (ValidateCommiterAndReviewer.load_contributors_from_disk): (ValidateCommiterAndReviewer.load_contributors_from_trac): (ValidateCommiterAndReviewer.load_contributors): * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test 2020-06-19 Lauro Moura [WPE] Warn potential issues when creating WindowViewBackend https://bugs.webkit.org/show_bug.cgi?id=213326 Reviewed by Philippe Normand. Make it easier to debug eventual GL issues when starting up MiniBrowser in windowed mode. * wpe/backends/WindowViewBackend.cpp: (WPEToolingBackends::WaylandEGLConnection::singleton): (WPEToolingBackends::WindowViewBackend::WindowViewBackend): 2020-06-19 Lauro Moura [webkitpy][WPE] Default to headless if _display_server is xfvb https://bugs.webkit.org/show_bug.cgi?id=213327 Reviewed by Philippe Normand. Xvfb is used as the default display server for some scripts, and the equivalent for WPE is the headless one. WTR and the API tests already create only HeadlessViewBackends, but the WebDriver tests create them through MiniBrowser, which requires the '--headless' parameter. * Scripts/run-webdriver-tests: Do not override _display_server * Scripts/webkitpy/port/base.py: (Port.__init__): Define _display_server for all ports to avoid eventually needing to override it. * Scripts/webkitpy/port/wpe.py: (WPEPort.__init__): Default to 'headless' if _display_server is 'xvfb' * Scripts/webkitpy/w3c/wpt_runner.py: (main): Dot not override _display_server 2020-06-19 Carlos Garcia Campos Add support for fetching registrable domains with resource load statistics https://bugs.webkit.org/show_bug.cgi?id=213291 Reviewed by Adrian Perez de Castro. Update GLib ITP unit test to check also fetch and remove. * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp: (testWebsiteDataITP): 2020-06-19 Tomoki Imai Change my (Tomoki Imai's) status to committer Unreviewed, just updating contributors.json for myself. * Scripts/webkitpy/common/config/contributors.json: 2020-06-18 Jonathan Bedard Add SPI to preconnect to a server (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=213109 Unreviewed build-fix. * TestWebKitAPI/Tests/WebKitCocoa/Preconnect.mm: HTTPServer does not exist if HAVE(NETWORK_FRAMEWORK) is false. 2020-06-18 Jonathan Bedard [iOS] Two KeyboardInputTests are failing on recent iOS SDK versions (build-fix) https://bugs.webkit.org/show_bug.cgi?id=213183 Unreviewed build fix. * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (webViewWithAutofocusedInput): bool may not be the same type as BOOL. 2020-06-18 Saam Barati call skip when skipping JetStream2 wasm test https://bugs.webkit.org/show_bug.cgi?id=213354 Reviewed by Yusuke Suzuki. So we can see the logging that we're skipping. * Scripts/run-jsc-stress-tests: 2020-06-18 Joonghun Park Unreviewed. Remove the build warning below since r262971. warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] * WebKitTestRunner/TestController.cpp: (WTR::getAllStorageAccessEntriesCallback): 2020-06-18 Ross Kirsling [Intl] Enable RelativeTimeFormat and Locale by default https://bugs.webkit.org/show_bug.cgi?id=213324 Reviewed by Yusuke Suzuki. * Scripts/run-jsc-stress-tests: Remove feature flags. 2020-06-18 Andy Estes Unreviewed build fix after r263194 * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): Guarded code that mentions UIContextMenuInteraction with USE(UICONTEXTMENU). 2020-06-18 Ryan Haddad Unreviewed infrastructure fix, temporarily remove ews116 due to hardware failure tracked with rdar://64424245 * BuildSlaveSupport/ews-build/config.json: 2020-06-18 Carlos Garcia Campos [GTK][WPE] Add API to configure and handle service worker registrations to WebKitWebsiteDataManager https://bugs.webkit.org/show_bug.cgi?id=213290 Reviewed by Michael Catanzaro. Handle new website data in MiniBrowser and add a unit test. * MiniBrowser/gtk/main.c: (gotWebsiteDataCallback): * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp: (serverCallback): (testWebsiteDataConfiguration): (testWebsiteDataEphemeral): (testWebsiteDataITP): (testWebsiteDataServiceWorkerRegistrations): (beforeAll): * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::Test): 2020-06-17 Fujii Hironori RebaselineServer: "Rebaseline queue" button is placed behind the footer https://bugs.webkit.org/show_bug.cgi?id=213258 Reviewed by Zalan Bujtas. * Scripts/webkitpy/tool/servers/data/rebaselineserver/index.html: Moved 'log' and 'queue' elements after 'footer' element. * Scripts/webkitpy/tool/servers/data/rebaselineserver/main.css: (#queue): Changed 'bottom' property from 3em to 4em. 2020-06-17 Wenson Hsieh [macOS] Shift-tab in a bullet list in Mail Compose jumps back to Subject field https://bugs.webkit.org/show_bug.cgi?id=213320 Reviewed by Tim Horton. Add a new API test to verify that preventing the "keypress" event for shift+tab in an SPI-editable web view causes us to avoid relinquishing focus. * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: 2020-06-17 Andy Estes REGRESSION (r258092): fast/forms/ios/file-upload-panel.html fails when HAVE(UICONTEXTMENU_LOCATION) https://bugs.webkit.org/show_bug.cgi?id=213314 Reviewed by Maciej Stachowiak. fast/forms/ios/file-upload-panel.html sets the shouldHandleRunOpenPanel and shouldPresentPopovers test options to false so that WKTR will (a) not register a runOpenPanel UI delegate callback, causing WebKit to create a WKFileUploadPanel instead, and (b) swizzle two UIKit view controller presentation methods to prevent the document picker menu from being presented. The test merely wants the WKFileUploadPanel instance to exist in order to query its available actions, not for it to show UI. In r258092, WKFileUploadPanel now sometimes uses a UIContextMenuInteraction instance to present the document picker menu, but -[UIContextMenuInteraction _presentMenuAtLocation:] fails due to WKTR's above-mentioned swizzling. When this failure occurs, UIContextMenuInteraction calls -contextMenuInteraction:willEndForConfiguration:animator: on its delegate (the WKFileUploadPanel), which dismisses the open panel before the test has had a chance to query the available actions. Fixed this by swizzling -[UIContextMenuInteraction _presentMenuAtLocation:] when the shouldPresentPopovers test option is false. * WebKitTestRunner/ios/TestControllerIOS.mm: (overridePresentMenuOrPopoverOrViewController): Renamed from overridePresentViewControllerOrPopover. (WTR::TestController::platformResetStateToConsistentValues): Swizzled -[UIContextMenuInteraction _presentMenuAtLocation:] with overridePresentMenuOrPopoverOrViewController when the shouldPresentPopovers test option is false. (overridePresentViewControllerOrPopover): Renamed to overridePresentMenuOrPopoverOrViewController. 2020-06-17 Sihui Liu REGRESSION (r263044): [macOS] TestWebKitAPI.TextManipulation.InsertingContentIntoAlreadyManipulatedContentCreatesTextManipulationItem is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=213311 Reviewed by Wenson Hsieh. TextManipulation.InsertingContentIntoAlreadyManipulatedContentCreatesTextManipulationItem does not wait long enough to make sure TextManipulationController gets notified about the insertion and starts observing. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-17 Aakash Jain Delete code for old ews bindings queue https://bugs.webkit.org/show_bug.cgi?id=213315 Rubber-stamped by Alexey Proskuryakov. * Scripts/webkitpy/common/config/ews.json: * Scripts/webkitpy/common/config/ports.py: (DeprecatedPort.run_bindings_tests_command): Deleted. (WinPort.run_bindings_tests_command): Deleted. * Scripts/webkitpy/common/config/ports_mock.py: (MockPort.run_bindings_tests_command): Deleted. * Scripts/webkitpy/common/net/generictestresults.py: Removed. * Scripts/webkitpy/common/net/generictestresults_unittest.py: Removed. * Scripts/webkitpy/tool/bot/bindingstestresultsreader.py: Removed. * Scripts/webkitpy/tool/bot/patchanalysistask.py: (PatchAnalysisTask._retry_bindings_tests): Deleted. * Scripts/webkitpy/tool/bot/retrylogic_unittest.py: (MockBindingsEarlyWarningSystem): Deleted. (MockBindingsEarlyWarningSystem.__init__): Deleted. (MockBindingsEarlyWarningSystem.test_results): Deleted. (BindingsEarlyWarningSystemTest): Deleted. (BindingsEarlyWarningSystemTest._results_indicate_all_passed): Deleted. (BindingsEarlyWarningSystemTest._create_task): Deleted. (BindingsEarlyWarningSystemTest.test_success_case): Deleted. (BindingsEarlyWarningSystemTest.test_test_failure): Deleted. (BindingsEarlyWarningSystemTest.test_fix): Deleted. (BindingsEarlyWarningSystemTest.test_ineffective_patch): Deleted. (BindingsEarlyWarningSystemTest.test_partially_effective_patch): Deleted. (BindingsEarlyWarningSystemTest.test_different_test_failures_in_patch_and_tree): Deleted. * Scripts/webkitpy/tool/commands/earlywarningsystem.py: * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: (TestBindingsEWS): Deleted. (AbstractEarlyWarningSystemTest.test_failing_bindings_tests_message): Deleted. * Scripts/webkitpy/tool/steps/checkpatchrelevance.py: * Scripts/webkitpy/tool/steps/runtests.py: (RunTests._run_bindings_tests): Deleted. * Scripts/webkitpy/tool/steps/steps_unittest.py: (test_patch_relevant_bindings): Deleted. (test_runtests_api): Deleted. 2020-06-17 Aakash Jain Delete code for old ews style queue https://bugs.webkit.org/show_bug.cgi?id=213297 Rubber-stamped by Alexey Proskuryakov. * Scripts/webkitpy/tool/bot/stylequeuetask.py: Removed. * Scripts/webkitpy/tool/commands/queues.py: (StyleQueue): Deleted. (StyleQueue.__init__): Deleted. (StyleQueue.review_patch): Deleted. (StyleQueue.run_command): Deleted. (StyleQueue.expected_failures): Deleted. (StyleQueue.refetch_patch): Deleted. * Scripts/webkitpy/tool/commands/queues_unittest.py: (TestReviewQueue): Deleted. 2020-06-17 Aakash Jain Delete code for old ews webkitpy queue https://bugs.webkit.org/show_bug.cgi?id=213299 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/config/ews.json: * Scripts/webkitpy/common/net/generictestresults.py: (WebkitpyTestResults): Deleted. * Scripts/webkitpy/tool/bot/patchanalysistask.py: * Scripts/webkitpy/tool/bot/webkitpytestresultsreader.py: Removed. * Scripts/webkitpy/tool/commands/earlywarningsystem.py: * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: (TestWebkitpyEWS): Deleted. (AbstractEarlyWarningSystemTest.test_failing_webkitpy_tests_message): Deleted. * Scripts/webkitpy/tool/steps/checkpatchrelevance.py: * Scripts/webkitpy/tool/steps/runtests.py: (RunTests._run_webkitpy_tests): Deleted. * Scripts/webkitpy/tool/steps/steps_unittest.py: (test_runtests_webkitpy): Deleted. (test_patch_not_relevant_bindings): Deleted. (test_runtests_api_debug): Deleted. 2020-06-17 Keith Miller WebKitTestRunner should not crash on alert with invalid utf16 strings https://bugs.webkit.org/show_bug.cgi?id=213269 Reviewed by Simon Fraser. * WebKitTestRunner/StringFunctions.h: (WTR::toWTFString): 2020-06-17 Aakash Jain Delete old ews client side code - part 2 https://bugs.webkit.org/show_bug.cgi?id=213262 Reviewed by Alexey Proskuryakov. * Scripts/webkitpy/common/net/bugzilla/attachment.py: * Scripts/webkitpy/tool/bot/patchanalysistask.py: (PatchAnalysisTaskDelegate.command_passed): Deleted. (PatchAnalysisTaskDelegate.command_failed): Deleted. * Scripts/webkitpy/tool/commands/earlywarningsystem.py: (AbstractEarlyWarningSystem.command_passed): Deleted. (AbstractEarlyWarningSystem.command_failed): Deleted. * Scripts/webkitpy/tool/commands/perfalizer.py: (PerfalizerTask.command_passed): Deleted. (PerfalizerTask.command_failed): Deleted. * Scripts/webkitpy/tool/commands/perfalizer_unittest.py: * Scripts/webkitpy/tool/commands/queues.py: (AbstractPatchQueue._next_patch): Deleted. (AbstractPatchQueue._did_error): Deleted. (AbstractPatchQueue._did_skip): Deleted. (AbstractPatchQueue._unlock_patch): Deleted. (StyleQueue.command_passed): Deleted. (StyleQueue.command_failed): Deleted. 2020-06-17 Paulo Matos Add new Igalia EWS workers for ARM/MIPS https://bugs.webkit.org/show_bug.cgi?id=212803 Reviewed by Aakash Jain. * BuildSlaveSupport/ews-build/config.json: 2020-06-16 Mark Lam TestWebKitAPI.WebCore.WildcardStringMatching needs to initialize Options before accessing them. https://bugs.webkit.org/show_bug.cgi?id=213270 Reviewed by Yusuke Suzuki. * TestWebKitAPI/Tests/WebCore/StringUtilities.mm: (TestWebKitAPI::TEST): 2020-06-16 Wenson Hsieh Text manipulation should not re-extract elements whose children have been manipulated https://bugs.webkit.org/show_bug.cgi?id=213276 Reviewed by Tim Horton. Add a new API test where we start and complete text manipulation, and then hide and show the manipulated element. This test verifies that the new item callbacks are *not* called after element is shown again. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-16 Saam Barati Fix two typos "signifcant" and "signficance". Should be "significant" and "significance" * Scripts/compare-results: (displayStr): (computeMultipleHypothesesSignificance): (dumpBreakdowns): (writeCSV): (computeMultipleHypothesesSignficance): Deleted. 2020-06-16 Andres Gonzalez Fix for accessibility/textarea-selected-text-range.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=213257 Reviewed by Chris Fleizach. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::setAttributeValue): (WTR::AccessibilityUIElement::selectedTextRange): Dispatch call into WebAccessibilityWrapper onto AX secondary thread to simulate isolated tree mode. 2020-06-16 Saam Barati Multiple hypothesis testing should use False Discovery Rate instead of Bonferroni https://bugs.webkit.org/show_bug.cgi?id=213219 Reviewed by Mark Lam. My previous patch here used Bonferroni to do multiple hypotheses correction. Bonferroni does a good job at reducing false positive rate (type I error, saying something is significant when it's not, e.g, rejecting the null hypothesis when we shouldn't), but at the expense of also having a high false negative rate (type II error, saying something is not significant when it is, e.g, not rejecting the null hypothesis when we should). After doing a bit more reading, it seems like using a technique called False Discovery Rate (FDR) is better. It still does a good job at controlling type I error rate, but without sacrificing a high type II error rate. FDR is based on a technique for "estimating the proportion of wrongly rejected null hypotheses" [2]. This patch uses Benjamini and Hochberg estimation of FDR, which relies on hypotheses being independent. We know subtests in a benchmark aren't fully independent variables, but it's a good enough approximation. You can read more about FDR: 1. https://www.stat.berkeley.edu/~mgoldman/Section0402.pdf 2. https://besjournals.onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2010.00061.x 3. https://en.wikipedia.org/wiki/False_discovery_rate * Scripts/compare-results: (displayStr): (computeMultipleHypothesesSignficance): (dumpBreakdowns): (writeCSV): 2020-06-16 David Kilzer REGRESSION (r262994): Web Inspector is killed when context-clicking anywhere Reviewed by Darin Adler. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: - Add ContextMenuAction.cpp to build systems. * TestWebKitAPI/Tests/WebCore/ContextMenuAction.cpp: Add. (TestWebKitAPI::TEST): - Add TestWebKitAPI.WebCore.ContextMenuAction_IsValidEnum. 2020-06-16 Fujii Hironori [Win] Mouse dragging tests are failing because WebKitTestRunner dispatches WM_MOUSELEAVE to the hidden WebView https://bugs.webkit.org/show_bug.cgi?id=213239 Reviewed by Don Olmstead. There are two problems: 1. Windows EventSenderProxy::mouseMoveTo doesn't set WPARAM of WM_MOUSEMOVE 2. Unexpected WM_MOUSELEAVE discontinues the mouse dragging events WPARAM of WM_MOUSEMOVE should represent pressed mouse buttons while dragging. WM_MOUSELEAVE is unexpectedly dispatched because the mouse cursor is always out of the hidden WebView. The unexpected WM_MOUSELEAVE discontinues dragging events. WM_MOUSELEAVE shouldn't be dispatched in WebKitTestRunner. Ignore it. * WebKitTestRunner/win/EventSenderProxyWin.cpp: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): Set MK_LBUTTON to WPARAM of WM_MOUSEMOVE while dragging. * WebKitTestRunner/win/TestControllerWin.cpp: (WTR::runRunLoopUntil): Ignore WM_MOUSELEAVE. 2020-06-16 Wenson Hsieh Text manipulation should handle nested item boundary elements https://bugs.webkit.org/show_bug.cgi?id=213251 Reviewed by Sihui Liu. Add a new API test to exercise this scenario. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: 2020-06-16 Charlie Turner [GTK] Disable video autoplay https://bugs.webkit.org/show_bug.cgi?id=184845 Reviewed by Carlos Garcia Campos. Update the various callsites for constructing a view to take into account the default policies. I chose the default as autoplay allow without sound, which is in keeping with WebCore's choice. * MiniBrowser/gtk/BrowserWindow.c: (webViewDecidePolicy): (newTabCallback): (openPrivateWindow): (browser_window_get_or_create_web_view_for_automation): (browser_window_create_web_view_in_new_tab_for_automation): * MiniBrowser/gtk/main.c: (createBrowserTab): (main): * TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp: Add autoplay policy tests, and use modern class initializers. (testAutoplayPolicy): (beforeAll): 2020-06-16 Philippe Normand [Flatpak SDK] Subversion perl bindings unusable https://bugs.webkit.org/show_bug.cgi?id=213241 Reviewed by Sergio Villar Senin. * buildstream/elements/sdk/subversion.bst: The svn swig perl library wasn't correctly installed, leading to undefined symbols when importing it from the bindings. A new integration command now tests this. 2020-06-16 Philippe Normand [Flatpak SDK] Update to Qt 5.15 https://bugs.webkit.org/show_bug.cgi?id=213192 Reviewed by Sergio Villar Senin. The new patch comes from the upstream KDE SDK: https://github.com/KDE/flatpak-kde-runtime/tree/qt5.15lts/patch * buildstream/elements/qt5/qtbase.bst: * buildstream/elements/qt5/qtdeclarative.bst: * buildstream/elements/qt5/qtquickcontrols.bst: * buildstream/elements/qt5/qtquickcontrols2.bst: * buildstream/elements/qt5/qtwayland.bst: * buildstream/elements/qt5/qtx11extras.bst: * buildstream/patches/qtbase-make-sure-to-correctly-construct-base-platform-theme.patch: Added. * buildstream/patches/qtwayland-use-gnome-platform-theme-on-gnome-based-desktops.patch: Removed. * buildstream/project.conf: 2020-06-16 Carlos Garcia Campos [GTK][WPE] Add API to configure and enable resource load statistics https://bugs.webkit.org/show_bug.cgi?id=177943 Reviewed by Michael Catanzaro. Add --enable-itp command line version to MiniBrowser and unit tests to check the new API. * MiniBrowser/gtk/main.c: (gotWebsiteDataCallback): (activate): * MiniBrowser/wpe/main.cpp: (main): * TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp: (serverCallback): (testWebsiteDataConfiguration): (testWebsiteDataEphemeral): (testWebsiteDataITP): (beforeAll): * TestWebKitAPI/glib/TestExpectations.json: * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::Test): * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp: (directoryChangedCallback): (WebViewTest::waitUntilFileChanged): * TestWebKitAPI/glib/WebKitGLib/WebViewTest.h: 2020-06-16 Philippe Normand REGRESSION(r263029): [Flatpak SDK] Broke initial SDK installation Rubber-stamped by Žan Doberšek. * flatpak/flatpakutils.py: (FlatpakObject.version): Gracefully return an empty version when the flatpak info command fails. This usually means the app has not been installed yet. 2020-06-15 Megan Gardner Text form controls can scroll by 1px when value is the same length as size. No scrolling should happen. https://bugs.webkit.org/show_bug.cgi?id=212856 Reviewed by Zalan Bujtas. Rebased to reflect new sizes. * TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm: (TEST): * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (TestWebKitAPI::TEST): 2020-06-15 Jonathan Bedard Follow-up fix: Make API tests tolerant of our relatively new use of WebPageProxy::preconnectTo https://bugs.webkit.org/show_bug.cgi?id=213144 Unreviewed build fix. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: Guard didFinishNavigation declaration with HAVE(NETWORK_FRAMEWORK). 2020-06-15 Alex Christensen Provide alternatively-named SPI for user style sheets and scripts https://bugs.webkit.org/show_bug.cgi?id=213206 Reviewed by Brady Eidson. * DumpRenderTree/mac/DumpRenderTree.mm: (fontAllowList): (createWebViewAndOffscreenWindow): (resetWebViewToConsistentStateBeforeTesting): (fontWhitelist): Deleted. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::addOriginAccessWhitelistEntry): (TestRunner::removeOriginAccessWhitelistEntry): (TestRunner::addUserScript): (TestRunner::addUserStyleSheet): * TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/UserContentWorld.mm: (TEST): * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::generateFontAllowList): (WTR::TestController::platformInitializeContext): (WTR::generateWhitelist): Deleted. 2020-06-15 Alex Christensen Add SPI to preconnect to a server https://bugs.webkit.org/show_bug.cgi?id=213109 Reviewed by Geoff Garen. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2020-06-15 Keith Miller Signal handlers should have a two phase installation. https://bugs.webkit.org/show_bug.cgi?id=213160 Reviewed by Mark Lam. * TestWebKitAPI/Tests/WTF/Signals.cpp: (TEST): 2020-06-15 Sihui Liu Text manipulation does not observe newly displayed element inside previously observed content https://bugs.webkit.org/show_bug.cgi?id=213156 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-15 Philippe Normand [Flatpak SDK] Bump Subversion and enable Perl bindings https://bugs.webkit.org/show_bug.cgi?id=213189 Reviewed by Žan Doberšek. * buildstream/elements/sdk-build-depends/swig.bst: Added. * buildstream/elements/sdk/subversion.bst: Enable Perl bindings so that git svn can be used within the sandbox. 2020-06-15 Philippe Normand [Flatpak SDK] flatpak update still not displayed https://bugs.webkit.org/show_bug.cgi?id=213180 Reviewed by Žan Doberšek. Added a new --version option to the script. We no longer gather the flatpak update command output to know if something was updated or not. Instead we get the version of the SDK prior to the update operation and compare that with the version after the update. * flatpak/flatpakutils.py: (FlatpakObject.version): (WebkitFlatpak.load_from_args): (WebkitFlatpak.main): 2020-06-15 Carlos Garcia Campos [GTK][WPE] Add API to expose UIClient::requestStorageAccessConfirm https://bugs.webkit.org/show_bug.cgi?id=210422 Reviewed by Michael Catanzaro. Handle WebKitWebsiteDataAccessPermissionRequest in MiniBrowser. * MiniBrowser/gtk/BrowserTab.c: (decidePermissionRequest): 2020-06-15 Philippe Normand [Flatpak SDK] Add libavif https://bugs.webkit.org/show_bug.cgi?id=212964 Reviewed by Žan Doberšek. Because of the ABI bump of dav1d, which ffmpeg depends on, ffmpeg needs to be rebuilt. So this is a good opportunity to include it in the SDK and not rely on the ffmpeg-full extension anymore, because it doesn't provide debug symbols. * buildstream/elements/flatpak/platform.bst: * buildstream/elements/flatpak/sdk.bst: * buildstream/elements/freedesktop-sdk.bst: * buildstream/elements/sdk-platform.bst: * buildstream/elements/sdk/ffmpeg.bst: Added. * buildstream/elements/sdk/gst-libav.bst: * buildstream/elements/sdk/libavif.bst: Added. * buildstream/elements/sdk/ruby-highline.bst: Remove the spec source, un-needed. * buildstream/patches/fdo/0001-dav1d-Bump-to-0.7.0.patch: Added. * buildstream/patches/fdo/0001-ffmpeg-Add-MS-MPEG-DivX-variants.patch: Removed. * buildstream/patches/fdo/0002-ffmpeg-Add-VP6-and-Sorenson-Spark-video-codecs.patch: Removed. * buildstream/patches/fdo/0003-ffmpeg-Add-Intel-Indeo-and-Cinepak-video-support.patch: Removed. * buildstream/patches/fdo/0004-ffmpeg-Add-MPEG-2-video-decoder.patch: Removed. * buildstream/patches/fdo/0005-ffmpeg-Add-msmpeg4v3-support.patch: Removed. * buildstream/project.conf: * flatpak/flatpakutils.py: (WebkitFlatpak._get_packages): 2020-06-15 Philippe Normand [Flatpak SDK] Remove webkit-build-directory dependency from flatpakutils https://bugs.webkit.org/show_bug.cgi?id=213179 Reviewed by Žan Doberšek. This makes webkit-flatpak usable without installing additional perl modules (version) on the host OS. * flatpak/flatpakutils.py: (WebkitFlatpak.load_from_args): Make --release and --debug mutually exclusive, and default to Release builds. (WebkitFlatpak.__init__): (WebkitFlatpak.clean_args): No need to pull in webkitpy which pulls webkitdirs.pm only to determine the default configuration. Assume we use Release by default. 2020-06-15 Paulo Matos Properly propagate TZ to the remote test devices https://bugs.webkit.org/show_bug.cgi?id=212816 Reviewed by Philippe Normand. * Scripts/run-jsc-stress-tests: 2020-06-14 Wenson Hsieh [iOS] Two KeyboardInputTests are failing on recent iOS SDK versions https://bugs.webkit.org/show_bug.cgi?id=213183 Reviewed by Tim Horton. On recent versions of the iOS SDK, iOS simulators that are not shown on-screen are treated as if the hardware keyboard is not available (that is, `+[UIIKeyboard isInHardwareKeyboardMode]` returns `NO`). When running API tests while `Simulator.app` is already launched, an iOS simulator is presented on-screen, whereas the simulator is not visible when running API tests without launching `Simulator.app` beforehand. This discrepancy causes two iOS API tests to fail (i.e. `CaretSelectionRectAfterRestoringFirstResponder` and `RangedSelectionRectAfterRestoringFirstResponder`), due to the fact that `-[WKWebView becomeFirstResponder]` no longer causes an input session to begin. Interestingly, these tests already attempt to circumvent this by using `webViewWithAutofocusedInput()`, which creates and loads a `WKWebView` with a single autofocusing input element, with a `_WKInputDelegate` that unconditionally allows input sessions to begin. However, this doesn't work as intended in these tests, because nothing keeps the delegate (a `TestInputDelegate`) alive past the scope of the call to `webViewWithAutofocusedInput()`. Since `[WKWebView _inputDelegate]` is a weak property, the input delegate simply disappears after we finish waiting for the load to finish (and the autofocused input element begins its input session). This causes us to erroneously fall back to default behavior (i.e. `_WKFocusStartsInputSessionPolicyAuto`) for subsequent calls to show the keyboard for the focused element, as is the case when these two API tests call `-becomeFirstResponder`. The end result is that the keyboard doesn't appear and text selection views are not created and laid out, but only when API tests are run without having launched the Simulator app beforehand. To fix this, refactor `webViewWithAutofocusedInput()` into `webViewAndInputDelegateWithAutofocusedInput()`, which returns both the new `WKWebView` as well as the `TestInputDelegate` of the web view. The call site is then responsible for keeping the input delegate around for as long as it needs. * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (webViewWithAutofocusedInput): Drive-by fix: fix a potential stack smasher by using an Objective-C block when setting the input delegate's policy handler, and by using `__block` for the `doneWaiting` boolean flag. This is now a problem becuase this block may be invoked multiple times. (webViewAndInputDelegateWithAutofocusedInput): 2020-06-13 Saam Barati compare-results should have an option to print a breakdown and to save the breakdown as csv file https://bugs.webkit.org/show_bug.cgi?id=213140 Reviewed by Filip Pizlo. In this patch, compare-results has a new --breakdown feature which will break down the results for -a and -b per subtest. It will also show you p values with a significance threshold determined using the Bonferroni correction for testing multiple hypotheses: https://en.wikipedia.org/wiki/Bonferroni_correction And there is also now a --csv option to generate a csv file containing the same per subtest breakdown. --breakdown will print out results like: ------------------------------------------------------------------------------------------------------------ | subtest | ms | ms | b / a | pValue, alpha = 0.003125 | ------------------------------------------------------------------------------------------------------------ | Elm-TodoMVC |616.625000 |583.625000 |0.946483 | 0.065002 | | VueJS-TodoMVC |89.425000 |83.225000 |0.930668 | 0.039102 | | EmberJS-TodoMVC |695.875000 |664.000000 |0.954194 | 0.088901 | | Flight-TodoMVC |263.600000 |257.600000 |0.977238 | 0.249259 | | BackboneJS-TodoMVC |213.025000 |201.550000 |0.946133 | 0.000636 (significant) | | Preact-TodoMVC |48.800000 |47.550000 |0.974385 | 0.502768 | | AngularJS-TodoMVC |745.300000 |704.275000 |0.944955 | 0.011779 | | Inferno-TodoMVC |607.900000 |354.800000 |0.583649 | 0.000000 (significant) | | Vanilla-ES2015-TodoMVC |214.950000 |200.575000 |0.933124 | 0.005018 | | Angular2-TypeScript-TodoMVC |191.575000 |187.025000 |0.976250 | 0.542229 | | VanillaJS-TodoMVC |162.075000 |160.375000 |0.989511 | 0.747186 | | jQuery-TodoMVC |855.275000 |833.825000 |0.974920 | 0.103439 | | EmberJS-Debug-TodoMVC |2056.250000 |1952.050000 |0.949325 | 0.000003 (significant) | | React-TodoMVC |475.225000 |428.950000 |0.902625 | 0.007566 | | React-Redux-TodoMVC |791.100000 |736.675000 |0.931203 | 0.066091 | | Vanilla-ES2015-Babel-Webpack-TodoMVC |208.050000 |202.000000 |0.970920 | 0.152470 | ------------------------------------------------------------------------------------------------------------ * Scripts/compare-results: (readJSONFile): (speedometer2Breakdown): (jetStream2Breakdown): (motionMarkBreakdown): (plt5Breakdown): (displayStr): (dumpBreakdowns): (writeCSV): (detectMotionMark1_1): (detectMotionMark1_1_1): (motionMarkResults): (detectBenchmark): (getOptions): (main): (motionMark1_1Results): Deleted. 2020-06-13 Sam Weinig Extended Color: Experiment with strongly typed ColorComponents https://bugs.webkit.org/show_bug.cgi?id=212396 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): Update for changed names (e.g. toSRGBAComponentsLossy() -> toSRGBALossy()) and use of explicit types. 2020-06-13 Diego Pino Garcia Unreviewed, fix configuration setting of WPE Debug (Tests JS) bot https://bugs.webkit.org/show_bug.cgi?id=213164 The bot was meant to run as Debug. * BuildSlaveSupport/build.webkit.org-config/config.json: 2020-06-12 Keith Miller Tests expecting a crash should use a signal handler in the JSC CLI process https://bugs.webkit.org/show_bug.cgi?id=212479 Reviewed by Yusuke Suzuki. Crashing tests should now exit with status zero. * Scripts/run-jsc-stress-tests: * Scripts/webkitruby/jsc-stress-test-writer-default.rb: * Scripts/webkitruby/jsc-stress-test-writer-playstation.rb: * Scripts/webkitruby/jsc-stress-test-writer-ruby.rb: 2020-06-12 Alex Christensen Make API tests tolerant of our relatively new use of WebPageProxy::preconnectTo https://bugs.webkit.org/show_bug.cgi?id=213144 Reviewed by Geofferey Garen. Most changes are straightforward moving to HTTPServer, which is more tolerant of different numbers of connections except these two: The ResourceLoadDelegate.Challenge API test was checking the output of _WKResourceLoadDelegate.didReceiveChallenge by using a server trust challenge. Now that preconnecting happens, the server trust evaluation would happen with a PreconnectTask, not the main resource load. The WKNavigationDelegate still gets the challenge and there is no problem here, but in order to continue to test _WKResourceLoadDelegate.didReceiveChallenge I use a basic authentication challenge instead of a server trust evaluation. The WebKit.FastServerTrust API test now has two failed attempts (one from the preconnect attempt, one from the main resource load attempt), but only when _strictTrustEvaluate is not available. * TestWebKitAPI/TCPServer.cpp: (TestWebKitAPI::TCPServer::TCPServer): * TestWebKitAPI/TCPServer.h: * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (TEST): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * TestWebKitAPI/cocoa/HTTPServer.h: * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::respondWithChallengeThenOK): 2020-06-12 Diego Pino Garcia [buildbot] [GTK][WPE] Move WebDriver test to own bot https://bugs.webkit.org/show_bug.cgi?id=212527 Reviewed by Carlos Alberto Lopez Perez. Move 'webdriver-test' step from GTK Release and GTK Debug test bots to separated bots. For bots that require a Wayland display (WPE and GTK Wayland), 'webdriver-test' step is run on the corresponding general test bot, since it's not possible at the moment to run tests that require a Wayland display in a bot set as a container. * BuildSlaveSupport/build.webkit.org-config/config.json: * BuildSlaveSupport/build.webkit.org-config/factories.py: (TestFactory.__init__): (TestWebDriverFactory): (TestWebDriverFactory.__init__): * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: 2020-06-12 Takashi Komori [Curl] Implement functions to use ResourceLoadStatistics. https://bugs.webkit.org/show_bug.cgi?id=207692 Reviewed by Don Olmstead. Implement functions which are required to implement ResourceLoadStatistics for Curl port. Tests: http/tests/resourceLoadStatistics/ * WebKitTestRunner/TestController.cpp: (WTR::GetAllStorageAccessEntriesCallbackContext::GetAllStorageAccessEntriesCallbackContext): (WTR::getAllStorageAccessEntriesCallback): (WTR::TestController::getAllStorageAccessEntries): 2020-06-12 Jonathan Bedard Support building test runners for watchOS and tvOS https://bugs.webkit.org/show_bug.cgi?id=213128 Reviewed by Tim Horton. * DumpRenderTree/mac/Configurations/Base.xcconfig: Link against framework stubs. * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Apply iOS rules to all embedded sdks. * WebKitTestRunner/Configurations/Base.xcconfig: Link against framework stubs. * WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig: Apply iOS rules to all embedded sdks. * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig: Use watchOS entitlements for tvOS. 2020-06-12 Jonathan Bedard TestWebKitAPI: Build for watchOS and tvOS https://bugs.webkit.org/show_bug.cgi?id=213127 Reviewed by Tim Horton. * TestWebKitAPI/Configurations/Base.xcconfig: Link against framework stubs. * TestWebKitAPI/Configurations/InjectedBundle.xcconfig: Apply iOS rules to all embedded sdks. * TestWebKitAPI/Configurations/TestWTF.xcconfig: Ditto. * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Link against framework stubs. * TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Apply iOS rules to all embedded sdks. * TestWebKitAPI/config.h: WatchOS uses SSL. 2020-06-12 Commit Queue Unreviewed, reverting r262942. https://bugs.webkit.org/show_bug.cgi?id=213132 Broke gst-libav due to dav1d ABI bump Reverted changeset: "[Flatpak SDK] Add libavif" https://bugs.webkit.org/show_bug.cgi?id=212964 https://trac.webkit.org/changeset/262942 2020-06-12 Carlos Garcia Campos Unreviewed. Fix GTK WebDriver tests after r262938 Ensure a valid title for backforward items in MiniBrowser, using the URL when the title is empty. * MiniBrowser/gtk/BrowserWindow.c: (browserWindowCreateBackForwardMenu): 2020-06-12 Philippe Normand [Flatpak SDK] Update GTK4 to 3.98.5 Rubber-stamped by Carlos Alberto Lopez Perez. * buildstream/elements/sdk/gtk.bst: 2020-06-12 Philippe Normand [Flatpak SDK] Add libavif https://bugs.webkit.org/show_bug.cgi?id=212964 Reviewed by Carlos Alberto Lopez Perez. * buildstream/elements/freedesktop-sdk.bst: * buildstream/elements/sdk-platform.bst: * buildstream/elements/sdk/libavif.bst: Added. * buildstream/patches/fdo/0001-dav1d-Bump-to-0.7.0.patch: Added. 2020-06-12 Philippe Normand [Flatpak SDK] Add libkate https://bugs.webkit.org/show_bug.cgi?id=212865 Reviewed by Carlos Alberto Lopez Perez. The GStreamer kate decoder is required for some media/track tests being re-enabled in bug 120665. * buildstream/elements/sdk-platform.bst: * buildstream/elements/sdk/gst-plugins-bad.bst: * buildstream/elements/sdk/libkate.bst: Added. 2020-06-12 Carlos Garcia Campos [GTK4] Get MiniBrowser ready for GTK4 https://bugs.webkit.org/show_bug.cgi?id=210276 Reviewed by Adrian Perez de Castro. Port MiniBrowser to GTK4. BrowserSearchBar has been renamed as BrowserSearchBox, because in GTK GtkSearchBar is final class, so we derive from GtkBox and to be used as contents of a GtkSearchBar. * MiniBrowser/gtk/BrowserCellRendererVariant.c: (browserCellRendererVariantCellRendererSnapshot): (browser_cell_renderer_variant_class_init): * MiniBrowser/gtk/BrowserCellRendererVariant.h: * MiniBrowser/gtk/BrowserSearchBar.c: Removed. * MiniBrowser/gtk/BrowserSearchBox.c: Added. (setFailedStyleForEntry): (doSearch): (searchNext): (searchPrevious): (searchEntryMenuIconPressedCallback): (searchEntryClearIconReleasedCallback): (searchEntryChangedCallback): (searchEntryActivatedCallback): (searchPreviousButtonCallback): (searchNextButtonCallback): (searchMenuCheckButtonToggledCallback): (findControllerFailedToFindTextCallback): (findControllerFoundTextCallback): (browserSearchBoxFinalize): (browserSearchBoxDispose): (browserSearchBoxSizeAllocate): (browser_search_box_class_init): (browser_search_box_new): (browser_search_box_get_entry): * MiniBrowser/gtk/BrowserSearchBox.h: Renamed from Tools/MiniBrowser/gtk/BrowserSearchBar.h. * MiniBrowser/gtk/BrowserSettingsDialog.c: (browser_settings_dialog_init): (browser_settings_dialog_new): * MiniBrowser/gtk/BrowserSettingsDialog.h: * MiniBrowser/gtk/BrowserTab.c: (loadChanged): (createInfoBarQuestionMessage): (tlsErrorsDialogResponse): (loadFailedWithTLSerrors): (permissionRequestDialogResponse): (decidePermissionRequest): (colorChooserRequestFinished): (runColorChooserCallback): (tabCloseClicked): (browserTabConstructed): (browserTabIsSearchBarOpen): (browser_tab_start_search): (browser_tab_stop_search): (browser_tab_enter_fullscreen): (browser_tab_leave_fullscreen): * MiniBrowser/gtk/BrowserWindow.c: (settingsCallback): (resetEntryProgress): (webViewLoadProgressChanged): (browserWindowCreateBackForwardMenu): (browserWindowUpdateNavigationMenu): (navigationButtonPressed): (navigationButtonPressCallback): (scrollEventCallback): (webViewIsLoadingChanged): (searchCallback): (insertImageDialogResponse): (insertImageCommandCallback): (insertLinkDialogResponse): (insertLinkCommandCallback): (typingAttributesChanged): (browserWindowSaveSession): (browserWindowFinalize): (browserWindowDispose): (addToolbarButton): (browserWindowSwitchTab): (browserWindowTabAddedOrRemoved): (browserWindowBuildPopoverMenu): (browserWindowCloseRequest): (browserWindowDeleteEvent): (browser_window_class_init): (browser_window_append_view): (browser_window_set_background_color): * MiniBrowser/gtk/CMakeLists.txt: 2020-06-12 Carlos Garcia Campos [GTK] MiniBrowser: stop using GtkToolbar https://bugs.webkit.org/show_bug.cgi?id=212898 Reviewed by Adrian Perez de Castro. GtkToolbar iss no longer available in GTK4, use a GtkBox with buttons instead. Also use symbolic icons and move some of the actions to a gear menu. * MiniBrowser/gtk/BrowserWindow.c: (browserWindowHistoryItemActivated): (browserWindowCreateBackForwardMenu): (browserWindowUpdateNavigationMenu): (navigationButtonPressCallback): (browserWindowCanZoomDefault): (browserWindowUpdateZoomActions): (webViewIsLoadingChanged): (addToolbarButton): (browserWindowBuildPopoverMenu): (resetStatusText): Deleted. (browserWindowHistoryItemSelected): Deleted. (browserWindowSetupEditorToolbarItem): Deleted. 2020-06-12 Carlos Garcia Campos [GTK] MiniBrowser: stop using GtkToolbar for the search bar https://bugs.webkit.org/show_bug.cgi?id=212817 Reviewed by Adrian Perez de Castro. Use a GtkSearchBar instead, because GtkToolbar is no longer available in GTK4. Also use a GtkPopover for the options menu instead of the GtkMenu. * MiniBrowser/gtk/BrowserSearchBar.c: (setFailedStyleForEntry): (doSearch): (searchEntryMenuIconPressedCallback): (searchEntryChangedCallback): (searchMenuCheckButtonToggledCallback): (browserSearchBarFinalize): (browser_search_bar_new): (browser_search_bar_open): (browser_search_bar_close): (browser_search_bar_is_open): (searchCloseButtonClickedCallback): Deleted. (searchEntryClearIconReleasedCallback): Deleted. * MiniBrowser/gtk/BrowserSearchBar.h: * MiniBrowser/gtk/BrowserTab.c: (browser_tab_start_search): (browser_tab_stop_search): 2020-06-12 Carlos Garcia Campos [GTK4] Make WebDriver work https://bugs.webkit.org/show_bug.cgi?id=212316 Reviewed by Adrian Perez de Castro. Stop connecting to WebKitWebView::close signal twice for newaly created windows. * MiniBrowser/gtk/BrowserWindow.c: (webViewCreate): 2020-06-11 Saam Barati Skip wasm-js2 test on memory limited devices https://bugs.webkit.org/show_bug.cgi?id=213099 Reviewed by Yusuke Suzuki. * Scripts/run-jsc-stress-tests: 2020-06-11 Alex Christensen Re-enable download resume tests https://bugs.webkit.org/show_bug.cgi?id=213098 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: 2020-06-11 Commit Queue Unreviewed, reverting r262696. https://bugs.webkit.org/show_bug.cgi?id=213097 It broke running JSC tests on watchOS Reverted changeset: "Allow run-jsc-stress-tests still run if some of the remote hosts are not available" https://bugs.webkit.org/show_bug.cgi?id=201426 https://trac.webkit.org/changeset/262696 2020-06-11 Sihui Liu REGRESSION (r262879): 3 TestWebKitAPI.TextManipulation tests are failing https://bugs.webkit.org/show_bug.cgi?id=213079 Reviewed by Wenson Hsieh. Update a few tests after behavior change in r262879. From r262879, we no longer use visible positions of element to calculate range to observe. Instead, we use the first and end position in the element to decide the range. In previous implementation, the range can be extended to outside of the element, like some visible positon before or after the element. TextManipulation.StartTextManipulationFindNewlyDisplayedParagraph: Different elements would make separate ranges because we create range with the boundaries of element. We can consider merging adjacent ranges later. TextManipulation.StartTextManipulationFindSameParagraphWithNewContent: The newly observing range only includes the newly inserted element now. TextManipulation.InsertingContentIntoAlreadyManipulatedContentDoesNotCreateTextManipulationItem: The p element is not manipulated as it is the common ancestor of manipulated elements. And we want to make sure the newly inserted element is child of a manipulated element. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-11 Andy Estes [iOS] nullptr deref in FileInputType::iconLoaded when the input's type attribute is modified by a change event listener https://bugs.webkit.org/show_bug.cgi?id=208244 Reviewed by Wenson Hsieh. * DumpRenderTree/TestRunner.cpp: (SetOpenPanelFilesMediaIconCallback): (TestRunner::staticFunctions): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setOpenPanelFilesMediaIcon): 2020-06-11 Sergio Villar Senin Unreviewed, updated libsoup dependency in jhbuild. * wpe/jhbuild.modules: 2020-06-10 Said Abou-Hallawa [macOS]: The File Picker of the file element should show the selection filter https://bugs.webkit.org/show_bug.cgi?id=212485 Reviewed by Darin Adler. Create a view with an NSPopupButton for the file extensions filter. Set this view as the AccessoryView of the OpenPanel. Create a customized target for the NSPopupButton to respond to changing its selection. * MiniBrowser/mac/WK2BrowserWindowController.m: (-[FileExtensionsPopupTarget initWithOpenPanel:allowedFileExtensions:]): (-[FileExtensionsPopupTarget popupAction:]): (-[FileExtensionsPopupTarget dealloc]): (-[WK2BrowserWindowController dealloc]): (-[WK2BrowserWindowController createFilterView:popupTarget:]): (-[WK2BrowserWindowController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): 2020-06-10 Jonathan Bedard Generalize configure-xcode-for-ios-development (Part 2) https://bugs.webkit.org/show_bug.cgi?id=207043 Reviewed by Darin Adler. * EWSTools/start-queue-mac.sh: Use configure-xcode-for-embedded-development over configure-xcode-for-ios-development. * Scripts/configure-xcode-for-ios-development: Removed. 2020-06-10 Sihui Liu Text manipulation does not observe inserted elements that are invisible https://bugs.webkit.org/show_bug.cgi?id=213057 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-10 Geoffrey Garen Some style improvements to main thread code https://bugs.webkit.org/show_bug.cgi?id=213051 Reviewed by Darin Adler. Updated for rename. * TestWebKitAPI/Tests/WTF/RefPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/RunLoop.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: (ApplicationManifestParserTest::SetUp): * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp: (TestWebKitAPI::ComplexTextControllerTest::SetUp): * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::ContentExtensionTest::SetUp): * TestWebKitAPI/Tests/WebCore/DNS.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (initializeInAppBrowserPrivacyTestSettings): * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): 2020-06-10 Jonathan Bedard results.webkit.org: Health check should access redis and Cassandra https://bugs.webkit.org/show_bug.cgi?id=212899 Reviewed by Stephanie Lewis. * resultsdbpy/resultsdbpy/example/main.py: (health): Check the health status of the model. * resultsdbpy/resultsdbpy/model/model.py: (Model.HealthTable): (Model.__init__): Construct a Cassandra table used to check the health of our Cassandra connection. (Model.healthy): Make both a read and write connection to our two database dependencies so that if our connection to those databases fails, an instance will be forced to restart. * resultsdbpy/resultsdbpy/model/model_unittest.py: Added. (ModelTest): (ModelTest.init_database): (ModelTest.test_health): 2020-06-10 Keith Miller run-jsc-stress-tests should skip tests marked as slow in quick mode. https://bugs.webkit.org/show_bug.cgi?id=213042 Reviewed by Yusuke Suzuki. * Scripts/run-jsc-stress-tests: 2020-06-10 Antoine Quint Subframes should not autosize independently https://bugs.webkit.org/show_bug.cgi?id=212984 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: (TEST): Added test for . 2020-06-09 Ryan Haddad [Mojave] Flaky API Test: TestWebKitAPI.WebKitLegacy.CrossPartitionFileSchemeAccess https://bugs.webkit.org/show_bug.cgi?id=206956 Unreviewed test gardening. * TestWebKitAPI/Tests/mac/CrossPartitionFileSchemeAccess.mm: Disable this test for Mojave. 2020-06-10 Alex Christensen Revert r259770 https://bugs.webkit.org/show_bug.cgi?id=210097 * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: (TEST): 2020-06-10 Commit Queue Unreviewed, reverting r262807. https://bugs.webkit.org/show_bug.cgi?id=213019 It is breaking JSC queues (Requested by caiolima on #webkit). Reverted changeset: "Add a timeout monitor for JSC stress test" https://bugs.webkit.org/show_bug.cgi?id=211978 https://trac.webkit.org/changeset/262807 2020-06-09 Fujii Hironori Unreviewed, reverting r262791. WinCairo WebKit1 is crashing. Reverted changeset: "[Curl] Implement functions to use ResourceLoadStatistics." https://bugs.webkit.org/show_bug.cgi?id=207692 https://trac.webkit.org/changeset/262791 2020-06-09 Zhifei Fang Add a timeout monitor for JSC stress test https://bugs.webkit.org/show_bug.cgi?id=211978 Reviewed by Jonathan Bedard. * Scripts/webkitruby/jsc-stress-test-writer-default.rb: Add timeout monitor inside the jsc stress test runner, it will kill the process in case of jsc timeout handler not working 2020-06-09 Tim Horton WebKit.ShrinkToFit is failing on some bots https://bugs.webkit.org/show_bug.cgi?id=212932 Reviewed by Simon Fraser. TestWebKitAPI was failing to stabilize the overlay scrollbar preference, because the only stabilization attempt was in the injected bundle initialization code, and most tests (including ShrinkToFit) do not have an injected bundle. Because this preference is manually propagated to the Web Content process, we can set the default in the volatile domain in the UI process at startup. We can't move other preferences yet, because they are not manually propagated, and WebKit's NSUserDefault synchronization mechanism ignores defaults in the volatile domain (and the initial preference load reads from disk, not from the UI process, so it wouldn't find them anyway). * TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm: (TEST): Explain why the final value of the test is different than the starting value. * TestWebKitAPI/mac/InjectedBundleControllerMac.mm: (TestWebKitAPI::InjectedBundleController::platformInitialize): Leave a FIXME for future generations. * TestWebKitAPI/mac/mainMac.mm: (main): Override overlay scrollbar preferences in the UI process, so it affects all tests. * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp: This test is also affected by using non-overlay scrollbars; we now have less space, so take up more pages. 2020-06-09 Youenn Fablet BaseAudioSharedUnit should unmute its clients in case of suspension even if not having any audio unit https://bugs.webkit.org/show_bug.cgi?id=212970 Reviewed by Eric Carlson. Add an option to capture in UI process so that the same test can run on both MacOS and iOS. This eases the testing infra to be able to get audio capture unit state in WebProcess as is the case in iOS. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): 2020-06-09 Takashi Komori [Curl] Implement functions to use ResourceLoadStatistics. https://bugs.webkit.org/show_bug.cgi?id=207692 Implement functions which are required to implement ResourceLoadStatistics for Curl port. Tests: http/tests/resourceLoadStatistics/ Reviewed by Don Olmstead. * WebKitTestRunner/TestController.cpp: (WTR::GetAllStorageAccessEntriesCallbackContext::GetAllStorageAccessEntriesCallbackContext): (WTR::getAllStorageAccessEntriesCallback): (WTR::TestController::getAllStorageAccessEntries): 2020-06-09 Víctor Manuel Jáquez Leal [Flatpak][GStreamer] enhance GST_ environment variable passing https://bugs.webkit.org/show_bug.cgi?id=212905 Reviewed by Philippe Normand. Handle the passing of several GST environment variables, particularly GST_DEBUG, which, when using * symbol, python adds quotes, but they break the parsing in GStreamer. Also the variables are handled by gst-env.py when using GST_BUILD_PATH, so they are filtered out when it's exported, avoiding duplication. But it GST_BUILD_PATH is not defined, the variables are passed to flatpak. * flatpak/flatpakutils.py: (WebkitFlatpak.setup_gstbuild): (WebkitFlatpak.run_in_sandbox): 2020-06-09 Sihui Liu TextManipulationController range of paragraph may be wrong after r262601 https://bugs.webkit.org/show_bug.cgi?id=212874 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-08 Sihui Liu TextManipulation should only convert text from Node's text content to tokens https://bugs.webkit.org/show_bug.cgi?id=212928 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-08 Diego Pino Garcia [webkitpy] Check 'bug-search' returns a non null result before parsing https://bugs.webkit.org/show_bug.cgi?id=212906 Reviewed by Jonathan Bedard. * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: (BugzillaQueries._parse_result_count): Check quick-search query response is non-null and a non-empty text. 2020-06-08 Sam Weinig Extended Color: Rename Color::lighten() and Color::darken() to Color::lightened() and Color::darkened() https://bugs.webkit.org/show_bug.cgi?id=212917 Reviewed by Darin Adler. Addresses feedback from Darin. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): 2020-06-08 Sam Weinig Fix test results after r262733. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): 2020-06-08 David Kilzer [IPC] Adopt enum class for DragOperation Reviewed by Darin Adler. * Scripts/do-webcore-rename: - Do DragOperation renames. 2020-06-08 Commit Queue Unreviewed, reverting r262685. https://bugs.webkit.org/show_bug.cgi?id=212914 caused flakey crashes in an iOS test Reverted changeset: "Clear WebPageProxy event state between tests" https://bugs.webkit.org/show_bug.cgi?id=212864 https://trac.webkit.org/changeset/262685 2020-06-08 Sam Weinig Extended Color: Unify rounding / clamping conversions between 0-1 float components and 0-255 byte components https://bugs.webkit.org/show_bug.cgi?id=212871 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): Switch to using makeSimpleColor(hslToSRGB(...)) directly. 2020-06-08 Sam Weinig Extended Color: Replace uses of differenceSquared() with luminance based computations https://bugs.webkit.org/show_bug.cgi?id=212872 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): Add basic tests for Color::luminance(), ensuring white == 1, black == 0, and darken() and lighten() creat colors with less than / greater than luminance. 2020-06-08 Per Arne Vollan [Cocoa] CFPrefs synchronization does not always work for global preference changes https://bugs.webkit.org/show_bug.cgi?id=212783 Reviewed by Tim Horton. Add API test, and add some synchronization to avoid flakiness. * TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm: (-[WKTestPreferenceObserver preferenceDidChange:key:encodedValue:]): (TEST): (sharedInstanceMethodOverride): 2020-06-08 Wenson Hsieh [iOS] Hit-testing on icloud.com is offset after closing a tab https://bugs.webkit.org/show_bug.cgi?id=212890 Reviewed by Simon Fraser. Add a new API test to verify that the scroll position doesn't get stuck at -30px after shifting both the top content inset and top obscured inset by 30px. See WebKit ChangeLog for more details. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/overflow-hidden.html: Added. * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: (-[ScrollViewDelegate scrollViewDidScroll:]): (TestWebKitAPI::TEST): * TestWebKitAPI/ios/UIKitSPI.h: 2020-06-08 Philippe Normand [Flatpak SDK] Add flatpak-run-nightly https://bugs.webkit.org/show_bug.cgi?id=212882 Reviewed by Carlos Alberto Lopez Perez. This new script is able to download WPE and GTK builds from the Igalia servers and run the corresponding binaries (like MiniBrowser, jsc) within the Flatpak SDK. Unzipped builds will be saved in /tmp and can be reused in further runs (by providing the path with the -p argument). Example: $ webkit-flatpak-run-nightly --wpe MiniBrowser https://webkit.org Downloading build release_r262699_b33885.zip from https://wpewebkit-release.igalia.com/built-products/ Extracting build to /tmp/wpewebkit-release-b33885 $ webkit-flatpak-run-nightly --wpe -p /tmp/wpewebkit-release-b33885 jsc Looking for updates… Nothing to do. >>> 2+2 4 * Scripts/webkit-flatpak-run-nightly: Added. 2020-06-08 Diego Pino Garcia [webkitpy] Make 'webkit-path rebaseline' to not update expectations file by default https://bugs.webkit.org/show_bug.cgi?id=212835 Reviewed by Carlos Alberto Lopez Perez. `webkit-patch rebaseline` let us add or update a test baseline from a test bot. By default, the command also updates the corresponding expectations file. This update is actually a brand-new generation of an expectations file based on the results of the bot, which in most cases messes up the current contents of the file. This patch makes the default to not update the expectations file and adds a new option '--update-expectations' to explicitly request an update. * Scripts/webkitpy/tool/commands/rebaseline.py: (AbstractRebaseliningCommand): (RebaselineTest.__init__): (RebaselineTest._rebaseline_tests): (RebaselineTest.execute): (AbstractParallelRebaselineCommand._rebaseline_commands): (RebaselineExpectations.__init__): (RebaselineExpectations.execute): (Rebaseline.__init__): (RebaselineTest._rebaseline_test_and_update_expectations): Deleted. * Scripts/webkitpy/tool/commands/rebaseline_unittest.py: (TestRebaselineTest.setUp): 2020-06-08 Youenn Fablet File URLs with hostnames are misleading https://bugs.webkit.org/show_bug.cgi?id=212739 Reviewed by Alex Christensen. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/open-window-with-file-url-with-host.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm: (TEST): 2020-06-07 Caio Lima Allow run-jsc-stress-tests still run if some of the remote hosts are not available https://bugs.webkit.org/show_bug.cgi?id=201426 Reviewed by Saam Barati. This patch allows run-jsc-stress-tests to keep on running if some of the remote hosts are not available. To do this, we created a new function `checkAndPrepareRemoteHosts` that is responsible to check the connection and read/write permissions of given remote hosts list. It filters out every unavailable remote host. These checks and filter happen in the beginning of the script and is excuted only once, in the beggining of the script. It means that if some remote device becomes unavailable after the check and preparation is done, the script execution will be interupted. * Scripts/run-jsc-stress-tests: 2020-06-07 Philippe Normand Remove ENABLE_VIDEO_TRACK ifdef guards https://bugs.webkit.org/show_bug.cgi?id=212568 Reviewed by Youenn Fablet. * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-06-06 Simon Fraser Clear WebPageProxy event state between tests https://bugs.webkit.org/show_bug.cgi?id=212864 Reviewed by Anders Carlsson. Make sure that event state doesn't leak between tests via events queued in WebPageProxy. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): 2020-06-06 Peng Liu REGRESSION (r262456): [iOS Debug] TestWebKitAPI.WKWebViewCloseAllMediaPresentations.PictureInPicture is frequently timing out https://bugs.webkit.org/show_bug.cgi?id=212777 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm: Disable the PictureInPicture test for old iOS devices. 2020-06-05 Ryan Haddad [iOS] TestWebKitAPI.WKWebsiteDataStore.RemoveAndFetchData is failing https://bugs.webkit.org/show_bug.cgi?id=208451 Unreviewed test gardening. * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: Disable this test again because it is still failing on certain bots. 2020-06-05 Daniel Bates -_focusTextInputContext should reposition the caret if called for an already focused text input context https://bugs.webkit.org/show_bug.cgi?id=212830 Reviewed by Wenson Hsieh. Re-purpose some existing tests to check for the new behavior. In TextInteraction_FocusingAssistedElementShouldScrollToReveal, keep in mind that the caret position is changing: on iOS, calling input.focus() places the caret at the end of the field's content. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TestWebKitAPI::TEST): 2020-06-05 Jonathan Bedard Generalize configure-xcode-for-ios-development (Part 1) https://bugs.webkit.org/show_bug.cgi?id=207043 Rubber-stamped by David Kilzer. Patch by Keith Rollin and Jonathan Bedard. Replace configure-xcode-for-ios-development with a Python script that works for iOS, watchOS and tvOS. * Scripts/configure-xcode-for-embedded-development: Added. 2020-06-05 Wenson Hsieh Text manipulation should exclude characters outside of the unicode private use area https://bugs.webkit.org/show_bug.cgi?id=212800 Reviewed by Sihui Liu. Add a new API test to verify the new behavior when extracting PUA characters. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-05 Dean Jackson REGRESSION (r262366): [ Mac wk1 ] webgl/webgl-backing-store-size-update.html is failing https://bugs.webkit.org/show_bug.cgi?id=212647 Reviewed by Eric Carlson. Drive-by comment from Simon. Remove some useless braces. * TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLPrepareDisplayOnWebThread.mm: 2020-06-05 Saam Barati Try to reduce jetsams further on iOS devices running jsc stress tests https://bugs.webkit.org/show_bug.cgi?id=212786 Reviewed by Mark Lam. * Scripts/run-jsc-stress-tests: 2020-06-05 Peng Liu REGRESSION (r262456?): [macOS] media/picture-in-picture/picture-in-picture-api tests are flaky timeouts https://bugs.webkit.org/show_bug.cgi?id=212762 Reviewed by Eric Carlson. Skip the Picture-in-Picture test if Picture-in-Picture is not supported and add playsinline attribute to the video element. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm: (TEST): 2020-06-05 Andy Estes [Apple Pay] Remove conditionals for ENABLE_APPLE_PAY_SESSION_V(3|4) https://bugs.webkit.org/show_bug.cgi?id=212541 Reviewed by Darin Adler. APPLE_PAY_SESSION_V(3|4) is now enabled whenever APPLE_PAY itself is enabled. * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-06-05 Carlos Garcia Campos [GTK] MiniBrowser: use GAction API for actions and shortcuts in preparation for GTK4 https://bugs.webkit.org/show_bug.cgi?id=212740 Reviewed by Adrian Perez de Castro. Make MiniBrowser a GtkApplication and BrowserWindow a GtkApplicationWindow to easily install actions and shortcuts. * MiniBrowser/gtk/BrowserMain.c: Removed. * MiniBrowser/gtk/BrowserMain.h: Removed. * MiniBrowser/gtk/BrowserSearchBar.c: (searchPreviousButtonCallback): (searchNextButtonCallback): * MiniBrowser/gtk/BrowserSearchBar.h: * MiniBrowser/gtk/BrowserTab.c: * MiniBrowser/gtk/BrowserTab.h: * MiniBrowser/gtk/BrowserWindow.c: (reloadOrStopCallback): (goBackCallback): (goForwardCallback): (settingsCallback): (browserWindowUpdateNavigationMenu): (browserWindowTryCloseCurrentWebView): (browserWindowTryClose): (webViewCreate): (browserWindowUpdateZoomActions): (webViewZoomLevelChanged): (zoomInCallback): (zoomOutCallback): (defaultZoomCallback): (searchCallback): (newTabCallback): (toggleWebInspector): (openPrivateWindow): (focusLocationBar): (reloadPage): (reloadPageIgnoringCache): (stopPageLoad): (loadHomePage): (toggleFullScreen): (printPage): (editingActionCallback): (typingAttributesChanged): (browserWindowFinalize): (browserWindowSetupEditorToolbarItem): (browserWindowSetupToolbarItem): (browserWindowDeleteEvent): (browser_window_new): (browser_window_append_view): (browser_window_get_or_create_web_view_for_automation): (browser_window_create_web_view_in_new_tab_for_automation): * MiniBrowser/gtk/BrowserWindow.h: * MiniBrowser/gtk/CMakeLists.txt: * MiniBrowser/gtk/main.c: (createWebViewForAutomationInWindowCallback): (createWebViewForAutomationInTabCallback): (automationStartedCallback): (startup): (activate): (main): 2020-06-04 Sihui Liu Text manipulation: first and last unit in a paragraph should not contain only excluded tokens https://bugs.webkit.org/show_bug.cgi?id=212759 Reviewed by Wenson Hsieh. Modify existing test for changed behavior that leading and trailing excluded units are not included in paragraph now. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-04 Chris Dumez UIProcess may crash after its prewarmed WebProcess gets terminated https://bugs.webkit.org/show_bug.cgi?id=212790 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm: (TEST): 2020-06-04 Sihui Liu REGRESSION: (r262398) Text manipulation crashes when content is added https://bugs.webkit.org/show_bug.cgi?id=212785 Reviewed by Ryosuke Niwa. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-04 Carlos Alberto Lopez Perez Improve watchlist logic for comments on patches touching imported WPT tests. https://bugs.webkit.org/show_bug.cgi?id=212597 Reviewed by Youenn Fablet. On r262295 I added a watchlist comment for patches touching the imported WPT tests. However, this is commenting on patches that are importing WPT tests. To avoid this situations, this patch adds a new rule to detect if the changes modify any of the w3c-import.log files, and then changes the logic to make the comment only for patches that modify the WPT imported tests but not the w3c-import.log files. In order to support this new logic, watchlist rule parsing is improved to support the "and" and "not" operators. Previously it only supported the "or" operator. * Scripts/webkitpy/common/config/watchlist: * Scripts/webkitpy/common/watchlist/watchlistparser.py: (WatchListParser._rule_definitions_as_set): * Scripts/webkitpy/common/watchlist/watchlistparser_unittest.py: (WatchListParserTest.test_cc_rule_with_undefined_defintion_with_suggestion): (WatchListParserTest): (WatchListParserTest.test_cc_rule_with_complex_logic): * Scripts/webkitpy/common/watchlist/watchlistrule.py: (WatchListRule.__init__): (WatchListRule._match_test_definitions): (WatchListRule.match): * Scripts/webkitpy/common/watchlist/watchlistrule_unittest.py: (WatchListRuleTest.test_complex_definition_or): (WatchListRuleTest): (WatchListRuleTest.test_complex_definition_and): (WatchListRuleTest.test_complex_definition_not): (WatchListRuleTest.test_complex_definition_combined): 2020-06-04 Carlos Alberto Lopez Perez svn-apply command is too slow with big patches https://bugs.webkit.org/show_bug.cgi?id=212766 Reviewed by Darin Adler. The script svn-apply was calling a "git add" or "svn add" command after adding each new file. This caused the git or svn command to re-check the internal SCM database each time they were called, and this was really slow when lot of new files are added. Instead of doing this, we queue the list of new files in memory, and at the end we call "git add" or "svn add" once (or a few times). On top of that, another optimization is added for the case of git, to avoid calling scmKnowsOfFile() inside addDirectoriesIfNeeded(), which is a slow operation and gets called a lot (once per file). Doing that for git is totally unneeded, as the only thing we have to take care about, is of ensuring that the directory is created. See: https://wkb.ug/86973 This reduces the time spent in the large test patch that caused this issue (see bug): - Git: 8 hours (before) -> 8 minutes (now). - SVN: 25 minutes (before) -> 5 minutes (now). * Scripts/svn-apply: (addDirectoriesIfNeeded): (handleBinaryChange): (handleGitBinaryChange): (patch): (scmRemove): (scmAddQueued): (scmCommitQueueAdded): (scmToggleExecutableBitQueued): (scmCommitQueueToggledExecutableBit): 2020-06-04 Jonathan Bedard Add watchOS and tvOS to build-webkit https://bugs.webkit.org/show_bug.cgi?id=212719 Reviewed by Tim Horton. * Scripts/build-webkit: Add tvOS and watchOS flags, generalize embedded if statements. * Scripts/webkitdirs.pm: (determineArchitecture): Add tvOS and watchOS architectures. (argumentsForConfiguration): Add tvOS and watchOS flags. (extractNonMacOSHostConfiguration): Ditto. 2020-06-04 Tim Horton Work around broken system version macro https://bugs.webkit.org/show_bug.cgi?id=212726 Reviewed by Dan Bernstein. * ContentExtensionTester/Configurations/DebugRelease.xcconfig: * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: * ImageDiff/cg/Configurations/DebugRelease.xcconfig: * MiniBrowser/Configurations/DebugRelease.xcconfig: * TestWebKitAPI/Configurations/DebugRelease.xcconfig: * WebEditingTester/Configurations/DebugRelease.xcconfig: * WebKitTestRunner/Configurations/DebugRelease.xcconfig: * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: 2020-06-04 Andy Estes [watchOS] Re-enable content filtering in the simulator build https://bugs.webkit.org/show_bug.cgi?id=212711 Reviewed by Wenson Hsieh. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-06-04 Philippe Normand [Flatpak SDK] Update definitions https://bugs.webkit.org/show_bug.cgi?id=212698 Reviewed by Žan Doberšek. * buildstream/elements/freedesktop-sdk.bst: Update to FDO 19.08.11 * buildstream/elements/sdk/gtk.bst: Update GTK4 * buildstream/patches/fdo/0001-Pango-Bump-to-1.45-master.patch: Added. Needed for GTK4 * buildstream/patches/fdo/0001-Add-Jack.patch: Removed. This will be used when we update to the 20.08 FDO SDK. * buildstream/patches/fdo/0001-components-xdg-desktop-portal.bst-Update-to-1.6.0.patch: Removed. Ditto. * buildstream/patches/fdo/0002-Update-PipeWire-to-0.3.1.patch: Removed. Ditto. 2020-06-03 Tadeu Zagallo Disable B3 hoistLoopInvariantValues by default https://bugs.webkit.org/show_bug.cgi?id=212511 Reviewed by Mark Lam. Enable the B3 hoistLoopInvariantValues pass in one of our existing configurations to avoid bit rot since we'd like to re-enable it eventually. * Scripts/run-jsc-stress-tests: 2020-06-03 Wenson Hsieh [Text manipulation] Extract the value attribute in inputs of type "text" and "search" https://bugs.webkit.org/show_bug.cgi?id=212706 Reviewed by Tim Horton. Add a new test case (similar to the existing test `StartTextManipulationExtractsValuesFromButtonInputs`) to verify that we extract text from the `value` of inputs of type "text" and "search". * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-03 Michael Saboff [iOS] TestWTF.WTF_Lock.ContendedShortSection is consistently timing out on debug simulator builds https://bugs.webkit.org/show_bug.cgi?id=211650 Reviewed by Saam Barati. The prior change to disable this test for Debug actually enabled it only for Debug IOS builds of any type, simulator or real HW. This test has intermittently failed or timed out on Debug simulator builds for for almost a year. We want to test Release builds as well as hardware builds. Therefore we should disable Debug simulator builds, and test all other variants. * TestWebKitAPI/Tests/WTF/Lock.cpp: 2020-06-03 Wenson Hsieh dataTransfer.types is empty when handling the "dragstart" event https://bugs.webkit.org/show_bug.cgi?id=212685 Reviewed by Andy Estes. Adds new API tests and test infrastructure to verify that DataTransfer types and data are accessible during the "dragstart" event. See below for more details. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (-[TestWKWebView selectElementWithID:]): (-[DragAndDropSimulator dragFromElementWithID:to:]): Add a few (very specialized) helper methods to assist with simulating drags over the various elements in the new drag and drop test harness page below (dragstart-data.html). (runDragStartDataTestCase): Test the following scenarios (split between three API tests) by dumping the resulting DataTransfer types and their data strings, and observing the results: - Dragging a normal text selection. - Dragging a normal text selection, and then adding a URL string. - Dragging a normal text selection, and then adding a custom pasteboard type. - Dragging a normal text selection, but then replacing the data with just a URL string. - Dragging a normal text selection, but then replacing the data with just a custom data type. - Dragging an image element. - Dragging an image element, and then overriding the plain text data. - Dragging a link (anchor element). - Dragging a link, and then adding a custom type. * TestWebKitAPI/Tests/WebKitCocoa/dragstart-data.html: Added. Add a new test harness to help test DataTransfer types when starting a drag. This test page can also be used as a manual test harness, by simply opening the test page, starting drags on the various elements and observing the output in the textarea. * TestWebKitAPI/Tests/WebKitCocoa/dump-datatransfer-types.html: Tweak this test page to replace the DataTransfer with custom data (rather than simply append it) by calling `DataTransfer.clearData()` prior to writing the custom types. * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebViewHostWindow initWithWebView:contentRect:styleMask:backing:defer:]): Add a `__weak` reference on TestWKWebViewHostWindow back to the TestWKWebView, so that we can consult `-eventTimestamp` when synthesizing mouse events on macOS during API tests. (-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:clickCount:]): (-[TestWKWebViewHostWindow _mouseUpAtPoint:clickCount:]): (-[TestWKWebViewHostWindow initWithWebView:frame:]): (-[TestWKWebView _setUpTestWindow:]): (-[TestWKWebView setEventTimestampOffset:]): (-[TestWKWebView eventTimestamp]): Add a mechanism to offset synthetic event timestamps by a given time interval (i.e. the event timestamp offset). (-[TestWKWebView mouseMoveToPoint:withFlags:]): (-[TestWKWebView _mouseEventWithType:atLocation:]): (-[TestWKWebView typeCharacter:]): * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: (-[DragAndDropSimulator runFrom:to:]): While simulating drag and drop on macOS, use `-setEventTimestampOffset:` to "leap forward" in time, so that the 150 millisecond delay when dragging a text selection doesn't prevent drags from beginning. 2020-06-03 Sihui Liu Text manipulation sometimes fails to replace text in attributes https://bugs.webkit.org/show_bug.cgi?id=212701 Reviewed by Wenson Hsieh. Modify TextManipulation.CompleteTextManipulationShouldReplaceTextContentWithMultipleTokens to cover text manipulation for attributes. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-03 Diego Pino Garcia [WPE] lint-test-expectations doesn't work when platform is WPE https://bugs.webkit.org/show_bug.cgi?id=212700 Reviewed by Carlos Alberto Lopez Perez. When passing arguments '--wpe' or '--platform=wpe*', lint-test-expectations does nothing for WPE, despite currently there are many lint errors in WPE's TestExpectations file. As a side-effect of this patch, now `Tools/Scripts/webkit-path rebaseline` lists the WPE Release and Debug bots. * Scripts/webkitpy/port/builders.py: Add WPE to the list of exact_matches and fuzzy_matches. * Scripts/webkitpy/tool/commands/rebaseline_unittest.py: 2020-06-03 Jonathan Bedard Allow using web processes for service workers even though they loaded about URLs (Follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=212464 Unreviewed build fix. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: didFinishNavigation is now used unconditionally. 2020-06-02 Keith Rollin Revert FEATURES_DEFINES related changes https://bugs.webkit.org/show_bug.cgi?id=212664 Reviewed by Andy Estes. Bug 262310, Bug 262311, Bug 262318, and Bug 262331 involve changes to FEATURE_DEFINES and how the values there relate to those found in the Platform*.h files. Those changes break XCBuild (by removing the .xcfilelist related to UnifiedSources and the process for generating them), and so are being reverted. * Scripts/webkitperl/FeatureList.pm: * Scripts/webkitpy/generate_xcfilelists_lib/generators.py: (WebCoreGenerator): (WebCoreGenerator._get_generate_unified_sources_script): * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-06-02 Peng Liu Stressing webkitSetPresentationMode leads to wrong inline video dimensions https://bugs.webkit.org/show_bug.cgi?id=202425 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm: (TEST): 2020-06-02 Youenn Fablet Allow using web processes for service workers even though they loaded about URLs https://bugs.webkit.org/show_bug.cgi?id=212464 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2020-06-02 Diego Pino Garcia [buildbot] [GTK][WPE] Move JavaScript related tests to own bot https://bugs.webkit.org/show_bug.cgi?id=212481 Reviewed by Carlos Alberto Lopez Perez. Currently GTK and WPE tests bots run too many tests. This makes the total running time for each build very long. This patch moves JavaScript related tests (jscore-test and test262-test) to a separated bot which will be triggered by the corresponding build bot of each platform. * BuildSlaveSupport/build.webkit.org-config/config.json: * BuildSlaveSupport/build.webkit.org-config/factories.py: (TestFactory.__init__): (TestJSFactory): (TestJSFactory.__init__): * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: 2020-06-02 Carlos Garcia Campos [GTK4] Make popup menus work https://bugs.webkit.org/show_bug.cgi?id=211178 Reviewed by Adrian Perez de Castro. * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: (WTR::PlatformWebView::dismissAllPopupMenus): 2020-06-02 Carlos Garcia Campos [GTK4] Make it possible to run layout tests https://bugs.webkit.org/show_bug.cgi?id=212328 Reviewed by Carlos Alberto Lopez Perez. Build WTR with GTK4. * PlatformGTK.cmake: * Scripts/webkitdirs.pm: (builtDylibPathForName): Try with both 4 and 5 API versions. * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: (WTR::PlatformWebView::PlatformWebView): (WTR::PlatformWebView::~PlatformWebView): (WTR::PlatformWebView::setWindowIsKey): (WTR::PlatformWebView::windowFrame): (WTR::PlatformWebView::setWindowFrame): (WTR::PlatformWebView::addToWindow): (WTR::PlatformWebView::removeFromWindow): (WTR::PlatformWebView::windowSnapshotImage): (WTR::PlatformWebView::dismissAllPopupMenus): * WebKitTestRunner/gtk/UIScriptControllerGtk.cpp: (WTR::UIScriptControllerGtk::copyText): 2020-06-01 Noam Rosenthal Make unicode-bidi:isolate the default for an element with a dir attribute (instead of unicode-bidi:embed) https://bugs.webkit.org/show_bug.cgi?id=134630 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm: (TEST): Test was expecting unicode-bidi:embed, changed expectation. 2020-06-01 Sihui Liu TextManipulationController should put one Node in only one paragraph https://bugs.webkit.org/show_bug.cgi?id=212548 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-06-01 Alex Christensen Make CustomDisplayName and DefaultDisplayName API tests fail instead of timing out when something changes https://bugs.webkit.org/show_bug.cgi?id=212480 This saves time when debugging and running all the tests. * TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm: (TestWebKitAPI::checkUntilDisplayNameIs): 2020-06-01 Philippe Normand [Flatpak SDK] Install and update don't provide any terminal output https://bugs.webkit.org/show_bug.cgi?id=212579 Reviewed by Žan Doberšek. The `show_output` option was removed from the process execution routines. We now assume the output will be displayed, unless the call-site asks `gather_output`. This change makes webkit-flatpak more chatty, which is nice during install/update operations. * flatpak/flatpakutils.py: (run_sanitized): (FlatpakObject.flatpak): (FlatpakPackage.install): (FlatpakPackage.update): (WebkitFlatpak.setup_builddir): (WebkitFlatpak.run_in_sandbox): 2020-06-01 Chris Dumez ASSERTION FAILURE (r220931): !m_function in ~CompletionHandler() after switch tabs https://bugs.webkit.org/show_bug.cgi?id=212537 Reviewed by Alex Christensen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm: Added. (TEST): 2020-06-01 Carlos Alberto Lopez Perez [EWS] Add a special case for running the layout test step without aborting in case of many failures for WPT tests https://bugs.webkit.org/show_bug.cgi?id=212381 Reviewed by Jonathan Bedard. Add a special case for patches uploaded by the bugzilla user that would be used for prototyping a bot that helps automating the import of WPT tests. For patches uploaded by this user don't pass the parameters that make the step abort early in case of many errors, and only run the layout tests inside the WPT import directory. * BuildSlaveSupport/ews-build/steps.py: (RunWebKitTests): (RunWebKitTests.start): * BuildSlaveSupport/ews-build/steps_unittest.py: (test_success): (test_warnings): (test_parse_results_json_regression): (test_parse_results_json_flakes): (test_parse_results_json_flakes_and_regressions): (test_parse_results_json_with_newlines): (test_unexpected_error): (test_failure): (test_success_wpt_import_bot): (TestRunWebKitTestsWithoutPatch.test_success): (TestRunWebKitTestsWithoutPatch.test_failure): (TestRunWebKit1Tests.test_success): (TestRunWebKit1Tests.test_failure): 2020-06-01 Sam Weinig Extended Color: Replace Color constructors taking numeric values with type specific factory functions https://bugs.webkit.org/show_bug.cgi?id=212576 Reviewed by Tim Horton. Replaces all remaining implicit and explicit uses of the Color constructors taking numeric values with explicit calls to makeSimpleColor/makeSimpleColorFromFloats/makeExtendedColor, giving us a consistent way to create colors. Also addes use constexpr SimpleColors where possible. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): (TestWebKitAPI::makeColor): * TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestPDFDocument.mm: (TestWebKitAPI::TestPDFPage::colorAtPoint const): 2020-05-31 Dean Jackson AutoTrader crashed while browsing search results https://bugs.webkit.org/show_bug.cgi?id=212461 rdar://60733185 Reviewed by Sam Weinig. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLPrepareDisplayOnWebThread.mm: Added. (-[WebGLPrepareDisplayOnWebThreadDelegate webViewDidFinishLoad:]): (-[WebGLPrepareDisplayOnWebThreadDelegate webView:shouldStartLoadWithRequest:navigationType:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitLegacy/ios/webgl.html: Added. 2020-05-31 Carlos Garcia Campos Unreviewed. Fix GTK4 build with current GTK * MiniBrowser/gtk/BrowserTab.c: (audioMutedChanged): 2020-05-30 Sam Weinig Extended Color: Additional color cleanups https://bugs.webkit.org/show_bug.cgi?id=212567 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): Update for rename from ExtendedColor::channels() to ExtendedColor::components() 2020-05-30 Carlos Garcia Campos [GTK] WebDriver: stop using GdkEvent API in preparation for GTK4 https://bugs.webkit.org/show_bug.cgi?id=212465 Reviewed by Adrian Perez de Castro. Update to the new webkitWebViewBaseSynthesizeKeyEvent() API. * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::EventSenderProxy::keyDown): 2020-05-29 Alex Christensen Use correct encoding when converting a WTF::URL to CFURLRef https://bugs.webkit.org/show_bug.cgi?id=212486 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): 2020-05-29 Andy Estes [Apple Pay] Remove conditionals for ENABLE_APPLE_PAY_SESSION_V(3|4) https://bugs.webkit.org/show_bug.cgi?id=212541 Reviewed by Darin Adler. APPLE_PAY_SESSION_V(3|4) is now enabled whenever APPLE_PAY itself is enabled. * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-05-29 Jan-Michael Brummer [GTK][WPE] API for WebView audio mute support https://bugs.webkit.org/show_bug.cgi?id=176119 Reviewed by Michael Catanzaro. * MiniBrowser/gtk/BrowserTab.c: (audioClicked): (audioMutedChanged): (browserTabConstructed): * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewIsAudioMuted): (beforeAll): 2020-05-29 Darin Adler Remove things from FeatureDefines.xcconfig that are covered by PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=212418 Rubber-stamped by Simon Fraser. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Add back ENABLE_CSS_CONIC_GRADIENTS, removed by accident. 2020-05-29 Pavel [Win] Allow compiling with the TOUCH_EVENTS enabled https://bugs.webkit.org/show_bug.cgi?id=212528 Reviewed by Fujii Hironori. Aligning Win with GTK, adding missing EventSenderProxy stubs. This allows compiling Win with TOUCH_EVENTS and unlocks event injection / processing by the automation drivers * WebKitTestRunner/win/EventSenderProxyWin.cpp: (WTR::EventSenderProxy::addTouchPoint): (WTR::EventSenderProxy::updateTouchPoint): (WTR::EventSenderProxy::setTouchModifier): (WTR::EventSenderProxy::setTouchPointRadius): (WTR::EventSenderProxy::touchStart): (WTR::EventSenderProxy::touchMove): (WTR::EventSenderProxy::touchEnd): (WTR::EventSenderProxy::touchCancel): (WTR::EventSenderProxy::clearTouchPoints): (WTR::EventSenderProxy::releaseTouchPoint): (WTR::EventSenderProxy::cancelTouchPoint): 2020-05-27 Darin Adler Remove things from FeatureDefines.xcconfig that are covered by PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=212418 Reviewed by Andy Estes. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed 83 of the 119 things defined in this file. There are 36 more that are slightly more complex that we can remove carefully later. 2020-05-29 Darin Adler Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable https://bugs.webkit.org/show_bug.cgi?id=212420 Reviewed by Andy Estes. * Scripts/webkitpy/generate_xcfilelists_lib/generators.py: (WebCoreGenerator._get_generate_derived_sources_script): Removed the code to generate UnifiedSources-output.xcfilelist. 2020-05-29 Keith Rollin Revert switch to XCBuild https://bugs.webkit.org/show_bug.cgi?id=212530 Unreviewed build fix. Bug 209890 enabled the use of XCBuild by default. Since then, some build issues have shown up. While addressing them, temporarily turn off the use of XCBuild by default. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * Scripts/build-webkit: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: 2020-05-29 Philippe Normand [Flatpak][GStreamer] all commands, except webkit-build, fails if GST_BUILD_PATH is set https://bugs.webkit.org/show_bug.cgi?id=212408 Reviewed by Žan Doberšek. Don't run gst-env.py in the sandbox because that can lead to command-line options clashing with build-webkit and other WebKit scripts. So instead we now parse the output of the environment variables gst-build requires and we forward those to the sandbox. * flatpak/flatpakutils.py: (run_sanitized): (check_flatpak): (FlatpakObject.flatpak): (WebkitFlatpak.execute_command): (WebkitFlatpak.setup_gstbuild): (WebkitFlatpak.run_in_sandbox): (flatpak_run_sanitized): Deleted. 2020-05-29 Carlos Alberto Lopez Perez Add watchlist comment for patches touching imported WPT tests. https://bugs.webkit.org/show_bug.cgi?id=212362 Reviewed by Youenn Fablet. Add a watchlist trigger to comment on patches touching imported WPT tests with a link to documentation about the export process. * Scripts/webkitpy/common/config/watchlist: 2020-05-29 Lauro Moura [Flatpak] Fix os.system return code for better signal handling. Rubber-stamped by Philippe Normand. The previous fix in r262270 correctly fixed the return code issue but made signal handling pass through python. For example, when you ctlr+C running MiniBrowser, you'd get a python stacktrace deep inside subprocess.call. So, revert back to os.system but fixing the return code. * flatpak/webkit-bwrap: 2020-05-29 Philippe Normand [Flatpak SDK] Update OpenXR https://bugs.webkit.org/show_bug.cgi?id=212518 Reviewed by Žan Doberšek. Upstream now builds fine with GCC 9.3.0. Removing downstream patch. * buildstream/elements/sdk/openxr.bst: * buildstream/patches/openxr-0001-cmake-Check-for-C-17-and-conditionally-enable-it.patch: Removed. 2020-05-29 Wenson Hsieh REGRESSION (r261812): editing/async-clipboard/clipboard-item-get-type-basic.html is flaky https://bugs.webkit.org/show_bug.cgi?id=212281 Reviewed by Tim Horton. On some shipping versions of iOS, returning `NO` from `-supportsImagePaste` still results in UIKit keyboard code pinning temporary items to the general pasteboard, which increments the change count of the pasteboard. If this happens in the middle of an attempt to read from the pasteboard, we end up falsely denying access to the contents of the pasteboard, since we believe that the contents of the pasteboard have changed. This has the potential to affect any test that attempts to read from the pasteboard on iOS, though the titular layout test seems to trigger the bug more frequently than other tests. This item pinning was added in support of being able to insert Memojis from the software keyboard, and works by pretending to copy a temporary PNG image, asking the delegate whether it `-canPerformAction:withSender:`, and then restoring the items previously on the pasteboard. To work around this in the test runner, we can simply swizzle out `-[UIKeyboardImpl delegateSupportsImagePaste]` to always return `NO`, which has the same effect as disabling the Memoji keyboard. * WebKitTestRunner/TestController.h: * WebKitTestRunner/ios/TestControllerIOS.mm: (overrideKeyboardDelegateSupportsImagePaste): (WTR::TestController::platformResetStateToConsistentValues): 2020-05-28 Myles C. Maxfield Make fast/text/user-installed-fonts/extended-character.html more robust https://bugs.webkit.org/show_bug.cgi?id=212487 Unreviewed. Update the font to use the new character. * WebKitTestRunner/fonts/FakeHelvetica-SingleExtendedCharacter.ttf: 2020-05-28 Lauro Moura [Flatpak] Use subprocess.call instead of os.system to forward the return code correctly. os.system reports error codes from the child process like wait(), which seems to not be playing well with flatpak/bwrap. This was causing flatpak to return 0 to some failed commands (like build-webkit), making failures show as successes in the bots. Unreviewed build fix. * flatpak/webkit-bwrap: 2020-05-28 Tim Horton makeValueRefForValue should be robust against the type encoding of a NSNumber backed by a boolean https://bugs.webkit.org/show_bug.cgi?id=212456 Reviewed by Anders Carlsson. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeValueRefForValue): Apply the fix from r260515 to this second copy of the code too. 2020-05-27 Saam Barati revert logging for detecting failures in run-jsc-stress-tests https://bugs.webkit.org/show_bug.cgi?id=212447 Reviewed by Alexey Proskuryakov. * Scripts/run-jsc-stress-tests: 2020-05-27 Tim Horton REGRESSION (PSON): Resizing WKWebView during cross-site navigation results in the page laying out at the wrong size https://bugs.webkit.org/show_bug.cgi?id=212434 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Add a test ensuring that we correctly update the view size if it changes during the provisional phase of the navigation. 2020-05-27 Lauro Moura Unreviewed. A couple transformations missing from r262214. Was making fast/events/touch/tap-highlight-color.html to fail. * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::EventSenderProxy::keyDown): (WTR::EventSenderProxy::addTouchPoint): 2020-05-27 Kenneth Russell Update MobileMiniBrowser project settings to current Xcode https://bugs.webkit.org/show_bug.cgi?id=212428 Reviewed by Dean Jackson. Apply suggestions from Dean to automatically switch between the internal and public SDKs. * MobileMiniBrowser/Configurations/Base.xcconfig: 2020-05-27 Lauro Moura [WPE] Avoid possible WTR event timing going back in time and fix conversion from s to ms https://bugs.webkit.org/show_bug.cgi?id=212338 Reviewed by Michael Catanzaro. Make sure we cast the double m_time timestamp from seconds to uint32_t milliseconds expected by WPE input events. * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::secToMsTimestamp): (WTR::EventSenderProxy::EventSenderProxy): Use monotonic time instead of zero as the time origin. This is used only in a relative manner, and we need monotonic behavior so conversion to DOM event timestamps makes sense. (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): (WTR::EventSenderProxy::mouseScrollBy): (WTR::EventSenderProxy::updateTouchPoint): (WTR::EventSenderProxy::prepareAndDispatchTouchEvent): (WTR::EventSenderProxy::releaseTouchPoint): 2020-05-27 Kate Cheney Make sure bundle identifier testing override is set in the network process https://bugs.webkit.org/show_bug.cgi?id=212288 Reviewed by Chris Dumez. Set the bundle identifier in the network process if a layout test updates it. This value usually only gets updated when a new network process is initialized, which does not happen for every test. So it should be set/cleared as needed. * WebKitTestRunner/TestController.cpp: (WTR::TestController::createWebViewWithOptions): (WTR::TestController::updateBundleIdentifierInNetworkProcess): * WebKitTestRunner/TestController.h: 2020-05-27 Wenson Hsieh [Clipboard API] Support reading "image/png" on ClipboardItem https://bugs.webkit.org/show_bug.cgi?id=212339 Reviewed by Tim Horton. Add a new API test to verify that TIFF images on the system pasteboard on macOS are automatically converted to PNG data, and is accessible through `ClipboardItem` through the "image/png" type. * TestWebKitAPI/Tests/WebKitCocoa/ClipboardTests.mm: 2020-05-27 Per Arne Vollan Unreviewed, reverting r260840. This patch is no longer needed after preferences root cause has been fixed. Reverted changeset: "[Cocoa] Global preferences are not accessible in the WebContent process when CFPrefs direct mode is enabled" https://bugs.webkit.org/show_bug.cgi?id=211075 https://trac.webkit.org/changeset/260840 2020-05-27 Devin Rousso Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro https://bugs.webkit.org/show_bug.cgi?id=210014 Reviewed by Brian Burg. Previously, the generated InspectorBackendCommands.js would include code for things that the backend doesn't actually support. By using actual macros and preprocessing that file, we can ensure that the frontend doesn't incorrectly think that something is supported by the page being inspected: - the `Canvas` commands and events related to shader programs/pipelines should only exist when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`. - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled` that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional parameter, as well as removing `Page.setShowRulers` entirely. - setting the forced appearance should only be possible if dark mode is supported. - web archives only exist if CF is used. * Configurations/FeatureDefines.xcconfig: Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h. * Scripts/webkitpy/inspector/main.py: (InspectorGeneratorTests.generate_from_json): (InspectorGeneratorTests.run_tests): (InspectorGeneratorTests.main): 2020-05-27 Philippe Normand [Flatpak SDK] Update openxr recipe https://bugs.webkit.org/show_bug.cgi?id=212403 Reviewed by Sergio Villar Senin. * buildstream/elements/sdk/openxr.bst: Explicitely list dependencies and bump to latest git master. 2020-05-27 Carlos Garcia Campos [GTK][WTR] EventSender: stop using GdkEvent API in preparation for GTK4 https://bugs.webkit.org/show_bug.cgi?id=212298 Reviewed by Adrian Perez de Castro. Use WebKitWebViewBase internal API to synthesize events instead of GdkEvents. The touch events support has been removed because we are no longer testing touch events, since they need an actual touchscreen. * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::getGDKKeySymForKeyRef): (WTR::toWebKitGLibAPI): (WTR::EventSenderProxy::keyDown): (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): (WTR::EventSenderProxy::mouseScrollBy): (WTR::EventSenderProxy::continuousMouseScrollBy): (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): (WTR::EventSenderProxy::leapForward): (WTR::EventSenderProxy::addTouchPoint): (WTR::EventSenderProxy::updateTouchPoint): (WTR::EventSenderProxy::touchStart): (WTR::EventSenderProxy::touchMove): (WTR::EventSenderProxy::touchEnd): (WTR::EventSenderProxy::touchCancel): (WTR::EventSenderProxy::clearTouchPoints): (WTR::EventSenderProxy::releaseTouchPoint): (WTR::EventSenderProxy::cancelTouchPoint): (WTR::EventSenderProxy::setTouchPointRadius): (WTR::EventSenderProxy::setTouchModifier): 2020-05-26 Alex Christensen UTF-8 encode strings of invalid URLs when converting WTF::URL to NSURL instead of truncating the UTF-16 encoding https://bugs.webkit.org/show_bug.cgi?id=212393 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): 2020-05-26 Mark Lam Enhance Bitmap::setEachNthBit() to also take an end index. https://bugs.webkit.org/show_bug.cgi?id=212386 Reviewed by Robin Morisset. * TestWebKitAPI/Tests/WTF/Bitmap.cpp: (TestWebKitAPI::testBitmapSetEachNthBitImpl): 2020-05-26 Fujii Hironori [WinCairo][WK2] Use GraphicsLayerTextureMapper for Accelerated Compositing mode https://bugs.webkit.org/show_bug.cgi?id=211883 Reviewed by Don Olmstead. * MiniBrowser/win/WebKitBrowserWindow.cpp: (WebKitBrowserWindow::setPreference): Call WKPreferencesSet* for menu items IDM_ACC_COMPOSITING, IDM_COMPOSITING_BORDERS and IDM_DEBUG_INFO_LAYER. 2020-05-26 Sam Weinig Extended Color Cleanup: Remove red()/green()/blue() accessors from ExtendedColor in preperation for supporting non-RGB based ColorSpaces https://bugs.webkit.org/show_bug.cgi?id=212366 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): Update tests to pull values from the channels rather than from the red()/green()/blue() accessors. 2020-05-26 Peng Liu ASSERTION FAILED: m_clientCounts.contains(contextId) - WebKit::VideoFullscreenManagerProxy::removeClientForContext() https://bugs.webkit.org/show_bug.cgi?id=212308 Disable TestWebKitAPI.PictureInPicture.ExitPiPOnSuspendVideoElement for old iOS versions due to an issue of AVKit. In addition, don't run the test if Picture-in-Picture is not supported. Reviewed by Jer Noble. * TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm: (TestWebKitAPI::TEST): 2020-05-26 Keith Rollin Enable the use of XCBuild by default in Apple builds https://bugs.webkit.org/show_bug.cgi?id=209890 Reviewed by Darin Adler. Switch from the "legacy" Xcode build system to the "new" build system (also known as "XCBuild"). Switching to the new system speeds up builds by a small percentage, better validates projects for build-related issues (such as dependency cycles), lets WebKit benefit from future improvements in XCBuild such as those coming from the underlying llbuild open source project, and prepares us for any other tools built for this new ecosystem. Specific changes: - Remove Xcode project and workspace settings that selected the Build system, allowing the default to take hold (which is currently the New build system). - Updated webkitdirs.pm with a terser check for Xcode version. - Update build-webkit and Makefile.shared to be explicit when using the old build system (no longer treat it as a default or fall-back configuration). - Update various xcconfig files similarly to treat the default as using the new build system. - Update various post-processing build steps to check for Xcode 11.4 and to no longer treat the default as using the old build system. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * Scripts/build-webkit: * Scripts/webkitdirs.pm: (canUseXCBuild): * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: 2020-05-26 Jonathan Bedard webkitpy: simctl list may have stderr logging https://bugs.webkit.org/show_bug.cgi?id=212376 Unreviewed infrastructure fix. * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager.populate_available_devices): Only parse stdout, log error when json decoding fails. (SimulatedDevice.is_usable): Only parse stdout. (SimulatedDevice.launch_app): Ditto. 2020-05-25 Wenson Hsieh [iOS] ActionSheetTests.DataDetectorsLinkIsNotPresentedAsALink is failing consistently https://bugs.webkit.org/show_bug.cgi?id=212363 Reviewed by Tim Horton. This test began to consistently throw an exception after , due to how UserInterfaceSwizzler always instantiates the shared UIApplication. This apparently causes -[WKContentView resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:] to return `nil` instead of a replica view. As a result, we crash under `createFallbackTargetedPreview` as we're attempting to assemble a targeted preview for the context menu interaction. Since this seems to only affect this particular API test, work around it by swizzling out `-resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:` in this API test to return a non-null UIView. * TestWebKitAPI/Tests/ios/ActionSheetTests.mm: (TestWebKitAPI::swizzledResizableSnapshotViewFromRect): (TestWebKitAPI::TEST): 2020-05-24 Sam Weinig Extended Color Cleanup: Use the name SimpleColor consistently https://bugs.webkit.org/show_bug.cgi?id=212337 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): Update test for rename of makeRGBAFromHSLA to makeSimpleColorFromHSLA. 2020-05-25 Víctor Manuel Jáquez Leal [Flatpak][GStreamer] compilation fails when GST_BUILD_PATH is defined https://bugs.webkit.org/show_bug.cgi?id=212343 Reviewed by Philippe Normand. Flatpak's command has to be expressed before gst-env declaration. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2020-05-25 Adrian Perez de Castro [WPE][WKTR] Fix typo in EventSenderProxyWPE https://bugs.webkit.org/show_bug.cgi?id=212340 Reviewed by Carlos Garcia Campos. * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::wpeKeySymForKeyRef): Fix typo rightArror -> rightArrow. 2020-05-25 Philippe Normand REGRESSION(r262057): [Flatpak SDK] sccache-dist server no longer starting https://bugs.webkit.org/show_bug.cgi?id=212326 Reviewed by Žan Doberšek. A few mount points were missing in the sandbox created by `flatpak run` preventing the sccache-dist server to start and keep running. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): * flatpak/webkit-bwrap: 2020-05-25 Philippe Normand [Flatpak SDK] Fixup icecc support https://bugs.webkit.org/show_bug.cgi?id=212301 Reviewed by Žan Doberšek. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): Allow homedir access from the sandbox, this is needed because the icecc toolchains paths refer to the host environment, not the sandbox. (WebkitFlatpak.pack_toolchain): Fix byte-string formatting issue, happening in Python3. 2020-05-25 Philippe Normand [GTK4] SDK contains too old GTK4 https://bugs.webkit.org/show_bug.cgi?id=212334 Reviewed by Adrian Perez de Castro. * buildstream/elements/sdk/gtk.bst: Update GTK4 to 3.98.4. 2020-05-24 Sam Weinig Extended Color Cleanup: Stop allowing direct access to the underlying SimpleColor (it is almost always incorrect with respect to extended colors) https://bugs.webkit.org/show_bug.cgi?id=212184 Reviewed by Dean Jackson. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): Use toSRGBASimpleColorLossy() to get access to color components. 2020-05-22 Alex Christensen Make download resume workaround forgiving of changes in CFNetwork https://bugs.webkit.org/show_bug.cgi?id=212273 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: 2020-05-22 Paulo Matos Add support for [no-]use-ccache option in build-jsc https://bugs.webkit.org/show_bug.cgi?id=212259 Reviewed by Mark Lam. * Scripts/build-jsc: 2020-05-22 Alex Christensen Add SPI to unblock third party cookies from WKWebViews with ResourceLoadStatistics turned on https://bugs.webkit.org/show_bug.cgi?id=212058 Reviewed by John Wilander. I also add _test_waitForAlert to make tests less verbose. * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.h: (TestWebKitAPI::Connection::Connection): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::HTTPServer): (TestWebKitAPI::dataFromString): (TestWebKitAPI::nullTerminatedRequest): (TestWebKitAPI::HTTPServer::request const): (TestWebKitAPI::Connection::receive const): (TestWebKitAPI::Connection::send const): * TestWebKitAPI/cocoa/TestUIDelegate.h: * TestWebKitAPI/cocoa/TestUIDelegate.mm: (-[WKWebView _test_waitForAlert]): 2020-05-22 Chris Dumez [WKTR] Make TestController::resetStateToConsistentValues() more robust against failures to navigate to about:blank https://bugs.webkit.org/show_bug.cgi?id=212268 Reviewed by Geoffrey Garen. Make TestController::resetStateToConsistentValues() more robust against failures to navigate to about:blank. In , we have evidence that TestController::resetStateToConsistentValues() sometimes fails to load about:blank, likely due to an unresponsive WebProcess. When this happens, WebKitTestRunner reports the test as timing out and logs this on stderr: """ - TestController::run - Failed to reset state to consistent values #PROCESS UNRESPONSIVE - com.apple.WebKit.WebContent.Development (pid 57421) """ This is unfortunate because this does not indicate that anything is particularly wrong with the test in question. Rather, it indicates that the WebProcess is unresponsive (likely due to a hang caused by a previous test), which prevents WebKitTestRunner to reset the state in order to run the test. I propose that if we fail to load about:blank once, we log an error message to stderr but then terminate the WebProcess and try once again, to make WebKitTestRunner more robust. I have verified the change locally, by injecting a script in resetStateToConsistentValues() that causes a WebProcess hang. Before my change, the test would time out and the same logging as in would show. After my change though, the test would pass successfully despite the WebProcess hang. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): 2020-05-22 ChangSeok Oh [GTK] jhbuild is broken with GCC 10.0 https://bugs.webkit.org/show_bug.cgi?id=212256 Reviewed by Carlos Alberto Lopez Perez. GCC 10.0 enables -fno-common as default, so many 'multiple definitions' failures occur in building dependencies via jhbuild. This patch addresses them by back-porting patches from corresponding source repositories. * gstreamer/jhbuild.modules: * gstreamer/patches/libsrtp-Fix-building-with-gcc-10.patch: Added. * gstreamer/patches/orc-satisfy-fno-common-under-gcc10.patch: Added. * gtk/jhbuild.modules: * gtk/patches/at-spi2-atk-tests-Replace-common-variable-with-usual-external.patch: Added. * gtk/patches/at-spi2-atk-tests-fix-child_pid-reference.patch: Added. * gtk/patches/mesa-gallium-build-fix-to-make-gcc-10-happy.patch: Added. * gtk/patches/xserver-Fix-building-with-fno-common.patch: Added. 2020-05-22 Philippe Normand [Flatpak SDK] Add bubblewrap ... wrapper https://bugs.webkit.org/show_bug.cgi?id=212077 Reviewed by Carlos Alberto Lopez Perez. The bind-mounts are now handled through webkit-bwrap. * flatpak/flatpakutils.py: (WebkitFlatpak.execute_command): (WebkitFlatpak.run_in_sandbox): * flatpak/webkit-bwrap: Added. 2020-05-22 Javier Fernandez [Flatpak SDK] CCACHE_ env vars are not forwarded to the sandbox environment https://bugs.webkit.org/show_bug.cgi?id=212257 Reviewed by Philippe Normand. Added the "CCACHE" prefix to the ones the SDK should keep from the user's environment, and forwarded to the Flatpak sandbox. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2020-05-22 Tim Horton iOS: Pressing tab in the Mail subject field moves focus to the body, but pressing shift tab doesn't move it back https://bugs.webkit.org/show_bug.cgi?id=212243 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[FocusDelegate _webView:takeFocus:]): (-[FocusDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TEST): 2020-05-21 Wenson Hsieh DataTransfer.files contains multiple files when pasting a single image with multiple representations https://bugs.webkit.org/show_bug.cgi?id=212245 Reviewed by Tim Horton. * DumpRenderTree/mac/DumpRenderTreePasteboard.mm: (-[LocalPasteboard _clearContentsWithoutUpdatingChangeCount]): (-[LocalPasteboard _addTypesWithoutUpdatingChangeCount:owner:]): (-[LocalPasteboard writeObjects:]): (-[LocalPasteboard pasteboardItems]): Adjust DumpRenderTree's LocalPasteboard so that it lazily populates the pasteboard when constructing NSPasteboardItems. To do this, we need to make a few adjustments: 1. When reifying NSPasteboardItems from LocalPasteboard, ask the owner (WebHTMLView) to provide pasteboard data for each pasteboard type that was promised by WebKit, but was not eagerly written to the pasteboard. 2. Cache pasteboard items that were created, so that we don't repeatedly ask WebHTMLView to provide pasteboard data. WebHTMLView doesn't currently support this, and suffers from a bug where TIFF data may only be provided once. This was fixed for WebKit2, but not for WebKit1. 3. Maintain a separate hash list of original pasteboard types (which may not be UTIs) that were handed to LocalPasteboard by WebKit. We use these original types in step (1). * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm: Add a new API test to verify that one file is exposed via the DataTranfer when the pasteboard contains a single image with two image representations, but two files are exposed when the pasteboard contains two images, each with a single representation. (writeImageDataToPasteboard): Overload this helper method with two additional variants: one that takes a dictionary of pasteboard types to data, and another that takes an array of dictionaries, each representing a single item's types and data. 2020-05-21 Robin Morisset Various compile-time boolean flags could/should be marked constexpr https://bugs.webkit.org/show_bug.cgi?id=212244 Reviewed by Mark Lam. * TestWebKitAPI/Tests/WTF/Condition.cpp: 2020-05-21 Mark Lam Rename some variables in Bitmap API test for consistency and better readability. https://bugs.webkit.org/show_bug.cgi?id=212235 Reviewed by Saam Barati. This patch renames the following: bitmap0 => bitmapZeroes bitmapFilled => bitmapOnes bitmap3 => bitmap2Clone bitmapSmallZeroed => smallBitmapZeroes bitmapSmallFilled => smallBitmapOnes bitmapSmall1 => smallBitmap1 bitmapSmall2 => smallBitmap2 Apart from these renamings, there are no other code changes. * TestWebKitAPI/Tests/WTF/Bitmap.cpp: (TestWebKitAPI::testBitmapSize): (TestWebKitAPI::testBitmapConstructedEmpty): (TestWebKitAPI::testBitmapSetGet): (TestWebKitAPI::testBitmapTestAndSet): (TestWebKitAPI::testBitmapTestAndClear): (TestWebKitAPI::testBitmapConcurrentTestAndSet): (TestWebKitAPI::testBitmapConcurrentTestAndClear): (TestWebKitAPI::testBitmapClear): (TestWebKitAPI::testBitmapClearAll): (TestWebKitAPI::testBitmapInvert): (TestWebKitAPI::testBitmapFindRunOfZeros): (TestWebKitAPI::testBitmapCount): (TestWebKitAPI::testBitmapIsEmpty): (TestWebKitAPI::testBitmapIsFull): (TestWebKitAPI::testBitmapMerge): (TestWebKitAPI::testBitmapFilter): (TestWebKitAPI::testBitmapExclude): (TestWebKitAPI::testBitmapConcurrentFilter): (TestWebKitAPI::testBitmapSubsumes): (TestWebKitAPI::testBitmapForEachSetBit): (TestWebKitAPI::testBitmapFindBit): (TestWebKitAPI::testBitmapIteration): (TestWebKitAPI::testBitmapMergeAndClear): (TestWebKitAPI::testBitmapSetAndClear): (TestWebKitAPI::testBitmapSetEachNthBit): (TestWebKitAPI::testBitmapOperatorEqual): (TestWebKitAPI::testBitmapOperatorNotEqual): (TestWebKitAPI::testBitmapOperatorAssignment): (TestWebKitAPI::testBitmapOperatorBitOrAssignment): (TestWebKitAPI::testBitmapOperatorBitAndAssignment): (TestWebKitAPI::testBitmapOperatorBitXorAssignment): (TestWebKitAPI::testBitmapHash): 2020-05-20 Mark Lam Add more Bitmap methods. https://bugs.webkit.org/show_bug.cgi?id=212190 Reviewed by Robin Morisset. Added test coverage for the new WTF::Bitmap methods. * TestWebKitAPI/Tests/WTF/Bitmap.cpp: (TestWebKitAPI::testBitmapSetEachNthBit): (TestWebKitAPI::testBitmapOperatorAssignment): (TestWebKitAPI::testBitmapOperatorBitOrAssignment): (TestWebKitAPI::testBitmapOperatorBitAndAssignment): (TestWebKitAPI::testBitmapOperatorBitXorAssignment): (TestWebKitAPI::TEST): 2020-05-21 Yoshiaki Jitsukawa [PlayStation] Add minimal WKView API to enable TestWebKitAPI https://bugs.webkit.org/show_bug.cgi?id=211868 Reviewed by Alex Christensen. Enable TestWebKitAPI * TestWebKitAPI/PlatformPlayStation.cmake: * TestWebKitAPI/PlatformWebView.h: * TestWebKitAPI/playstation/PlatformUtilitiesPlayStation.cpp: (TestWebKitAPI::Util::createInjectedBundlePath): (TestWebKitAPI::Util::createURLForResource): * TestWebKitAPI/playstation/PlatformWebViewPlayStation.cpp: (TestWebKitAPI::PlatformWebView::PlatformWebView): (TestWebKitAPI::PlatformWebView::~PlatformWebView): (TestWebKitAPI::PlatformWebView::initialize): (TestWebKitAPI::PlatformWebView::resizeTo): (TestWebKitAPI::PlatformWebView::page const): (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress): (TestWebKitAPI::PlatformWebView::simulateMouseMove): (TestWebKitAPI::PlatformWebView::simulateRightClick): (TestWebKitAPI::PlatformWebView::simulateButtonClick): * TestWebKitAPI/playstation/main.cpp: (loadLibraryOrExit): (main): Add PlayStation Platform support. * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp: (TestWebKitAPI::TEST): Use the same expected default font preferences as GTK's. 2020-05-21 Alex Christensen [macOS] TestWebKitAPI.WebKit.HTTPReferer is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=212180 Reviewed by Darin Adler. Sometimes an HTTP request takes more than one call to nw_connection_receive to receive entirely. Add a new abstraction Connection that wraps an nw_connection_t and knows how to read an entire request. Use strnstr instead of null terminating and using strstr. * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h: * TestWebKitAPI/cocoa/HTTPServer.h: (TestWebKitAPI::Connection::receiveHTTPRequest): (TestWebKitAPI::Connection::Connection): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::HTTPServer): (TestWebKitAPI::dataFromString): (TestWebKitAPI::vectorFromData): (TestWebKitAPI::HTTPServer::respondToRequests): (TestWebKitAPI::HTTPServer::request const): (TestWebKitAPI::Connection::receiveHTTPRequest const): (TestWebKitAPI::Connection::send const): (TestWebKitAPI::Connection::terminate const): (TestWebKitAPI::nullTerminatedRequest): Deleted. 2020-05-21 Enrique Ocaña González [GStreamer][GTK][WPE] Expose and honor the media content types requiring hardware support setting https://bugs.webkit.org/show_bug.cgi?id=211950 Reviewed by Adrian Perez de Castro. Exercise the new mediaContentTypesRequiringHardwareSupport setting. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp: (testWebKitSettings): 2020-05-20 Simon Fraser [macOS] Scrolling synchronization part 1: Have the scrolling thread wait half a frame for the main thread to complete the rendering update https://bugs.webkit.org/show_bug.cgi?id=212168 Reviewed by Tim Horton. Some new trace points for scrolling thread activity. * Tracing/SystemTracePoints.plist: 2020-05-20 Wenson Hsieh [iOS] Layout tests in editing/pasteboard sporadically crash https://bugs.webkit.org/show_bug.cgi?id=212169 Reviewed by Tim Horton. Add some missing entitlements. * TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements: * WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements: 2020-05-20 Sam Weinig Replace Color::getHSL() with sRGBToHSL to ensure it at least gives somewhat sensible results for ExtendedColors and reduce code duplication https://bugs.webkit.org/show_bug.cgi?id=212143 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST): Update tests to use sRGBToHSL instead of Color::getHSL() and add testing of WebCore::lightness() and round tripping. Update results for hue to be 0->1 rather than 0->6 which allows the round tripping to succeed. 2020-05-20 ChangSeok Oh [GTK] Implement connected and disconnected events of GAMEPAD API with libmanette https://bugs.webkit.org/show_bug.cgi?id=133854 Reviewed by Carlos Garcia Campos. This patch brings initial GAMEPAD API support to the gtk port. We use libmanette, a simple GObject game controller library to handle gamepad connection and input. In particular, we use libmanette-0.2.4 which is the latest version and minimum version to build in c++. * gtk/jhbuild.modules: 2020-05-20 Kate Cheney Support operating dates in ResourceLoadStatisticsDatabaseStore https://bugs.webkit.org/show_bug.cgi?id=212034 Reviewed by Brent Fulgham. Add a testing function to insert an expired statistic. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setStatisticsExpiredStatistic): (WTR::TestRunner::statisticsCallDidSetExpiredStatisticCallback): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::setStatisticsExpiredStatistic): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didSetExpiredStatistic): * WebKitTestRunner/TestInvocation.h: 2020-05-20 Chris Dumez Deprecate WKBundlePageSetPolicyClient() Injected bundle C API https://bugs.webkit.org/show_bug.cgi?id=212166 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsInvalidScheme_Bundle.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::InjectedBundlePage): 2020-05-20 Myles C. Maxfield [iPadOS] -webkit-text-size-adjust:percentage doesn't work in native apps https://bugs.webkit.org/show_bug.cgi?id=212122 Reviewed by Wenson Hsieh. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/idempotent-mode-autosizing-only-honors-percentages.html: Added. * TestWebKitAPI/ios/PreferredContentMode.mm: 2020-05-20 Lauro Moura [WPE][WebDriver] Allow subviews to create new views https://bugs.webkit.org/show_bug.cgi?id=212118 Reviewed by Carlos Garcia Campos. Required by some WebDriver tests. * MiniBrowser/wpe/main.cpp: (createWebView): 2020-05-20 Philippe Normand [FlatPak SDK] Missing ruby gems json and highline https://bugs.webkit.org/show_bug.cgi?id=212086 Reviewed by Žan Doberšek. Add the json and highline Ruby gems in the Flatpak SDK. * buildstream/elements/sdk-platform.bst: * buildstream/elements/sdk/ruby-highline.bst: Added. * buildstream/elements/sdk/ruby-json.bst: Added. * buildstream/project.conf: 2020-05-20 Diego Pino Garcia Unreviewed, reverting r261909. Execution of LayoutTests returns syntax error in the bots (GTK, WPE) Reverted changeset: "[Flatpak SDK] Add bubblewrap ... wrapper" https://bugs.webkit.org/show_bug.cgi?id=212077 https://trac.webkit.org/changeset/261909 2020-05-20 Philippe Normand [Flatpak SDK] Bump rr and bst https://bugs.webkit.org/show_bug.cgi?id=212074 Reviewed by Adrian Perez de Castro. Update Buildstream to 1.4.3 which is their latest stable release. Also bump rr to their latest git master commit, which makes it usable in the Flatpak sandbox. * buildstream/Pipfile: * buildstream/Pipfile.lock: * buildstream/elements/sdk/rr.bst: 2020-05-20 Carlos Alberto Lopez Perez update-test-expectations-from-bugzilla tool not working with new EWS https://bugs.webkit.org/show_bug.cgi?id=210975 Reviewed by Youenn Fablet. With the new EWS, the layout test archive results are not longer posted to bugzilla as attachment. Now we need to inspect the EWS server to get the status of the runs for the patch id, and then query the EWS builbot server in order to get the details of each run to finally obtain the URL with the zip file for the results. The tool now automatically applies platform-specific and generic results automatically (its not longer needed to specify whether the result its generic or not). It uses mac-wk2 results as generic. Also now it updates the test results for tests where the result is MISSING. * Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py: (configure_logging): (argument_parser): (TestExpectationUpdater.__init__): (TestExpectationUpdater._platform_name): (TestExpectationUpdater): (TestExpectationUpdater._get_layout_tests_run): (TestExpectationUpdater._lookup_ews_results): (TestExpectationUpdater._tests_to_update): (TestExpectationUpdater._update_for_generic_bot): (TestExpectationUpdater._update_for_platform_specific_bot): (TestExpectationUpdater.do_update): (main): * Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py: (MockAttachment.__init__): (MockAttachment.is_patch): (MockAttachment): (MockAttachment.is_obsolete): (MockBugzilla): (MockBugzilla.attachments): (MockRequests): (MockRequests.__init__): (MockRequests.get): (MockRequests.content): (MockRequests.text): (MockZip.__init__): (TestExpectationUpdaterTest.test_update_test_expectations): 2020-05-20 Carlos Garcia Campos Unreviewed. Fix GTK4 build with GTK 3.98.4 * MiniBrowser/gtk/BrowserTab.c: (loadChanged): (browserTabConstructed): * MiniBrowser/gtk/BrowserWindow.c: (webViewClose): (browserWindowSetupToolbarItem): (browser_window_init): 2020-05-20 Sam Weinig Remove unused Color::getHSV function https://bugs.webkit.org/show_bug.cgi?id=212119 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/ColorTests.cpp: Remove tests for Color::getHSV(). 2020-05-20 Philippe Normand [Flatpak SDK] Add bubblewrap ... wrapper https://bugs.webkit.org/show_bug.cgi?id=212077 Reviewed by Carlos Alberto Lopez Perez. The bind-mounts are now handled through webkit-bwrap. * flatpak/flatpakutils.py: (WebkitFlatpak.execute_command): (WebkitFlatpak.run_in_sandbox): * flatpak/webkit-bwrap: Added. 2020-05-19 Darin Adler REGRESSION (r259930): Dictation marker at start of text is removed when added trailing whitespace is collapsed https://bugs.webkit.org/show_bug.cgi?id=212093 Reviewed by Daniel Bates. * TestWebKitAPI/Tests/WebKitCocoa/InsertTextAlternatives.mm: (TestWebKitAPI::TEST): Expect success rather than failure. 2020-05-19 Alex Christensen Add _WKDownloadDelegate callback including totalBytesWritten https://bugs.webkit.org/show_bug.cgi?id=212110 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (TEST): * TestWebKitAPI/cocoa/TestDownloadDelegate.h: * TestWebKitAPI/cocoa/TestDownloadDelegate.mm: (-[TestDownloadDelegate _download:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]): (-[TestDownloadDelegate _download:didReceiveData:]): Deleted. 2020-05-19 Daniel Bates Blue dotted underline with alternatives only shown for last word, gets lost for previous insertions https://bugs.webkit.org/show_bug.cgi?id=212097 Reviewed by Darin Adler. Add tests. As I was writing them I discovered a few bugs in the existing code: 1. REGRESSION (r259930): Dictation marker at start of text is removed when added trailing whitespace is collapsed 2. Inserting a no-break space before or after a marker removes the marker * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/InsertTextAlternatives.mm: Added. (TestWebKitAPI::TEST): (TestWebKitAPI::makeNSStringWithCharacter): Added. 2020-05-19 Sergio Villar Senin [WPE] Sync jhbuild to flatpak https://bugs.webkit.org/show_bug.cgi?id=212087 Reviewed by Adrian Perez de Castro. * wpe/jhbuild.modules: Updated meson, libwpe and wpebackend-fdo. 2020-05-19 Chris Dumez Turn on ITP in TestController::resetStateToConsistentValues() https://bugs.webkit.org/show_bug.cgi?id=212076 Reviewed by Darin Adler. Turn on ITP in TestController::resetStateToConsistentValues(), in a single place instead of doing it in different places depending on whether or not the session is ephemeral or not. It is also important to do it in resetStateToConsistentValues() instead of doing it on data store creation because there is a testRunner method that allows tests to turn off ITP. * WebKitTestRunner/TestController.cpp: (WTR::TestController::generatePageConfiguration): (WTR::TestController::resetStateToConsistentValues): (WTR::TestController::platformAdjustContext): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::initializeWebViewConfiguration): (WTR::TestController::platformInitializeDataStore): 2020-05-19 Lauro Moura [Flatpak SDK] Use items instead of iteritems to make Python 3 happier. Rubber-stamped by Philippe Normand. * flatpak/flatpakutils.py: (WebkitFlatpak.pack_toolchain): 2020-05-19 Wenson Hsieh [macOS] Drag and drop within a contenteditable area duplicates attachment-backed images https://bugs.webkit.org/show_bug.cgi?id=212075 Reviewed by Andy Estes. Add a new API test to verify that starting a drag on an attachment-backed image in an editable container with queued mouse move events does not cause the selection to collapse. See Source/WebKit/ChangeLog for more details. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView waitForPendingMouseEvents]): Move this method from DragAndDropSimulator into TestWKWebView. * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: (-[DragAndDropTestWKWebView waitForPendingMouseEvents]): Deleted. 2020-05-19 Carlos Alberto Lopez Perez [buildbot][GTK][WPE] Pass --verbose flag when running JavaScriptCore tests https://bugs.webkit.org/show_bug.cgi?id=212088 Reviewed by Philippe Normand. Pass the "--verbose" flag to run-javascriptcore-tests also for GTK and WPE. Also change the way we are currently passing "--memory-limited" to make it more obvious that this is needed for all Linux bots (GTK+WPE+JSCOnly). * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunJavaScriptCoreTests.start): (RunRemoteJavaScriptCoreTests.start): 2020-05-19 Michael Catanzaro Fixups for r261689 "stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js failing on ppc64le and s390x" https://bugs.webkit.org/show_bug.cgi?id=211724 Reviewed by Carlos Alberto Lopez Perez. Rewrite determineArchitectureFromELFBinary to properly handle big endian architectures. Also, properly account for 32-bit PowerPC. * Scripts/run-jsc-stress-tests: 2020-05-19 Michael Catanzaro [GTK] Add WEBKIT_EDITING_COMMAND_PASTE_AS_PLAIN_TEXT https://bugs.webkit.org/show_bug.cgi?id=212038 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp: (testWebViewEditorCutCopyPasteNonEditable): (testWebViewEditorCutCopyPasteEditable): (testWebViewEditorNonEditable): 2020-05-18 Zan Dobersek [WPE] HeadlessViewBackend should exclusively use software rasterization mode https://bugs.webkit.org/show_bug.cgi?id=211982 Reviewed by Carlos Garcia Campos. Instead of using WPEBackend-fdo's EGL mode that optionally allows the GL operations to be done through software rasterization, have the HeadlessViewBackend use the SHM mode which enforces this behavior. Under the hood, the graphics library will be forced to set up and use the software rasterization mechanisms, and on our side we are required to properly handle SHM-backed buffers. This avoids any use of EGL or GL operations inside HeadlessViewBackend, enabling to use this setup in systems and environments that don't have GPUs available. All GL-y things are pushed into the WindowViewBackend class. Inside HeadlessViewBackend, the whole SHM logic requires WPEBackend-fdo APIs that are part of the current 1.7 development cycle. When building against older versions, HeadlessViewBackend itself remains buildable but is not operational otherwise. * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: (WTR::PlatformWebView::windowSnapshotImage): * wpe/backends/HeadlessViewBackend.cpp: (WPEToolingBackends::HeadlessInstance::singleton): (WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): (WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend): (WPEToolingBackends::HeadlessViewBackend::backend const): (WPEToolingBackends::HeadlessViewBackend::snapshot): (WPEToolingBackends::HeadlessViewBackend::updateSnapshot): (WPEToolingBackends::HeadlessViewBackend::vsync): (): Deleted. (WPEToolingBackends::HeadlessEGLConnection::singleton): Deleted. (WPEToolingBackends::HeadlessViewBackend::createSnapshot): Deleted. (WPEToolingBackends::HeadlessViewBackend::createEGLSnapshot): Deleted. (WPEToolingBackends::HeadlessViewBackend::createSHMSnapshot): Deleted. (WPEToolingBackends::HeadlessViewBackend::performUpdate): Deleted. (WPEToolingBackends::HeadlessViewBackend::displayBuffer): Deleted. * wpe/backends/HeadlessViewBackend.h: * wpe/backends/ViewBackend.cpp: (WPEToolingBackends::ViewBackend::initialize): Deleted. (WPEToolingBackends::ViewBackend::deinitialize): Deleted. (WPEToolingBackends::ViewBackend::backend const): Deleted. * wpe/backends/ViewBackend.h: * wpe/backends/WindowViewBackend.cpp: (WPEToolingBackends::WindowViewBackend::backend const): (WPEToolingBackends::WindowViewBackend::initialize): (WPEToolingBackends::WindowViewBackend::deinitialize): * wpe/backends/WindowViewBackend.h: 2020-05-18 Zan Dobersek [WPE] Disable modern media controls for testing https://bugs.webkit.org/show_bug.cgi?id=212023 Reviewed by Philippe Normand. * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Since using the same Adwaita-based media controls as the GTK port, WPE too should disable modern media controls during testing by overriding the default value. This fixes a couple of obscure crashes in text track tests. 2020-05-18 Christopher Reid [WinCairo] WKTR WebsiteDataStore is being overwritten by the default one https://bugs.webkit.org/show_bug.cgi?id=212044 Reviewed by Fujii Hironori. Ensure TestController::defaultWebSiteDataStore is being used for WinCairo as done in r259705. Also consolidate platformInitializeDataStore implementations with GTK/WPE since WinCairo WKTR also started crashing since r261758. * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/gtk/TestControllerGtk.cpp: * WebKitTestRunner/wpe/TestControllerWPE.cpp: 2020-05-18 Andy Estes http/tests/ssl/applepay/ApplePayInstallmentConfiguration.https.html fails in public SDK builds https://bugs.webkit.org/show_bug.cgi?id=212000 Reviewed by Youenn Fablet. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-05-18 Wenson Hsieh Replace uses of +self with +class https://bugs.webkit.org/show_bug.cgi?id=212041 Reviewed by Darin Adler. * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController monitorWheelEventsWithOptions:]): * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (TestWebKitAPI::TEST): * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::enclosingScrollViewIncludingSelf): 2020-05-18 Simon Fraser Implement conversion between P3 and sRGB color https://bugs.webkit.org/show_bug.cgi?id=211998 Reviewed by Daniel Bates. API test for conversions from P3 to sRGB, and linearRGB to sRGB. Values were confirmed as close to those provided by ColorSync Utility. * TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp: (TestWebKitAPI::TEST): 2020-05-18 Mark Lam Implement a faster findBitInWord() using the hardware ctz instruction. https://bugs.webkit.org/show_bug.cgi?id=212032 Reviewed by Saam Barati. Add tests to make sure that the ctz implementation matches the loop implementation in behavior. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/StdLibExtras.cpp: Added. (TestWebKitAPI::testFindBitInWord): (TestWebKitAPI::TEST): 2020-05-18 Wenson Hsieh Allow clipboard API access when pasting from a menu item or key binding https://bugs.webkit.org/show_bug.cgi?id=211990 Reviewed by Megan Gardner. Add a UIScriptController method to trigger a paste from the application process. * DumpRenderTree/cocoa/UIScriptControllerCocoa.h: * DumpRenderTree/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::paste): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::paste): * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::paste): 2020-05-18 Darin Adler Add iterator checking to ListHashSet https://bugs.webkit.org/show_bug.cgi?id=211669 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: Removed use of the DID_CREATE_WEAK_PTR_IMPL and WILL_DESTROY_WEAK_PTR_IMPL, which didn't work consistently because of the one-definition rule. Instead, this file parameterizes the WeakPtr family of class templates with a counter class. To avoid having to rewrite test code, used alias templates to insert these class template into the TestWebKitAPI namespace, hiding the class templates from the WTF namespace. 2020-05-18 Peng Liu [iPad Simulator] TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia is timing out https://bugs.webkit.org/show_bug.cgi?id=211792 Reviewed by Daniel Bates. Fix deadlocks in two API tests (only reproducible on iPad simulators). * TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm: (TestWebKitAPI::TEST): 2020-05-18 Wenson Hsieh Single selection ` and ``. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: 2020-05-01 Alex Christensen Add SPI to move localStorage to a different domain https://bugs.webkit.org/show_bug.cgi?id=209260 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2020-05-01 Wenson Hsieh Add a test for webkit.org/b/211311 https://bugs.webkit.org/show_bug.cgi?id=211319 Reviewed by Tim Horton. Exercise the crash fixed in r261017 with a new API test that loads a page and then uses `-[WebHTMLView attributedSubstringFromRange:]` to try and grab the contents of the page as an attributed string. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/AttributedString.mm: (TestWebKitAPI::AttributedStringTest_NewlineAtEndOfDocument::didLoadURL): (TestWebKitAPI::AttributedStringTest_NewlineAtEndOfDocument::url const): (TestWebKitAPI::AttributedStringTest_NewlineAtEndOfDocument::runSyncTest): * TestWebKitAPI/Tests/mac/attributedStringNewlineAtEndOfDocument.html: Added. 2020-05-01 Per Arne Vollan [iOS] Every running WebContent process should be granted access to frontboard services when Accessibility is enabled https://bugs.webkit.org/show_bug.cgi?id=211238 Reviewed by Daniel Bates. * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm: (TEST): 2020-05-01 Don Olmstead [GTK] Add additional exports to support hidden visibility https://bugs.webkit.org/show_bug.cgi?id=211246 Reviewed by Michael Catanzaro. * DumpRenderTree/TestNetscapePlugIn/main.cpp: * TestWebKitAPI/InjectedBundleMain.cpp: * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp: (webkit_web_extension_initialize_with_user_data): * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp: (webkit_web_extension_initialize): * WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp: 2020-05-01 Don Olmstead Use export macros on all platforms https://bugs.webkit.org/show_bug.cgi?id=211293 Reviewed by Michael Catanzaro. Remove uses of USE_EXPORT_MACROS from the DumpRenderTree xcode project. This is the only xcode project that had any references to this value. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: 2020-05-01 Peng Liu A PiP window doesn’t actually dismiss after the browser navigates to a different page within the same domain https://bugs.webkit.org/show_bug.cgi?id=211257 Reviewed by Jer Noble. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/AGXCompilerService.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ExitPiPOnSuspendVideoElement.mm: Added. (-[ExitPiPOnSuspendVideoElementUIDelegate _webView:hasVideoInPictureInPictureDidChange:]): (TestWebKitAPI::TEST): 2020-05-01 Jonathan Bedard results.webkit.org: Dropped connections when uploading archives shouldn't be fatal https://bugs.webkit.org/show_bug.cgi?id=211248 Rubber-stamped by Aakash Jain. * Scripts/webkitpy/results/upload.py: (Upload.upload_archive): Dropping a connection when uploading archives shouldn't be a fatal error. * Scripts/webkitpy/results/upload_unittest.py: (UploadTest.test_archive_upload): 2020-05-01 Lauro Moura [Flatpak SDK] Honor XDG_RUNTIME_DIR when setting the document path https://bugs.webkit.org/show_bug.cgi?id=211277 Reviewed by Philippe Normand. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): Prefer using the value of $XDG_RUNTIME_DIR instead of the hardcoded path when setting the document portal path mount. 2020-05-01 Adrian Perez de Castro [GTK] File GtkVersioning.h should be excluded from the style checker https://bugs.webkit.org/show_bug.cgi?id=211262 Reviewed by Carlos Garcia Campos. * Scripts/webkitpy/style/checker.py: Exclude Source/WebCore/platform/gtk/GtkVersioning.h from style checks. 2020-04-30 Jiewen Tan [WebAuthn] Require user gestures for LocalAuthenticator https://bugs.webkit.org/show_bug.cgi?id=182893 Reviewed by Brent Fulgham. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-la-no-mock.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-la-no-mock.html: Added. 2020-04-30 Alex Christensen TestWebKitAPI.WebKit.DefaultDisplayName and TestWebKitAPI.WebKit.CustomDisplayName are flaky failures https://bugs.webkit.org/show_bug.cgi?id=209993 Reviewed by Chris Dumez. The display name for the web process is set on a low-priority background queue in WebProcess::updateProcessName() so sometimes in our test it hasn't executed yet. If it hasn't executed yet, it will soon, so try until it succeeds. * TestWebKitAPI/Tests/WebKitCocoa/DisplayName.mm: (TestWebKitAPI::checkUntilDisplayNameIs): (TestWebKitAPI::TEST): 2020-04-30 Jiewen Tan [WebAuthn] Optimize LocalAuthenticator https://bugs.webkit.org/show_bug.cgi?id=183534 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (-[TestWebAuthenticationPanelDelegate panel:selectAssertionResponse:source:completionHandler:]): (TestWebKitAPI::TEST): Adds a new test case for the LRU. 2020-04-30 Kate Cheney Change default of "inAppBrowserPrivacyQuirks" testing toggle to use it for tests only https://bugs.webkit.org/show_bug.cgi?id=211209 Reviewed by Brent Fulgham. Manually enable inAppBrowserPrivacyQuirks for certain tests which need script evaluation to test other aspects of In-App Browser Privacy. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (TEST): 2020-04-30 Jonathan Bedard results.webkit.org: Sort out certificates on Catalina https://bugs.webkit.org/show_bug.cgi?id=202837 Reviewed by Alex Christensen. * Scripts/run-javascriptcore-tests: (uploadResults): Do not allow insecure requests. * Scripts/webkitpy/results/upload.py: (Upload.upload): Verify ssl certificates. (Upload.upload_archive): Ditto. 2020-04-30 Alex Christensen Add SPI to change a WKWebView's CORS disabling pattern after initialization https://bugs.webkit.org/show_bug.cgi?id=211211 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: 2020-04-30 Alex Christensen REGRESSION: [ iOS ] http/tests/resourceLoadStatistics/standalone-web-application-exempt-from-website-data-deletion tests are flaky crashing, failing an timing out. https://bugs.webkit.org/show_bug.cgi?id=211190 Reviewed by Chris Dumez. * WebKitTestRunner/TestController.cpp: (WTR::TestController::configureWebsiteDataStoreTemporaryDirectories): In tests that swap out the WebsiteDataStore, don't use the same paths as the other WebsiteDataStore. 2020-04-30 David Kilzer REGRESSION (r176862, r210483): Leaks of BrowserWindowController in MiniBrowser/mac/AppDelegate.m Reviewed by Tim Horton. * MiniBrowser/mac/AppDelegate.m: (-[BrowserAppDelegate createBrowserWindowController:]): - Autorelease return value to fix leak. (-[BrowserAppDelegate newPrivateWindow:]): - Release controller to fix leak. 2020-04-30 David Kilzer REGRESSION (r247490): Leak of MiniBrowserNSTextFinder._hideInterfaceCallback Reviewed by Tim Horton. * MiniBrowser/mac/WK2BrowserWindowController.m: (-[MiniBrowserNSTextFinder dealloc]): Add. - Release _hideInterfaceCallback to fix the leak. 2020-04-30 Daniel Bates [iOS] Implement -markedTextRange https://bugs.webkit.org/show_bug.cgi?id=211148 Reviewed by Wenson Hsieh. Add some tests. * TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm: (TestWebKitAPI::applyAhemStyle): Added. (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView synchronouslyLoadHTMLStringAndWaitUntilAllImmediateChildFramesPaint:]): Added. 2020-04-30 Claudio Saavedra [GTK4] Add navigation and reload buttons to MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=211231 Reviewed by Adrian Perez de Castro. * MiniBrowser/gtk/BrowserWindow.c: (browserWindowUpdateNavigationMenu): (webViewIsLoadingChanged): (browserWindowSetupToolbarItem): (browser_window_init): 2020-04-30 Philippe Normand [SOUP] http/tests/media/video-accept-encoding.html fails https://bugs.webkit.org/show_bug.cgi?id=211228 Reviewed by Carlos Garcia Campos. * Scripts/webkitpy/port/gtk.py: (GtkPort.setup_environ_for_server): * Scripts/webkitpy/port/wpe.py: (WPEPort.setup_environ_for_server): 2020-04-30 Andres Gonzalez Fix for crashes in accessibility/accessibility-node-memory-management.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=211215 Reviewed by Chris Fleizach. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::executeOnAXThreadIfPossible): Removed the call CFRunLoopRunInMode and instead we'll use setTimeout in each of the tests that require to complete a spin of the main run loop. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::accessibleElementById): Need to retain ObjectiveC object when it is retrieved from the secondary thread. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::getChildrenWithRange): Dito as above. 2020-04-30 Claudio Saavedra [GTK4] Bring back the URI entry to MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=211186 Reviewed by Carlos Garcia Campos. GTK4 support for the URI entry added, using a GtkCenterBox to start layouting a modern version of the toolbar. * MiniBrowser/gtk/BrowserWindow.c: (activateUriEntryCallback): (webViewURIChanged): (updateUriEntryIcon): (faviconChanged): (insertLinkCommandCallback): (browser_window_init): 2020-04-29 Simon Fraser Add a MiniBrowser option to inset the web view so it doesn't fill the window https://bugs.webkit.org/show_bug.cgi?id=211216 Reviewed by Tim Horton. Add a menu item, Debug > Inset Web View to MiniBrowser which insets the view from the edges of the window, making it possible to debug coordinate conversion issues. The state is stored in Settings, but unlike other Settings this one doesn't get populated into the Settings menu because it makes more logical sense grouped with the options to Hide and Remove the web view. * MiniBrowser/mac/BrowserWindowController.h: * MiniBrowser/mac/BrowserWindowController.m: (-[BrowserWindowController toggleFullWindowWebView:]): (-[BrowserWindowController webViewFillsWindow]): (-[BrowserWindowController setWebViewFillsWindow:]): * MiniBrowser/mac/MainMenu.xib: * MiniBrowser/mac/SettingsController.h: * MiniBrowser/mac/SettingsController.m: (-[SettingsController initWithMenu:]): (-[SettingsController webViewFillsWindow]): (-[SettingsController setWebViewFillsWindow:]): * MiniBrowser/mac/WK1BrowserWindowController.m: (-[WK1BrowserWindowController validateMenuItem:]): (-[WK1BrowserWindowController didChangeSettings]): * MiniBrowser/mac/WK2BrowserWindowController.m: (-[WK2BrowserWindowController validateMenuItem:]): (-[WK2BrowserWindowController didChangeSettings]): 2020-04-29 Chris Dumez REGRESSION(r260791) Network process fails to suspend promptly https://bugs.webkit.org/show_bug.cgi?id=211207 Reviewed by Alex Christensen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): 2020-04-29 Kate Cheney Add better handling of an uncleared bundle identifier in WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=211195 Reviewed by Alexey Proskuryakov. * WebKitTestRunner/TestController.cpp: (WTR::TestController::createWebViewWithOptions): 2020-04-29 Saam Barati build-jsc should quote the value of compile flags it forwards https://bugs.webkit.org/show_bug.cgi?id=211204 Reviewed by Mark Lam. We should quote outgoing compile flags that have an equal in them. Before, if build-jsc were invoked like: $ build-jsc --release ARCHS="x86_64 i386" It'd invoke make like: $ make release ARCHS=x86_64 i386 leading us to try to build the "i386" target, which doesn't exist. This patch makes us invoke make like so: $ make release ARCHS="x86_64 i386" * Scripts/build-jsc: (buildMyProject): 2020-04-29 Alex Christensen Add WKNavigationDelegate API shouldAllowDeprecatedTLS https://bugs.webkit.org/show_bug.cgi?id=210981 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: (-[TLSNavigationDelegate receivedShouldAllowDeprecatedTLS]): (-[TLSNavigationDelegate webView:authenticationChallenge:shouldAllowDeprecatedTLS:]): (TestWebKitAPI::TEST): (-[TLSNavigationDelegate receivedShouldAllowLegacyTLS]): Deleted. (-[TLSNavigationDelegate _webView:authenticationChallenge:shouldAllowLegacyTLS:]): Deleted. * TestWebKitAPI/config.h: 2020-04-29 Kate Cheney Refactor layout tests after updates to In-App Browser Privacy https://bugs.webkit.org/show_bug.cgi?id=211146 Reviewed by Brent Fulgham. Removes two unused functions after updating the test cases. setInAppBrowserPrivacyEnabled is no longer needed, setting this in TestOptions is enough. getWebViewCategory is not needed because this patch deletes the only test which uses it. Adds a function to clear app-bound sessions between tests now that multiple tests check for them. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::getWebViewCategory): Deleted. (WTR::TestRunner::callDidReceiveWebViewCategoryCallback): Deleted. (WTR::TestRunner::setInAppBrowserPrivacyEnabled): Deleted. (WTR::TestRunner::callDidSetInAppBrowserPrivacyEnabledCallback): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::createWebViewWithOptions): (WTR::TestController::resetStateToConsistentValues): Move the call to clear the bundle id to happen in resetStateToConsistentValues to make sure the next test can set the value if needed (otherwise results in a call to exit(1)). (WTR::updateTestOptionsFromTestHeader): (WTR::TestController::clearAppBoundSession): (WTR::TestController::getWebViewCategory): Deleted. (WTR::TestController::setInAppBrowserPrivacyEnabled): Deleted. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didSetInAppBrowserPrivacyEnabled): Deleted. (WTR::TestInvocation::didReceiveWebViewCategory): Deleted. * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): App-bound WebViews now require a special configuration argument. This patch adds logic to enable that using a new TestOption. (WTR::TestController::getWebViewCategory): Deleted. 2020-04-29 Aakash Jain [ews] Display flaky test names in build summary when ReRunJavaScriptCoreTests passes https://bugs.webkit.org/show_bug.cgi?id=210855 Reviewed by Jonathan Bedard. * BuildSlaveSupport/ews-build/steps.py: (ReRunJavaScriptCoreTests.evaluateCommand): Display flaky test names in build summary. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests and removed extra TestReRunJavaScriptCoreTests class. 2020-04-29 Carlos Garcia Campos Unreviewed. Fix GTK4 build after r260891 * MiniBrowser/gtk/BrowserWindow.c: 2020-04-29 Claudio Saavedra [GTK] Remove deprecated GTK API calls from MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=211171 Reviewed by Carlos Garcia Campos. In preparation to porting MiniBrowser to GTK4, remove all deprecated API calls. Also get rid of the --geometry command-line argument and make it a no-op. * MiniBrowser/gtk/BrowserDownloadsBar.c: (browser_downloads_bar_init): (browser_downloads_bar_new): (actionButtonClicked): (browser_download_init): (downloadFinished): * MiniBrowser/gtk/BrowserSearchBar.c: (doSearch): (searchEntryMenuIconPressedCallback): (browser_search_bar_init): * MiniBrowser/gtk/BrowserSettingsDialog.c: (browser_settings_dialog_init): * MiniBrowser/gtk/BrowserTab.c: (createInfoBarQuestionMessage): (browserTabConstructed): * MiniBrowser/gtk/BrowserWindow.c: (browserWindowHistoryItemSelected): (browserWindowHistoryItemActivated): (browserWindowCreateBackForwardMenu): (browserWindowUpdateNavigationMenu): (backForwardlistChanged): (updateUriEntryIcon): (webViewIsLoadingChanged): (browserWindowSetupEditorToolbarItem): (browserWindowSetupEditorToolbar): (browserWindowSwitchTab): (browserWindowSetupToolbarItem): (browser_window_init): (browserWindowUpdateNavigationActions): Deleted. * MiniBrowser/gtk/main.c: (main): 2020-04-29 Adrian Perez de Castro [GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup() https://bugs.webkit.org/show_bug.cgi?id=170553 Minor adaptations needed in the API tests to account for the differences between GtkMenuShell and GtkPopoverMenu. Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebKitGtk/TestContextMenu.cpp: (lookupWidgetsWalkChild): Added. (lookupWidgets): Added. 2020-04-28 Said Abou-Hallawa Upgrade motionmark1.1.plan to r260656 https://bugs.webkit.org/show_bug.cgi?id=211143 Reviewed by Darin Adler. r260656 includes a fix for the Multiply test. * Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan: 2020-04-28 Wenson Hsieh [Text manipulation] Add a userInfo dictionary to _WKTextManipulationToken https://bugs.webkit.org/show_bug.cgi?id=211151 Reviewed by Darin Adler. Add a new API test to check the userInfo dictionary on text manipulation tokens. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: 2020-04-28 David Kilzer check-webkit-style should suggest CheckedSize for Checked Reviewed by Darin Adler. * Scripts/webkitpy/style/checkers/cpp.py: (check_wtf_checked_size): Add checker. (check_style): Call check_wtf_checked_size() to check. (CppChecker): Add 'runtime/wtf_checked_size'. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (WebKitStyleTest.test_wtf_checked_size): Add tests. 2020-04-28 Lauro Moura [GTK] update-webkitgtk-libs: TypeError: cannot use a string pattern on a bytes-like object https://bugs.webkit.org/show_bug.cgi?id=211144 Reviewed by Michael Catanzaro. Unconditionally decode the output from the 'id' command to make it work with python3. Also check if the doc directory exists before passing it to bwrap. Should avoid errors like these: bwrap: Can't find source path /run/user/1000/doc: No such file or directory * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2020-04-28 Kate Cheney Create a mechanism to add missing ITP Database tables when the schema is updated https://bugs.webkit.org/show_bug.cgi?id=211004 Reviewed by John Wilander. Add test case which copies a database schema with a missing table into the ITP database file, then ensures the pre-seeded data is migrated over and that the schema now has all tables (including the previously missing one). * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/missingTopFrameUniqueRedirectSameSiteStrictTableSchema.db: Added. * TestWebKitAPI/Tests/WebKitCocoa/missingTopFrameUniqueRedirectSameSiteStrictTableSchema.db-shm: Added. * TestWebKitAPI/Tests/WebKitCocoa/missingTopFrameUniqueRedirectSameSiteStrictTableSchema.db-wal: Added. 2020-04-28 Per Arne Vollan [Cocoa] Global preferences are not accessible in the WebContent process when CFPrefs direct mode is enabled https://bugs.webkit.org/show_bug.cgi?id=211075 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm: (TEST): 2020-04-28 Jonathan Bedard results.webkit.org: A suite running multiple times in a commit for a single configuration may overwrite upload metadata https://bugs.webkit.org/show_bug.cgi?id=211097 Rubber-stamped by Aakash Jain. Create a new table for uploads which is indexed by both uuid and timestamp so that uploads which share a configuration and uuid but not a timestamp do not collide. * resultsdbpy/resultsdbpy/model/upload_context.py: (UploadContext): (UploadContext.UploadsByConfigurationLegacy): Renamed from UploadContext.UploadsByConfiguration. (UploadContext.UploadsByConfiguration): New database table indexed by both timestamp and uuid. (UploadContext.UploadsByConfiguration.unpack): (UploadContext.__init__): (UploadContext.find_test_results): Search both versions of the UploadsByConfiguration table. 2020-04-28 Claudio Saavedra [Linux] Replace --geometry with --fullscreen when using MiniBrowser for WebDriver tests https://bugs.webkit.org/show_bug.cgi?id=211123 Reviewed by Carlos Alberto Lopez Perez. MiniBrowser's --geometry is on its way out, so use --fullscreen instead as it does the job. * Scripts/webkitpy/benchmark_runner/browser_driver/linux_minibrowsergtk_driver.py: (GTKMiniBrowserDriver.launch_url): 2020-04-27 Carlos Garcia Campos [GTK4] Add support for motion events https://bugs.webkit.org/show_bug.cgi?id=211073 Reviewed by Adrian Perez de Castro. Use the GtkOverlay in GTK4 too so that status label is shown when hovering elements. * MiniBrowser/gtk/BrowserTab.c: (browserTabConstructed): 2020-04-28 Carlos Garcia Campos [GTK4][Wayland] Add support for rendering web view contents https://bugs.webkit.org/show_bug.cgi?id=211021 Reviewed by Adrian Perez de Castro. Set vertical expand of web view to TRUE. * MiniBrowser/gtk/BrowserTab.c: (browserTabConstructed): 2020-04-27 Philippe Normand [GTK][WebInspector] platformSave broken when running within the Flatpak runtime https://bugs.webkit.org/show_bug.cgi?id=209473 Reviewed by Adrian Perez de Castro. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): White-list the user document folder into the sandbox. This seems needed by the file-chooser popup, somehow. 2020-04-27 Jonathan Bedard results.webkit.org: A suite running multiple times in a commit for a single configuration may pre-empt processing https://bugs.webkit.org/show_bug.cgi?id=211094 Reviewed by Aakash Jain. Hash collision in processing key when results only differ by upload time. * resultsdbpy/resultsdbpy/model/upload_context.py: (UploadContext.process_test_results): Include upload timestamp in the hashed key. 2020-04-27 Zhifei Fang Add some debug output for run-jsc-stress-tests https://bugs.webkit.org/show_bug.cgi?id=210999 This will help to address where the script get stucked Reviewed by Jonathan Bedard. * Scripts/run-jsc-stress-tests: 2020-04-27 Wenson Hsieh Text manipulation should not aggregate text from different navigation anchor elements https://bugs.webkit.org/show_bug.cgi?id=211081 Reviewed by Megan Gardner. Add a new API test, and augment an existing test. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: 2020-04-27 Jonathan Bedard results.webkit.og: Add investigation endpoint https://bugs.webkit.org/show_bug.cgi?id=209562 Rubber-stamped by Aakash Jain. Add an endpoint that allows users to list all test failures given some criteria, and provide a partial list of failures in the investigation drawer. * resultsdbpy/resultsdbpy/view/static/js/commit.js: (CommitTable): Link commit to investigation endpoint. (_CommitBank.prototype.latest): Populate the CommitBank with the last x commits. (_CommitBank.prototype.commitsDuringUuid): Renamed commitsDuring. (_CommitBank.prototype. commitsDuring): Accept a range Uuids instead of a single Uuid. (_CommitBank.prototype._load): Load a single commit if the before and after uuid match. * resultsdbpy/resultsdbpy/view/static/js/common.js: (paramsToQuery): False should be added as a parameter, if provided. (percentage): Moved from investigate.js. (elapsedTime): Ditto. * resultsdbpy/resultsdbpy/view/static/js/configuration.js: (Configuration.combine): Allow configurations to be combined to a single, more general, configuration. * resultsdbpy/resultsdbpy/view/static/js/failures.js: Added. (Failures.prototype.fromEndpoint): Construct a failure object from the failures endpoint. (Failures.combine): Combine two failure objects together. (Failures): (Failures.prototype.toParams): Convert object to parameters for other results database queries. * resultsdbpy/resultsdbpy/view/static/js/investigate.js: (elapsed): Used shared time elapsed function. (percentage): Moved to common.js. (prioritizedFailures): Return a div with a truncated list of tests which failed. (resultsForData): Include some number of prioritized test failures based on how many bubbles are already displayed. (_InvestigateDrawer.prototype.expand): Dispatch failure request. (_InvestigateDrawer.prototype.dispatch): Start request to failures endpoint. * resultsdbpy/resultsdbpy/view/static/js/timeline.js: (TimelineFromEndpoint.prototype.render.onDotEnterFactory): Add link to investigation endpoint. (Legend): When search parameters change, we need to re-dispatch failure requests. * resultsdbpy/resultsdbpy/view/suite_view.py: (SuiteView._suites_for_investigation): Filter parameters for investigation endpoint. (SuiteView.investigate): Return investigation endpoint html template. * resultsdbpy/resultsdbpy/view/templates/investigate.html: Added. (willFilterExpected): Check if the query parameters indicate that expected failures are to be ignored. (commitsForRange): Return a list of commits for a uuid range. (SuiteFailuresView.constructor): Abstraction to hold the investigation data for a single suite. (SuiteFailuresView.reload): Dispatch requests to the results and failures endpoint to populate investigation data. (SuiteFailuresView.select): By default, failures for different configurations are collapsed into a single view. Allows the user to iterate through each configuration that comprises the view. (SuiteFailuresView.toString): (populateRanges): Either convert the provided arguments to a range to search for failures and results in, or use the most recent commit. (reload): Force all suite views to re-dispatch results and failures requests. * resultsdbpy/resultsdbpy/view/templates/suite_results.html: Add space between suite content and top bar. * resultsdbpy/resultsdbpy/view/view_routes.py: (ViewRoutes.__init__): Add investigate endpoint. 2020-04-27 Tim Horton WebKit.ResizeReversePaginatedWebView is failing (21 pages instead of 20) https://bugs.webkit.org/show_bug.cgi?id=211001 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp: * TestWebKitAPI/Tests/WebKit/lots-of-text-vertical-lr.html: Use Ahem to keep the layout more stable. 2020-04-27 Per Arne Vollan [Cocoa] After r258891, r255119 can be reverted https://bugs.webkit.org/show_bug.cgi?id=211083 Unreviewed revert of r255119. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/MimeTypes.mm: Removed. 2020-04-27 Daniel Bates Caret may be placed in the wrong spot for text input context that is a form control https://bugs.webkit.org/show_bug.cgi?id=210939 Reviewed by Darin Adler. Add a test. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TestWebKitAPI::TEST): 2020-04-27 Alexey Proskuryakov Make run-safari --ios-simulator work again https://bugs.webkit.org/show_bug.cgi?id=211008 Reviewed by Darin Adler. While at it, removed all direct uses of device.plist, and all use of Foundation. * Scripts/webkitdirs.pm: Stopped exporting unused simulator related functions. New code should be using webkitpy. (simulatorDeviceFromJSON): Helper function for parsing simctl output. (iOSSimulatorDevices): Use simctl instead of reading device.plist. (createiOSSimulatorDevice): Device creation appears to be synchronous, I couldn't find any reason for waiting and retrying. (iosSimulatorApplicationsPath): This is part of the actual fix - runtime path built here was incorrect; switched to one provided by simctl. (shutDownIOSSimulatorDevice): Added an early return to avoid stderr spew. (relaunchIOSSimulator): Another part of the actual fix: open Simulator.app before booting the simulator to have it visible; CurrentDeviceUDID doesn't work. (iosSimulatorDeviceByUDID): Stop using device.plist. (runIOSWebKitAppInSimulator): Stop quitting Simulator.app, we only needed to shut down the device. (iOSSimulatorDevicesPath): Deleted. (quitIOSSimulator): Deleted. 2020-04-27 Daniel Bates Text interaction tests should ensure view is not scroll instead of looking for a zoom change https://bugs.webkit.org/show_bug.cgi?id=211056 Reviewed by Dean Jackson. For the text interaction sub-tests, override the scroll view's delegate so as to track whether a scroll occurred or not instead of looking at the zoom scale. As the tests are written looking at the zoom scale is racy. It is simpler and deterministic to detect whether the scroll view scrolled. The purpose of the text interaction sub-tests are to ensure that zooming to reveal the focused element is suppressed until the interaction completes with a call to -_didFinishTextInteractionInTextInputContext. I added some more assertions to ensure this. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (-[TextInteractionScrollDelegate scrollViewDidScroll:]): (TestWebKitAPI::TEST): 2020-04-27 Carlos Garcia Campos [GTK4] Make it possible to build with GTK4 without errors https://bugs.webkit.org/show_bug.cgi?id=210967 Reviewed by Adrian Perez de Castro. * MiniBrowser/gtk/BrowserCellRendererVariant.c: * MiniBrowser/gtk/BrowserCellRendererVariant.h: * MiniBrowser/gtk/BrowserDownloadsBar.c: * MiniBrowser/gtk/BrowserDownloadsBar.h: * MiniBrowser/gtk/BrowserMain.c: Added. (browser_main): (browser_main_quit): * MiniBrowser/gtk/BrowserMain.h: Added. * MiniBrowser/gtk/BrowserSearchBar.c: * MiniBrowser/gtk/BrowserSearchBar.h: * MiniBrowser/gtk/BrowserSettingsDialog.c: * MiniBrowser/gtk/BrowserSettingsDialog.h: * MiniBrowser/gtk/BrowserTab.c: (browserTabConstructed): (browser_tab_start_search): (browser_tab_stop_search): (browser_tab_enter_fullscreen): (browser_tab_leave_fullscreen): * MiniBrowser/gtk/BrowserTab.h: * MiniBrowser/gtk/BrowserWindow.c: (webViewURIChanged): (resetEntryProgress): (webViewLoadProgressChanged): (downloadStarted): (browserWindowUpdateNavigationActions): (webViewReadyToShow): (browserWindowUpdateZoomActions): (webViewZoomLevelChanged): (updateUriEntryIcon): (webViewIsLoadingChanged): (browserWindowFinalize): (browserWindowSetupEditorToolbar): (browserWindowSwitchTab): (browser_window_init): (browser_window_class_init): (browser_window_new): (browser_window_append_view): (browser_window_set_background_color): (browser_window_get_or_create_web_view_for_automation): * MiniBrowser/gtk/CMakeLists.txt: * MiniBrowser/gtk/main.c: (main): * PlatformGTK.cmake: * Scripts/webkitpy/style/checker.py: * TestWebKitAPI/glib/PlatformGTK.cmake: 2020-04-27 Philippe Normand [Flatpak SDK] Regenerate toolchains only if new updates were downloaded https://bugs.webkit.org/show_bug.cgi?id=210804 Reviewed by Žan Doberšek. The SDK toolchain archives are now regenerated only if an actual update was downloaded from the Flatpak repository. Some redundant flatpak calls were removed as well, such as the GL extension and Debug reinstalls that were happening during webkit-flatpak updates. * flatpak/flatpakutils.py: (FlatpakObject.flatpak): (FlatpakRepo.__init__): (WebkitFlatpak.main): (WebkitFlatpak.setup_dev_env): 2020-04-27 Philippe Normand unable to build from tot - linux - flatpakutils.py - TypeError: not enough arguments for format string https://bugs.webkit.org/show_bug.cgi?id=210941 Reviewed by Žan Doberšek. * flatpak/flatpakutils.py: (check_flatpak): Fix error message formating. 2020-04-26 Yoshiaki Jitsukawa [PlayStation] Enable TestWTF and TestWebCore https://bugs.webkit.org/show_bug.cgi?id=208849 Reviewed by Don Olmstead. * TestWebKitAPI/PlatformPlayStation.cmake: * TestWebKitAPI/playstation/main.cpp: Added. (main): Load runtime libraries. 2020-04-26 Yusuke Suzuki Warn when NeverDestroyed is used https://bugs.webkit.org/show_bug.cgi?id=211054 Reviewed by Darin Adler. WTF::Lock and WTF::Condition are designed to be constant-initialize compliant. So NeverDestroyed<> for these types are not necessary, or rather, introducing race condition issue while `static Lock` doesn't have that issue. This patch adds lint rules which prevent us from using `NeverDestroyed` and `LazyNeverDestroyed`. * Scripts/webkitpy/style/checkers/cpp.py: (check_wtf_never_destroyed): (check_style): (CppChecker): * Scripts/webkitpy/style/checkers/cpp_unittest.py: (WebKitStyleTest.test_wtf_never_destroyed): 2020-04-25 Darin Adler [Cocoa] Deal with another round of Xcode upgrade checks https://bugs.webkit.org/show_bug.cgi?id=211027 Reviewed by Alexey Proskuryakov. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Bump the upgrade check version. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Bump the upgrade check version. Add a harmless base localization; this project contains nothing localized. Also let the script sort the project. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Bump the upgrade check version. Add a harmless base localization; this project contains nothing localized. Also let the script sort the project. 2020-04-25 Darin Adler Move URL to use StringView when returning substrings of the URL https://bugs.webkit.org/show_bug.cgi?id=210431 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WTF/URL.cpp: Removed the test for equalIgnoringQueryAndFragment since we removed that function. Updated for rename of URL::password from URL::pass. Updated arguments to isMatchingDomain to pass literals that can be converted to StringView rather than ASCIILiteral, which StringView doesn't yet support. * TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp: (TestWebKitAPI::checkURL): Updated for rename of URL::password from URL::pass. (TestWebKitAPI::checkRelativeURL): Ditto. (TestWebKitAPI::checkURLDifferences): Ditto. (TestWebKitAPI::checkRelativeURLDifferences): Ditto. (TestWebKitAPI::testUserPassword): Ditto. 2020-04-25 Diego Pino Garcia [Flatpak SDK][EWS] Install dependencies step needs configuration as argument https://bugs.webkit.org/show_bug.cgi?id=210913 Follow-up on r260560. The same change is needed for EWS bots. Reviewed by Philippe Normand. * BuildSlaveSupport/ews-build/steps.py: (InstallGtkDependencies): Pass 'configuration' value (Release, Debug). (InstallWpeDependencies): Pass 'configuration' value (Release, Debug). 2020-04-24 Alex Christensen REGRESSION(260485) Payment requests don't do anything https://bugs.webkit.org/show_bug.cgi?id=210997 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): 2020-04-24 Wenson Hsieh Make some more adjustments to TextManipulationController's paragraph boundary heuristic https://bugs.webkit.org/show_bug.cgi?id=210993 Reviewed by Tim Horton. Add a new API test with buttons and links styled with `display: inline-block;`. Additionally, rebaseline an existing API test that exercises inline-block list items. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: 2020-04-24 Chris Dumez [iOS] Always run WKTR's WKWebViews at foreground priority https://bugs.webkit.org/show_bug.cgi?id=210991 Reviewed by Keith Miller. Always run WKTR's WKWebViews at foreground priority. This makes sure that they don't suspend and run at foreground priority on iOS, even if those views are not visible on screen. This is an issue to address flakiness on the bots. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::initializeWebViewConfiguration): 2020-04-24 Kate Cheney Removing website data for a domain should delete corresponding ITP entry https://bugs.webkit.org/show_bug.cgi?id=210864 Reviewed by John Wilander. Created 2 new APIs for testing. One to mimic clearing website data for a domain, and one to check if the domain exists in the database after a deletion was requested. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): (WTR::TestRunner::domainIDExistsInDatabase): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::doesStatisticsDomainIDExistInDatabase): (WTR::TestController::domainIDExistsInDatabase): Deleted. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): 2020-04-24 Antoine Quint Update the css/css-animations WPT tests https://bugs.webkit.org/show_bug.cgi?id=210964 Reviewed by Dean Jackson. Turn on the CSSCustomPropertiesAndValues experimental feature which a new test relies on. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * DumpRenderTree/win/DumpRenderTree.cpp: (enableExperimentalFeatures): 2020-04-24 David Kilzer check-webkit-style should recognize *Internal.h and *Private.h as primary headers Reviewed by Darin Adler. * Scripts/webkitpy/style/checkers/cpp.py: (_classify_include): If a header has an "Internal.h" or a "Private.h" suffix with the same base name as the source file, consider it a primary header--the header that comes after "config.h". * Scripts/webkitpy/style/checkers/cpp_unittest.py: (OrderOfIncludesTest.test_classify_include): Add tests. 2020-04-24 Alex Christensen SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation https://bugs.webkit.org/show_bug.cgi?id=210533 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: (-[TLSNavigationDelegate waitForDidNegotiateModernTLS]): (-[TLSNavigationDelegate _webView:didNegotiateModernTLS:]): (TestWebKitAPI::TEST): 2020-04-24 Brian Burg webkitpy: update autoinstalled mozprocess dependency to 1.1.0 (adds python3 support) https://bugs.webkit.org/show_bug.cgi?id=210220 Reviewed by Anders Carlsson. * Scripts/webkitpy/thirdparty/__init__.py: (AutoinstallImportHook._install_mozprocess): 2020-04-24 Philippe Normand [GTK][WPE] White-list more GStreamer environment variables in webkitpy https://bugs.webkit.org/show_bug.cgi?id=210854 Reviewed by Carlos Alberto Lopez Perez. Extra variables need to be white-listed when the webkitpy tooling runs inside a gst-build environment, those variables are needed so that uninstalled GStreamer plugins are correctly picked up. Additionally we now correctly white-list the WEBKIT_GST_USE_PLAYBIN3 env var. USE_PLAYBIN3 shouldn't be used anymore. * Scripts/webkitpy/port/gtk.py: (GtkPort.setup_environ_for_server): * Scripts/webkitpy/port/wpe.py: (WPEPort.setup_environ_for_server): 2020-04-23 Yusuke Suzuki stress/ensure-crash.js shouldn't spew stuff onto my screen https://bugs.webkit.org/show_bug.cgi?id=210931 Reviewed by Ross Kirsling. Set noisyOutputHandler when crash! is specified. We also specify noisyOutputHandler for runComplexTest. * Scripts/run-jsc-stress-tests: * Scripts/webkitruby/jsc-stress-test-writer-default.rb: * Scripts/webkitruby/jsc-stress-test-writer-playstation.rb: * Scripts/webkitruby/jsc-stress-test-writer-ruby.rb: 2020-04-23 Yusuke Suzuki Disable useKernTCSM=false for JSC stress tests to make EWS faster https://bugs.webkit.org/show_bug.cgi?id=210950 Reviewed by Mark Lam. This patch removes "JSC_useKernTCSM=false" environment variable in JSC stress tests. Alexey found that this causes EWS JSC stress tests slow down (from roughly 63 mins to 83 mins). This slow down happens in Mac Pro (which is used in JSC EWS right now), and this slow down does not happen in Mac mini (post-commit buildbot) and rather improves Mac Mini execution time by 15%, but keeping EWS faster is more important than making post-commit bots faster. * Scripts/run-javascriptcore-tests: 2020-04-23 Yusuke Suzuki Support `--report-execution-time` to report execution time for each JSC stress test https://bugs.webkit.org/show_bug.cgi?id=210938 Reviewed by Saam Barati. We can run `run-javascriptcore-tests` with `--report-execution-time` option to report execution time for each JSC stress test, to figure out which test is taking a long time. It appends execution-time to the verbose log. To see it stderr, --verbose is also required. $ run-javascriptcore-tests .... --verbose --report-execution-time * Scripts/run-javascriptcore-tests: (runJSCStressTests): * Scripts/run-jsc-stress-tests: * Scripts/webkitruby/jsc-stress-test-writer-default.rb: 2020-04-23 Wenson Hsieh Text manipulation does not account for text in fully clipped containers https://bugs.webkit.org/show_bug.cgi?id=210940 Reviewed by Tim Horton. Add a new text manipulation API test. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-04-23 Jer Noble REGRESSION (r260278): TestWebKitAPI.Fullscreen.Delegate is timing out on macOS bots https://bugs.webkit.org/show_bug.cgi?id=210676 Reviewed by Daniel Bates. A number of API tests modify the WKWebViewConfiguration after calling -[WKWebView initWithFrame:configuration:], which could be a source of failures or flakiness. Update these tests to set those configuration values before passing the configuration to WKWebView. * TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm: (TestWebKitAPI::TEST): 2020-04-23 Saam Barati DumpRenderTree should have the JIT entitlement on Mac https://bugs.webkit.org/show_bug.cgi?id=210887 Reviewed by Tim Horton. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/mac/Configurations/Base.xcconfig: * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: * DumpRenderTree/mac/Configurations/DumpRenderTree.entitlements: Added. * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: 2020-04-23 Kate Cheney All ITP database tables should reference the ObservedDomains table on DELETE CASCADE https://bugs.webkit.org/show_bug.cgi?id=210874 Reviewed by Brady Eidson. Adds a new database file with pre-entered values and the old schema. Adds an API test which checks if the data was migrated after initializing the ITP database. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/incorrectCreateTableSchema.db: Added. * TestWebKitAPI/Tests/WebKitCocoa/incorrectCreateTableSchema.db-shm: Added. * TestWebKitAPI/Tests/WebKitCocoa/incorrectCreateTableSchema.db-wal: Added. 2020-04-23 Don Olmstead [CMake] CMAKE_BINARY_DIR should always be a PRIVATE include directory https://bugs.webkit.org/show_bug.cgi?id=196717 Reviewed by Michael Catanzaro. Include CMAKE_BINARY_DIR. * MiniBrowser/gtk/CMakeLists.txt: * TestWebKitAPI/glib/CMakeLists.txt: 2020-04-23 Ryan Haddad Unreviewed, reverting r260552. Broke internal builds. Reverted changeset: "DumpRenderTree should have the JIT entitlement on Mac" https://bugs.webkit.org/show_bug.cgi?id=210887 https://trac.webkit.org/changeset/260552 2020-04-23 Wenson Hsieh Add a heuristic for text manipulation to treat some list items as paragraph boundaries https://bugs.webkit.org/show_bug.cgi?id=210915 Reviewed by Megan Gardner. Add a new API test to exercise text manipulation over several different cases of lists and list items. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-04-23 Commit Queue Unreviewed, reverting r260562. https://bugs.webkit.org/show_bug.cgi?id=210924 It caused 3 new failures and 1 timeout in GTK API tests (Requested by clopez on #webkit). Reverted changeset: "[GTK][WPE] White-list more GStreamer environment variables in webkitpy" https://bugs.webkit.org/show_bug.cgi?id=210854 https://trac.webkit.org/changeset/260562 2020-04-23 Sihui Liu TextManipulationController should set range of paragraph using token's positions https://bugs.webkit.org/show_bug.cgi?id=210866 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-04-23 Emilio Cobos Álvarez Unreviewed, add my bugzilla / slack nick to contributors.json * Scripts/webkitpy/common/config/contributors.json: 2020-04-23 Philippe Normand [JHBuild] Add mock release/debug options to the update script Rubber-stamped by Carlos Alberto Lopez Perez. These options are now required after r260560. They're not used though because JHBuild itself doesn't have the notion of build configuration, unlike the Flatpak SDK. * Scripts/update-webkit-libs-jhbuild: 2020-04-23 Philippe Normand [GTK][WPE] White-list more GStreamer environment variables in webkitpy https://bugs.webkit.org/show_bug.cgi?id=210854 Reviewed by Adrian Perez de Castro. Extra variables need to be white-listed when the webkitpy tooling runs inside a gst-build environment, those variables are needed so that uninstalled GStreamer plugins are correctly picked up. Additionally we now correctly white-list the WEBKIT_GST_USE_PLAYBIN3 env var. USE_PLAYBIN3 shouldn't be used anymore. * Scripts/webkitpy/port/gtk.py: (GtkPort.setup_environ_for_server): * Scripts/webkitpy/port/wpe.py: (WPEPort.setup_environ_for_server): 2020-04-23 Diego Pino Garcia [Flatpak SDK] Install dependencies step needs configuration as argument https://bugs.webkit.org/show_bug.cgi?id=210898 Reviewed by Philippe Normand. * BuildSlaveSupport/build.webkit.org-config/steps.py: (InstallGtkDependencies): Pass 'configuration' value (Release, Debug). (InstallWpeDependencies): Pass 'configuration' value (Release, Debug). 2020-04-22 Darin Adler [Cocoa] Build with UChar as char16_t even in builds that use Apple's internal SDK https://bugs.webkit.org/show_bug.cgi?id=210845 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: (TestWebKitAPI::TEST): Get rid of an obsolete cast to unsigned to work around uint16_t not being treated as a number by makeString. * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: (TestWebKitAPI::TEST): Ditto. * TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm: (TestWebKitAPI::TEST): Ditto. * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (TestWebKitAPI::TEST): Ditto. * TestWebKitAPI/Tests/WebKit/EnvironmentUtilitiesTest.cpp: Add an include needed since EvironmentUtilities.h now includes less. 2020-04-22 Saam Barati DumpRenderTree should have the JIT entitlement on Mac https://bugs.webkit.org/show_bug.cgi?id=210887 Reviewed by Tim Horton. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: * DumpRenderTree/mac/Configurations/DumpRenderTree.entitlements: Added. * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: 2020-04-22 Chris Dumez [iOS] Expose -_webView:willGoToBackForwardListItem:inPageCache: https://bugs.webkit.org/show_bug.cgi?id=210878 Reviewed by Alex Christensen. Enable corresponding API test on iOS. * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: 2020-04-22 Daniel Bates Add a test for -focusTextInputContext on a field in detached frame https://bugs.webkit.org/show_bug.cgi?id=210704 Reviewed by Wenson Hsieh. Calling -focusTextInputContext on a field in a detached frame should not cause a focus change. Add a test to ensure this behavior doesn't regress. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TEST): 2020-04-22 Don Olmstead [CMake] Use WEBKIT_EXECUTABLE in WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=210132 Reviewed by Adrian Perez de Castro. Modify CMake code to use WEBKIT_EXECUTABLE when creating WebKitTestRunner. * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/PlatformFTW.cmake: * WebKitTestRunner/PlatformGTK.cmake: * WebKitTestRunner/PlatformWPE.cmake: * WebKitTestRunner/PlatformWin.cmake: 2020-04-22 Don Olmstead [CMake] Add WebKit::WebCoreTestSupport target https://bugs.webkit.org/show_bug.cgi?id=210867 Reviewed by Michael Catanzaro. Use the WebKit::WebCoreTestSupport target in DumpRenderTree. Fix an include for WPE in WebKitTestRunner. * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/PlatformWin.cmake: * WebKitTestRunner/PlatformWPE.cmake: 2020-04-22 Sihui Liu TextManipulation.CompleteTextManipulationAvoidCrashingWhenContentIsRemoved does not wait for result https://bugs.webkit.org/show_bug.cgi?id=210871 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST): 2020-04-22 Alex Christensen Add unit test for resuming downloads https://bugs.webkit.org/show_bug.cgi?id=210852 Reviewed by Brady Eidson. This is a test that we should've written years ago. I made HTTPServer able to take a Function that takes a nw_connection_t to give it more power than declarative request/response pairs. I made TestDownloadDelegate to be reused by future tests, like those I'm going to add for bug 210313. * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (longString): (TEST): * TestWebKitAPI/cocoa/HTTPServer.h: (TestWebKitAPI::HTTPServer::totalRequests const): Deleted. * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::RequestData::RequestData): (TestWebKitAPI::HTTPServer::listenerParameters): (TestWebKitAPI::startListening): (TestWebKitAPI::HTTPServer::HTTPServer): (TestWebKitAPI::HTTPServer::totalRequests const): (TestWebKitAPI::dataFromString): (TestWebKitAPI::nullTerminatedRequest): (TestWebKitAPI::HTTPServer::respondToRequests): * TestWebKitAPI/cocoa/TestDownloadDelegate.h: Added. * TestWebKitAPI/cocoa/TestDownloadDelegate.mm: Added. (-[TestDownloadDelegate _downloadDidStart:]): (-[TestDownloadDelegate _download:didReceiveServerRedirectToURL:]): (-[TestDownloadDelegate _download:didReceiveResponse:]): (-[TestDownloadDelegate _download:didReceiveData:]): (-[TestDownloadDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]): (-[TestDownloadDelegate _downloadDidFinish:]): (-[TestDownloadDelegate _download:didFailWithError:]): (-[TestDownloadDelegate _downloadDidCancel:]): (-[TestDownloadDelegate _download:didReceiveAuthenticationChallenge:completionHandler:]): (-[TestDownloadDelegate _download:didCreateDestination:]): * TestWebKitAPI/cocoa/TestNavigationDelegate.h: * TestWebKitAPI/cocoa/TestNavigationDelegate.mm: (-[TestNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]): 2020-04-22 Saam Barati makeValueRefForValue should be robust against the type encoding of a NSNumber backed by a boolean https://bugs.webkit.org/show_bug.cgi?id=210821 Reviewed by Tim Horton. * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: (makeValueRefForValue): 2020-04-21 Ryan Haddad Unreviewed, reverting r260410. Caused crashes in Safari Reverted changeset: "SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation" https://bugs.webkit.org/show_bug.cgi?id=210533 https://trac.webkit.org/changeset/260410 2020-04-21 Cathie Chen REGRESSION (r254790): No longer get smooth scrolling on music.apple.com https://bugs.webkit.org/show_bug.cgi?id=210634 Reviewed by Darin Adler. Add settings-flag. Add support for CSSOMViewSmoothScrolling on Windows DumpRenderTree. * DumpRenderTree/win/DumpRenderTree.cpp: (enableExperimentalFeatures): (setWebPreferencesForTestOptions): * Scripts/webkitpy/style/checkers/jsonchecker.py: (JSONCSSPropertiesChecker.check_codegen_properties): 2020-04-21 Peng Liu Fix MACCATALYST build failures https://bugs.webkit.org/show_bug.cgi?id=210815 Reviewed by Tim Horton. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-04-19 Darin Adler [Cocoa] Use createNSArray in many more places that build NSArray objects from C++ collections https://bugs.webkit.org/show_bug.cgi?id=210702 Reviewed by Alex Christensen. * DumpRenderTree/mac/DumpRenderTree.mm: (activateTestingFonts): Use constexpr and NSString instead of a null-pointer terminated array for the font names. Use createNSArray. * DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]): Use createNSArray. * Scripts/webkitpy/style/checkers/cpp.py: (find_parameter_name_index): Fixed a spelling error. (_check_parameter_name_against_text): Added a special case to not complain that parameters named "]" have redundant names. Not obvious to me how to write a test case for this and how to fix this in a more sensible way, but immediately helpful to not get this spurious warning. * WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm: (WTR::activateSystemCoreWebFonts): Use constexpr array instead of NSArray for font names. (WTR::activateFonts): Use constexpr and NSString instead of a null-pointer terminated array for the font names. Use createNSArray. 2020-04-21 Matt Lewis Bindings-test should not depend on current working directory. https://bugs.webkit.org/show_bug.cgi?id=210831 Reviewed by Jonathan Bedard. * Scripts/webkitpy/bindings/main.py: (BindingsTests.main): 2020-04-21 Daniel Bates Attempt to fix the build after r260449 (https://bugs.webkit.org/show_bug.cgi?id=210697) Wrap the C++ methods in namespace TestWebKitAPI so that IPhoneUserInterfaceSwizzler can be used unqualified. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: 2020-04-21 Darin Adler WTF API test for StringConcatenate failing for internal Apple builds https://bugs.webkit.org/show_bug.cgi?id=210812 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: (TestWebKitAPI::TEST): Add back a case for when UChar is uint16_t. 2020-04-21 Kate Cheney Move WebKit.WebViewCategory test to InAppBrowserPrivacy.mm https://bugs.webkit.org/show_bug.cgi?id=210811 Reviewed by Alexey Proskuryakov. This test was added before InAppBrowserPrivacy.mm existed. It should be moved here so it has access to all setup/cleanup needed by these tests. * TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm: * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: 2020-04-21 Daniel Bates [iOS] -_didFinishTextInteractionInTextInputContext should only zoom to reveal focused element if it changed https://bugs.webkit.org/show_bug.cgi?id=210697 Reviewed by Wenson Hsieh. I use the term "assisted" below and in the tests to describe an element that is both DOM focused and the UI process is showing an input view (like the software keyboard) for it. For many of the tests I check for a zoom scale change as a way to detect if the page zoomed to reveal the focused element. Add some tests for the following cases: 1. Place the caret in a focused field that isn't being assisted. 2. Focusing an assisted element should not scroll the page. 3. Focusing an offscreen read-only element should not change zoom scale. 4. Focusing an offscreen element should change the zoom scale. 5. Calling -_focusTextInputContext on an offscreen element multiple times during a text interaction should change the zoom scale. The purpose of this test is to ensure that later calls that do not focus the element (because it is already focused) don't prevent zooming for the first call that did focus the element. 6. Focusing an offscreen element, defocusing it, disabling it, and focusing it again during a text interaction should not change zoom scale. 7. Focusing an offscreen element, defocusing it, and focusing it again during a text interaction should change zoom scale. 8. Focusing an assisted element during a text interaction should not change zoom scale. 9. Focusing a non-assisted focused element during a text interaction should change zoom scale. While I am here, I consolidated the RAII helper classes IPhoneUserInterfaceSwizzler and IPadUserInterfaceSwizzler into a single UserInterfaceSwizzler templated class and defined the former two as template instances. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TextInteractionForScope::TextInteractionForScope): (TextInteractionForScope::~TextInteractionForScope): Added convenience RAII object to call -_willBeginTextInteractionInTextInputContext and -_didFinishTextInteractionInTextInputContext. (TEST): Added. * TestWebKitAPI/Tests/ios/ActionSheetTests.mm: * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: * TestWebKitAPI/ios/IPadUserInterfaceSwizzler.h: Removed. * TestWebKitAPI/ios/PreferredContentMode.mm: (IPhoneUserInterfaceSwizzler::IPhoneUserInterfaceSwizzler): Deleted; movedinto UserInterfaceSwizzler.h. (IPhoneUserInterfaceSwizzler::phoneUserInterfaceIdiom): Deleted; no longer needed. * TestWebKitAPI/ios/UserInterfaceSwizzler.h: Renamed from Tools/TestWebKitAPI/ios/IPadUserInterfaceSwizzler.h. (TestWebKitAPI::UserInterfaceSwizzler::UserInterfaceSwizzler): Formerly named IPadUserInterfaceSwizzler; repurposed into general purpose template class, consolidating code from PreferredContentMode.mm. Privately inherits from InstanceMethodSwizzler instead of using composition as that simplifies the source code a tiny bit. (TestWebKitAPI::UserInterfaceSwizzler::effectiveUserInterfaceIdiom): Renamed; formerly padUserInterfaceIdiom. 2020-04-21 Timothy Hatcher Reset m_userScriptsNotified when web process crashes. https://bugs.webkit.org/show_bug.cgi?id=210807 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: (TEST): Test crashing the web process and reloading. 2020-04-21 Aakash Jain [ews] Display error message when submit for EWS analysis button doesn't work https://bugs.webkit.org/show_bug.cgi?id=210803 Reviewed by Jonathan Bedard. * BuildSlaveSupport/ews-app/ews/views/submittoews.py: (SubmitToEWS.post): Display relevant error message on submit for EWS analysis button failure. * BuildSlaveSupport/ews-app/ews/fetcher.py: (BugzillaPatchFetcher.fetch): (BugzillaPatchFetcher.send_patches_to_buildbot): * BuildSlaveSupport/ews-app/ews/config.py: Add few more error codes. 2020-04-21 Lauro Moura [GStreamer][JHBuild] Update to 1.16.2 https://bugs.webkit.org/show_bug.cgi?id=210730 Reviewed by Philippe Normand. Moving the bots closer to the flatpak SDK versions. * gstreamer/jhbuild.modules: * gstreamer/patches/base-0001-glupload-Add-VideoMetas-and-GLSyncMeta-to-the-raw-up.patch: Removed. 2020-04-21 Alexey Proskuryakov Correct the path to libclang_rt.asan_iossim_dynamic.dylib in LC_RPATH https://bugs.webkit.org/show_bug.cgi?id=210770 rdar://problem/61904541 Reviewed by Alex Christensen. * asan/asan.xcconfig: 2020-04-21 Diego Pino Garcia [Flatpak SDK] Keep env variable 'RESULTS_SERVER_API_KEY' https://bugs.webkit.org/show_bug.cgi?id=210798 Reviewed by Philippe Normand. The variable is needed by several bot steps to upload results. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2020-04-21 Adrian Perez de Castro [GTK][CMake] Make gtk-unix-print a component of FindGTK.cmake https://bugs.webkit.org/show_bug.cgi?id=210792 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/glib/PlatformGTK.cmake: Use the GTK::UnixPrint imported target. 2020-04-21 Philippe Normand [Flatpak SDK] Silence git stderr output https://bugs.webkit.org/show_bug.cgi?id=210789 Reviewed by Sergio Villar Senin. * flatpak/flatpakutils.py: (WebkitFlatpak.is_branch_build): Don't display git errors, usually emitted when operating on a SVN checkout. 2020-04-21 Philippe Normand [CMake][Flatpak SDK] gst-build-backed build fails https://bugs.webkit.org/show_bug.cgi?id=210742 Reviewed by Xabier Rodriguez-Calvar. Add non-core GStreamer include-dirs necessary for the compilation of the GStreamer API test. Usually GSTREAMER_INCLUDE_DIRS is sufficient because on a GStreamer system-wide installation, all headers are stored in the same root include dir, the same as the core GStreamer library. But when building with gst-build, include-dirs are scattered all over the place. * TestWebKitAPI/PlatformGTK.cmake: * TestWebKitAPI/PlatformWPE.cmake: 2020-04-20 Ross Kirsling Classes marked final should not use protected access specifier https://bugs.webkit.org/show_bug.cgi?id=210775 Reviewed by Daniel Bates. * DumpRenderTree/win/DefaultPolicyDelegate.h: * DumpRenderTree/win/UIDelegate.h: 2020-04-20 Peng Liu Fix build failures when video fullscreen and picture-in-picture is disabled https://bugs.webkit.org/show_bug.cgi?id=210777 Reviewed by Eric Carlson. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2020-04-20 Alex Christensen SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation https://bugs.webkit.org/show_bug.cgi?id=210533 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: (-[TLSNavigationDelegate waitForDidNegotiateModernTLS]): (-[TLSNavigationDelegate _webView:didNegotiateModernTLS:]): (TestWebKitAPI::TEST): 2020-04-20 Kate Cheney App-bound domain behavior should abide by the limitsNavigationsToAppBoundDomains argument in WKWebView configuration https://bugs.webkit.org/show_bug.cgi?id=210769 Reviewed by Brent Fulgham. Removes any tests for swapping between app-bound and non app-bound domains as this behavior is no longer supported. Sets the limitsNavigationsToAppBoundDomains flag for tests which should have app-bound behavior to maintain test functionality. Adds 5 new tests for new behavior. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (TEST): (-[AppBoundDomainDelegate webView:didFinishNavigation:]): (-[AppBoundDomainDelegate webView:didFailProvisionalNavigation:withError:]): (-[AppBoundDomainDelegate waitForDidFinishNavigation]): (-[AppBoundDomainDelegate waitForDidFailProvisionalNavigationError]): 2020-04-20 Megan Gardner Date and Time form controls not showing correct initial values on immediate second invocation. https://bugs.webkit.org/show_bug.cgi?id=210613 Reviewed by Wenson Hsieh. * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.h: (WTR::UIScriptController::timePickerValueHour const): (WTR::UIScriptController::timePickerValueMinute const): * WebKitTestRunner/ios/UIScriptControllerIOS.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::timePickerValueHour const): (WTR::UIScriptControllerIOS::timePickerValueMinute const): 2020-04-20 Wenson Hsieh Text manipulation sometimes fails to replace text in title elements https://bugs.webkit.org/show_bug.cgi?id=210750 Reviewed by Tim Horton and Darin Adler. Add a new API test to verify that a single title or option element may be replaced with multiple tokens, as long as all the token identifiers match. * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: 2020-04-20 Stephan Szabo [PlayStation] Fix build after r260277 https://bugs.webkit.org/show_bug.cgi?id=210756 Reviewed by Don Olmstead. * TestWebKitAPI/PlatformPlayStation.cmake: 2020-04-20 Wenson Hsieh Oversized caret and selection rects in text fields on ganji.com and netflix.com/login https://bugs.webkit.org/show_bug.cgi?id=210622 Reviewed by Darin Adler. Rebaseline some expected selection and caret rects in some iOS API tests. * TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: (TEST): * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (TestWebKitAPI::TEST): 2020-04-20 Darin Adler Use #import instead of #include in Objective-C and don't use #pragma once https://bugs.webkit.org/show_bug.cgi?id=210724 Reviewed by David Kilzer. * DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm: * DumpRenderTree/ios/DumpRenderTreeAppMain.mm: * DumpRenderTree/mac/AccessibilityCommonMac.h: * DumpRenderTree/mac/DumpRenderTreeMain.mm: * TestRunnerShared/cocoa/ClassMethodSwizzler.mm: * TestRunnerShared/cocoa/InstanceMethodSwizzler.mm: * TestRunnerShared/cocoa/LayoutTestSpellChecker.h: * TestRunnerShared/mac/NSPasteboardAdditions.h: * TestRunnerShared/spi/AppKitTestSPI.h: * TestRunnerShared/spi/PencilKitTestSPI.h: * TestWebKitAPI/DataDetectorsCoreSPI.h: * TestWebKitAPI/EditingTestHarness.h: * TestWebKitAPI/EditingTestHarness.mm: * TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: * TestWebKitAPI/Tests/WebCore/LineBreaking.mm: * TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm: * TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: * TestWebKitAPI/Tests/WebKit/AGXCompilerService.mm: * TestWebKitAPI/Tests/WebKit/AccessibilityRemoteUIApp.mm: * TestWebKitAPI/Tests/WebKit/BacklightLevelNotification.mm: * TestWebKitAPI/Tests/WebKit/Battery.mm: * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm: * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm: * TestWebKitAPI/Tests/WebKit/FindMatches.mm: * TestWebKitAPI/Tests/WebKit/GrantAccessToMobileAssets.mm: * TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm: * TestWebKitAPI/Tests/WebKit/LocalizedDeviceModel.mm: * TestWebKitAPI/Tests/WebKit/MimeTypes.mm: * TestWebKitAPI/Tests/WebKit/NoHistoryItemScrollToFragment.mm: * TestWebKitAPI/Tests/WebKit/PasteboardNotifications.mm: * TestWebKitAPI/Tests/WebKit/PictureInPictureSupport.mm: * TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm: * TestWebKitAPI/Tests/WebKit/SleepDisabler.mm: * TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm: * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm: * TestWebKitAPI/Tests/WebKit/WebFilter.mm: * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm: * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm: * TestWebKitAPI/Tests/WebKit/mac/CustomBundleObject.h: * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm: * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter_Bundle.mm: * TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm: * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm: * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm: * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: * TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewAfterEnterFullscreen.mm: * TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewDuringEnterFullscreen.mm: * TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm: * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm: * TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm: * TestWebKitAPI/Tests/WebKitCocoa/CopyRTF.mm: * TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm: * TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm: * TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm: * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm: * TestWebKitAPI/Tests/WebKitCocoa/DeviceManagementRestrictions.mm: * TestWebKitAPI/Tests/WebKitCocoa/DoAfterNextPresentationUpdateAfterCrash.mm: * TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm: * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: * TestWebKitAPI/Tests/WebKitCocoa/FindInPageAPI.mm: * TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm: * TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm: * TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm: * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: * TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm: * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: * TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm: * TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm: * TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm: * TestWebKitAPI/Tests/WebKitCocoa/LoadFileURL.mm: * TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm: * TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm: * TestWebKitAPI/Tests/WebKitCocoa/MediaType.mm: * TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm: * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: * TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm: * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm: * TestWebKitAPI/Tests/WebKitCocoa/NoPauseWhenSwitchingTabs.mm: * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: * TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm: * TestWebKitAPI/Tests/WebKitCocoa/ObservedRenderingProgressEventsAfterCrash.mm: * TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm: * TestWebKitAPI/Tests/WebKitCocoa/OverrideViewportArguments.mm: * TestWebKitAPI/Tests/WebKitCocoa/PageZoom.mm: * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm: * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm: * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm: * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: * TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm: * TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm: * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm: * TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm: * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: * TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm: * TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm: * TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm: * TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm: * TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm: * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm: * TestWebKitAPI/Tests/WebKitCocoa/TabOutOfWebView.mm: * TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h: * TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.mm: * TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: * TestWebKitAPI/Tests/WebKitCocoa/TextSize.mm: * TestWebKitAPI/Tests/WebKitCocoa/TextWidth.mm: * TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm: * TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm: * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm: * TestWebKitAPI/Tests/WebKitCocoa/VideoQualityDisplayCompositing.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: * TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm: * TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm: * TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm: * TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm: * TestWebKitAPI/Tests/ios/DataDetectorsTestIOS.mm: * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: * TestWebKitAPI/Tests/ios/OverflowScrollViewTests.mm: * TestWebKitAPI/Tests/ios/RenderingProgressTests.mm: * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: * TestWebKitAPI/Tests/ios/ScrollViewScrollabilityTests.mm: * TestWebKitAPI/Tests/ios/SelectionByWord.mm: * TestWebKitAPI/Tests/ios/SelectionModifyByParagraphBoundary.mm: * TestWebKitAPI/Tests/ios/TestInputDelegate.h: * TestWebKitAPI/Tests/ios/TestInputDelegate.mm: * TestWebKitAPI/Tests/ios/TextAutosizingBoost.mm: * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm: * TestWebKitAPI/Tests/ios/WKScrollViewTests.mm: * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm: * TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm: * TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm: * TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm: * TestWebKitAPI/Tests/mac/BackForwardList.mm: * TestWebKitAPI/Tests/mac/BackgroundColor.mm: * TestWebKitAPI/Tests/mac/CandidateTests.mm: * TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm: * TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm: * TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm: * TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm: * TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm: * TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm: * TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm: * TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm: * TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm: * TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm: * TestWebKitAPI/Tests/mac/SetDocumentURI.mm: * TestWebKitAPI/Tests/mac/SimplifyMarkup.mm: * TestWebKitAPI/Tests/mac/SubresourceErrorCrash.mm: * TestWebKitAPI/Tests/mac/TypingStyleCrash.mm: * TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm: * TestWebKitAPI/Tests/mac/WebScriptObjectDescription.mm: * TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm: * TestWebKitAPI/cocoa/DragAndDropSimulator.h: * TestWebKitAPI/cocoa/NSItemProviderAdditions.h: * TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm: * TestWebKitAPI/cocoa/TestContextMenuDriver.h: * TestWebKitAPI/cocoa/TestNavigationDelegate.h: * TestWebKitAPI/cocoa/TestProtocol.mm: * TestWebKitAPI/cocoa/TestUIDelegate.h: * TestWebKitAPI/cocoa/UtilitiesCocoa.mm: * TestWebKitAPI/ios/PencilKitTestSPI.h: * TestWebKitAPI/mac/JavaScriptTestMac.mm: * TestWebKitAPI/mac/NSFontPanelTesting.h: * TestWebKitAPI/mac/NSFontPanelTesting.mm: * TestWebKitAPI/mac/OffscreenWindow.h: * TestWebKitAPI/mac/PlatformUtilitiesMac.mm: * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.mm: * TestWebKitAPI/mac/TestDraggingInfo.h: * TestWebKitAPI/mac/TestFilePromiseReceiver.h: * TestWebKitAPI/mac/TestFontOptions.h: * TestWebKitAPI/mac/TestInspectorBar.h: * TestWebKitAPI/mac/WebKitAgnosticTest.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h: * WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h: * WebKitTestRunner/mac/PoseAsClass.mm: More #import, less #pragma once. 2020-04-20 Diego Pino Garcia [Flatpak SDK] Prevent exception when calling git in a non-git repository https://bugs.webkit.org/show_bug.cgi?id=210737 Reviewed by Philippe Normand. * flatpak/flatpakutils.py: (WebkitFlatpak.is_branch_build): Return false if command executes in a non-git repository (i.e SVN). 2020-04-20 Philippe Normand [Flatpak SDK] Drive-by fixes https://bugs.webkit.org/show_bug.cgi?id=210557 Reviewed by Žan Doberšek. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): Properly format error message. (WebkitFlatpak.main): Show flatpak update output. 2020-04-20 Sergio Villar Senin [WebXR][WPE] Let XR_RUNTIME_JSON environment variable go through for testing https://bugs.webkit.org/show_bug.cgi?id=210738 Reviewed by Žan Doberšek. The OpenXR loader might be instructed to load a specific runtime by using the XR_RUNTIME_JSON environment variable. Let it get in for testing. * Scripts/webkitpy/port/wpe.py: (WPEPort.setup_environ_for_server): Copy XR_RUNTIME_JSON if set. 2020-04-20 Carlos Garcia Campos [GTK][WPE] Enable resource load statistics https://bugs.webkit.org/show_bug.cgi?id=210184 Reviewed by Žan Doberšek. Implement TestController::loadedThirdPartyDomains() and TestController::clearLoadedThirdPartyDomains() for non-cocoa ports. * WebKitTestRunner/TestController.cpp: (WTR::LoadedThirdPartyDomainsCallbackContext::LoadedThirdPartyDomainsCallbackContext): (WTR::loadedThirdPartyDomainsCallback): (WTR::TestController::loadedThirdPartyDomains): (WTR::TestController::clearLoadedThirdPartyDomains): 2020-04-20 David Kilzer check-webkit-style should not complain about missing config.h header in WebKitLegacy source files Reviewed by Darin Adler. * Scripts/webkitpy/style/checkers/cpp.py: (_NO_CONFIG_H_PATH_PATTERNS): - Add '^Source/WebKitLegacy/' to the list. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (OrderOfIncludesTest.test_primary_header): - Add test for Source/WebKitLegacy source file. 2020-04-19 Brady Eidson Add WKScriptMessageHandler API that asynchronously responds with a promise. rdar://problem/57243492 and https://bugs.webkit.org/show_bug.cgi?id=206398 Reviewed by Andy Estes. * TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: (TEST): (webViewForScriptMessageHandlerMultipleHandlerRemovalTest): (-[AsyncScriptMessageHandler userContentController:didReceiveScriptMessage:replyHandler:]): 2020-04-19 Ross Kirsling [ECMA-402] Intl.RelativeTimeFormat missing in WebKit https://bugs.webkit.org/show_bug.cgi?id=209770 Reviewed by Darin Adler. * Scripts/run-jsc-stress-tests: Add runIntlRelativeTimeFormatEnabled. 2020-04-19 Don Olmstead [CMake] Consolidate TestNetscapePlugin build https://bugs.webkit.org/show_bug.cgi?id=210691 Reviewed by Fujii Hironori. The DumpRenderTree CMakeLists.txt contained a definition of TestNetscapePlugIn which was used for WebKitLegacy ports. The TestNetscapePlugIn directory also had a CMakeLists.txt used by GTK for its port. The definitions in DumpRenderTree's CMake are moved into the TestNetscapePlugIn CMake to provide a common definition for all ports that ENABLE_NETSCAPE_PLUGIN_API. * DumpRenderTree/CMakeLists.txt: * DumpRenderTree/PlatformWin.cmake: * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/PlatformGTK.cmake: Added. * DumpRenderTree/TestNetscapePlugIn/PlatformWin.cmake: Added. * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.def: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.def. * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.rc: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.rc. * DumpRenderTree/TestNetscapePlugIn/win/resource.h: Renamed from Tools/DumpRenderTree/win/resource.h. 2020-04-19 Emilio Cobos Álvarez Allow to override sccache server port. https://bugs.webkit.org/show_bug.cgi?id=210722 Reviewed by Philippe Normand. This is useful so that sccache can work both inside and outside the sandbox, without getting confused about flatpak's chroot. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2020-04-19 Darin Adler REGRESSION (r260334): SpacebarScrolling.cpp (test in TestWebKitAPI) fails to compile because it includes an Objective-C header https://bugs.webkit.org/show_bug.cgi?id=210723 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp: Instead of including WKPreferencesPrivate.h, an Objective-C header, include WKPreferencesRefPrivate.h, the header with the functions this test is trying to use. 2020-04-18 Darin Adler Update header postprocessing version cutoff to keep Apple internal builds working https://bugs.webkit.org/show_bug.cgi?id=210708 Reviewed by Brady Eidson. * DumpRenderTree/ios/TextInputControllerIOS.m: * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm: * DumpRenderTree/mac/EditingDelegate.mm: * DumpRenderTree/mac/EventSendingController.h: * DumpRenderTree/mac/EventSendingController.mm: * DumpRenderTree/mac/FrameLoadDelegate.mm: * DumpRenderTree/mac/ObjCPlugin.m: * DumpRenderTree/mac/PixelDumpSupportMac.mm: * DumpRenderTree/mac/ResourceLoadDelegate.mm: * DumpRenderTree/mac/UIScriptControllerMac.mm: Removed includes of , the header for modern WebKit, from the files here that are intending to use WebKitLegacy. This is harmless, except for if someone builds DumpRenderTree *before* building WebKit as I just did. 2020-04-18 Brady Eidson Fix WebUserContentControllerProxy vs ContentWorld lifetime https://bugs.webkit.org/show_bug.cgi?id=210700 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm: (-[DummyMessageHandler userContentController:didReceiveScriptMessage:]): (TEST): Make sure removing a script message handler from a particular world doesn't also destroy the other JavaScript contents of that world. 2020-04-18 Daniel Bates Add some more tests for -focusTextInputContext:placeCaretAt:completionHandler: https://bugs.webkit.org/show_bug.cgi?id=210624 Reviewed by Simon Fraser. Test behavior when the target element is already focused, when the target element is programmatically replaced, and focusing the target element after the page was navigated away. Also while I am here, fix up the test FocusFieldAndPlaceCaretOutsideField to use the size of the exampleText constant - 1 instead of hardcoding this value. This will future proof this test should the example text string literal change. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TEST): 2020-04-18 Alex Christensen Fix client certificate authentication when using non-default WKWebsiteDataStores https://bugs.webkit.org/show_bug.cgi?id=210681 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (TestWebKitAPI::TEST): 2020-04-17 Kate Cheney Enable service workers for app-bound domains https://bugs.webkit.org/show_bug.cgi?id=210451 Reviewed by Brent Fulgham. Adds 2 test cases to make sure service workers behave properly on app bound domains, and that the APIs are not available on non-app bound domains. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (-[SWInAppBrowserPrivacyMessageHandler userContentController:didReceiveScriptMessage:]): 2020-04-17 Alex Christensen NetworkSessionCocoa should request client certificate only once per host/port https://bugs.webkit.org/show_bug.cgi?id=210626 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: (TestWebKitAPI::clientCertServerWithCertVerifier): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/HTTPServer.h: (TestWebKitAPI::HTTPServer::HTTPResponse::HTTPResponse): * TestWebKitAPI/cocoa/HTTPServer.mm: (TestWebKitAPI::HTTPServer::HTTPServer): 2020-04-17 David Kilzer Bug 210645: REGRESSION (r211095): [iOS] TestRunnerWKWebView leaks @property accessibilitySpeakSelectionContent Reviewed by Chris Fleizach. * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView dealloc]): - Release accessibilitySpeakSelectionContent in -dealloc. 2020-04-17 Brady Eidson Pass sandbox extensions for back/forward list navigations after the policy is decided at process-swap time. and https://bugs.webkit.org/show_bug.cgi?id=210623 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2020-04-17 Brent Fulgham Unreviewed build fix after r260269. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (TEST): Correct argument order. 2020-04-17 Jer Noble Bring Fullscreen API + alert() behavior from iOS to macOS https://bugs.webkit.org/show_bug.cgi?id=210662 Reviewed by Eric Carlson. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm: Added. (TestWebKitAPI::TEST): 2020-04-17 Don Olmstead [CMake] Add WebKit::WebCore target https://bugs.webkit.org/show_bug.cgi?id=210445 Reviewed by Michael Catanzaro. Use the WebKit::WebCore target within tests and developer tools. * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * MiniBrowser/wpe/CMakeLists.txt: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformGTK.cmake: * TestWebKitAPI/PlatformWPE.cmake: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/glib/CMakeLists.txt: 2020-04-17 Antoine Quint Stop including style rules related to media controls in the UA style sheet when Modern Media Controls are enabled https://bugs.webkit.org/show_bug.cgi?id=210606 Unreviewed build fix after r260261. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: (TEST): 2020-04-17 Claudio Saavedra [GTK] Update for GdkKeymap API changes https://bugs.webkit.org/show_bug.cgi?id=210642 Reviewed by Adrian Perez de Castro. No new tests needed. gdk_keymap_get_default() is deprecated in GTK+ 3.22, so use gdk_keymap_get_for_display() instead. Since in GTK4 this method is removed to gdk_display_get_keymap(), add a helper to GtkVersioning.h to avoid cluttering with ifdefs all over the place. * TestWebKitAPI/glib/WebKitGLib/gtk/WebViewTestGtk.cpp: (WebViewTest::keyStroke): * TestWebKitAPI/gtk/PlatformWebViewGtk.cpp: (TestWebKitAPI::doKeyStroke): * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::EventSenderProxy::keyDown): 2020-04-17 Antoine Quint Allow the UserStyleLevel to be set through _WKUserStyleSheet https://bugs.webkit.org/show_bug.cgi?id=210653 Reviewed by Tim Horton. Add new tests for the "level" parameter when creating a _WKUserStyleSheet. * TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm: (TEST): 2020-04-17 David Kilzer REGRESSION (r162729): [iOS] WebKitTestRunner over-releases UITextField in WTR::PlatformWebView::removeChromeInputField() Reviewed by Wenson Hsieh. * WebKitTestRunner/ios/PlatformWebViewIOS.mm: (WTR::PlatformWebView::removeChromeInputField): - Remove unnecessary -release. 2020-04-17 Per Arne Vollan [iOS] Deny iokit open access to graphics related classes https://bugs.webkit.org/show_bug.cgi?id=210616 Reviewed by Darin Adler. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/AGXCompilerService.mm: Added. (TEST): 2020-04-17 Philippe Normand [Flatpak SDK] Not fully hooked in BuildSlaveSupport https://bugs.webkit.org/show_bug.cgi?id=210548 Reviewed by Carlos Alberto Lopez Perez. * Scripts/webkitdirs.pm: (determineBaseProductDir): Flatpak SDK builds use a dedicated product directory per port. 2020-04-16 Lauro Moura [GTK] A couple of API tests are flaky failing on X11. Unreviewed test gardening. * TestWebKitAPI/glib/TestExpectations.json: 2020-04-16 Daniel Bates Remove unused -_focusTextInputContext https://bugs.webkit.org/show_bug.cgi?id=210619 Reviewed by Darin Adler. Remove test now that the SPI was removed. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (-[TestWKWebView synchronouslyFocusTextInputContext:]): Deleted. 2020-04-16 Yusuke Suzuki Add slack-aware WKR implementation https://bugs.webkit.org/show_bug.cgi?id=210425 Reviewed by Alexey Proskuryakov. This patch adds new WKR implementation, which is posting changes to #changes in WebKit slack. Currently, we are polling git.webkit.org's feed once a minute. The more efficient way to implement this bot is introducing post-commit hook, but for now, this polling strategy just works. * WKR/.gitignore: Added. * WKR/ReadMe.md: Added. * WKR/WKR.mjs: Added. * WKR/data/.gitignore: Added. * WKR/package-lock.json: Added. * WKR/package.json: Added. 2020-04-16 Daniel Bates [iOS] Add a way to focus a text input and place a caret https://bugs.webkit.org/show_bug.cgi?id=210611 Reviewed by Darin Adler. Add some tests. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (-[TestWKWebView synchronouslyFocusTextInputContext:placeCaretAt:]): Added. (webViewLoadHTMLStringAndWaitForAllFramesToPaint): Use the bundle's TestWebKitAPI.resources directory as the base URL so that we have a valid file URL. Some of the tests will then call -_setAllowUniversalAccessFromFileURLs to allow the main frame access to the unique-origin child frame contents. (TEST): 2020-04-16 Daniel Bates REGRESSION (r259762): Should always hit test for editable elements if the WKWebView is fully editable https://bugs.webkit.org/show_bug.cgi?id=210558 Reviewed by Wenson Hsieh. Add a test. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TEST): 2020-04-16 Daniel Bates Move -_requestTextInputContextsInRect to WKContentView to simplify implementation https://bugs.webkit.org/show_bug.cgi?id=210398 Reviewed by Darin Adler. Update test now that -_requestTextInputContextsInRect has moved from WKWebView to WKContentView. I expose new testing-only WKWebView SPI to access it on the content view. * TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm: (-[TestWKWebView synchronouslyRequestDocumentContext:]): Added; due to category name change. (-[TestWKWebView synchronouslyAdjustSelectionWithDelta:]): Added; due to category name change. * TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (-[WKWebView synchronouslyRequestTextInputContextsInRect:]): Deleted; due to category name change. (-[WKWebView synchronouslyFocusTextInputContext:]): Deleted; due to category name change. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::mayContainEditableElementsInRect): Convert from content coordinates to WKWebView coordinates now that -_mayContainEditableElementsInRect expects it. 2020-04-16 Philippe Normand Unreviewed, GTK clean build fix after r260132. * TestWebKitAPI/gtk/main.cpp: (main): Don't use GtkVersioning here. A dependency on the WebCore private headers for this single file is overkill. 2020-04-16 Carlos Alberto Lopez Perez [GTK] MiniBrowser opens new windows too small causing failures on some WPT tests https://bugs.webkit.org/show_bug.cgi?id=210206 Reviewed by Carlos Garcia Campos. Add two API test to check that window.open() by default gets a size request equal to the old window if there is no default window size, or to the default window if there is a default window size. A new function helper setCreateNewWebViewsInWindowsWithDefaultSize() its added to create new webviews in new windows automatically, which its needed to test the case of having a default window size. * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp: (testWebViewWindowProperties): (testWebViewOpenWindowDefaultSize): (testWebViewOpenWindowNoDefaultSize): (beforeAll): 2020-04-15 Tim Horton REGRESSION (r258337): Crash when right clicking on link that uses the system UI font with optimizeLegibility on Mojave https://bugs.webkit.org/show_bug.cgi?id=210575 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm: (TEST): Add an API test ensuring that we can encode and decode a NSAttributedString that includes a system-ui font with optimizeLegibility on. 2020-04-15 John Wilander Add SPI to configure WebsiteDataStores with a URL for standalone web applications and use it to disable first-party website data removal in ITP https://bugs.webkit.org/show_bug.cgi?id=209634 Reviewed by Alex Christensen. Added a new test option called standaloneWebApplicationURL so that layout tests can configure the website data store accordingly. Picking it up and using it requires creating a new website data store with a configuration that has the standalone web application URL. * WebKitTestRunner/TestController.cpp: (WTR::TestController::configureWebsiteDataStoreTemporaryDirectories): (WTR::TestController::defaultWebsiteDataStore): (WTR::parseStringTestHeaderValueAsURL): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): 2020-04-15 Chris Dumez [IPC Hardening] MachMessage::messageSize() should use checked arithmetic https://bugs.webkit.org/show_bug.cgi?id=210567 Reviewed by Geoff Garen. Add API test coverage for / operator in Checked. * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp: (TestWebKitAPI::TEST): 2020-04-15 Brent Fulgham [Cocoa] Remove generic parameter serialization fallback https://bugs.webkit.org/show_bug.cgi?id=210509 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/BundleFormDelegate.mm: (WKWebProcessPlugInWithoutRegisteredCustomClass): Update to reflect fact that we block serialization of unregistered classes. 2020-04-15 Carlos Garcia Campos [GTK4] Fix use of gtk init functions https://bugs.webkit.org/show_bug.cgi?id=210550 Reviewed by Adrian Perez de Castro. Include GtkVersioning.h instead of gtk.h. * TestWebKitAPI/Tests/WebKitGtk/AccessibilityTestServer.cpp: * TestWebKitAPI/Tests/WebKitGtk/InspectorTestServer.cpp: * TestWebKitAPI/gtk/main.cpp: * WebKitTestRunner/gtk/main.cpp: 2020-04-15 Jonathan Bedard REGRESSION: [ Mojave+ Debug WK1 ] Layout Test imported/blink/storage/indexeddb/blob-basics-metadata.html is a flaky timeout https://bugs.webkit.org/show_bug.cgi?id=199117 Reviewed by Alexey Proskuryakov. * Scripts/run-javascriptcore-tests: Set JSC_useKernTCSM to false. * Scripts/webkitpy/port/base.py: (Port.setup_environ_for_server): Forward JSC_useKernTCSM. * Scripts/webkitpy/port/driver.py: (Driver._setup_environ_for_driver): Set JSC_useKernTCSM to false. 2020-04-15 Devin Rousso [ESNext] Implement logical assignment operators https://bugs.webkit.org/show_bug.cgi?id=209716 Reviewed by Ross Kirsling. * Scripts/run-jsc-stress-tests: 2020-04-14 Jer Noble WKTR always enables capturing audio/video in GPUProcess https://bugs.webkit.org/show_bug.cgi?id=210319 Reviewed by Tim Horton. Capturing in the GPUProcess should be off by default. GPU capture can be enabled at runtime via the --internal-feature flag of run-webkit-tests. * WebKitTestRunner/TestOptions.h: 2020-04-14 Peng Liu Adopt interface AVAudioRoutingArbiter for Mac https://bugs.webkit.org/show_bug.cgi?id=210167 Reviewed by Eric Carlson. Add test for softlink of AVAudioRoutingArbiter. * TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm: (TestWebKitAPI::TEST): 2020-04-14 Per Arne Vollan [iOS] Content filtering needs access to the frontboard service https://bugs.webkit.org/show_bug.cgi?id=210505 Reviewed by Geoffrey Garen. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/WebFilter.mm: Added. (isManagedSessionMethodOverride): (TEST): 2020-04-14 Andres Gonzalez Make WTR::AccessibilityUIElements calls to accessibilitySetValue run on AX secondary thread. https://bugs.webkit.org/show_bug.cgi?id=210500 Reviewed by Chris Fleizach. Needed to test accessibility isolated tree mode. Follow up to https://bugs.webkit.org/show_bug.cgi?id=210392. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (AccessibilityUIElement::setBoolAttributeValue): (AccessibilityUIElement::resetSelectedTextMarkerRange): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::setAttributeValue): (WTR::attributesOfElement): (WTR::descriptionOfElements): (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): (WTR::AccessibilityUIElement::stringAttributeValue): (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): (WTR::AccessibilityUIElement::uiElementAttributeValue const): (WTR::AccessibilityUIElement::boolAttributeValue): (WTR::AccessibilityUIElement::setBoolAttributeValue): (WTR::AccessibilityUIElement::setValue): (WTR::AccessibilityUIElement::setSelectedTextRange): (WTR::AccessibilityUIElement::setSelectedVisibleTextRange): (WTR::AccessibilityUIElement::setSelectedChild const): (WTR::AccessibilityUIElement::setSelectedChildAtIndex const): (WTR::AccessibilityUIElement::removeSelectionAtIndex const): (WTR::AccessibilityUIElement::takeFocus): (WTR::AccessibilityUIElement::resetSelectedTextMarkerRange): 2020-04-14 Brent Fulgham InjectedBundle parameters often need initialization function called before unarchiving https://bugs.webkit.org/show_bug.cgi?id=189709 Reviewed by Ryosuke Niwa. * TestWebKitAPI/cocoa/WebProcessPlugIn/WebProcessPlugIn.mm: (-[WebProcessPlugIn additionalClassesForParameterCoder]): Added. 2020-04-14 Sergio Villar Senin [Flatpak] Make run-webkit-tests obey WEBKIT_JHBUILD https://bugs.webkit.org/show_bug.cgi?id=210497 Reviewed by Philippe Normand. run-webkit-tests in linux uses the flatpak SDK if the flatpak directories are found in the build directory. However it might the the case that a developer wants to run them using the jhbuild SDK which can be configured in parallel. We have the WEBKIT_JHBUILD environment variable to force other scripts to use jhbuild instead of flatpak so we can use it as well for this use case. * flatpak/flatpakutils.py: (run_in_sandbox_if_available): 2020-04-14 Carlos Garcia Campos [GTK] Bring back support for rendering scrollbars using the system appearance https://bugs.webkit.org/show_bug.cgi?id=209805 Reviewed by Michael Catanzaro. Do not use system appearance for scrollbars in MiniBrowser and unit tests. * MiniBrowser/gtk/main.c: (main): * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::Test): 2020-04-13 Devin Rousso REGRESSION (r259900) : Speedometer failing on Catalina-Release-WK2-Perf bot https://bugs.webkit.org/show_bug.cgi?id=210442 Reviewed by Stephanie Lewis. * Scripts/webkitpy/performance_tests/perftest.py: (PerfTest): 2020-04-13 David Kilzer check-webkit-style should warn about attributes that appear after function definitions Reviewed by Darin Adler. * Scripts/webkitpy/style/checkers/cpp.py: (_FunctionState.attributes_after_definition): Add. - Return list of attributes that appear after a function definition. (check_function_definition): - Add new check for attributes that appear after a function definition. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (CppStyleTest.test_decode_functions_missing_warn_unused_return): - Update test to fix new warning. (CppStyleTest.test_function_readability_for_attributes): Add. - Add tests. 2020-04-13 Kate Cheney http/tests/in-app-browser-privacy/app-bound-domain.html is a constant failure on iOS https://bugs.webkit.org/show_bug.cgi?id=210344 Reviewed by Brent Fulgham. This patch creates a new TestOption parameter for enabling In-App Browser Privacy because its NSUserDefaults key is not set using the internal or experimental keywords. It enables this flag for WebKitTestRunner if the option is set (and disables it otherwise). * WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformAddTestOptions const): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): 2020-04-13 Per Arne Vollan [iOS] Remove unused UTType swizzler code https://bugs.webkit.org/show_bug.cgi?id=210435 Unreviewed rollout of r258120. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/UTIFromTag.mm: Removed. 2020-04-13 Andres Gonzalez Make WTR::AccessibilityUIElement methods run on AX secondary thread. https://bugs.webkit.org/show_bug.cgi?id=210392 Reviewed by Chris Fleizach. In order to test accessibility isolated tree mode, it is necessary to run WTR::AccessibilityUIElement methods on the AX secondary thread. This change uses the functionality built-in AccessibilityController to dispatch the calls to WebAccessibilityObjectWrapper to the AX thread. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::AccessibilityUIElement): (WTR::supportedAttributes): (WTR::attributeValue): (WTR::descriptionOfValue): (WTR::attributesOfElement): (WTR::AccessibilityUIElement::getLinkedUIElements): (WTR::AccessibilityUIElement::getDocumentLinks): (WTR::AccessibilityUIElement::getUIElementsWithAttribute const): (WTR::AccessibilityUIElement::getChildren): (WTR::AccessibilityUIElement::getChildrenWithRange): (WTR::AccessibilityUIElement::rowHeaders const): (WTR::AccessibilityUIElement::columnHeaders const): (WTR::AccessibilityUIElement::elementAtPoint): (WTR::AccessibilityUIElement::indexOfChild): (WTR::AccessibilityUIElement::elementForAttribute const): (WTR::AccessibilityUIElement::elementForAttributeAtIndex const): (WTR::AccessibilityUIElement::linkedUIElementAtIndex): (WTR::AccessibilityUIElement::ariaOwnsElementAtIndex): (WTR::AccessibilityUIElement::ariaFlowToElementAtIndex): (WTR::AccessibilityUIElement::ariaControlsElementAtIndex): (WTR::AccessibilityUIElement::ariaDetailsElementAtIndex): (WTR::AccessibilityUIElement::ariaErrorMessageElementAtIndex): (WTR::AccessibilityUIElement::disclosedRowAtIndex): (WTR::AccessibilityUIElement::rowAtIndex): (WTR::AccessibilityUIElement::selectedChildAtIndex const): (WTR::AccessibilityUIElement::selectedChildrenCount const): (WTR::AccessibilityUIElement::selectedRowAtIndex): (WTR::AccessibilityUIElement::titleUIElement): (WTR::AccessibilityUIElement::parentElement): (WTR::AccessibilityUIElement::disclosedByRow): (WTR::AccessibilityUIElement::numberAttributeValue): (WTR::AccessibilityUIElement::isAttributeSupported): (WTR::AccessibilityUIElement::isSelected const): (WTR::AccessibilityUIElement::selectTextWithCriteria): 2020-04-13 Lauro Moura [Flatpak SDK] test262-runner fails to run with WEBKIT_JHBUILD enabled https://bugs.webkit.org/show_bug.cgi?id=210430 Make sure we check the WEBKIT_JHBUILD env var directly to avoid requiring webkitdirs early and messing up Runner.pm compilation. Reviewed by Philippe Normand. * Scripts/test262-runner: 2020-04-13 David Kilzer Add WARN_UNUSED_RETURN to decode methods in Source/WebKit Reviewed by Alex Christensen. * Scripts/webkitpy/style/checkers/cpp.py: (check_function_definition): - Add check for platformDecode() methods. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (CppStyleTest): - Add tests for platformDecode() methods. 2020-04-13 Aakash Jain [ews] Improve handling of unexpected network issues while communicating with Bugzilla https://bugs.webkit.org/show_bug.cgi?id=210377 Reviewed by Jonathan Bedard. * BuildSlaveSupport/ews-app/ews/common/bugzilla.py: (BugzillaBeautifulSoup.authenticate): 2020-04-13 Aakash Jain ews status-bubble hover-over message include unhelpful message 'Crash collection has quiesced' https://bugs.webkit.org/show_bug.cgi?id=210378 Reviewed by Jonathan Bedard. * BuildSlaveSupport/ews-app/ews/views/statusbubble.py: (StatusBubble): 2020-04-11 Wenson Hsieh [macOS] [WK1] Touch Bar flashes when typing in Vietnamese in Mail https://bugs.webkit.org/show_bug.cgi?id=210394 Reviewed by Tim Horton. Add an API test that inserts an attributed string with the text replacement attribute, and verifies that we show the candidate list when inserting the string, and also don't temporarily hide the candidate list in the process of doing so. To achieve this, we swizzle out calls to -[NSCandidateListTouchBarItem updateWithInsertionPointVisibility:] to detect when the candidate list is either hidden or made visible. * TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h: * TestWebKitAPI/Tests/mac/CandidateTests.mm: Fix a leak in an adjacent test too, while I'm touching this file. (TestWebKitAPI::updateCandidateListWithVisibility): 2020-04-11 Aakash Jain Buildbot: Force crash log submission after each test run (follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=210202 Unreviewed follow-up fix. * BuildSlaveSupport/ews-build/steps.py: (WaitForCrashCollection): Remove spaces from step name. 2020-04-11 Aakash Jain Buildbot: Force crash log submission after each test run (follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=210202 Unreviewed follow-up fix. * BuildSlaveSupport/wait-for-crash-collection: Improved error message. 2020-04-11 David Kilzer check-webkit-style should warn about 'decode' functions with missing WARN_UNUSED_RETURN attribute Reviewed by Jonathan Bedard. * Scripts/webkitpy/style/checkers/cpp.py: (_FunctionState.post_modifiers): Add. Returns string of text that appears after the function definition's list of parameters. This is used to find the WARN_UNUSED_RETURN attribute in function declarations in header files. (_FunctionState.has_attribute): Add. Takes a string (or regex) and searchs before and after the function definition for the attribute. (_FunctionState.has_return_type): Add. Takes a string (or regex) and checks the return type of the fuction. (_FunctionState.is_static): Add. Returns True for functions with the 'static' modifier. (check_function_definition): Add check for decode() functions with missing WARN_UNUSED_RETURN attribute. (CppChecker): Add 'security/missing_warn_unused_return' to the list of enabled style checkers. * Scripts/webkitpy/style/checkers/cpp_unittest.py: (CppStyleTestBase.perform_function_definition_check): Add. This runs the check_function_definition() function in cpp.py. (CppStyleTest.test_decode_functions_missing_warn_unused_return): Add. Tests for the new warning. 2020-04-10 Alex Christensen Add SPI to handle proxy authentication and require secure proxy connections https://bugs.webkit.org/show_bug.cgi?id=210343 and Reviewed by Geoffrey Garen. * TestWebKitAPI/TCPServer.cpp: (TestWebKitAPI::TCPServer::startSecureConnection): (TestWebKitAPI::TCPServer::TCPServer): * TestWebKitAPI/TCPServer.h: * TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm: (-[ProxyDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (-[ProxyDelegate waitForAlert]): (-[ProxyDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]): (TestWebKitAPI::TEST): 2020-04-10 Devin Rousso Changes to shared testing JS files should not cause test failures due to console message line numbers changing https://bugs.webkit.org/show_bug.cgi?id=210303 Reviewed by Simon Fraser. * DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate webView:addMessageToConsole:withSource:]): * DumpRenderTree/win/UIDelegate.cpp: (UIDelegate::webViewAddMessageToConsole): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::willAddMessageToConsole): 2020-04-10 Simon Fraser Reset view navigation gesture state between tests https://bugs.webkit.org/show_bug.cgi?id=210283 Re-land r259818 with a null-check on m_webPageProxyForBackForwardListForCurrentSwipe. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::cocoaResetStateToConsistentValues): 2020-04-10 Alicia Boya García [WTF] DataMutex: Add runUnlocked() https://bugs.webkit.org/show_bug.cgi?id=209811 Reviewed by Xabier Rodriguez-Calvar. Tests for runUnlocked() and DataMutex checks are introduced. * TestWebKitAPI/Tests/WTF/DataMutex.cpp: (TestWebKitAPI::TEST): == Rolled over to ChangeLog-2020-04-10 ==