2018-06-13 Kocsen Chung Revert r231850. rdar://problem/39111626 2018-06-13 Carlos Alberto Lopez Perez [JSCOnly] Add a MIPS32el JSCOnly EWS (follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=186523 Unreviewed follow-up fix after r232748 * Scripts/webkitpy/common/config/ports.py: (JscOnlyPort.build_jsc_command): It is needed to pass a --jsc-only argument to the build-jsc script. * Scripts/webkitpy/common/config/ports_unittest.py: (DeprecatedPortTest.test_jsconly_port): 2018-06-12 Thibault Saunier webkitpy: Implement coredumpctl support on linux https://bugs.webkit.org/show_bug.cgi?id=184039 Reviewed by Daniel Bates. And start using an Executive to run subprocesses in GDBCrashLogGenerator. Unit tests adapted to the new API and still passing. * Scripts/webkitpy/port/linux_get_crash_log.py: (GDBCrashLogGenerator): (GDBCrashLogGenerator._get_trace_from_systemd): (GDBCrashLogGenerator.generate_crash_log): 2018-06-12 Valerie R Young test262/Runner.pm: fix one test (can't find jsc) https://bugs.webkit.org/show_bug.cgi?id=186573 Reviewed by Michael Saboff. * Scripts/webkitperl/test262_unittest/test262-runner-tests.pl: fix subtest to use mock JSC 2018-06-12 Tim Horton Add a API test for r232601 https://bugs.webkit.org/show_bug.cgi?id=186417 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: (immediateSubviewOfClass): (TEST): Ensure that we put the view hierarchy back together (move WKContentView out of the animated resize view) and unhide WKContentView after a resize-with-hidden-content. 2018-06-12 Valerie R Young test262/Runner.pm: add unit tests https://bugs.webkit.org/show_bug.cgi?id=185783 Reviewed by Michael Saboff. * Scripts/webkitperl/test262_unittest/README: Added. * Scripts/webkitperl/test262_unittest/fixtures/expectations-compare.yaml: Added. * Scripts/webkitperl/test262_unittest/fixtures/expectations.yaml: Added. * Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-fail-new-error.pl: Added. * Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-fail.pl: Added. * Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-pass.pl: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing-with-new-error.js: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing.js: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-passing.js: Added. (f): * Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-pass-now-failing.js: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/fail.js: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/pass.js: Added. (f): * Scripts/webkitperl/test262_unittest/test262-runner-tests.pl: Added. 2018-06-12 Valerie R Young test262/Runner.pm: minor updates https://bugs.webkit.org/show_bug.cgi?id=186399 - If harness files cannot be found in a CLI supplied test262 path, then default to webkit's test262 harness files. - Lazily create the test262-results directory (only right before writing to it) - If an expectation file is supplied via the CLI, save to the supplied location instead of the default webkit location (JSTest/test262/expectation.yaml). Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (processCLI): (main): (compileTest): (processResult): (getHarness): (summarizeResults): 2018-06-11 Carlos Alberto Lopez Perez [JSCOnly] Add a MIPS32el JSCOnly EWS https://bugs.webkit.org/show_bug.cgi?id=186523 Reviewed by Michael Catanzaro. Add a new jsc-mips-ews queue that will execute build-jsc for the jsc-only (Linux) port. The worker(s) on this queue should be pre-configured to cross-build JSC for MIPS32el. * QueueStatusServer/config/queues.py: * QueueStatusServer/model/queues.py: (Queue.display_name): * Scripts/webkitpy/common/config/ews.json: * Scripts/webkitpy/common/config/ports.py: (DeprecatedPort.port): (WpePort.run_webkit_tests_command): (JscOnlyPort): (JscOnlyPort.build_jsc_command): * Scripts/webkitpy/common/config/ports_unittest.py: (DeprecatedPortTest.test_wincairo_port): (DeprecatedPortTest): (DeprecatedPortTest.test_jsconly_port): * Scripts/webkitpy/port/factory.py: (PortFactory): * Scripts/webkitpy/port/jsc_only.py: Added. Add a basic port definition. Required by the EWS tooling. (JscOnlyPort): (JscOnlyPort.__init__): * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: (test_ews_name): 2018-06-12 Zan Dobersek Add run-web-platform-tests script https://bugs.webkit.org/show_bug.cgi?id=183356 Reviewed by Carlos Alberto Lopez Perez. Add the run-web-platform-tests script that allows running WebKit builds against the external web-platform-tests project. The script sets up all the port-specific information, including the display driver. If no web-platform-tests repository location is specified, the TestDownloader utility is used to clone the repository, and path to that clone is leveraged instead. Port-specific TestManifest.ini and TestExpectations.json file paths are then constructed, bailing if any of the files is missing. The JSON file is then used to construct the metadata file tree, creating an .ini file for each test that is disabled, has a certain expectation, or has subtests that themselves have certain expectations. This metadata tree is built under the build directory, and is purged and reconstructed for each separate run. Lastly, the WPT python module is imported from the web-platform-tests source location, and wpt.main() is invoked along with all the necessary arguments that set up a web-platform-tests suite run using the WebKit product. * Scripts/run-web-platform-tests: Added. * Scripts/webkitpy/common/config/ports_mock.py: (MockPort.run_bindings_tests_command): (MockPort): (MockPort.wpt_metadata_directory): (MockPort.wpt_manifest_file): * Scripts/webkitpy/port/base.py: (Port.wpt_metadata_directory): (Port): (Port.wpt_manifest_file): * Scripts/webkitpy/w3c/common.py: (is_file_exportable): (WPTPaths): (WPTPaths.checkout_directory): (WPTPaths.wpt_checkout_path): * Scripts/webkitpy/w3c/test_downloader.py: (TestDownloader.clone_tests): (TestDownloader): (TestDownloader.download_tests): * Scripts/webkitpy/w3c/test_exporter.py: (WebPlatformTestExporter.__init__): * Scripts/webkitpy/w3c/wpt_runner.py: Added. (main): (parse_args): (create_webdriver): (spawn_wpt): (WPTRunner): (WPTRunner.__init__): (WPTRunner._prepare_wpt_checkout): (WPTRunner._generate_metadata_directory): (WPTRunner.run): * Scripts/webkitpy/w3c/wpt_runner_unittest.py: Added. (WPTRunnerTest): (WPTRunnerTest.MockTestDownloader): (WPTRunnerTest.MockTestDownloader.default_options): (WPTRunnerTest.MockTestDownloader.__init__): (WPTRunnerTest.MockTestDownloader.clone_tests): (WPTRunnerTest.MockWebDriver): (WPTRunnerTest.MockWebDriver.create): (WPTRunnerTest.MockWebDriver.binary_path): (WPTRunnerTest.MockWebDriver.browser_path): (WPTRunnerTest.MockWebDriver.browser_args): (WPTRunnerTest.MockSpawnWPT): (WPTRunnerTest.MockSpawnWPT.__init__): (WPTRunnerTest.MockSpawnWPT.__call__): (WPTRunnerTest.TestInstance): (WPTRunnerTest.TestInstance.__init__): (WPTRunnerTest.TestInstance.prepare_mock_files_for_run): (WPTRunnerTest.test_prepare_wpt_checkout): (WPTRunnerTest.test_prepare_wpt_checkout_specified_path): (WPTRunnerTest.test_generate_metadata_directory): (WPTRunnerTest.test_run): (WPTRunnerTest.test_run_with_specified_options): (WPTRunnerTest.test_run_with_args): 2018-06-11 Mark Lam Add support for webkit-test-runner jscOptions in DumpRenderTree and WebKitTestRunner. https://bugs.webkit.org/show_bug.cgi?id=186451 Reviewed by Tim Horton. This jscOptions option can be used by a layout test to specify some JSC runtime options needed by the test e.g. by adding something like this to the top of the html file after the DOCTYPE tag: If more than one option is needed, the options can be specified as a comma separated string e.g. This only works with JSC options that can be changed at runtime. Not all JSC options can be changed this way as some options are only checked and set once at VM / process initialization time: changing this type of options may have no effect. It's the test writer's responsibility to determine which options are appropriate for with this webkit-test-runner jscOptions option. This implementation is a workaround until we can change the run-webkit-tests scripts to parse the option and apply it to a new launch of DRT or WKTR: https://bugs.webkit.org/show_bug.cgi?id=186452 * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): (TestOptions::webViewIsCompatibleWithOptions const): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (setJSCOptions): (resetWebViewToConsistentStateBeforeTesting): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): 2018-06-11 Brady Eidson Add a command line default to force WebKitTestRunner to turn on process swap on navigation. https://bugs.webkit.org/show_bug.cgi?id=186534 Reviewed by Chris Dumez. Right now Process Swap On Navigation is enabled on a per-test basis. The future is to enable it by default. Adding a 'defaults write' helps us get to that future. * WebKitTestRunner/TestController.cpp: (WTR::TestController::testOptionsForTest const): (WTR::TestController::platformAddTestOptions const): * WebKitTestRunner/TestController.h: * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformAddTestOptions const): 2018-06-11 Chris Dumez Allow enabling PSON in layout tests without window.open support https://bugs.webkit.org/show_bug.cgi?id=186537 Reviewed by Geoffrey Garen. Allow enabling PSON in layout tests without window.open support since window.open support is far from being ready and we plan to enable PSON in layout tests soon. * WebKitTestRunner/TestController.cpp: (WTR::TestController::createWebViewWithOptions): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): 2018-06-11 Brady Eidson Followup to [Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC https://bugs.webkit.org/show_bug.cgi?id=186436 Patch by Darin Adler Reviewed by Brady Eidson. * TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm: (TestWebKitAPI::TEST): 2018-06-11 Mark Lam Gardening: skip BigInt tests on iOS until the feature is stable. Not reviewed. * Scripts/run-jsc-stress-tests: 2018-06-11 Fujii Hironori [Win][MiniBrowser] Add WebKitBrowserWindow class for modern WebKit API https://bugs.webkit.org/show_bug.cgi?id=186478 Reviewed by Alex Christensen. Added "New WebKit Window" and "New WebKitLegacy Window" menu items. Disabled the menu item "New WebKit Window" if !ENABLE(WEBKIT). * MiniBrowser/win/CMakeLists.txt: Added WebKitBrowserWindow.cpp source file and ENABLE_WEBKIT macro if ENABLE_WEBKIT. * MiniBrowser/win/MainWindow.cpp: (MainWindow::MainWindow): (MainWindow::create): (MainWindow::init): (MainWindow::WndProc): * MiniBrowser/win/MainWindow.h: * MiniBrowser/win/MiniBrowserLib.rc: * MiniBrowser/win/MiniBrowserLibResource.h: * MiniBrowser/win/PrintWebUIDelegate.cpp: (PrintWebUIDelegate::createWebViewWithRequest): * MiniBrowser/win/WebKitBrowserWindow.cpp: Added. (createString): (toUtf8): (createWKString): (createWKURL): (WebKitBrowserWindow::create): (WebKitBrowserWindow::WebKitBrowserWindow): (WebKitBrowserWindow::init): (WebKitBrowserWindow::hwnd): (WebKitBrowserWindow::loadURL): (WebKitBrowserWindow::loadHTMLString): (WebKitBrowserWindow::navigateForwardOrBackward): (WebKitBrowserWindow::navigateToHistory): (WebKitBrowserWindow::setPreference): (WebKitBrowserWindow::print): (WebKitBrowserWindow::launchInspector): (WebKitBrowserWindow::setUserAgent): (WebKitBrowserWindow::userAgent): (WebKitBrowserWindow::showLayerTree): (WebKitBrowserWindow::updateStatistics): (WebKitBrowserWindow::resetZoom): (WebKitBrowserWindow::zoomIn): (WebKitBrowserWindow::zoomOut): (toWebKitBrowserWindow): (WebKitBrowserWindow::didReceiveTitleForFrame): (WebKitBrowserWindow::didCommitLoadForFrame): * MiniBrowser/win/WebKitBrowserWindow.h: * MiniBrowser/win/WinMain.cpp: (wWinMain): 2018-06-11 Keith Miller Add missing whitespace to run-jsc command https://bugs.webkit.org/show_bug.cgi?id=186528 Reviewed by Mark Lam. * Scripts/run-jsc: 2018-06-11 Philippe Normand [webkitpy] PHP7.2 support on Debian platforms https://bugs.webkit.org/show_bug.cgi?id=186521 Reviewed by Michael Catanzaro. * Scripts/webkitpy/port/base.py: (Port._debian_php_version): Refactor and add PHP 7.2 version support. 2018-06-11 Carlos Garcia Campos Unreviewed. Fix WPE API and layout tests after r232670. Now that dyz is not installed, there's not -default.so symlink for the WPE backend, so we need to use WPE_BACKEND_LIBRARY environment variable to ensure tests are run with fdo backend. * Scripts/run-wpe-tests: (WPETestRunner.__init__): (WPETestRunner): (WPETestRunner.setup_testing_environment): * Scripts/webkitpy/port/wpe.py: (WPEPort.setup_environ_for_server): * glib/api_test_runner.py: (TestRunner.setup_testing_environment): (TestRunner.run_tests): (TestRunner._setup_testing_environment): Deleted. 2018-06-10 Carlos Garcia Campos [GTK][WPE] Add API run run javascript from a WebKitWebView in an isolated world https://bugs.webkit.org/show_bug.cgi?id=186192 Reviewed by Michael Catanzaro. Add tests cases for the new API. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewRunJavaScript): * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp: (methodCallCallback): (webkit_web_extension_initialize_with_user_data): * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp: (runJavaScriptInWorldReadyCallback): (WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished): (WebViewTest::runJavaScriptInWorldAndWaitUntilFinished): * TestWebKitAPI/glib/WebKitGLib/WebViewTest.h: 2018-06-10 Carlos Garcia Campos [WPE] Add a MiniBrowser and use it to run WebDriver tests https://bugs.webkit.org/show_bug.cgi?id=186345 Reviewed by Žan Doberšek. Most of the code is based on dyz and gtk MiniBrowser. This patch adds a new internal library WPEToolingBackends, including the headless view backend and a new window backend to be used by the MiniBrowser. MiniBrowser can also run in headless mode, by using the headless backend instead of the window one, which will allow us to run the WebDriver tests in the bots. * CMakeLists.txt: * MiniBrowser/wpe/CMakeLists.txt: Added. * MiniBrowser/wpe/main.cpp: Added. (automationStartedCallback): (createViewBackend): (main): * Scripts/run-minibrowser: Remove WPE specific code. * Scripts/run-webdriver-tests: Add headless display-server option. * Scripts/webkitdirs.pm: (launcherName): Remove WPE specific code. * Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py: (WebDriverWPE.browser_name): Return MiniBrowser. (WebDriverWPE.browser_path): Return the path to the MiniBrowser in build dir. (WebDriverWPE.browser_args): Add --headless when running in headless mode. (WebDriverWPE.capabilities): Use the full browser path. * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: (WebDriverTestRunnerSelenium.collect_tests): Fix early return value. * TestWebKitAPI/PlatformWPE.cmake: Use WPEToolingBackends instead of HeadlessViewBackend. * TestWebKitAPI/PlatformWebView.h: Ditto. * TestWebKitAPI/glib/PlatformWPE.cmake: Ditto * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::createWebViewBackend): Ditto. * TestWebKitAPI/wpe/PlatformWebViewWPE.cpp: (TestWebKitAPI::PlatformWebView::initialize): Ditto. * WebKitTestRunner/PlatformWPE.cmake: Ditto. * WebKitTestRunner/PlatformWebView.h: Ditto. * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: (WTR::PlatformWebView::PlatformWebView): Ditto. * wpe/HeadlessViewBackend/CMakeLists.txt: Removed. * wpe/backends/CMakeLists.txt: Added. * wpe/backends/HeadlessViewBackend.cpp: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.cpp. (WPEToolingBackends::getEGLDisplay): (WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): (WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend): (WPEToolingBackends::HeadlessViewBackend::createSnapshot): (WPEToolingBackends::HeadlessViewBackend::performUpdate): (WPEToolingBackends::HeadlessViewBackend::displayBuffer): * wpe/backends/HeadlessViewBackend.h: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.h. * wpe/backends/ViewBackend.cpp: Added. (WPEToolingBackends::ViewBackend::ViewBackend): (WPEToolingBackends::ViewBackend::~ViewBackend): (WPEToolingBackends::ViewBackend::initialize): (WPEToolingBackends::ViewBackend::setInputClient): (WPEToolingBackends::ViewBackend::backend const): (WPEToolingBackends::ViewBackend::dispatchInputPointerEvent): (WPEToolingBackends::ViewBackend::dispatchInputAxisEvent): (WPEToolingBackends::ViewBackend::dispatchInputKeyboardEvent): * wpe/backends/ViewBackend.h: Added. * wpe/backends/WindowViewBackend.cpp: Added. (WPEToolingBackends::WindowViewBackend::WindowViewBackend): (WPEToolingBackends::WindowViewBackend::~WindowViewBackend): (WPEToolingBackends::WindowViewBackend::displayBuffer): (WPEToolingBackends::WindowViewBackend::handleKeyEvent): * wpe/backends/WindowViewBackend.h: Added. * wpe/jhbuild.modules: Remove dyz and add wayland-protocols. 2018-06-10 Fujii Hironori [Win][MiniBrowser] MiniBrowser class should be renamed to WebKitLegacyBrowserWindow https://bugs.webkit.org/show_bug.cgi?id=186427 Reviewed by Ryosuke Niwa. * MiniBrowser/win/AccessibilityDelegate.cpp: * MiniBrowser/win/AccessibilityDelegate.h: (AccessibilityDelegate::AccessibilityDelegate): * MiniBrowser/win/CMakeLists.txt: Removed MiniBrowser.cpp. Added WebKitLegacyBrowserWindow.cpp. * MiniBrowser/win/Common.h: * MiniBrowser/win/MainWindow.cpp: (MainWindow::init): * MiniBrowser/win/MainWindow.h: * MiniBrowser/win/MiniBrowserWebHost.cpp: * MiniBrowser/win/MiniBrowserWebHost.h: (MiniBrowserWebHost::MiniBrowserWebHost): * MiniBrowser/win/PageLoadTestClient.cpp: (PageLoadTestClient::PageLoadTestClient): * MiniBrowser/win/PageLoadTestClient.h: * MiniBrowser/win/PrintWebUIDelegate.cpp: (PrintWebUIDelegate::createWebViewWithRequest): * MiniBrowser/win/PrintWebUIDelegate.h: (PrintWebUIDelegate::PrintWebUIDelegate): * MiniBrowser/win/ResourceLoadDelegate.cpp: * MiniBrowser/win/ResourceLoadDelegate.h: (ResourceLoadDelegate::ResourceLoadDelegate): * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp: Renamed from Tools/MiniBrowser/win/MiniBrowser.cpp. * MiniBrowser/win/WebKitLegacyBrowserWindow.h: Renamed from Tools/MiniBrowser/win/MiniBrowser.h. * MiniBrowser/win/WebDownloadDelegate.cpp: (WebDownloadDelegate::WebDownloadDelegate): * MiniBrowser/win/WebDownloadDelegate.h: 2018-06-10 Chris Dumez Reload the Web view in case of crash if the client does not implement webViewWebContentProcessDidTerminate delegate https://bugs.webkit.org/show_bug.cgi?id=186468 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: (-[BasicNavigationDelegateWithoutCrashHandler webView:didStartProvisionalNavigation:]): (-[BasicNavigationDelegateWithoutCrashHandler webView:didFinishNavigation:]): (TEST): 2018-06-10 Michael Catanzaro [WPE][GTK] paypal.com requires user agent quirk https://bugs.webkit.org/show_bug.cgi?id=186466 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2018-06-09 Dan Bernstein [Xcode] Clean up and modernize some build setting definitions https://bugs.webkit.org/show_bug.cgi?id=186463 Reviewed by Sam Weinig. * DumpRenderTree/mac/Configurations/Base.xcconfig: Removed definition for macOS 10.11. Simplified the definition of WK_PRIVATE_FRAMEWORK_STUBS_DIR now that WK_XCODE_SUPPORTS_TEXT_BASED_STUBS is true for all supported Xcode versions. * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: Removed definition for macOS 10.11. * MiniBrowser/Configurations/Base.xcconfig: Ditto. * MiniBrowser/Configurations/DebugRelease.xcconfig: Ditto. * TestWebKitAPI/Configurations/Base.xcconfig: Ditto. * TestWebKitAPI/Configurations/DebugRelease.xcconfig: Ditto. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Simplified the definitions of ENABLE_APPLE_PAY and ENABLE_VIDEO_PRESENTATION_MODE now macOS 10.12 is the earliest supported version. * TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Removed definitions for macOS 10.11. * WebKitTestRunner/Configurations/Base.xcconfig: Ditto. Also simplified the definition of WK_PRIVATE_FRAMEWORK_STUBS_DIR now that WK_XCODE_SUPPORTS_TEXT_BASED_STUBS is true for all supported Xcode versions * WebKitTestRunner/Configurations/DebugRelease.xcconfig: Removed definition for macOS 10.11. 2018-06-09 Dan Bernstein Added missing file references to the Configuration group. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2018-06-08 Darin Adler [Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC https://bugs.webkit.org/show_bug.cgi?id=186436 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm: (TestWebKitAPI::WebKit2CustomProtocolsTest_ProcessPoolDestroyedDuringLoading): Use @autoreleasepool. * TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm: (TestWebKitAPI::buildAndPerformTest): Ditto. * TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm: (TestWebKitAPI::WebKitLegacy_StopLoadingFromDidFinishLoading): Ditto. 2018-06-08 Wenson Hsieh [WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 1) https://bugs.webkit.org/show_bug.cgi?id=186442 Reviewed by Tim Horton. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-06-08 Alicia Boya García [GTK] Update to libva-2.1.0 in jhbuild https://bugs.webkit.org/show_bug.cgi?id=186434 Reviewed by Philippe Normand. * gstreamer/jhbuild.modules: 2018-06-07 Yusuke Suzuki [WTF] Add WorkerPool https://bugs.webkit.org/show_bug.cgi?id=174569 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/WorkerPool.cpp: Added. (TestWebKitAPI::TEST): 2018-06-07 Fujii Hironori [Win][MiniBrowser] Add a new BrowserWindow interface to abstract WK1 and WK2 BrowserWindow https://bugs.webkit.org/show_bug.cgi?id=186421 Reviewed by Ryosuke Niwa. This is the core patch to make MiniBrowser to support WK1 and WK2 windows (Bug 184770). I will rename MiniBrowser class to WK1BrowserWindow in a follow-up patch (Bug 184770 Comment 12). * MiniBrowser/win/BrowserWindow.h: Added. * MiniBrowser/win/MainWindow.cpp: (MainWindow::WndProc): * MiniBrowser/win/MainWindow.h: (MainWindow::browserWindow const): * MiniBrowser/win/MiniBrowser.cpp: (MiniBrowser::create): (MiniBrowser::navigateForwardOrBackward): Removed the unsed first argument hWnd. (MiniBrowser::navigateToHistory): Ditto. * MiniBrowser/win/MiniBrowser.h: Inherit BrowserWindow interface. Make all other methods private and make delegates classes friends. * MiniBrowser/win/PrintWebUIDelegate.cpp: (PrintWebUIDelegate::createWebViewWithRequest): 2018-06-07 Fujii Hironori [Win][MiniBrowser] MiniBrowser::updateDeviceScaleFactor should be a MainWindow's method https://bugs.webkit.org/show_bug.cgi?id=186387 Reviewed by Ryosuke Niwa. MiniBrowser::updateDeviceScaleFactor does nothing for MiniBrowser. It should be a MainWindow's method. * MiniBrowser/win/MainWindow.cpp: (MainWindow::init): Call MainWindow::updateDeviceScaleFactor. (MainWindow::resizeSubViews): Do not set a font every time window size is changed. (MainWindow::WndProc): Call MainWindow::updateDeviceScaleFactor on WM_DPICHANGED. (MainWindow::updateDeviceScaleFactor): Converted from MiniBrowser::updateDeviceScaleFactor and MiniBrowser::generateFontForScaleFactor. Set a URL bar's font if DPI is changed. * MiniBrowser/win/MainWindow.h: * MiniBrowser/win/MiniBrowser.cpp: (MiniBrowser::init): (MiniBrowser::generateFontForScaleFactor): Deleted. (MiniBrowser::updateDeviceScaleFactor): Deleted. * MiniBrowser/win/MiniBrowser.h: (MiniBrowser::deviceScaleFactor): Deleted. (MiniBrowser::urlBarFont): Deleted. 2018-06-07 Jonathan Bedard [webkitpy] Treat svn versions as Version objects https://bugs.webkit.org/show_bug.cgi?id=186403 Reviewed by Dan Bernstein. * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: * Scripts/webkitpy/common/checkout/scm/svn.py: (SVN.svn_version): Return Version object instead of string. (SVN._status_regexp): Convert version string to Version object. (SVN.add_list): Ditto. 2018-06-07 Tadeu Zagallo Don't try to allocate JIT memory if we don't have the JIT entitlement https://bugs.webkit.org/show_bug.cgi?id=182605 Reviewed by Mark Lam. Add the Security framework to the TestWTF target, since it's required by the new function to check the entitlements. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2018-06-07 Mark Lam Enhance run-jsc-stress-tests to allow a test to specify test specific options required for it to run. https://bugs.webkit.org/show_bug.cgi?id=186409 Reviewed by Saam Barati. This is needed because some tests are written with specific features in mind, and we may not necessarily want to enable that option for all tests. We can now specify something like this at the top of a test file: //@ requireOptions("--useIntlPluralRules=true") ... and ensure that that test will be run with the --useIntlPluralRules=true option for all test configurations that run the test. * Scripts/run-jsc-stress-tests: 2018-06-07 Tim Horton REGRESSION (r232544): [iOS] TestWebKitAPI.WebKit.OverrideLayoutSizeChangesDuringAnimatedResizeSucceed is failing https://bugs.webkit.org/show_bug.cgi?id=186395 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: (TEST): endAnimatedResize no longer synchronizes, so we have to wait for the next presentation update. 2018-06-07 Thibault Saunier [GTK][WPE] Start implementing MediaStream API https://bugs.webkit.org/show_bug.cgi?id=185787 Reviewed by Philippe Normand. * Scripts/webkitpy/style/checker.py: Apply special formatting rules for new GObject subclasses. * gstreamer/jhbuild.modules: Added a patch for the gst-plugins-base. * gstreamer/patches/gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch: Added this fix to gst-plugings-base to fix the decodebin3. Merged as 89d0e9cc92a86aa0227ee87406737b6d31670aea 2018-06-07 Brendan McLoughlin Update web-platform-tests github location in webkitpy.w3c.test_importer https://bugs.webkit.org/show_bug.cgi?id=186392 Reviewed by Youenn Fablet. * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.write_import_log): 2018-06-07 Jonathan Bedard webkitperl: Generalize .internal SDK suffix https://bugs.webkit.org/show_bug.cgi?id=186352 Reviewed by Alexey Proskuryakov. * Scripts/build-webkit: * Scripts/package-root: (usage): * Scripts/webkitdirs.pm: (parseAvailableXcodeSDKS): Parse 'xcodebuild -showsdks' output. (availableXcodeSDKS): Generate a list of all available Xcode SDKs on this machine. (determineXcodeSDK): Always prefer .internal SDKs if available. * Scripts/webkitperl/webkitdirs_unittest/availableXcodeSDKS.pl: 2018-06-07 Fujii Hironori [Win][MiniBrowser] Support multiple windows properly https://bugs.webkit.org/show_bug.cgi?id=186263 Reviewed by Ryosuke Niwa. The current implementation of PrintWebUIDelegate::createWebViewWithRequest is wrong. It is using CreateProcess to open a new window, and doesn't return the new instance of IWebView. As the result, for example, window.close doesn't work as expected. In this change, a new MainWindow is created and return the IWebView in PrintWebUIDelegate::createWebViewWithRequest. In addition to it, this change unifies the lifetime of MiniBrowser and its delegates AccessibilityDelegate, PrintWebUIDelegate, ResourceLoadDelegate and WebDownloadDelegate in order to keep MiniBrowser alive as long as the delegates live. Because the window of webview keeps references of such delegates and accesses those after MiniBrowser destruction. * MiniBrowser/win/MainWindow.h: Added s_numInstances class member to count the number of instance to close the application. Do not use unique_ptr for m_browserWindow because it has ref count now. * MiniBrowser/win/MainWindow.cpp: (MainWindow::MainWindow): Increment s_numInstances. (MainWindow::~MainWindow): Decrement s_numInstances. (MainWindow::create): (MainWindow::init): (MainWindow::WndProc): Rename thiz to thisWindow. Keep this instance alive during this function by using RefPtr. Deref the MainWindow instance on WM_DESTROY. Quit the application when the last MainWindow is closed. (MainWindow::cachesDialogProc): Rename thiz to thisWindow. (MainWindow::customUserAgentDialogProc): Ditto. * MiniBrowser/win/MiniBrowser.h: Added declarations AddRef and Release. * MiniBrowser/win/MiniBrowser.cpp: (MiniBrowser::create): (MiniBrowser::AddRef): (MiniBrowser::Release): (MiniBrowser::init): Passes this to the constructors of delegates. * MiniBrowser/win/AccessibilityDelegate.cpp: (AccessibilityDelegate::AddRef): Delegate to MiniBrowser. (AccessibilityDelegate::Release): Ditto. * MiniBrowser/win/AccessibilityDelegate.h: Removed m_refCount. (AccessibilityDelegate::AccessibilityDelegate): * MiniBrowser/win/MiniBrowserWebHost.cpp: (MiniBrowserWebHost::AddRef): Delegate to MiniBrowser. (MiniBrowserWebHost::Release): Ditto. * MiniBrowser/win/MiniBrowserWebHost.h: Removed m_refCount. * MiniBrowser/win/PrintWebUIDelegate.cpp: (PrintWebUIDelegate::createWebViewWithRequest): Create a new MainWindow and return the IWebView. (PrintWebUIDelegate::AddRef): Delegate to MiniBrowser. (PrintWebUIDelegate::Release): Ditto. * MiniBrowser/win/PrintWebUIDelegate.h: Removed m_refCount. (PrintWebUIDelegate::PrintWebUIDelegate): * MiniBrowser/win/ResourceLoadDelegate.cpp: (ResourceLoadDelegate::AddRef): Delegate to MiniBrowser. (ResourceLoadDelegate::Release): Ditto. * MiniBrowser/win/ResourceLoadDelegate.h: Removed m_refCount. * MiniBrowser/win/WebDownloadDelegate.cpp: (WebDownloadDelegate::WebDownloadDelegate): (WebDownloadDelegate::AddRef): Delegate to MiniBrowser. (WebDownloadDelegate::Release): Ditto. * MiniBrowser/win/WebDownloadDelegate.h: Removed m_refCount. 2018-06-06 Fujii Hironori [Win][MiniBrowser] Remove gMainWindow global variable https://bugs.webkit.org/show_bug.cgi?id=186378 Reviewed by Ryosuke Niwa. I'm going to support multiple MainWindow in Bug 186263. It should not be assumed that MainWindow has only one instance. gMainWindow is used only in DisplayAuthDialog. * MiniBrowser/win/Common.cpp: (authDialogProc): Use DWLP_USER to store the dialog data. (displayAuthDialog): Moved and renamed from MainWindow::displayAuthDialog. Use DialogBoxParam instead of DialogBox to pass a data pointer. Do not return S_OK if DialogBoxParam returns -1. Take a HWND argument as the parent window. (DisplayAuthDialog): Deleted. * MiniBrowser/win/Common.h: * MiniBrowser/win/MainWindow.cpp: (authDialogProc): Moved to Common.cpp. (MainWindow::displayAuthDialog): Ditto. * MiniBrowser/win/MainWindow.h: * MiniBrowser/win/ResourceLoadDelegate.cpp: (ResourceLoadDelegate::didReceiveAuthenticationChallenge): * MiniBrowser/win/WinMain.cpp: (wWinMain): Added a local variable mainWindow instead of using gMainWindow. 2018-06-06 Dan Bernstein [Xcode] Opt out of the New Build System https://bugs.webkit.org/show_bug.cgi?id=186380 Reviewed by Alexey Proskuryakov. * Scripts/webkitdirs.pm: (XcodeOptions): Have -UseNewBuildSystem=NO passed to xcodebuild. 2018-06-06 Antoine Quint Rename color-filter to -apple-color-filter and do not expose it to Web content https://bugs.webkit.org/show_bug.cgi?id=186306 Reviewed by Simon Fraser. Adding an option to turn support for the -apple-color-filter property on via an HTML comment. * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): 2018-06-06 Brent Fulgham Adjust compile and runtime flags to match shippable state of features (Part 2) https://bugs.webkit.org/show_bug.cgi?id=186319 Unreviewed test fix. TestWebKitAPI was timing out because 'color' input types are no longer support. I also discovered that the ASSERT_STREQ macro returns on error, which causes tests to time out whenever a 'done = true' call (needed to end the test) is done after ASSERT_STREQ, which might fail and return early, preventing the flag from being set. * TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsTextField.mm: (-[InjectedBundleNodeHandleIsTextField webProcessPlugIn:didCreateBrowserContextController:]): Make testing of the 'color' input type conditional on the feature being part of the build. * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[AutoFillDelegate _webView:didClickAutoFillButtonWithUserInfo:]): Set the 'done=true' state before performing string equality assertions, since they do an early return and bypass the end state of the test. (-[DidResignInputElementStrongPasswordAppearanceDelegate _webView:didResignInputElementStrongPasswordAppearanceWithUserInfo:]): Ditto. (-[AutoFillAvailableDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Ditto. (-[InjectedBundleNodeHandleIsTextFieldDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Ditto. 2018-06-05 Chris Dumez Regression(r232082): Websites get loaded inside of Messages App chat transcript https://bugs.webkit.org/show_bug.cgi?id=186331 Reviewed by Darin Adler. Add API test coverage. * TestWebKitAPI/Tests/mac/NoPolicyDelegateResponse.mm: (-[NoDecidePolicyForNavigationActionDecisionDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): (-[NoDecidePolicyForNavigationActionDecisionDelegate webView:didStartProvisionalLoadForFrame:]): (TestWebKitAPI::TEST): (-[NoPolicyDelegateDecisionDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): Deleted. (-[NoPolicyDelegateDecisionDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]): Deleted. (-[NoPolicyDelegateDecisionDelegate webView:didFinishLoadForFrame:]): Deleted. 2018-06-05 Wenson Hsieh DataInteractionTests ContentEditableToTextarea and ContentEditableToContentEditable are failing on recent iOS 12 https://bugs.webkit.org/show_bug.cgi?id=186325 Reviewed by Tim Horton. Tweak these API tests so that they're robust against changes to how NSAttributedStrings are serialized in item providers ("public.rtf" vs. "com.apple.flat-rtfd"). Across all versions of iOS, just verify that either rich text type is present in the list of dragged type identifiers, and that the rich text type is placed at a higher fidelity than plain text. * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: (checkRichTextTypePrecedesPlainTextType): (TestWebKitAPI::TEST): (checkTypeIdentifierPrecedesOtherTypeIdentifier): Deleted. 2018-06-05 Brent Fulgham Adjust compile and runtime flags to match shippable state of features https://bugs.webkit.org/show_bug.cgi?id=186319 Reviewed by Maciej Stachowiak, Jon Lee, and others. This patch revises the compile time and runtime state for various features to match their suitability for end-user releases. * TestWebKitAPI/Configurations/DebugRelease.xcconfig: Update to match WebKit definition of WK_RELOCATABLE_FRAMEWORKS so that ENABLE(EXPERIMENTAL_FEATURES) is defined properly for Cocoa builds. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Don't build ENABLE_INPUT_TYPE_COLOR or ENABLE_INPUT_TYPE_COLOR_POPOVER. 2018-06-05 Saam Barati run-testmem should have a dry run option and an option to parse the stdout of executing the dry run https://bugs.webkit.org/show_bug.cgi?id=186293 Reviewed by Mark Lam. This makes it easier to execute run-testmem on a device that doesn't have ruby on it. run-testmem now has a --dry option that will output commands to execute in bash. To run on a device that doesn't have ruby, just put its output into a bash script, and copy the PerformanceTests/testmem directory onto that device, and execute the bash script. Running that bash script will give you raw output. Make a file with that output and pass it into run-testmem using the --parse option. run-testmem will parse the raw output and compute the benchmark score. * Scripts/run-testmem: 2018-06-05 Youenn Fablet ServiceWorker registration should store any script fetched through importScripts https://bugs.webkit.org/show_bug.cgi?id=182444 Reviewed by Chris Dumez. Add support to crash the storage process from Internals. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::terminateStorageProcess): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::terminateStorageProcess): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): 2018-06-05 Brent Fulgham Revise DEFAULT_EXPERIMENTAL_FEATURES_ENABLED to work properly on Apple builds https://bugs.webkit.org/show_bug.cgi?id=186286 Reviewed by Dan Bernstein. Use the WK_RELOCATABLE_FRAMEWORKS flag (which is always defined for non-production builds) to define ENABLE(EXPERIMENTAL_FEATURES) so that we do not need to manually change this flag when preparing for a production release. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Use WK_RELOCATABLE_FRAMEWORKS to determine whether experimental features should be enabled, and use it to properly define the feature flag. 2018-06-05 Robin Morisset Add a grammar (in antlr4 format) to the WSL spec. https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo It is just the raw rules, without much comments and no typesetting. Compiles to any of Java/JS/C++/etc.. with antlr4 (requires a JDK) It does not exactly match the parser of the current js implementation of WSL, it: - Accepts negative literals - Reserves keywords fallthrough/auto - Refuses '_' as a valid identifier - Accepts several capitalizations for Null/True/False - Accepts variable declarations at the top-level - Correctly parses ternary expressions - Forbids empty extension list for protocols - Does not allow a space between '[' and ']' in type suffixes - Correctly parses nested generics - Accepts a 'fallthrough;' statement (for switches) - Refuses chained relational operator (e.g. x < y < z) - Generally a completely different structure for parsing effectful expressions, although it probably accepts about the same language - Currently only accepts literals and identifiers as constexpr (while the js parser accepts way too much, including '(x += 42)') There are probably more differences that I missed. The js parser will probably have to be mostly rewritten to follow the spec more closely (and fix all the bugs). I will try to see if it can be automatically derived from the antlr4 grammar. * WebGPUShadingLanguageRI/SpecWork/WSL.g4: Added. 2018-06-04 Frederic Wang import-w3c-tests should rely on to detect CSS manual tests https://bugs.webkit.org/show_bug.cgi?id=186261 Reviewed by Youenn Fablet. * Scripts/webkitpy/w3c/test_parser.py: (TestParser.is_wpt_manualtest): Add code to detect whether a file is a manual test from its tags. This is based on SourceFile::content_is_css_manual from the WPT repository. * Scripts/webkitpy/w3c/test_parser_unittest.py: Add a test to verify whether files with are manual or non-manual according to CSS WG rules. 2018-06-04 Dan Bernstein Fixed building ImageDiff with the default build system in the Xcode 10 developer beta. * ImageDiff/cg/Configurations/Base.xcconfig: Use #include? to include HaveInternalSDK.xcconfig, since it may not be preent. 2018-06-04 Dan Bernstein Fixed building TestWebKitAPI with a shared build directory with XCBuild, which is the default build system in the Xcode 10 developer beta. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Changed the reference to the built libWTF.a to be relative to the built products directory. 2018-06-04 Chris Dumez Rename "Cross-Origin-Options" HTTP header to "Cross-Origin-Window-Policy" https://bugs.webkit.org/show_bug.cgi?id=186287 Reviewed by Youenn Fablet. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * DumpRenderTree/win/DumpRenderTree.cpp: (enableExperimentalFeatures): 2018-06-04 Daniel Bates Typo in MockBugzillaQueries.fetch_attachment_ids_from_review_queue() https://bugs.webkit.org/show_bug.cgi?id=186290 Reviewed by Aakash Jain. Although the usefulness of the code in MockBugzillaQueries.fetch_attachment_ids_from_review_queue() is questionable we should fix a typo when calling this mocked function with argument since. * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzillaQueries.fetch_attachment_ids_from_review_queue): 2018-06-04 Dan Bernstein Fixed building with the macOS Mojave seed SDK. * TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm: 2018-06-04 Alexey Proskuryakov Add Mojave support to WebKit tools https://bugs.webkit.org/show_bug.cgi?id=186282 Reviewed by Daniel Bates. Nightly build support will be added separately. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave@2x.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js: * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css: Added dashboard support. * BuildSlaveSupport/build.webkit.org-config/wkbuild.py: * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py: Trigger the right build queues on check-in. * Scripts/webkitpy/common/version_name_map.py: * Scripts/webkitpy/common/version_name_map_unittest.py: The main version mapping class updated. * Scripts/webkitpy/layout_tests/models/test_expectations.py: * Scripts/webkitpy/port/mac_unittest.py: Updated for more platforms in unit tests. * TestResultServer/static-dashboards/flakiness_dashboard.js: Added the new platform to flakiness dashboard. 2018-06-04 Wenson Hsieh [WebKit on watchOS] Remove all uses of the EXTRA_ZOOM_MODE compiler flag https://bugs.webkit.org/show_bug.cgi?id=186279 Reviewed by Tim Horton. Replaces uses of ENABLE(EXTRA_ZOOM_MODE) with PLATFORM(WATCHOS). * TestWebKitAPI/Tests/ios/RenderingProgressTests.mm: 2018-06-03 Fujii Hironori [Win][MiniBrowser] Remove gMiniBrowser global variable https://bugs.webkit.org/show_bug.cgi?id=186134 Reviewed by Brent Fulgham. It should not be assumed there is only one main window and one browser window to support multiple windows properly. gMainWindow and gMiniBrowser global variables should be removed. This change removes gMiniBrowser. * MiniBrowser/win/Common.cpp: Removed gMiniBrowser global variable. * MiniBrowser/win/Common.h: Ditto. * MiniBrowser/win/MainWindow.cpp: (MainWindow::init): (MainWindow::WndProc): (EditProc): Post WM_COMMAND if the enter key is pressed in URL bar. (MainWindow::cachesDialogProc): Renamed from Caches. (MainWindow::customUserAgentDialogProc): Renamed from CustomUserAgent. (MainWindow::onURLBarEnter): Extracted from EditProc. (BackButtonProc): Deleted. (ForwardButtonProc): Deleted. (Caches): Renamed to MainWindow::cachesDialogProc. (CustomUserAgent): Renamed to MainWindow::customUserAgentDialogProc. * MiniBrowser/win/MainWindow.h: Convert hCacheWnd global variable to a member variable of MainWindow. * MiniBrowser/win/MiniBrowserLibResource.h: * MiniBrowser/win/WinMain.cpp: (wWinMain): 2018-06-02 Darin Adler [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption https://bugs.webkit.org/show_bug.cgi?id=186227 Reviewed by Dan Bernstein. * DumpRenderTree/mac/AccessibilityCommonMac.mm: (+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease. (-[NSString createJSStringRef]): Add __bridge to a bridging typecast. * DumpRenderTree/mac/AccessibilityControllerMac.mm: Add a missing include. * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: (-[NSString createJSStringRef]): Add __bridge to a bridging typecast. * DumpRenderTree/mac/AccessibilityTextMarkerMac.mm: (AccessibilityTextMarker::isEqual): Ditto. (AccessibilityTextMarkerRange::isEqual): Ditto. * DumpRenderTree/mac/DumpRenderTree.mm: (-[DumpRenderTree _waitForWebThread]): Use @autoreleasepool instead of NSAutoreleasePool. (DumpRenderTreeMain): Ditto. (WebThreadLockAfterDelegateCallbacksHaveCompleted): Ditto. (runTest): Ditto. * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm: (copyFile): Use a std::pair to return both a URL and an error rather than using an out argument for the NSError. (-[DumpRenderTreeFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]): Updated for the above change. * DumpRenderTree/mac/DumpRenderTreeWindow.mm: (-[DumpRenderTreeWindow _addToOpenWindows]): Add __bridge to a bridging typecast. (-[DumpRenderTreeWindow close]): Ditto. * DumpRenderTree/mac/LayoutTestHelper.m: (setDisplayColorProfile): Ditto. * DumpRenderTree/mac/PolicyDelegate.mm: Add a missing include. * DumpRenderTree/mac/ResourceLoadDelegate.mm: (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): Add __bridge to a bridging typecast. * DumpRenderTree/mac/TestRunnerMac.mm: (-[APITestDelegateIPhone initWithTestRunner:utf8Data:baseURL:]): Ditto. (TestRunner::apiTestNewWindowDataLoadBaseURL): Use @autoreleasepool instead of NSAutoreleasePool. * DumpRenderTree/mac/TextInputControllerMac.m: Fix a comment. * DumpRenderTree/mac/UIScriptControllerMac.mm: (WTR::UIScriptController::replaceTextAtRange): Add __bridge to a bridging typecast. (WTR::UIScriptController::contentsOfUserInterfaceItem const): Ditto. (WTR::UIScriptController::overridePreference): Ditto. * DumpRenderTree/mac/WorkQueueItemMac.mm: (LoadItem::invoke const): Ditto. (LoadHTMLStringItem::invoke const): Ditto. (ScriptItem::invoke const): Ditto. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease. (-[NSString createJSStringRef]): Add __bridge to a bridging typecast. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease. (-[NSString createJSStringRef]): Add __bridge to a bridging typecast. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::accessibleElementById): Add __bridge to a bridging typecast. * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (-[NSString createJSStringRef]): Ditto. * WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm: (WTR::AccessibilityTextMarker::isEqual): Ditto. * WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm: (WTR::AccessibilityTextMarkerRange::isEqual): Ditto. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Ditto. (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Ditto. (WTR::AccessibilityUIElement::textMarkerRangeLength): Ditto. (WTR::AccessibilityUIElement::previousTextMarker): Ditto. (WTR::AccessibilityUIElement::nextTextMarker): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. (WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto. (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto. (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto. (WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Ditto. (WTR::createJSStringRef): Ditto. (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Ditto. (WTR::AccessibilityUIElement::indexForTextMarker): Ditto. (WTR::AccessibilityUIElement::isTextMarkerValid): Ditto. (WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto. (WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto. (WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto. (WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto. (WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto. (WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto. (WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto. (WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto. (WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto. (WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::initializeWebViewConfiguration): Ditto. (WTR::TestController::platformContext): Ditto. (WTR::TestController::platformPreferences): Ditto. (WTR::TestController::platformAdjustContext): Ditto. * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::PlatformWebView): Ditto. * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::initializeInjectedBundlePath): Ditto. (WTR::TestController::initializeTestPluginDirectory): Ditto. (WTR::TestController::platformConfigureViewForTest): Ditto. * WebKitTestRunner/mac/UIScriptControllerMac.mm: (WTR::nsString): Use CFBridgingRelease instead of autorelease. (WTR::UIScriptController::platformPlayBackEventStream): Add __bridge to a bridging typecast. * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm: Add a missing include. * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: (-[LocalPasteboard setPropertyList:forType:]): Add _bridge to a bridging typecast. (-[LocalPasteboard setString:forType:]): Ditto. * WebKitTestRunner/mac/main.mm: (main): Use @autoreleasepool instead of NSAutoreleasePool. 2018-06-02 Keith Miller run-jsc should pass the option to use dollar vm by default https://bugs.webkit.org/show_bug.cgi?id=186170 Reviewed by Yusuke Suzuki. * Scripts/run-jsc: 2018-06-02 Commit Queue Unreviewed, rolling out r232421. https://bugs.webkit.org/show_bug.cgi?id=186240 Breaks webkitpy tests (Requested by aakashjain on #webkit). Reverted changeset: "Add some tests for lldb_webkit.py" https://bugs.webkit.org/show_bug.cgi?id=183744 https://trac.webkit.org/changeset/232421 2018-06-01 Daniel Bates Add some tests for lldb_webkit.py https://bugs.webkit.org/show_bug.cgi?id=183744 Reviewed by Alexey Proskuryakov. Adds some tests to ensure we do not regress LLDB pretty-printing of WTF::StringImpl and WTF::String objects. The tests make use of the LLDB Python API (lldb.py) and a simple debug-built test program, lldbWebKitTester, to run. For now, we only support building lldbWebKitTester on Mac. * Makefile: Build the simple test tool lldbWebKitTester on Mac. * Scripts/build-lldbwebkittester: Added. (buildProjectOrDie): * Scripts/dump-class-layout: Extract logic to compute the path to the LLDB Python module from here to Scripts/webkitpy/common/system/systemhost.py so that it can used by both this script and lldb/lldb_webkit_unittest.py. Also import the lldb module at the top of the file and take advantage of Python's default error semantics to throw an exception if the import fails instead of handling it ourself. This has the side effect that we now always import the LLDB Python module even if this script is invoked with --help. If this turns out to be a significant annoyance then we can look to dynamically import the module as we did before this change. (webkit_build_dir): (main): (developer_dir): Deleted. (import_lldb): Deleted. * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: Update FIXME comment to reflect that fact that test-webkitpy does not support class and module fixtures. This is because test-webkitpy currently implements parallelism by breaking down existing test classes into individual test methods itself and having each worker run exactly one test method (via unittest.TestLoader.loadTestsFromName()) at a time. As a result of this reorganization, setUpModule()/setUpClass() are called for each test method as opposed to once per test class/test module. (remove_dir): Ditto. * Scripts/webkitpy/common/system/systemhost.py: (SystemHost): (SystemHost.path_to_lldb_python_directory): Added. * Scripts/webkitpy/test/main.py: (_find_lldb_webkit_tester): Returns whether there exists a Debug or Release-built lldbWebKitTester. (_build_lldb_webkit_tester): Builds lldbWebKitTester. For now, we only support building lldbWebKitTester on Mac. (main): Add Tools/lldb to the test search path if the platform has lldb.py. (Tester.run): Pass a boolean as to whether we will run the lldb_webkit unit tests. (Tester._run_tests): Modified to take a boolean as to whether to run the lldb_webkit unit tests. If we will run these tests then build lldbWebKitTester if it has not already been built as the unit tests depend on this program. * lldb/lldbWebKitTester/Configurations/Base.xcconfig: Added. * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: Added. * lldb/lldbWebKitTester/Configurations/lldbWebKitTester.xcconfig: Added. * lldb/lldbWebKitTester/Makefile: Added. * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Added. * lldb/lldbWebKitTester/main.cpp: Added. (breakForTestingSummaryProviders): (utf16String): (testSummaryProviders): (main): * lldb/lldb_webkit_unittest.py: Added. (destroy_cached_debug_session): (LLDBDebugSession): (LLDBDebugSession.setup): (LLDBDebugSession.tearDown): (TestSummaryProviders): (TestSummaryProviders.setUpClass): (TestSummaryProviders._sbFrame): (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_null_string): (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_empty_string): (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string): (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string): (TestSummaryProviders.serial_test_WTFString_SummaryProvider_null_string): (TestSummaryProviders.serial_test_WTFString_SummaryProvider_empty_string): (TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string): (TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string): 2018-06-01 Frederic Wang export-w3c-test-changes cannot apply patches when some w3c-import.log files are changed https://bugs.webkit.org/show_bug.cgi?id=186133 Reviewed by Youenn Fablet. * Scripts/webkitpy/w3c/test_exporter.py: Exclude w3c-import.log from the diff. * Scripts/webkitpy/w3c/test_exporter_unittest.py: Add unit test. 2018-05-31 Frederic Wang export-w3c-test-changes should use the new location & name of the WPT repo https://bugs.webkit.org/show_bug.cgi?id=186135 Reviewed by Youenn Fablet. Web platform tests have been moved to GitHub's web-platform-tests/wpt. This patch updates the corresponding variables to use the new organization and repository name. It also refactors a bit the code to reduce the amount of hardcoded strings. * Scripts/webkitpy/w3c/common.py: Use org web-platform-tests, repo name wpt. Also removes the final slash to WPT_GH_URL, so it can be used for repo URL too. * Scripts/webkitpy/w3c/test_exporter.py: Import more symbols and define WPT_PR_URL from WPT_GH_URL. (WebPlatformTestExporter._wpt_fork_branch_github_url): Use WPT_GH_REPO_NAME. (WebPlatformTestExporter._wpt_fork_push_url): Use WPT_GH_REPO_NAME. (WebPlatformTestExporter._git): Use WPT_GH_URL. (WebPlatformTestExporter._ensure_username_and_token): Use WPT_GH_ORG, WPT_GH_REPO_NAME. (WebPlatformTestExporter.make_pull_request): Use WPT_GH_ORG, WPT_GH_REPO_NAME. (parse_args): Use WPT_GH_REPO_NAME, WPT_GH_URL. * Scripts/webkitpy/w3c/test_exporter_unittest.py: (TestExporterTest.test_export): Update organization and repository names for the remote branch and pull request. (TestExporterTest.test_export_with_specific_branch): Update repository name. 2018-05-31 Ryan Haddad Update expected results for BuildStepsConstructorTest https://bugs.webkit.org/show_bug.cgi?id=186119 Reviewed by Alex Christensen. * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Add missing entries for 'WinCairo 64-bit' bots. 2018-05-31 Sihui Liu [iOS] TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPool fails because cookies use different files with/without processpool https://bugs.webkit.org/show_bug.cgi?id=185831 Reviewed by David Kilzer. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TEST): 2018-05-31 Chris Dumez [iOS] API test ScrollViewInsetTests.InnerHeightWithLargeTopContentInset is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=184893 Reviewed by Wenson Hsieh. Update test to wait until the view is the expected height instead of calling waitForNextPresentationUpdate once and expect the view to have the right height. This fixes the flakiness. * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: (TestWebKitAPI::waitUntilInnerHeightIs): (TestWebKitAPI::TEST): 2018-05-31 Leo Balter test262-runner should run in verbose mode in automation https://bugs.webkit.org/show_bug.cgi?id=186115 Reviewed by Yusuke Suzuki. This patch toggles the verbose mode in the build bot and reports every test file in order to avoid the '1200 seconds without output' issue. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunTest262Tests): * Scripts/test262/Runner.pm: (processResult): 2018-05-30 Fujii Hironori [Win][MiniBrowser] Move MainWindow related code from Common.cpp to MainWindow.cpp https://bugs.webkit.org/show_bug.cgi?id=186079 Reviewed by Alex Christensen. This is a sub task of Bug 184770. This change is partial. I'm going to remove global variables gMainWindow and gMiniBrowser and convert more functions to MainWindow's methods in follow-up patches. * MiniBrowser/win/CMakeLists.txt: Added Common.cpp * MiniBrowser/win/Common.cpp: (menuItemIsChecked): Moved to MainWindow.cpp. (turnOffOtherUserAgents): Ditto. (EditProc): Ditto. (BackButtonProc): Ditto. (ForwardButtonProc): Ditto. (About): Ditto. (Caches): Ditto. (CustomUserAgent): Ditto. (AuthDialogProc): Ditto. (DisplayAuthDialog): Converted to MainWindow's method. (ToggleMenuItem): Ditto. (loadURL): Ditto. * MiniBrowser/win/Common.h: * MiniBrowser/win/MainWindow.cpp: (MainWindow::init): Call SetFocus at the end of the construction. (MainWindow::WndProc): (menuItemIsChecked): Moved from Common.cpp. (turnOffOtherUserAgents): Ditto. (EditProc): Ditto. (BackButtonProc): Ditto. (ForwardButtonProc): Ditto. (About): Ditto. (Caches): Ditto. (CustomUserAgent): Ditto. (authDialogProc): Ditto. (MainWindow::displayAuthDialog): Converted from a function of Common.cpp. (MainWindow::toggleMenuItem): Ditto. (MainWindow::loadURL): Ditto. * MiniBrowser/win/MainWindow.h: Added method declarations. * MiniBrowser/win/MiniBrowser.h: Added pragma once. * MiniBrowser/win/WinMain.cpp: (wWinMain): Include Common.h instead of Common.cpp. 2018-05-30 Brady Eidson REGRESSION (r224684): User-agent seen by page does not change when modified by the develop menu options after reloading. and https://bugs.webkit.org/show_bug.cgi?id=186111 Reviewed by Andy Estes. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setCustomUserAgent): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): 2018-05-30 Youenn Fablet Rename CrossOriginResourcePolicy same to same-origin https://bugs.webkit.org/show_bug.cgi?id=186080 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp: (TestWebKitAPI::TEST): 2018-05-30 Ms2ger [GTK] Unreviewed test gardening https://bugs.webkit.org/show_bug.cgi?id=186098 Unreviewed gardening. * TestWebKitAPI/glib/TestExpectations.json: update expectations. 2018-05-29 Youenn Fablet Add a consistency check between URL and CFURL https://bugs.webkit.org/show_bug.cgi?id=182444 Reviewed by Geoff Garen. DRT code expected a non null URL which is no longer the case now. Updated DRT to remove that assumption. * DumpRenderTree/TestRunner.cpp: (TestRunner::redirectionDestinationForURL): * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/ResourceLoadDelegate.mm: (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): 2018-05-29 Brendan McLoughlin Export changes to web-platform-test as part of the webkit-patch upload workflow https://bugs.webkit.org/show_bug.cgi?id=184914 Reviewed by Youenn Fablet. * Scripts/webkitpy/tool/commands/upload.py: (Upload): (CreateBug.execute): (WPTChangeExport): * Scripts/webkitpy/tool/steps/__init__.py: * Scripts/webkitpy/tool/steps/wptchangeexport.py: Added. (WPTChangeExport): (WPTChangeExport.options): (WPTChangeExport.run): * Scripts/webkitpy/w3c/common.py: * Scripts/webkitpy/w3c/test_exporter.py: (WebPlatformTestExporter): (WebPlatformTestExporter.__init__): (WebPlatformTestExporter.username): (WebPlatformTestExporter.token): (WebPlatformTestExporter._github): (WebPlatformTestExporter._wpt_fork_branch_github_url): (WebPlatformTestExporter._wpt_fork_remote): (WebPlatformTestExporter._wpt_fork_push_url): (WebPlatformTestExporter._git): (WebPlatformTestExporter._branch_name): (WebPlatformTestExporter._public_branch_name): (WebPlatformTestExporter._wpt_patch): (WebPlatformTestExporter.has_wpt_changes): (WebPlatformTestExporter._find_filename): (WebPlatformTestExporter._is_ignored_file): (WebPlatformTestExporter._strip_ignored_files_from_diff): (WebPlatformTestExporter.write_git_patch_file): (WebPlatformTestExporter._prompt_for_token): (WebPlatformTestExporter._prompt_for_username): (WebPlatformTestExporter._ensure_username_and_token): (WebPlatformTestExporter._validate_and_save_token): (WebPlatformTestExporter.create_branch_with_patch): (WebPlatformTestExporter.push_to_wpt_fork): (WebPlatformTestExporter.make_pull_request): (WebPlatformTestExporter.delete_local_branch): (WebPlatformTestExporter.create_upload_remote_if_needed): (WebPlatformTestExporter.do_export): (parse_args): (TestExporter): Deleted. (TestExporter.__init__): Deleted. (TestExporter._ensure_wpt_repository): Deleted. (TestExporter._fetch_wpt_repository): Deleted. (TestExporter._ensure_new_branch_name): Deleted. (TestExporter.download_and_commit_patch): Deleted. (TestExporter.clean): Deleted. (TestExporter.create_branch_with_patch): Deleted. (TestExporter.push_to_wpt_fork): Deleted. (TestExporter.make_pull_request): Deleted. (TestExporter.create_wpt_pull_request): Deleted. (TestExporter.delete_local_branch): Deleted. (TestExporter.create_git_patch): Deleted. (TestExporter.create_upload_remote): Deleted. (TestExporter.do_export): Deleted. * Scripts/webkitpy/w3c/test_exporter_unittest.py: (TestExporterTest.MockGit): (TestExporterTest.MockGit.create_patch): (TestExporterTest.test_export): (TestExporterTest.test_export_with_specific_branch): (TestExporterTest): (TestExporterTest.test_export_interactive_mode): (TestExporterTest.test_export_invalid_token): (TestExporterTest.test_export_wrong_token): (TestExporterTest.test_has_wpt_changes): (TestExporterTest.test_has_no_wpt_changes_for_no_diff): (TestExporterTest.test_ignore_changes_to_expected_file): 2018-05-29 Fujii Hironori [Win][MiniBrowser] Move WK1 specific code from Common.cpp to MiniBrowser.cpp https://bugs.webkit.org/show_bug.cgi?id=186029 Reviewed by Alex Christensen. This is a sub task of Bug 184770. * MiniBrowser/win/Common.cpp: (ToggleMenuItem): Extracted WK1 specific code to MiniBrowser::setPreference. (Caches): Call MiniBrowser::updateStatistics instead of updateStatistics. (AbortProc): Moved to MiniBrowser.cpp. (getPrinterDC): Ditto. (initDocStruct): Ditto. (PrintView): Ditto. (ToggleMenuFlag): Ditto. (setWindowText): Ditto. (updateStatistics): Ditto. * MiniBrowser/win/MainWindow.cpp: (MainWindow::WndProc): Call MiniBrowser::print instead of PrintView. * MiniBrowser/win/MiniBrowser.cpp: (AbortProc): Moved from Common.cpp. (getPrinterDC): Moved from Common.cpp. (initDocStruct): Moved from Common.cpp. (setWindowText): Moved from Common.cpp. (MiniBrowser::print): Renamed from PrintView of Common.cpp. (MiniBrowser::updateStatistics): Renamed from updateStatistics of Common.cpp. (MiniBrowser::setPreference): Extracted from ToggleMenuItem of Common.cpp. * MiniBrowser/win/MiniBrowser.h: Add method declarations. * MiniBrowser/win/MiniBrowserWebHost.cpp: Removed duplicated IWebFramePtr typedef. 2018-05-29 Saam Barati JSC should put bmalloc's scavenger into mini mode https://bugs.webkit.org/show_bug.cgi?id=185988 Reviewed by Michael Saboff. This patch makes it so that we turn off the JIT when running run-testmem that way we make JSC use its mini mode. * Scripts/run-testmem: 2018-05-29 Sihui Liu Unable to remove IndexedDB Databases with Cocoa API removeDataOfTypes https://bugs.webkit.org/show_bug.cgi?id=185835 Reviewed by Chris Dumez. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm: (TEST): 2018-05-29 Wenson Hsieh [Extra zoom mode] "Significant area painted" rendering progress event is rarely fired https://bugs.webkit.org/show_bug.cgi?id=186042 Reviewed by Tim Horton. Adds a new API test to check that the "significant area painting" rendering milestone is dispatched when a significant portion of the page has been painted before document load is finished. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/paint-significant-area-milestone.html: Added. * TestWebKitAPI/Tests/ios/RenderingProgressTests.mm: Added. (-[MissingResourceSchemeHandler webView:stopURLSchemeTask:]): (-[MissingResourceSchemeHandler webView:startURLSchemeTask:]): (-[RenderingProgressHandler initWithHandler:]): (-[RenderingProgressHandler _webView:renderingProgressDidChange:]): (TEST): 2018-05-29 Thibault Saunier [GStreamer] Update "qtdemux: Clarify field name about stream-encryption-system" patch https://bugs.webkit.org/show_bug.cgi?id=186040 The patch we merge contained a type and was merged in upstream GStreamer fixing that (s/avalaible/available/). Reviewed by Xabier Rodriguez-Calvar. * gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch: 2018-05-28 Sihui Liu Add an API test to check process privilege when using Cookie API https://bugs.webkit.org/show_bug.cgi?id=185406 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (TEST): 2018-05-28 Thibault Saunier [GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message. https://bugs.webkit.org/show_bug.cgi?id=185948 Reviewed by Xabier Rodriguez-Calvar. When the patch introducing gst_protection_filter_systems_by_available_decryptors was merged, we changed sensibly its behaviour concerning the way empty results is represented (now returning NULL instead of an array of 1(NULL) element) and this change was not properly taken into account in the qtdemux patch that uses it and got upstreamed. Those 3 new patches fixe that and change the NEED_CONTEXT field names to clarify the meaning of "stream-encryption-systems". * gstreamer/jhbuild.modules: * gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch: Added. Merged upstream as 3e063703b3a51b8aaa7f75f36c4660c583a60e93 * gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch: Added. Merged upstream as 43a540b1cd9f162d3dae5d50e36703dfaf558a3e * gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch: Added. 2018-05-27 Dan Bernstein Reverted the changes made for https://webkit.org/b/186016 They broke the USE(APPLE_INTERNAL_SDK) Sierra build. 2018-05-27 Dan Bernstein [Cocoa] Avoid importing directly from subumbrella frameworks https://bugs.webkit.org/show_bug.cgi?id=186016 Reviewed by Sam Weinig. * DumpRenderTree/cg/PixelDumpSupportCG.cpp: Include CoreServices.h instead of a LaunchServices header. * DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS. * DumpRenderTree/mac/LayoutTestHelper.m: Import ApplicationServices.h instead of ColorSync.h when using SDKs earlier than 10.13. * TestWebKitAPI/Configurations/Base.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS. * TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm: Import Carbon.h instead of an HIToolbox header. * WebKitTestRunner/Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS. * WebKitTestRunner/cg/TestInvocationCG.cpp: Include CoreServices.h instead of a LaunchServices header. 2018-05-27 Fujii Hironori [Win][MiniBrowser] Add MainWindow class https://bugs.webkit.org/show_bug.cgi?id=185814 Reviewed by Per Arne Vollan. This is a sub task of Bug 184770. Added a new class MainWindow to represent the main window which will be shared among WK1 and WK2. This change is partial so that it's easy to review this patch. I'll move more functions into MainWindow.cpp, and remove more global variables in forthcoming patches. * MiniBrowser/win/CMakeLists.txt: Added MainWindow.cpp. * MiniBrowser/win/Common.cpp: Removed MainWindow related global variables hMainWnd, hURLBarWnd, hBackButtonWnd and hForwardButtonWnd. Added a new global variable gMainWindow. (WndProc): Moved to MainWindow.cpp. (resizeSubViews): Ditto. (ToggleMenuFlag): Removed static to be called from MainWindow.cpp. (ToggleMenuItem): Ditto. (CustomUserAgent): Follow the global variables removal. (DisplayAuthDialog): Ditto. (loadURL): Ditto. (WndProc): Renamed to MainWindow::WndProc. * MiniBrowser/win/MainWindow.cpp: Added. (MainWindow::registerClass): Renamed from MyRegisterClass of WinMain.cpp. (MainWindow::init): Extracted MainWindow initialization code from wWinMain. (MainWindow::resizeSubViews): Moved from Common.cpp. (MainWindow::WndProc): Ditto. * MiniBrowser/win/MainWindow.h: Added. (MainWindow::hwnd): (MainWindow::browserWindow): * MiniBrowser/win/MiniBrowser.cpp: (MiniBrowser::init): (MiniBrowser::prepareViews): Extract some code into MiniBrowser::loadDefaultHTML. (MiniBrowser::loadDefaultHTML): Extracted from MiniBrowser::prepareViews. * MiniBrowser/win/MiniBrowser.h: * MiniBrowser/win/WinMain.cpp: (wWinMain): Extracted MainWindow initialization code into MainWindow::init. (MyRegisterClass): Moved to MainWindow.cpp. 2018-05-27 Fujii Hironori [Win][MiniBrowser] Remove URL argument of MiniBrowser::init https://bugs.webkit.org/show_bug.cgi?id=185969 Reviewed by Alex Christensen. MiniBrowser::init takes URL argument, but it's used only for loading default HTML if URL is not given. - Add a new method MiniBrowser::loadHTMLString - Remove loadHTMLString process from MiniBrowser::prepareViews * MiniBrowser/win/MiniBrowser.cpp: (MiniBrowser::init): Removed `requestedURL` argument. (MiniBrowser::prepareViews): Ditto. (MiniBrowser::loadHTMLString): New. (MiniBrowser::loadURL): Return E_INVALIDARG if passedURL is null instead of calling loadHTMLString. * MiniBrowser/win/MiniBrowser.h: Removed URL argument. Added loadHTMLString. * MiniBrowser/win/WinMain.cpp: (wWinMain): Call MiniBrowser::loadHTMLString if URL is not given. 2018-05-27 David Kilzer svn-apply fails when a patch has an empty file Reviewed by Daniel Bates. Prior to this change, applying the following patches resulted in: - svn: add empty file (failure) - svn: delete empty file (failure) - svn: rename empty file (failure) - git: add empty file (false-positive success) - git: delete empty file (success) - git: rename empty file (failure) * Scripts/VCSUtils.pm: (parseSvnDiffHeader): Handle the case when there is no patch following the header. If the file exists and is empty, that means it's a deletion. If the file does not exist, that means it's an addition. Everything else is a fatal error. * Scripts/svn-apply: (patch): - Only apply a patch for deletion if it has one or more text chunks. - Add a case to handle adding an empty file (an addition with no text chunks), and verify the file doesn't exist yet. - Any unhandled patch is a fatal error. * Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffHeader.pl: Add tests for adding an empty file and deleting an empty file. * Scripts/webkitperl/VCSUtils_unittest/resources/empty.txt: Add. Used by parseSvnDiffHeader.pl unit test for "add an empty file" test case. 2018-05-25 Aakash Jain Display detailed error logs when a script fails in EWS https://bugs.webkit.org/show_bug.cgi?id=175696 Reviewed by Darin Adler. * Scripts/webkitpy/tool/bot/queueengine.py: Set output_limit to 5000 characters instead of default 500 characters. * Scripts/webkitpy/tool/commands/abstractsequencedcommand.py: Ditto. * Scripts/webkitpy/tool/commands/download.py: Ditto. * Scripts/webkitpy/tool/commands/earlywarningsystem.py: Ditto. * Scripts/webkitpy/tool/commands/queues.py: Ditto. * Scripts/webkitpy/tool/commands/stepsequence.py: Ditto. 2018-05-25 Daniel Bates test-webkitpy messages logged using __main__ logger are not displayed https://bugs.webkit.org/show_bug.cgi?id=185823 Rubber-stamped by Aakash Jain. Configure the logger for __main__ so that messages that are logged before it parses its command line arguments are printed to standard error. Currently test-webkitpy creates a named logger (__main__) for its logging. However it does not configure a stream to use for printing until after it parses its command line arguments via webkitpy.test.printer.Printer.configure(). Messages logged until then are never written to the console. We explicitly configure the __main__ logger instead of calling webkitpy.test.printer.Printer.configure() earlier because the latter both configures a stream and filters logged messages based on the specified verbosity. Logged messaged from code in __main__ should not be subject to such filtering. So, we explicitly configure the __main__ logger. * Scripts/webkitpy/test/main.py: (main): 2018-05-25 Saam Barati Make JSC have a mini mode that kicks in when the JIT is disabled https://bugs.webkit.org/show_bug.cgi?id=185931 Reviewed by Mark Lam. This renames a variable for clarity. * Scripts/run-testmem: 2018-05-25 Alex Christensen URL::host should return a StringView to reduce allocations https://bugs.webkit.org/show_bug.cgi?id=185986 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WebCore/URL.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::eq): * TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm: (TestWebKitAPI::SSLKeyGeneratorTest::TearDown): 2018-05-25 Ms2ger Minor improvements to wpt exporter. https://bugs.webkit.org/show_bug.cgi?id=185978 Reviewed by Youenn Fablet. * Scripts/webkitpy/w3c/test_exporter.py: (TestExporter.push_to_wpt_fork): Update call to create_upload_remote(). (TestExporter.make_pull_request): Improve the description of the created PR. (TestExporter.create_upload_remote): Always update the remote to override any obsolete state. 2018-05-25 Saam Barati Have a memory test where we can validate JSCs mini memory mode https://bugs.webkit.org/show_bug.cgi?id=185932 Reviewed by Mark Lam. This patch adds the run-testmem script. This runs the new testmem CLI against the contents in the testmem benchmark. The contents of testmem contain tests from ARES-6, Sunspider, Octane, and JetStream. One iteration of the benchmark comprises of running each testmem test for a certain number of iterations. We collect the peak memory usage, the memory usage after running all the iterations, and the time it takes to run all the iterations. We then run the entire benchmark 3 times over. For each test, we compute the arithmetic mean over each iteration for time, peak memory, and end memory. The benchmark then computes a time score and memory score. peak memory score = geomean({peak memory of each individual test}) end memory score = geomean({end memory of each individual test}) memory score = geomean({peak memory score, end memory score}) time score = geomean({time score of each individual test}) We want the memory score to weigh improvements to peak memory usage and memory usage at the end equally. We plan to tune this benchmark in JSC's mini mode by improving the memory score while ensuring the time score is not more than 10-15% regressed. * Scripts/run-testmem: Added. 2018-05-25 Sihui Liu [WKHTTPCookieStore getAllCookies] returns inconsistent creation time https://bugs.webkit.org/show_bug.cgi?id=185041 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (TEST): 2018-05-24 Chris Dumez Reduce copying of FontCascadeDescription objects by moving them around https://bugs.webkit.org/show_bug.cgi?id=185963 Reviewed by Simon Fraser. Reduce copying of FontCascadeDescription objects by moving them around when possible. * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp: (TestWebKitAPI::TEST_F): 2018-05-24 Carlos Garcia Campos WebDriver: implement maximize, minimize and fullscreen window commands https://bugs.webkit.org/show_bug.cgi?id=180398 Reviewed by Brian Burg. * Scripts/webkitpy/port/xvfbdriver.py: (XvfbDriver._setup_environ_for_test): Set UNDER_XVFB environment variable when running under Xvfb. 2018-05-24 Xabier Rodriguez Calvar [GStreamer] Save some time disabling some compile options in the dependencies https://bugs.webkit.org/show_bug.cgi?id=185909 Reviewed by Philippe Normand. * gstreamer/jhbuild.modules: Added --disable-tests to gstreamer and --disable-examples --disable-gtk-doc to gstreamer-vaapi. 2018-05-23 Roy Reapor Use Helvetica on build.webkit.org webpages https://bugs.webkit.org/show_bug.cgi?id=185894 Reviewed by Aakash Jain. * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html: * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/common.css: * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary-mock.html: 2018-05-23 Aakash Jain Add Buildbot configuration for Opensource EWS https://bugs.webkit.org/show_bug.cgi?id=185484 Rubber-stamped by Alexey Proskuryakov. * BuildSlaveSupport/ews-build/config.json: Added, config file. * BuildSlaveSupport/ews-build/factories.py: Added, basic template for factories. * BuildSlaveSupport/ews-build/loadConfig.py: Added. (loadBuilderConfig): Loads the configuration. (checkValidWorker): Checks if the worker is valid. (checkValidBuilder): Checks if the builder is valid. (checkWorkersAndBuildersForConsistency): Check if workers and builders are consistent. (checkWorkersAndBuildersForConsistency._find_worker_with_name): (getBlackListedTags): Returns a list of keywords which should not be listed as tags. (getValidTags): Returns a list of valid tags. (getTagsForBuilder): Return a list of tags for given builder. * BuildSlaveSupport/ews-build/loadConfig_unittest.py: unit-tests for loadConfig.py. * BuildSlaveSupport/ews-build/master.cfg: Configuration for buildbot. 2018-05-23 Michael Catanzaro [GTK] Silence GCC 8 warnings https://bugs.webkit.org/show_bug.cgi?id=185556 Reviewed by Žan Doberšek. GCC is complaining about this strncpy. It's guaranteed to be safe, because the length of source and destination are always identical. But switching to snprintf avoids the warning. * DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp: (FormValue::NPP_GetValue): 2018-05-23 Ryan Haddad Unreviewed, rolling out r232112. The tests added with this change are failing on the bots. Reverted changeset: "test262/Runner.pm: add unit tests" https://bugs.webkit.org/show_bug.cgi?id=185783 https://trac.webkit.org/changeset/232112 2018-05-23 Valerie R Young test262/Runner.pm: add unit tests https://bugs.webkit.org/show_bug.cgi?id=185783 Reviewed by Aakash Jain. Add unit tests to be run by test-webkitperl * Scripts/test262/Runner.pm: (main): - If harness files cannot be found in a custom, supplies test262 path, then sure the webkit test262 harness files. - Lazily create the test262-results directory. - If an expectation file is supplied via command line, save to the supplied location instead of the detault webkit location. (compileTest): (processResult): (getHarness): * Scripts/webkitperl/test262_unittest/README: Added. * Scripts/webkitperl/test262_unittest/fixtures/expectations-compare.yaml: Added. * Scripts/webkitperl/test262_unittest/fixtures/expectations.yaml: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing-with-new-error.js: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing.js: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-passing.js: Added. (f): * Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-pass-now-failing.js: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/fail.js: Added. * Scripts/webkitperl/test262_unittest/fixtures/test/pass.js: Added. (f): * Scripts/webkitperl/test262_unittest/test262-runner-tests.pl: Added. 2018-05-22 Roy Reapor Test infrastructure websites should use jQuery and jQuery UI hosted on webkit.org https://bugs.webkit.org/show_bug.cgi?id=185788 Reviewed by Aakash Jain. * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html: * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html: * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/rebaseline.html: * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html: * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary-mock.html: * TestResultServer/static-dashboards/run-embedded-unittests.html: * TestResultServer/static-dashboards/run-unittests.html: 2018-05-22 Sihui Liu [iOS] TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPool is crashing with reason: 'Completion handler passed to -[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:] was not called' https://bugs.webkit.org/show_bug.cgi?id=185831 Reviewed by Chris Dumez. Updated the test to prevent crash after assertion fails. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): 2018-05-22 Chris Dumez Regression(AsyncPolicyDelegates): Box.app login Window is blank https://bugs.webkit.org/show_bug.cgi?id=185832 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/cocoa/WeakObjCPtr.mm: * TestWebKitAPI/Tests/mac/NoPolicyDelegateResponse.mm: Added. (-[NoPolicyDelegateDecisionDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): (-[NoPolicyDelegateDecisionDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]): (-[NoPolicyDelegateDecisionDelegate webView:didFinishLoadForFrame:]): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView _isBackground]): 2018-05-22 Sihui Liu Conversion between SecurityOriginData and DatabaseIdentifier is asymmetric when port is null https://bugs.webkit.org/show_bug.cgi?id=185715 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm: Added. (-[LocalStorageUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TEST): 2018-05-22 Sihui Liu Unreviewed, added myself as a WebKit committer. * Scripts/webkitpy/common/config/contributors.json: 2018-05-22 Ryan Haddad Unreviewed, rolling out r232052. Breaks internal builds. Reverted changeset: "Use more C++17" https://bugs.webkit.org/show_bug.cgi?id=185176 https://trac.webkit.org/changeset/232052 2018-05-22 Thibault Saunier [GStreamer] Update to GStreamer 1.14.1 in jhbuild https://bugs.webkit.org/show_bug.cgi?id=185689 Reviewed by Philippe Normand. And update the patches, removing the ones that have been merged upstream. * gstreamer/jhbuild.modules: * gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch: Removed. * gstreamer/patches/gst-plugins-good-0001-souphttpsrc-cookie-jar-and-context-query-support.patch: Removed. Not needed anymore and closed as OBSELETE upstream. * gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch: Renamed from Tools/gstreamer/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch This patch has now been merged in GStreamer master and will be there in GStreamer 1.16. * gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch: Renamed from Tools/gstreamer/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch. This patch has now been merged in GStreamer master and will be there in GStreamer 1.16. * gstreamer/patches/gst-plugins-good-0009-qtdemux-fix-assert-when-moof-contains-one-sample.patch: Removed. * gstreamer/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch: Removed. 2018-05-21 Yusuke Suzuki Use more C++17 https://bugs.webkit.org/show_bug.cgi?id=185176 Reviewed by JF Bastien. * DumpRenderTree/mac/Configurations/Base.xcconfig: * ImageDiff/cg/Configurations/Base.xcconfig: * MiniBrowser/Configurations/Base.xcconfig: * MobileMiniBrowser/Configurations/Base.xcconfig: * TestWebKitAPI/Configurations/Base.xcconfig: * WebKitTestRunner/Configurations/Base.xcconfig: 2018-05-21 Fujii Hironori [WinCairo] Enable WebKit build by default https://bugs.webkit.org/show_bug.cgi?id=185141 Reviewed by Per Arne Vollan. TestWTF, TestWebCore and TestWebKitLegacy need a dependency to WebKitForwardingHeaders because config.h includes a header of WK2. * TestWebKitAPI/PlatformWin.cmake: Make TestWTFLib, TestWebCoreLib and TestWebKitLegacyLib depend on WebKitForwardingHeaders. * TestWebKitAPI/config.h: Use PLATFORM(WIN_CAIRO) instead of BUILDING_WIN_CAIRO_WEBKIT. 2018-05-21 Jer Noble Complete fix for enabling modern EME by default https://bugs.webkit.org/show_bug.cgi?id=185770 Reviewed by Eric Carlson. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-05-18 Christopher Reid Unreviewed, add myself as a WebKit committer. * Scripts/webkitpy/common/config/contributors.json: 2018-05-21 Carlos Garcia Campos Unreviewed, rolling out r222967. It's not ready yet Reverted changeset: "[GTK][WPE] Add API to configure and enable resource load statistics" https://bugs.webkit.org/show_bug.cgi?id=177943 https://trac.webkit.org/changeset/222967 2018-05-20 Carlos Garcia Campos [GTK] MiniBrowser crashes when loading twice quickly https://bugs.webkit.org/show_bug.cgi?id=185763 Reviewed by Michael Catanzaro. This is very difficult to reproduce manually, but it happens when running WebDriver tests where loads are very fast and multiple loads are done quickly. The problem is that we use an idle to reset the progress bar, but we don't reset it when a new load starts. We always reset the last idle on destroy, but if there's another one leaked, it will crash when scheduled if the window has already been destroyed. * MiniBrowser/gtk/BrowserWindow.c: (webViewLoadProgressChanged): Stop any pending reset task when progress != 1. 2018-05-18 Commit Queue Unreviewed, rolling out r231982. https://bugs.webkit.org/show_bug.cgi?id=185793 Caused layout test failures (Requested by realdawei on #webkit). Reverted changeset: "Complete fix for enabling modern EME by default" https://bugs.webkit.org/show_bug.cgi?id=185770 https://trac.webkit.org/changeset/231982 2018-05-18 Eric Carlson Handle failure to extend sandbox gracefully https://bugs.webkit.org/show_bug.cgi?id=185779 Unreviewed, fix test results. * TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm: (TEST_F): 2018-05-18 Jer Noble Complete fix for enabling modern EME by default https://bugs.webkit.org/show_bug.cgi?id=185770 Reviewed by Eric Carlson. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-05-18 Eric Carlson Handle failure to extend sandbox gracefully https://bugs.webkit.org/show_bug.cgi?id=185779 Reviewed by Brent Fulgham. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm: Added. (-[SimulateFailedSandboxMessageHandler userContentController:didReceiveScriptMessage:]): (-[SimulateFailedSandboxUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]): (-[SimulateFailedSandboxUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]): (MediaCaptureSimulateFailedSandbox::SetUp): (MediaCaptureSimulateFailedSandbox::loadTestAndWaitForMessage): (TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/disableGetUserMedia.html: 2018-05-18 Daniel Bates "debug-safari --ios-simulator" creates lldb target to launch Mac Safari https://bugs.webkit.org/show_bug.cgi?id=185774 Reviewed by Andy Estes. For now, the script debug-safari is not supported for WebKit for iOS. To fix this we differentiate between the Apple Mac port and Apple embedded ports. * Scripts/webkitdirs.pm: (safariPath): Substitute isAppleMacWebKit() for isAppleCocoaWebKit(). (isAppleMacWebKit): Added. (isAppleCocoaWebKit): Write in terms of isAppleMacWebKit() and isEmbeddedWebKit(). (launcherName): Substitute isAppleMacWebKit() for isAppleCocoaWebKit(). (mobileSafariBundle): Substitute isIOSWebKit() for isAppleCocoaWebKit(). (debugSafari): Substitute isAppleMacWebKit() for isAppleCocoaWebKit(). (runSafari): Ditto. (runMiniBrowser): Ditto. (debugMiniBrowser): Ditto. (runWebKitTestRunner): Ditto. (debugWebKitTestRunner): Ditto. 2018-05-18 Antoine Quint [Web Animations] Turn Web Animations with CSS integration on for test runners https://bugs.webkit.org/show_bug.cgi?id=184819 Unreviewed. Rolling out the patch for this bug, it caused some flaky timeouts for animation suspension tests. * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): (shouldOverrideAndDisableWebAnimationsCSSIntegrationPreference): Deleted. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::TestOptions): (WTR::isLegacyAnimationEngineTestPath): Deleted. * WebKitTestRunner/TestOptions.h: 2018-05-18 Fujii Hironori [Win][MiniBrowser] Create MainWindow even in transparent mode https://bugs.webkit.org/show_bug.cgi?id=185597 Reviewed by Per Arne Vollan. The current implementations doesn't create the MainWindow in transparent mode. The screenshot is in Bug 58300. There were three problems: - Can't control the WebView. ie. going backward and forward. - Can't quit the program. - It makes implementation complicated. * MiniBrowser/win/Common.cpp (resizeSubViews): Resize sub views even in the transparent mode. * MiniBrowser/win/WinMain.cpp: (wWinMain): Create the main window even in the transparent mode. 2018-05-18 Antoine Quint [Web Animations] Turn Web Animations with CSS integration on for test runners https://bugs.webkit.org/show_bug.cgi?id=184819 Reviewed by Jon Lee. Make the test runners turn both the main Web Animations flag and the Web Animations CSS integration flag on. We also remove the ability to toggle the Web Animations CSS integration flag using an HTML comment directly at the top of the file since test runners now set the flag on by default and a dedicated directory exists for tests that need to run with this flag off. * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (shouldOverrideAndDisableWebAnimationsCSSIntegrationPreference): (runTest): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.cpp: (WTR::isLegacyAnimationEngineTestPath): (WTR::TestOptions::TestOptions): * WebKitTestRunner/TestOptions.h: 2018-05-17 Nan Wang AX: [macOS] Expose the primary screen height through AX API https://bugs.webkit.org/show_bug.cgi?id=185742 Reviewed by Chris Fleizach. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (attributesOfElement): * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::attributesOfElement): 2018-05-17 Commit Queue Unreviewed, rolling out r231912. https://bugs.webkit.org/show_bug.cgi?id=185750 It is prompting the user when there is no WPT changes (Requested by bmac on #webkit). Reverted changeset: "Export changes to web-platform-test as part of the webkit- patch upload workflow" https://bugs.webkit.org/show_bug.cgi?id=184914 https://trac.webkit.org/changeset/231912 2018-05-17 Valerie R Young test262/Runner.pm: expand $INC to find webkitdirs.pm https://bugs.webkit.org/show_bug.cgi?id=185739 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (getBuildPath): 2018-05-17 Carlos Alberto Lopez Perez [WPE] Implement and enable FULLSCREEN_API https://bugs.webkit.org/show_bug.cgi?id=185676 Reviewed by Žan Doberšek. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewFullScreen): 2018-05-17 Brendan McLoughlin Export changes to web-platform-test as part of the webkit-patch upload workflow https://bugs.webkit.org/show_bug.cgi?id=184914 Reviewed by Youenn Fablet. * Scripts/webkitpy/tool/commands/upload.py: (Upload): (CreateBug.execute): (WPTChangeExport): * Scripts/webkitpy/tool/steps/__init__.py: * Scripts/webkitpy/tool/steps/wptchangeexport.py: Added. (WPTChangeExport): (WPTChangeExport.options): (WPTChangeExport.run): * Scripts/webkitpy/w3c/common.py: * Scripts/webkitpy/w3c/test_exporter.py: (WebPlatformTestExporter): (WebPlatformTestExporter.__init__): (WebPlatformTestExporter.username): (WebPlatformTestExporter.token): (WebPlatformTestExporter._github): (WebPlatformTestExporter._wpt_fork_branch_github_url): (WebPlatformTestExporter._wpt_fork_remote): (WebPlatformTestExporter._wpt_fork_push_url): (WebPlatformTestExporter._git): (WebPlatformTestExporter._branch_name): (WebPlatformTestExporter._public_branch_name): (WebPlatformTestExporter.has_wpt_changes): (WebPlatformTestExporter._create_patch): (WebPlatformTestExporter.create_git_patch): (WebPlatformTestExporter._prompt_for_token): (WebPlatformTestExporter._prompt_for_username): (WebPlatformTestExporter._ensure_username_and_token): (WebPlatformTestExporter._validate_and_save_token): (WebPlatformTestExporter.push_to_wpt_fork): (WebPlatformTestExporter.make_pull_request): (WebPlatformTestExporter.delete_local_branch): (parse_args): (TestExporter): Deleted. (TestExporter.__init__): Deleted. (TestExporter._ensure_wpt_repository): Deleted. (TestExporter._fetch_wpt_repository): Deleted. (TestExporter._ensure_new_branch_name): Deleted. (TestExporter.download_and_commit_patch): Deleted. (TestExporter.clean): Deleted. (TestExporter.create_branch_with_patch): Deleted. (TestExporter.push_to_wpt_fork): Deleted. (TestExporter.make_pull_request): Deleted. (TestExporter.create_wpt_pull_request): Deleted. (TestExporter.delete_local_branch): Deleted. (TestExporter.create_git_patch): Deleted. (TestExporter.create_upload_remote_if_needed): Deleted. (TestExporter.do_export): Deleted. * Scripts/webkitpy/w3c/test_exporter_unittest.py: (TestExporterTest.test_export): (TestExporterTest.test_export_with_specific_branch): (TestExporterTest): (TestExporterTest.test_export_interactive_mode): (TestExporterTest.test_export_invalid_token): (TestExporterTest.test_export_wrong_token): 2018-05-17 Valerie R Young test262/Runner.pm: look for jsc in path if cannot call webkit-build-directory https://bugs.webkit.org/show_bug.cgi?id=185650 Reviewed by Michael Saboff. First, use jsc from CLI arg, then try to use webkit-build-directory, if that doesn't work, look for jsc in the $PATH * Scripts/test262/Runner.pm: (processCLI): (getBuildPath): (runTest): 2018-05-16 Leo Balter Test262-Runner: Adds a --timeout option https://bugs.webkit.org/show_bug.cgi?id=185696 Reviewed by Michael Saboff. The timeout option is used to set a timeout execution in ms for each test run in JSC. The passed value - if defined - will be used as the value for the JSC --watchdog arg. * Scripts/test262/Runner.pm: (processCLI): (runTest): 2018-05-16 Leo Balter Test262-Runner: Set timer for each test run https://bugs.webkit.org/show_bug.cgi?id=185692 Reviewed by Michael Saboff. Sets a high resolution timer for each execution call of JSC, reporting the time in the results report to allow identifying slow tests. * Scripts/test262/Runner.pm: (main): (processFile): (runTest): (processResult): 2018-05-16 Andy VanWagoner Add support for Intl NumberFormat formatToParts https://bugs.webkit.org/show_bug.cgi?id=185375 Reviewed by Yusuke Suzuki. Add flag for NumberFormat formatToParts. * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-05-14 Yusuke Suzuki [Win] Use C++17 in MSVC https://bugs.webkit.org/show_bug.cgi?id=185232 Reviewed by Alex Christensen. Do not use `using namespace std;`. In C++17, we have std::byte. This "byte" conflicts with ::byte defined in Windows' header. * DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp: (WindowedPluginTest::WindowedPluginTest): * DumpRenderTree/win/AccessibilityControllerWin.cpp: (logEventProc): (stringEvent): (AccessibilityController::winNotificationReceived): * DumpRenderTree/win/TextInputController.cpp: (markedRangeCallback): (firstRectForCharacterRangeCallback): (selectedRangeCallback): * DumpRenderTree/win/TextInputController.h: * DumpRenderTree/win/TextInputControllerWin.cpp: (TextInputController::markedRange): (TextInputController::firstRectForCharacterRange): (TextInputController::selectedRange): 2018-05-16 Sihui Liu Session cookies aren't reliably set when using default WKWebSiteDataStore https://bugs.webkit.org/show_bug.cgi?id=185624 Reviewed by Geoffrey Garen. Modified and enabled WebKit.WKHTTPCookieStoreWithoutProcessPool. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TEST): 2018-05-16 Valerie R Young test262/Runner.pm: save to supplied expectation file if supplied https://bugs.webkit.org/show_bug.cgi?id=185660 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (processCLI): (main): 2018-05-15 Ryan Haddad Unreviewed, rolling out r231763. The test added with this change is failing an assertion. Reverted changeset: "NSEvent event trackers don't work from WebKitTestRunner" https://bugs.webkit.org/show_bug.cgi?id=185383 https://trac.webkit.org/changeset/231763 2018-05-15 David Kilzer TestWebKitAPI: Fix warnings found by new clang compiler Reviewed by Michael Catanzaro. * TestWebKitAPI/Tests/WTF/NakedPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Poisoned.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/PoisonedRefPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/RefPtr.cpp: (TestWebKitAPI::TEST): - Add #pragma statements to ignore the new -Wself-assign-overloaded warning and to ignore this as an unknown warning on older clang versions. We want to keep these self assigments as this code is designed to test that use case. * TestWebKitAPI/Tests/WebKit/FindMatches.mm: (TestWebKitAPI::didFindStringMatches): - Replace the "rect = rect;" statement that was used to avoid an unused variable warning with two expectations. * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[PinnedStateObserver observeValueForKeyPath:ofObject:change:context:]): - Switch from -integerValue to -unsignedIntegerValue when comparing against _WKRectEdgeAll since it's an enum declared as an NSUInteger. 2018-05-15 Michael Catanzaro Unreviewed, rolling out r230749 This did not work as desired. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2018-05-15 Antoine Quint [Web Animations] Expose Web Animations CSS integration as an experimental feature https://bugs.webkit.org/show_bug.cgi?id=185647 Reviewed by Dean Jackson. Rename the Web Animations CSS integration flag. * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): 2018-05-14 Brady Eidson Add an API test to guard against regressions while re-entering setDefersLoading:. and https://bugs.webkit.org/show_bug.cgi?id=185630 Reviewed by Chris Dumez. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm: Added. (-[DoubleDefersNavigationDelegate _webView:navigation:didSameDocumentNavigation:]): (-[DoubleDefersNavigationDelegate webView:didFinishNavigation:]): (-[DefersScheme initWithBytes:]): (-[DefersScheme webView:startURLSchemeTask:]): (-[DefersScheme webView:stopURLSchemeTask:]): * TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoadingPlugin.mm: Added. (-[DoubleDefersLoadingPlugIn webProcessPlugIn:didCreateBrowserContextController:]): (-[DoubleDefersLoadingPlugIn webProcessPlugInBrowserContextController:didSameDocumentNavigation:forFrame:]): (-[DoubleDefersLoadingPlugIn dealloc]): 2018-05-14 Daniel Bates [iOS] Add a test to ensure that setTimeout() does not fire more than expected when using UIWebView https://bugs.webkit.org/show_bug.cgi?id=185599 Reviewed by Simon Fraser. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/SetTimeoutFunction.mm: Added. (-[SetTimeoutFunctionWebViewDelegate webViewDidFinishLoad:]): (-[SetTimeoutFunctionWebViewDelegate webView:didFailLoadWithError:]): (-[SetTimeoutFunctionWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]): (TestWebKitAPI::TEST): * TestWebKitAPI/ios/set-timeout-function.html: Added. 2018-05-14 Valerie R Young test262/Runner.pm: small bugs in CLI and error codes https://bugs.webkit.org/show_bug.cgi?id=185629 Reviewed by Michael Saboff. Fix two commandline args with use '-f', correct error code of failures. * Scripts/test262/Runner.pm: (processCLI): (main): 2018-05-14 Ryan Haddad Disable API tests that time out after pointer poisioning was disabled. https://bugs.webkit.org/show_bug.cgi?id=185586 Unreviewed test gardening. * TestWebKitAPI/Tests/WTF/Poisoned.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForNonTriviallyDestructibleArrays.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForTriviallyDestructibleArrays.cpp: (TestWebKitAPI::TEST): 2018-05-14 Leo Balter Test262-Runner: Fix RegExp for capturing tests metadata" https://bugs.webkit.org/show_bug.cgi?id=185622 Reviewed by Michael Saboff. This patch fixes the RegExp used to capture each test metadata regarding their EOL characters for both LF and CRLF forms. The fix also allows the runner to capture the proper results from two specific files using CR and CRLF line terminators. They are updated in the expectations file. * Scripts/test262/Runner.pm: (parseData): 2018-05-14 Jeremy Jones NSEvent event trackers don't work from WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=185383 rdar://problem/40025045 Reviewed by Simon Fraser. Post simulated wheel events to _sendEventToObservers: so they can be handled by NSEvent observers. NSEvent swipe tracking is used for webkit swipe navigation. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases): 2018-05-11 Leo Balter Test262 Runner should search for the Debug JSC by default https://bugs.webkit.org/show_bug.cgi?id=185562 Reviewed by Michael Saboff. The Test262 Runner is now searching for the Debug build of JSC by default, not the Release build. This fix allows a similar call from the previous runner, making it compatible with the current build bot configuration parameters. This patch also adds some minor improvements the verbose mode output. * Scripts/test262/Runner.pm: (processCLI): (main): (getBuildPath): (processResult): 2018-05-11 Charles Vazac Runtime feature flag for Server-Timing https://bugs.webkit.org/show_bug.cgi?id=184758 Reviewed by Youenn Fablet. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: added ENABLE_SERVER_TIMING. * DumpRenderTree/win/DumpRenderTree.cpp: enable Server Timing 2018-05-11 Fujii Hironori [Win][MiniBrowser] Move WK1 related code into MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=185418 Reviewed by Alex Christensen. All WK1 related code should be moved into MiniBrowser for the preparation of Bug 184770. This change moves the initilization code of MiniBrowse into MiniBrowser::init(). * MiniBrowser/win/Common.cpp: (getAppDataFolder): Removed `static` keyword to be called from MiniBrowser.cpp. (setCacheFolder): This is only for WK1. Moved into MiniBrowser.cpp. * MiniBrowser/win/Common.h: Added. * MiniBrowser/win/MiniBrowser.cpp: (MiniBrowser::init): Moved the initilization code from wWinMain. (MiniBrowser::setCacheFolder): Moved from Common.cpp and made it a method. * MiniBrowser/win/MiniBrowser.h: (MiniBrowser::setCacheFolder): Changed to a private method. (MiniBrowser::subclassForLayeredWindow): Changed to a private method. * MiniBrowser/win/WinMain.cpp: (wWinMain): Moved MiniBrowse initilization code into MiniBrowser.cpp. 2018-05-11 Brady Eidson Make sure history navigations reuse the existing process when necessary. and https://bugs.webkit.org/show_bug.cgi?id=185532 Reviewed by Ryosuke Niwa. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2018-05-10 Carlos Garcia Campos [JSC][GLIB] Add introspectable alternatives to functions using vargars https://bugs.webkit.org/show_bug.cgi?id=185508 Reviewed by Michael Catanzaro. Add test cases for the new API. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCFunction): (testJSCObject): 2018-05-10 Leo Balter [Build Bot] Restore configuration options to the Test262 Runner During the switch from the previous Test262 runner to the new one, a call for an extra configurations options got removed. This call is important to inform the script to find the debug or release build of JSC. It's being restored in this patch. https://bugs.webkit.org/show_bug.cgi?id=185513 Reviewed by Yusuke Suzuki. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunTest262Tests): 2018-05-10 Jonathan Bedard REGRESSION (r230998): Cannot stream API test output https://bugs.webkit.org/show_bug.cgi?id=185090 Reviewed by Ryosuke Niwa. Change run-api-tests so that the stdout and stderr of a test will be printed before it's result. If -v is passed, the output of single test runs will be streamed. * Scripts/webkitpy/api_tests/run_api_tests.py: (run): Use print_timestamps flag. (parse_args): Add timestamps option to print timestamps in the log. * Scripts/webkitpy/api_tests/runner.py: (Runner): Add running status. (Runner.__init__): Add number of workers and a flag to detect if a newline is needed at the beginning of a log line. (Runner.run): Turn off most logging coming from server process since it is not constructive for API tests. (Runner.handle): Add new log message to stream stdout and stderr instead of caching values until the test run finished. (_Worker._run_single_test): Log stdout and stderr in real time. (_Worker._run_shard_with_binary): Log stderr and stdout buffer before ending the test. (_Worker.post): Provide a post with explicitly enumerated argument names. * Scripts/webkitpy/layout_tests/views/metered_stream.py: (MeteredStream.__init__): Differentiate verbose logging and logging with timestamps. (MeteredStream.write): Allow for verbose logging without timestamps. * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py: (RegularTest): Add print_timestamps flag. (RegularTest.setUp): (RegularTest.test_logging_not_included): (VerboseTest.test_log_args): (VerboseWithOutTimestamp): (VerboseWithOutTimestamp.test_basic): Add test for verbose logging without timestamps. 2018-05-10 Ryosuke Niwa build-webkit can erroneously warn about Xcode being too old https://bugs.webkit.org/show_bug.cgi?id=185533 Reviewed by Dan Bernstein. Don't assume the version number is always a single digit. * Scripts/webkitdirs.pm: (determineXcodeVersion): 2018-05-10 Ross Kirsling [WinCairo][Buildbot] Test bots need to acquire WinCairoRequirements. https://bugs.webkit.org/show_bug.cgi?id=185528 Reviewed by Lucas Forschler. * BuildSlaveSupport/build.webkit.org-config/factories.py: (TestFactory.__init__): * BuildSlaveSupport/build.webkit.org-config/steps.py: (InstallWinCairoDependencies): 2018-05-10 Michael Catanzaro Fix some -Wstring-op-truncation warnings https://bugs.webkit.org/show_bug.cgi?id=185496 Reviewed by Alex Christensen. We have an off-by-one in the use of strncpy. The strings would not be null-terminated if the input was too long. Ensure the buffers are zero-initialized so we don't need to manually set the last bucket to NUL. * TestWebKitAPI/Tests/WTF/AtomicString.cpp: (TestWebKitAPI::testAtomicStringNumber): * TestWebKitAPI/Tests/WTF/WTFString.cpp: (TestWebKitAPI::testStringNumberFixedPrecision): (TestWebKitAPI::testStringNumberFixedWidth): (TestWebKitAPI::testStringNumber): 2018-05-10 Fujii Hironori [Win][MiniBrowser] Add a separate WndProc for the layered window https://bugs.webkit.org/show_bug.cgi?id=185460 Reviewed by Brent Fulgham. All WK1 related code should be moved into MiniBrowser for the preparation of Bug 184770. The layered window was using WndProc of the main window. The layered window is specific only for WK1. the main window will be shared among WK1 and WK2. This change add a new WndProc for the layer window. * MiniBrowser/win/Common.cpp: (WndProc): Removed code for the layered windows. (subclassForLayeredWindow): Moved into MiniBrowser.cpp. * MiniBrowser/win/MiniBrowser.cpp: (MiniBrowser::prepareViews): Removed the fourth argument `viewHwnd`. (viewWndProc): New WndProc for the layered windows. (MiniBrowser::subclassForLayeredWindow): Moved from Common.cpp. * MiniBrowser/win/MiniBrowser.h: (MiniBrowser::hwnd): * MiniBrowser/win/WinMain.cpp: (wWinMain): Added m_viewWnd. 2018-05-10 Stephan Szabo Support --verbose in run-javascriptcore-tests https://bugs.webkit.org/show_bug.cgi?id=185492 Reviewed by Daniel Bates. * Scripts/run-javascriptcore-tests: (runJSCStressTests): 2018-05-10 Valerie R Young test262/Runner.pm: --failing-files uses results file not expectations https://bugs.webkit.org/show_bug.cgi?id=185395 Reviewed by Michael Saboff. --failing-files arg now uses results file to find failing tests to rerun. It will look in the test262-results directory from whereever the script is run, or a results.yaml file can be supplied via command line argument. --expectations arg added for suppling expectation file. * Scripts/test262/Runner.pm: (processCLI): (main): (loadImportFile): (findAllFailing): 2018-05-10 Carlos Garcia Campos [GTK] Add support for settings cookies policy and storage type in MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=185506 Reviewed by Philippe Normand. Useful for testing and debugging. * MiniBrowser/gtk/main.c: (main): 2018-05-09 Chris Dumez Unreviewed Windows build fix after r231622. * DumpRenderTree/win/DumpRenderTree.cpp: (enableExperimentalFeatures): 2018-05-09 Sihui Liu Update WebKit.WebsiteDataStoreCustomPaths after r231536 https://bugs.webkit.org/show_bug.cgi?id=185486 Reviewed by Chris Dumez. Update WebKit.WebsiteDataStoreCustomPaths as _syncNetworkProcessCookies is async now. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2018-05-09 Leo Balter Test262-Runner: Improve the verbose output https://bugs.webkit.org/show_bug.cgi?id=185491 Reviewed by Michael Saboff. * Scripts/test262/Import.pm: (transferFiles): * Scripts/test262/Runner.pm: (processResult): 2018-05-09 Leo Balter Fix Test262 Runner to have DYLD_FRAMEWORK_PATH always set https://bugs.webkit.org/show_bug.cgi?id=185488 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (processCLI): (getBuildPath): (runTest): 2018-05-09 Richard Houle [Cocoa] Some fields are not identified as [WKWebProcessPlugInNodeHandle isTextField] https://bugs.webkit.org/show_bug.cgi?id=185260 Reviewed by Tim Horton. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsTextField.mm: Added. (-[InjectedBundleNodeHandleIsTextField isTextFieldForHTMLInputType:document:jsContext:]): (-[InjectedBundleNodeHandleIsTextField webProcessPlugIn:didCreateBrowserContextController:]): * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[InjectedBundleNodeHandleIsTextFieldDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): 2018-05-09 Thibault Saunier [tests][GStreamer]: Pass USE_PLAYBIN3 to the tests subprocess https://bugs.webkit.org/show_bug.cgi?id=185481 Reviewed by Philippe Normand. [tests][GStreamer]: Pass USE_PLAYBIN3 to the tests subprocess * Scripts/webkitpy/port/gtk.py: (GtkPort.setup_environ_for_server): 2018-05-09 Leo Balter Set build.webkit.org to use the new Test262-runner https://bugs.webkit.org/show_bug.cgi?id=184933 Reviewed by Aakash Jain. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunTest262Tests): (RunTest262Tests.countFailures): * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: 2018-05-09 Carlos Eduardo Ramalho [GTK][JHBuild] LLVM 3.7.0 build is broken with GCC 8.1 https://bugs.webkit.org/show_bug.cgi?id=185461 Reviewed by Michael Catanzaro. JHBuild now compiles LLVM 6 and Mesa 18.0.3. * gtk/jhbuild.modules: 2018-05-09 Michael Catanzaro Unreviewed. Update OptionsWPE.cmake and NEWS for 2.21.1 release. * wpe/manifest.txt.in: Distribute the NEWS. 2018-05-09 Michael Catanzaro [WPE] Build cleanly with GCC 8 and ICU 60 https://bugs.webkit.org/show_bug.cgi?id=185462 Reviewed by Carlos Alberto Lopez Perez. * TestWebKitAPI/CMakeLists.txt: Fix weird build failure, we were missing a directory. Not sure why this was never noticed until now or why the bots are OK. * gtk/jhbuild.modules: Add upstream patch to avoid warnings inside G_DEFINE_TYPE. * gtk/patches/glib-cast-function-type.patch: Added. * wpe/jhbuild.modules: Add upstream patch to avoid warnings inside G_DEFINE_TYPE. * wpe/patches/glib-cast-function-type.patch: Added. 2018-05-06 Yusuke Suzuki [JSC][GTK][JSCONLY] Use capstone disassembler https://bugs.webkit.org/show_bug.cgi?id=185283 Reviewed by Michael Catanzaro. * gtk/manifest.txt.in: * wpe/manifest.txt.in: 2018-05-09 Antti Koivisto Add OptionSet::operator& and operator bool https://bugs.webkit.org/show_bug.cgi?id=185306 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WTF/OptionSet.cpp: (TestWebKitAPI::TEST): 2018-05-08 Wenson Hsieh Consolidate WebContentReaderIOS and WebContentReaderMac into WebContentReaderCocoa https://bugs.webkit.org/show_bug.cgi?id=185340 Reviewed by Tim Horton. Adds a new API test to verify that URLs written using -[NSPasteboard writeObjects:] are pasted as anchors with non-empty text in a contenteditable. * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: (TestWebKitAPI::TEST): 2018-05-08 Valerie R Young test262/Runner.pm: create results dir for results of test262 run https://bugs.webkit.org/show_bug.cgi?id=185392 Reviewed by Michael Saboff. New directory test262-results created from where ever script is called. * Scripts/test262/Runner.pm: (processCLI): 2018-05-08 Valerie R Young test262/Runner.pm: lower number of processes per core https://bugs.webkit.org/show_bug.cgi?id=185426 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (getProcesses): 2018-05-08 Leo Balter Test262-Runner: Add base Perl UnicodeData https://bugs.webkit.org/show_bug.cgi?id=185444 Reviewed by Michael Saboff. * Scripts/test262/local/lib/perl5/unicore/lib/gc_sc/SpacePer.pl: Added. * Scripts/test262/local/lib/perl5/unicore/lib/gc_sc/Word.pl: Added. 2018-05-08 Daniel Bates Add tests to ensure that the Strong Password appearance is removed on form reset https://bugs.webkit.org/show_bug.cgi?id=185440 Reviewed by Ryosuke Niwa. * TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm: (-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]): * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (TEST): 2018-05-08 Daniel Bates Resign Strong Password appearance when text field value changes https://bugs.webkit.org/show_bug.cgi?id=185433 Reviewed by Ryosuke Niwa. Add a unit test to ensure the injected bundle API and WebKit UI delegate SPI is invoked when the field has the Strong Password button and its value changes. * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (testDidResignInputElementStrongPasswordAppearanceAfterEvaluatingJavaScript): (TEST): 2018-05-06 Filip Pizlo InPlaceAbstractState::beginBasicBlock shouldn't have to clear any abstract values https://bugs.webkit.org/show_bug.cgi?id=185365 Reviewed by Saam Barati. Make it possible to measure compile times. Rolling back in after fixing cloop builds. * Scripts/run-jsc-benchmarks: 2018-05-08 Wenson Hsieh [iOS] WKAttachmentTestsIOS.InsertDroppedItemProvidersInOrder fails after r231396 https://bugs.webkit.org/show_bug.cgi?id=185414 Reviewed by Tim Horton. Adjust a test expectation to check that the resulting DOM contains an attachment element, anchor element, and another attachment element in that order. This ensures that the test still passes, even after the anchor element is followed by a line break. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (TestWebKitAPI::TEST): 2018-05-08 Commit Queue Unreviewed, rolling out r231491. https://bugs.webkit.org/show_bug.cgi?id=185434 Setting the Created key on a cookie does not work yet, due a bug in CFNetwork (Requested by ggaren on #webkit). Reverted changeset: "[WKHTTPCookieStore getAllCookies] returns inconsistent creation time" https://bugs.webkit.org/show_bug.cgi?id=185041 https://trac.webkit.org/changeset/231491 2018-05-08 Valerie R Young test262/Runner.pm: move input files to JSTests/test262 https://bugs.webkit.org/show_bug.cgi?id=185389 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (processCLI): 2018-05-08 Chris Dumez Unreviewed, simplify Speedometer fixes landed in r231489, r231483 & r231474. * Scripts/webkitpy/performance_tests/perftest.py: (PerfTest): 2018-05-08 Ryan Haddad Unreviewed, rolling out r231468. Broke the CLoop build Reverted changeset: "InPlaceAbstractState::beginBasicBlock shouldn't have to clear any abstract values" https://bugs.webkit.org/show_bug.cgi?id=185365 https://trac.webkit.org/changeset/231468 2018-05-08 Sihui Liu [WKHTTPCookieStore getAllCookies] returns inconsistent creation time https://bugs.webkit.org/show_bug.cgi?id=185041 Reviewed by Geoffrey Garen. Add API test Coverage. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (TEST): 2018-05-08 Chris Dumez Unreviewed, fix issue with running Speedometer PerfTest after r231450. * Scripts/webkitpy/performance_tests/perftest.py: (PerfTest): 2018-05-08 Chris Dumez Unreviewed, fix issue with running Speedometer PerfTest after r231450. * Scripts/webkitpy/performance_tests/perftest.py: (PerfTest): 2018-05-07 Chris Dumez Unreviewed, fix issue with running Speedometer PerfTest after r231450. * Scripts/webkitpy/performance_tests/perftest.py: (PerfTest): 2018-05-06 Filip Pizlo InPlaceAbstractState::beginBasicBlock shouldn't have to clear any abstract values https://bugs.webkit.org/show_bug.cgi?id=185365 Reviewed by Saam Barati. Make it possible to measure compile times. * Scripts/run-jsc-benchmarks: 2018-05-07 Leo Balter Test262-Runner: Add base module to the local deps - unicore/Exact.pl https://bugs.webkit.org/show_bug.cgi?id=185390 Reviewed by Michael Saboff. * Scripts/test262/local/lib/perl5/unicore/Exact.pl: Added. 2018-05-07 Jonathan Bedard Check for com.apple.datamigrator before declaring simulators booted https://bugs.webkit.org/show_bug.cgi?id=185315 Reviewed by David Kilzer. * Scripts/webkitdirs.pm: (waitUntilProcessNotRunning): Wait until a process is not found. (relaunchIOSSimulator): Wait until com.apple.datamigrator stops running to declare a simulator booted. * Scripts/webkitpy/common/system/executive_mock.py: (MockExecutive2.__init__): Define _running_pids. * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager.initialize_devices): Call wait_until_data_migration_is_done before declaring that devices have been booted, increase the timeout since data migration will frequently take longer than 60 seconds, especially with multiple simulators booting. (SimulatedDeviceManager.swap): Ditto. (SimulatedDeviceManager): (SimulatedDeviceManager.wait_until_data_migration_is_done): Wait until there are no com.apple.datamigrator processes running. 2018-05-07 Daniel Bates REGRESSION (r229955): run-webkit-tests runs tests in skipped directories and subdirectories of directory given on command line https://bugs.webkit.org/show_bug.cgi?id=185054 Reviewed by Ryosuke Niwa. Fallback to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not have Apple Additions. Darwin-based ports have OS version-specific test expectations and are certified to support running tests using the currently shipping OS by way of a hardcoded class variable CURRENT_VERSION. The run-webkit-tests script depends on the OS version to find the applicable TestExpectations files to parse to compute the list of skipped tests for the port. * Scripts/webkitpy/port/mac.py: (MacPort.__init__): Fall back to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not have Apple Additions. * Scripts/webkitpy/port/mac_unittest.py: (MacTest.test_factory_with_future_version): Added. (MacTest.test_factory_with_future_version_and_apple_additions): Renamed from MacTest.test_factory_with_future_version() and added code to use the mock Apple Additions so that running this code with- and without- the real Apple Additions produces consistent results now that the Mac port's OS version falls back to MacPort.CURRENT_VERSION when Apple Additions is absent. 2018-05-07 Brian Burg Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected https://bugs.webkit.org/show_bug.cgi?id=184861 Reviewed by Timothy Hatcher. Add a new test that checks whether a new process is used for navigation when an Inspector is shown. Also check that the behavior reverts to normal after the Inspector has been closed. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2018-05-04 Wenson Hsieh [iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell apart https://bugs.webkit.org/show_bug.cgi?id=185289 Reviewed by Tim Horton and Darin Adler. Augment and rebaseline some iOS drag-and-drop API tests that handle dropping URLs as a part of multi-item drop sessions. * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: (TestWebKitAPI::TEST): 2018-05-04 Timothy Hatcher Deprecate legacy WebView and friends https://bugs.webkit.org/show_bug.cgi?id=185279 rdar://problem/33268700 Reviewed by Tim Horton. * MiniBrowser/Configurations/Base.xcconfig: Added GCC_PREPROCESSOR_DEFINITIONS to define DISABLE_LEGACY_WEBKIT_DEPRECATIONS. 2018-05-04 Leo Balter Test262-Runner: Add base module to the local deps - unicore/PVA.pl https://bugs.webkit.org/show_bug.cgi?id=185314 Reviewed by Michael Saboff. * Scripts/test262/local/lib/perl5/unicore/PVA.pl: Added. 2018-05-04 Wenson Hsieh REGRESSION: [ios-simulator] 3 WKWebViewAutofillTests API test failures seen with 11.3 SDK https://bugs.webkit.org/show_bug.cgi?id=184196 Reviewed by Tim Horton. Removes some unnecessary workarounds to enable running app autofill tests against iOS versions earlier than 11.3. Also re-enables these tests. * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm: (TestWebKitAPI::TEST): (-[UITextAutofillSuggestion initWithUsername:password:]): Deleted. (+[UITextAutofillSuggestion autofillSuggestionWithUsername:password:]): Deleted. 2018-05-04 Myles C. Maxfield Text shaping in the simple path is flipped in the y direction https://bugs.webkit.org/show_bug.cgi?id=185062 Reviewed by Simon Fraser. Huge thanks to Ulrike Rausch of LiebeFonts for contributing the test fonts!!! * Scripts/webkitpy/common/config/contributors.json: 2018-05-04 Leo Balter Test262-Runner: place the processCLI inside the main call https://bugs.webkit.org/show_bug.cgi?id=185304 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (main): 2018-05-04 Carlos Garcia Campos [GTK] Epiphany (GNOME Web) says "Error downloading: Service Unavailable." when trying to download an image from discogs.com https://bugs.webkit.org/show_bug.cgi?id=174730 Reviewed by Michael Catanzaro. Update unit tests to check that User-Agent header is included in HTTP download requests. * TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp: (testDownloadRemoteFile): (testWebViewDownloadURI): (testPolicyResponseDownload): (testPolicyResponseDownloadCancel): (testDownloadMIMEType): (testContextMenuDownloadActions): 2018-05-03 Ross Kirsling [WinCairo] Test archive must use Python zipfile, just like build product. https://bugs.webkit.org/show_bug.cgi?id=185265 Reviewed by Per Arne Vollan. * BuildSlaveSupport/test-result-archive: (archive_test_results): Copy over Win32-oriented archiving logic from built-product-archive. 2018-05-03 Leo Balter cleanup modules usage for the Test262-Runner https://bugs.webkit.org/show_bug.cgi?id=185263 Reviewed by Michael Saboff. * Scripts/test262-runner: * Scripts/test262/Runner.pm: (processCLI): 2018-05-03 Valerie R Young test262/Runner.pm: minor fixes https://bugs.webkit.org/show_bug.cgi?id=185250 Reviewed by Michael Saboff. Add comments, change output and fix bug: unintended interpolation of filename when running jsc. * Scripts/test262/Runner.pm: (processCLI): (main): (runTest): 2018-05-03 Chris Dumez Load hangs if the WebProcess fails to launch https://bugs.webkit.org/show_bug.cgi?id=185225 Reviewed by Geoff Garen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: Added. (-[CrashOnStartNavigationDelegate _webView:webContentProcessDidTerminateWithReason:]): (-[CrashOnStartNavigationDelegate webView:didFinishNavigation:]): (-[CrashRecoveryScriptMessageHandler userContentController:didReceiveScriptMessage:]): (TEST): 2018-05-03 Don Olmstead [WinCairo] Add JSC test bots https://bugs.webkit.org/show_bug.cgi?id=185234 Reviewed by Per Arne Vollan. * BuildSlaveSupport/build.webkit.org-config/config.json: * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunJavaScriptCoreTests.start): 2018-05-03 Michael Catanzaro WebKit should send fake macOS user agent to docs.google.com https://bugs.webkit.org/show_bug.cgi?id=185165 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2018-05-03 Valerie R Young test262/Runner.pm: performance improvements https://bugs.webkit.org/show_bug.cgi?id=185202 Reviewed by Michael Saboff. Batch the tests by the number of processes, and give each process a file to save results to to avoid threading. Do not parallelize when running small sets of tests. * Scripts/test262/Runner.pm: (processCLI): (main): (processFile): (processResult): 2018-05-03 Ryan Haddad Unreviewed, rolling out r231253. The API test added with this change is crashing on the bots. Reverted changeset: "Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected" https://bugs.webkit.org/show_bug.cgi?id=184861 https://trac.webkit.org/changeset/231253 2018-05-03 Carlos Garcia Campos REGRESSION(r222772): [GTK][WPE] WebProcess from WebKitGtk+ 2.19.9x SIGSEVs in WebKit::WebProcess::ensureNetworkProcessConnection() at Source/WebKit/WebProcess/WebProcess.cpp:1127 https://bugs.webkit.org/show_bug.cgi?id=183348 Reviewed by Michael Catanzaro. Add a test case to reproduce the crash. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewCloseQuickly): (beforeAll): 2018-05-02 Aditya Keerthi Can't copy and paste URLs that have no title into Mail (macOS) https://bugs.webkit.org/show_bug.cgi?id=185205 Reviewed by Tim Horton. Added test to verify behavior when copying and pasting a URL without a title. * TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.html: * TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm: (TestWebKitAPI::TEST): 2018-05-02 Carlos Alberto Lopez Perez [GTK] Generate a JSC bundle on the 64 and 32 bit release bots and upload it to webkitgtk.org (follow-up fix) https://bugs.webkit.org/show_bug.cgi?id=184699 Unreviewed follow-up fix after r231230. * Scripts/generate-jsc-bundle: (generate_wrapper_script): Quote the arguments passed to jsc. 2018-05-02 Brian Burg Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected https://bugs.webkit.org/show_bug.cgi?id=184861 Reviewed by Ryosuke Niwa. Add a new test that checks whether a new process is used for navigation when an Inspector is shown. Also check that the behavior reverts to normal after the Inspector has been closed. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2018-05-02 Valerie R Young test262/Runner.pm: save summary to file https://bugs.webkit.org/show_bug.cgi?id=185200 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (processCLI): (main): (summarizeResults): 2018-05-02 Carlos Alberto Lopez Perez [GTK] Generate a JSC bundle on the 64 and 32 bit release bots and upload it to webkitgtk.org https://bugs.webkit.org/show_bug.cgi?id=184699 Reviewed by Gustavo Noronha Silva. This adds a new step for the GTK 64-bit release build bot and the GTK 32-bit release build&test bot. This step will be run as one of the lasts ones (after the product is built) and will execute the script generate-jsc-bundle. This script will take care of creating a JSC bundle and uploading it to a server defined on a configuration file that has to be deployed on the bots with the required server data and credentials for this upload. In this case, the built products should then be accessible at . But the implementation is not tied to any specific server. All the details about where to upload the file is done in configuration file that is kept private on each bot outside of the WebKit source tree. The script also supports generating a JSC bundle locally and not uploading it anywhere. This is the default mode of running. The remote upload will only be activated if a --remote-config-file parameter is passed (which is done from the buildbot config) * BuildSlaveSupport/build.webkit.org-config/config.json: * BuildSlaveSupport/build.webkit.org-config/factories.py: (BuildFactory): (BuildFactory.__init__): (TestFactory): (TestFactory.__init__): (BuildAndGenerateJSCBundleFactory): (BuildAndNonLayoutTestAndGenerateJSCBundleFactory): * BuildSlaveSupport/build.webkit.org-config/steps.py: (GenerateJSCBundle): * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: * Scripts/generate-jsc-bundle: Added. (ldd_get_libs_and_interpreter): (generate_readme): (generate_wrapper_script): (copy_and_remove_rpath): (createJSCBundle): (sha256sum): (uploadJSCBundle): (main): 2018-05-01 Ryosuke Niwa PSON: Make WebKitTestRunner work with process swap on navigation turned on https://bugs.webkit.org/show_bug.cgi?id=185111 Reviewed by Chris Dumez. Add the basic support for running layout tests with process-swap-on-navigation turned on. First, move m_whatToDump, m_dumpPixels, m_waitToDump, and m_dumpFrameLoadCallbacks from WebContent process to UI process so that calls to waitUntilDone, dumpAsText, etc... persist across process swaps. In addition, initialize the injected bundle inside a new WebContent process when the first page is created. This instantiates objects such as TestRunner, GCController, etc... in the new process. The initialization can't be done in InjectedBundle::beginTesting because some steps in InjectedBundle::initialize require the current PageGroup and Page objects. We avoid clearing databases and app cache in this case. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Send "Initialization" message to UI process. This message returns all the dictionary values usually present in "BeginTest" message from UI process as well as "ResumeTesting" boolean which is set when this process was created as a result of a process swap on navgation. Invoke beginTesting with BegingTestingMode::Resume when this boolean is set. (WTR::InjectedBundle::didReceiveMessageToPage): (WTR::InjectedBundle::beginTesting): Don't clear database, app cache, etc... when initializing an injected bundle after a process swap on navigation. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::dump): (WTR::InjectedBundlePage::frameDidChangeLocation): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): (WTR::TestRunner::shouldDumpPixels const): Added. (WTR::TestRunner::setDumpPixels): Added. (WTR::TestRunner::dumpAsText): (WTR::TestRunner::whatToDump const): Added. (WTR::TestRunner::setWhatToDump): Added. (WTR::TestRunner::waitUntilDone): (WTR::TestRunner::setWaitUntilDone): Added. (WTR::TestRunner::shouldWaitUntilDone): Added. (WTR::TestRunner::notifyDone): (WTR::TestRunner::forceImmediateCompletion): (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Added. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Added. (WTR::TestRunner::setAudioResult): * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::dumpChildFramesAsText): (WTR::TestRunner::dumpDOMAsWebArchive): (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Moved to cpp. (WTR::TestRunner::whatToDump const): Moved to cpp. (WTR::TestRunner::shouldDumpMainFrameScrollPosition const): (WTR::TestRunner::shouldDumpPixels const): Moved to cpp. (WTR::TestRunner::shouldDumpFrameLoadCallbacks const): Moved to cpp. (WTR::TestRunner::waitToDump const): Renamed to shouldWaitUntilDone and moved to cpp. * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::TestInvocation): Initialize m_dumpFrameLoadCallbacks here. (WTR::TestInvocation::shouldLogFrameLoadDelegates const): Deleted. (WTR::TestInvocation::createTestSettingsDictionary): Extracted from invoke(). (WTR::TestInvocation::invoke): Sets m_startedTesting to true immediately afte sending "BeginTest" message. m_startedTesting is later used in didReceiveSynchronousMessageFromInjectedBundle to detect whether a given "Initialization" message is sent from a regular WebContent process (m_startedTesting is false) or the one started as a result of a process swap on navigation (m_startedTesting is true). (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Added a bunch of new messgaes to support initializing the injected bundle in a process swapped after navigation and set/get messages for the states which must persist across process swaps within a test. * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: * Tools/WebKitTestRunner/WhatToDump.h: (WTR::WhatToDump): Added. 2018-05-01 Leo Balter Auto save the results for Test262 https://bugs.webkit.org/show_bug.cgi?id=184926 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (processCLI): (main): (parseError): (processResult): (summarizeResults): * Scripts/test262/config.yaml: Renamed from Tools/Scripts/test262/test262-config.yaml. 2018-05-01 Jonathan Bedard webkitpy: SIGKILL right after SIGTERM causes orphaned processes with 'xcrun simctl spawn' https://bugs.webkit.org/show_bug.cgi?id=185164 Reviewed by David Kilzer. * Scripts/webkitpy/common/system/executive.py: (Executive.kill_process): First attempt will always send a SIGTERM, all subsequent attempts will send a SIGKILL. A SIGKILL with not be sent if the process is not running to avoid orphaning childen. 2018-05-01 Chris Dumez REGRESSION (r230919): API test WebKit.AutoLayoutIntegration is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=184918 Reviewed by Wenson Hsieh. Make sure provisional load has started before calling beginLayoutAtMinimumWidth on the AutoLayoutWKWebView to restore pre-r230919 behavior. The load now starts asynchronously because we ask the client if it is OK to do the load and the policy delegates are asynchronous nowadays. * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: (-[AutoLayoutWKWebView load:withWidth:expectingContentSize:resettingWidth:]): * TestWebKitAPI/cocoa/TestNavigationDelegate.h: * TestWebKitAPI/cocoa/TestNavigationDelegate.mm: (-[TestNavigationDelegate webView:didStartProvisionalNavigation:]): (-[TestNavigationDelegate waitForDidStartProvisionalNavigation]): (-[WKWebView _test_waitForDidStartProvisionalNavigation]): 2018-05-01 Ross Kirsling [WinCairo] Align buildbot test stages with AppleWin. https://bugs.webkit.org/show_bug.cgi?id=185094 Reviewed by Brent Fulgham. * BuildSlaveSupport/build.webkit.org-config/factories.py: (TestFactory.__init__): Do run API tests, don't run dashboard tests. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunUnitTests): Call run-api-tests with Python, not Perl (bugfix for r230998). * Scripts/webkitpy/port/win.py: (WinPort.environment_for_api_tests): Retrieve necessary Windows environment variables. 2018-05-01 Eric Carlson [MediaStream] remove WK1 support https://bugs.webkit.org/show_bug.cgi?id=185136 Reviewed by Youenn Fablet. * DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate webView:decidePolicyForUserMediaRequestFromOrigin:listener:]): Deleted. 2018-05-01 Chris Dumez [WKTR] Move navigation policy for response decision from InjectedBundle to UIProcess https://bugs.webkit.org/show_bug.cgi?id=185157 Reviewed by Geoffrey Garen. Move navigation policy for response decision from InjectedBundle to UIProcess. This is a more common configuration and should therefore be the configuration we test by default. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForResponse): 2018-05-01 Oleksandr Skachkov WebAssembly: add support for stream APIs - JavaScript API https://bugs.webkit.org/show_bug.cgi?id=183442 Reviewed by Yusuke Suzuki and JF Bastien. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-04-30 Mark Lam Apply PtrTags to the MetaAllocator and friends. https://bugs.webkit.org/show_bug.cgi?id=185110 Reviewed by Saam Barati. Update the test to match MetaAllocator changes in WTF. * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp: (TestWebKitAPI::TEST_F): (WTF::tagForPtr): (WTF::ptrTagName): 2018-04-30 Alex Christensen Add WKUIDelegatePrivate equivalent of WKPageContextMenuClient getContextMenuFromProposedMenuAsync https://bugs.webkit.org/show_bug.cgi?id=180955 Reviewed by Andy Estes. * TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm: (-[ContextMenuImgWithVideoDelegate _webView:contextMenu:forElement:]): (-[ContextMenuImgWithVideoDelegate _webView:getContextMenuFromProposedMenu:forElement:userInfo:completionHandler:]): 2018-04-30 JF Bastien Use some C++17 features https://bugs.webkit.org/show_bug.cgi?id=185135 Reviewed by Alex Christensen. * DumpRenderTree/PlatformMac.cmake: * gtk/ycm_extra_conf.py: (FlagsForFile): 2018-04-30 Yusuke Suzuki Use WordLock instead of std::mutex for Threading https://bugs.webkit.org/show_bug.cgi?id=185121 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WTF/Signals.cpp: (TEST): 2018-04-30 Michael Catanzaro [GTK] Webkit should spoof as Safari on a Mac when on Chase.com https://bugs.webkit.org/show_bug.cgi?id=185103 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2018-04-28 Sihui Liu [Cocoa] Set HTTPOnly flag when converting Cookie to NSHTTPCookie https://bugs.webkit.org/show_bug.cgi?id=185052 Reviewed by Geoffrey Garen. Modified API test to provide correct test cases for HTTPOnly flag. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (TEST): 2018-04-28 Rick Waldron Token misspelled "tocken" in error message string https://bugs.webkit.org/show_bug.cgi?id=185030 Reviewed by Saam Barati. * Scripts/test262/test262-expectations.yaml: Fix typo "tocken" => "token" 2018-04-27 Stephan Szabo [WinCairo] Support --no-copy for jsc tests in wincairo tests, add copying of dlls for copy case https://bugs.webkit.org/show_bug.cgi?id=185049 Reviewed by Keith Miller. * Scripts/run-javascriptcore-tests: (runJSCStressTests): * Scripts/run-jsc-stress-tests: 2018-04-26 Ryosuke Niwa PSON: Triggering a navigation to an invalid URL creates a new WebContent process https://bugs.webkit.org/show_bug.cgi?id=185066 Reviewed by Youenn Fablet. Added a new test case (ProcessSwap.NavigateToInvalidURL) for navigating to an invalid URL. WebKit should not swap WebContent process in this case. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate webView:didFailProvisionalNavigation:withError:]): (-[PSONUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): 2018-04-27 Nan Wang AX: Accessibility needs to know which part of the content view is visible on iOS https://bugs.webkit.org/show_bug.cgi?id=185085 Reviewed by Chris Fleizach. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::stringAttributeValue): 2018-04-27 Wenson Hsieh [Extra zoom mode] Add a mechanism to override default viewport behaviors in extra zoom mode https://bugs.webkit.org/show_bug.cgi?id=185050 Reviewed by Tim Horton. Remove a test that's no longer useful, now that the SPI it was testing is gone. This functionality is now tested by the layout test added in this patch. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/ViewportSizingTests.mm: Removed. 2018-04-26 Ryan Haddad REGRESSION (r231039): RunUnitTests step reports disabled tests as failures https://bugs.webkit.org/show_bug.cgi?id=185061 Reviewed by Aakash Jain. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunUnitTests.countFailures): Return the difference between the total number of tests run and the number that passed. * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Add a test. 2018-04-26 Ross Kirsling Add release bots for WinCairo. https://bugs.webkit.org/show_bug.cgi?id=185042 Reviewed by Lucas Forschler. * BuildSlaveSupport/build.webkit.org-config/config.json: Add a release build bot and two test bots, replacing the outdated WinCairo release bots. 2018-04-26 Sihui Liu -[WKHTTPCookieStore deleteCookie:completionHandler:] doesn't delete cookies https://bugs.webkit.org/show_bug.cgi?id=184938 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (TEST): 2018-04-26 Ross Kirsling WinCairo test bots should run JSC tests with options for Windows command prompt. https://bugs.webkit.org/show_bug.cgi?id=185019 Reviewed by Per Arne Vollan. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunJavaScriptCoreTests.start): 2018-04-26 Ross Kirsling WinCairo WKL Debug Test bot is not using DRT. https://bugs.webkit.org/show_bug.cgi?id=185009 Reviewed by Per Arne Vollan. * BuildSlaveSupport/build.webkit.org-config/config.json: 2018-04-26 Per Arne Vollan Disable content filtering in minimal simulator mode https://bugs.webkit.org/show_bug.cgi?id=185027 Reviewed by Jer Noble. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-04-26 Brady Eidson Add a setting for keeping around all processes and always reusing them per-origin. and https://bugs.webkit.org/show_bug.cgi?id=185020 Reviewed by Andy Estes. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2018-04-26 Andy VanWagoner [INTL] Implement Intl.PluralRules https://bugs.webkit.org/show_bug.cgi?id=184312 Reviewed by JF Bastien. Added Intl.PluralRules feature flag. * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-04-25 Michael Catanzaro [WPE] Build and link against latest WPEBackend and WPEBackend-fdo https://bugs.webkit.org/show_bug.cgi?id=184643 Reviewed by Žan Doberšek. Add missing INCLUDE_DIRS in many places. Adapt to single-header WPE includes. Null-initialize padding to silence -Wmissing-field-initializers. (Yuck.) * TestWebKitAPI/PlatformWPE.cmake: * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewWebBackend): * TestWebKitAPI/glib/PlatformWPE.cmake: * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/PlatformWPE.cmake: * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: * wpe/HeadlessViewBackend/CMakeLists.txt: * wpe/HeadlessViewBackend/HeadlessViewBackend.cpp: * wpe/HeadlessViewBackend/HeadlessViewBackend.h: * wpe/jhbuild.modules: 2018-04-25 Jonathan Bedard REGRESSION (r230998): Bot watcher's dashboard doesn't display number of API test failures https://bugs.webkit.org/show_bug.cgi?id=184982 Rubber-stamped by Aakash Jain. Correctly count the number of API test failures. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunUnitTests.countFailures): Count the number of test failures for the new run-api-tests. * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: * Scripts/webkitpy/api_tests/manager.py: (Manager.run): Disabled tests are not run. 2018-04-25 Jiewen Tan Remove access to keychain from the WebContent process https://bugs.webkit.org/show_bug.cgi?id=184428 Reviewed by Brent Fulgham. This patch does the followings: 1. Added an API test for this patch. 2. Instrument DumpRenderTree and WebKitTestRunner to take advantages of new SPIs. * DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate signedPublicKeyAndChallengeStringForWebView:]): * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm: Added. (TestWebKitAPI::SSLKeyGeneratorTest::SetUp): (TestWebKitAPI::SSLKeyGeneratorTest::TearDown): (TestWebKitAPI::TEST_F): * WebKitTestRunner/TestController.cpp: (WTR::copySignedPublicKeyAndChallengeString): (WTR::TestController::createOtherPage): (WTR::TestController::createWebViewWithOptions): 2018-04-25 Wenson Hsieh [Extra zoom mode] The search field on www.bing.com is missing label text https://bugs.webkit.org/show_bug.cgi?id=184975 Reviewed by Tim Horton. Adds UIScriptController.formInputLabel, which asynchronously requests the input label text for the currently focused element in extra zoom mode. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::formInputLabel const): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::formInputLabel const): * TestRunnerShared/UIScriptContext/UIScriptController.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::formInputLabel const): 2018-04-25 Michael Catanzaro [WPE] Should load injected bundle from builddir in developer builds https://bugs.webkit.org/show_bug.cgi?id=184983 Reviewed by Carlos Alberto Lopez Perez. Set WEBKIT_INJECTED_BUNDLE_PATH when running WPE MiniBrowser. * Scripts/run-minibrowser: 2018-04-25 Michael Catanzaro [WPE] libgstggtk.so broken in jhbuild environment https://bugs.webkit.org/show_bug.cgi?id=184984 Reviewed by Carlos Alberto Lopez Perez. Don't pass --enable-glx=no when building libepoxy, to ensure it's compatible with gst-plugins-good. * wpe/jhbuild.modules: 2018-04-25 Ryosuke Niwa PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank https://bugs.webkit.org/show_bug.cgi?id=184962 Reviewed by Youenn Fablet. Added four test cases for navigating to a blob URL, data URL, and about:blank with process-swap-on-navigation turned on. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (ProcessSwap.SameOriginBlobNavigation): Added. (ProcessSwap.CrossOriginBlobNavigation): Added. (ProcessSwap.NavigateToAboutBlank): Added. (ProcessSwap.NavigateToDataURL): Added. 2018-04-25 Michael Catanzaro [WPE] Remove deprecated functions and properties from the API https://bugs.webkit.org/show_bug.cgi?id=179295 Reviewed by Žan Doberšek. * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: (testWebViewAuthenticationStorage): Disable this test for now. It will require some effort to rewrite LoadTrackingTest to not require the web view at construction time. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp: (testWebKitSettings): Don't test private browsing setting, which is gone. * TestWebKitAPI/glib/CMakeLists.txt: Disable TestCookieManager for now. 2018-04-25 Andy Estes [Mac] Number of drop items is always 0 when performing a DHTML drag https://bugs.webkit.org/show_bug.cgi?id=184943 Reviewed by Ryosuke Niwa. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm: (-[DragInfo numberOfValidItemsForDrop]): (-[DragInfo setNumberOfValidItemsForDrop:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/mac/full-page-dropzone.html: Added. 2018-04-25 Jonathan Bedard API test harness should be Python https://bugs.webkit.org/show_bug.cgi?id=181043 Reviewed by David Kilzer. Run API tests from a Python script rather than Perl. The Python API tests have the same structure as the layout tests. * Scripts/run-api-tests: Changed from Perl to Python. * Scripts/webkitpy/api_tests: Added. * Scripts/webkitpy/api_tests/__init__.py: Added. * Scripts/webkitpy/api_tests/manager.py: Added. (Manager): (Manager.__init__): (Manager._test_list_from_output): Construct a list of tests from the output of TestWTF and TestWebKitAPI. (Manager._find_test_subset): Given a list of all possible tests and command line arguments, return a list of tests which match the provided arguments. (Manager._collect_tests): Run TestWTF and TestWebKitAPI with --gtest_list_tests to determine which tests will be run. (Manager._print_test_result): Formatted print of a test with it's output. (Manager._print_tests_result_with_status): Print all tests and output for tests which ran with a specified exit status. (Manager.run): Collect all tests, run them and then print results from the run. * Scripts/webkitpy/api_tests/run_api_tests.py: Added. (main): Parse arguments, construct a port, early exit for illegal ports and then run tests. (run): Setup logging and printing before using the Manager to run tests. (parse_args): Use argparse to define all options used by run-api-tests. * Scripts/webkitpy/api_tests/runner.py: Added. (Runner): (Runner.__init__): (Runner._shard_tests): Split tests so that each suite runs together. (Runner.command_for_port): Run a command on the device specified by the given port object. Once is completed, this function would be entirely replaced by the server_process factory owned by the port object. (Runner.run): Run all shards in the message_pool. (Runner.handle): Handle reports from child processes. (Runner.result_map_by_status): Return a mapping of tests to output for tests which exit with a specific status. (_Worker): (_Worker.__init__): (_Worker._filter_noisy_output): Filter out objc warnings since these polite the log. (_Worker._run_single_test): Runs a single test in a single child process. (_Worker._run_shard_with_binary): Attempts to run a group of tests in the same child process. If this technique fails, the remaining tests are run singly. (_Worker.handle): Run the specified shard. * Scripts/webkitpy/port/base.py: (Port): (Port.check_api_test_build): Check if TestWTF and TestWebKitAPI are built. (Port.environment_for_api_tests): Return the environment needed to run the TestWebKitAPI binary. (Port. path_to_api_test_binaries): Return a list of the path to all binaries used when running API tests. (Port._build_api_tests): Build TestWTF and TestWebKitAPI if required. * Scripts/webkitpy/port/mac.py: (MacPort.environment_for_api_tests): Enable GuardMalloc for API tests. * Scripts/webkitpy/port/server_process.py: (ServerProcess.pop_all_buffered_stdout): 2018-04-25 Carlos Garcia Campos Incorrect number of WebDriver test failures shown in the bots https://bugs.webkit.org/show_bug.cgi?id=184959 Reviewed by Michael Catanzaro. The regular expression we are using to get the number of failures from the log is matching a particular test error output. Improve the regular expression to avoid matching other strings in the log. Ensure that only matches at the beginning of lines and add spaces after Unexpected and before the (). * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunWebDriverTests.commandComplete): 2018-04-25 Carlos Garcia Campos [GTK] Implement MouseEvent.buttons https://bugs.webkit.org/show_bug.cgi?id=184913 Reviewed by Žan Doberšek. Include the mouse buttons state in WTR synthesized events. * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::EventSenderProxy::EventSenderProxy): (WTR::EventSenderProxy::createMouseButtonEvent): (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): 2018-04-24 Pablo Saavedra [GTK][WPE] Fix triggered bot name on the WPE Debug Build bot https://bugs.webkit.org/show_bug.cgi?id=184954 Reviewed by Michael Catanzaro. * BuildSlaveSupport/build.webkit.org-config/config.json: 2018-04-24 Saam Barati Keep around a pre-warmed process when doing process swap on navigation https://bugs.webkit.org/show_bug.cgi?id=184765 Reviewed by Ryosuke Niwa and Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2018-04-24 Aakash Jain [build.webkit.org] unit-tests fail when passwords.json is missing https://bugs.webkit.org/show_bug.cgi?id=180390 Reviewed by Carlos Alberto Lopez Perez. * BuildSlaveSupport/build.webkit.org-config/loadConfig.py: (loadBuilderConfig): Add support for test_mode. Load mock passwords in test_mode. * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: (BuildBotConfigLoader._add_dependant_modules_to_sys_modules): Call _add_webkitpy_to_sys_path as well. (BuildBotConfigLoader._mock_open): Deleted. (BuildBotConfigLoader.load_config): Deleted. 2018-04-24 John Wilander From-Origin: Support for 'same' and 'same-site' response header, nested frame origin check https://bugs.webkit.org/show_bug.cgi?id=184560 Reviewed by Youenn Fablet and Daniel Bates. This patch implements significant parts of https://github.com/whatwg/fetch/issues/687. We consume the From-Origin response header and only load the resource if: - The header is non-existent, empty, or invalid. - The header specifies 'same' and the resource's origin matches the originating document's origin and the origins up the frame tree. - The header specifies 'same-site' and the resource's eTLD+1 matches the originating document's eTLD+1 and the eTLD+1 of the documents up the frame tree. This feature is experimental and off by default. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp: Added. (TestWebKitAPI::TEST): Tests for From-Origin header parsing. 2018-04-24 Carlos Garcia Campos Unreviewed. Update W3C WebDriver imported tests. * Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py: (WebDriverW3CExecutor.__init__): 2018-04-24 Zan Dobersek [WPE] Remove libgbm dependency https://bugs.webkit.org/show_bug.cgi?id=184906 Reviewed by Carlos Garcia Campos. Stop searching for libgbm, using its compiler flags for the HeadlessViewBackend compilation and linking against the .so object. This is not necessary anymore after r230562 switched to a different backend implementation for testing. * wpe/HeadlessViewBackend/CMakeLists.txt: * wpe/install-dependencies: 2018-04-23 Carlos Garcia Campos [GLIB] Make it possible to use a different timeout for slow test cases in GLib tests https://bugs.webkit.org/show_bug.cgi?id=184816 Reviewed by Michael Catanzaro. Pass a function from api test runner to glib test runner to check if a test is slow and use the given slow timeout. * TestWebKitAPI/glib/TestExpectations.json: * glib/api_test_runner.py: (TestRunner._run_test_glib.is_slow_test): (TestRunner._run_test_glib): * glib/glib_test_runner.py: (GLibTestRunner.__init__): (GLibTestRunner._stop_timeout): (GLibTestRunner._subtest_start): (GLibTestRunner._subtest_end): 2018-04-23 Wenson Hsieh [Extra zoom mode] REGRESSION(230860) Unable to change time input values using UI https://bugs.webkit.org/show_bug.cgi?id=184901 Reviewed by Tim Horton. Introduce a new UIScriptController method to set the value of a currently focused input of type time, by interacting with the UI. See WebKit ChangeLogs for more detail. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::setTimePickerValue): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::setTimePickerValue): * TestRunnerShared/UIScriptContext/UIScriptController.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::setTimePickerValue): 2018-04-23 Zalan Bujtas [LayoutFormattingContext] Initial commit. https://bugs.webkit.org/show_bug.cgi?id=184896 Reviewed by Antti Koivisto. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-04-23 Chris Dumez [WKTR] Move navigation policy decision from the injected bundle to the UIProcess https://bugs.webkit.org/show_bug.cgi?id=184801 Reviewed by Geoffrey Garen. Move navigation policy decision from the injected bundle to the UIProcess in WebKitTestRunner. This is a more common configuration and therefore should be the default testing configuration. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Always respond with 'PassThrough' in the InjectedBundle so the UIProcess is now asked for the policy decision. 2018-04-23 Pablo Saavedra [GTK][WPE] Add Debug bots (build and tests) for WPE https://bugs.webkit.org/show_bug.cgi?id=184887 Reviewed by Carlos Alberto Lopez Perez. Deployed 2 new bots for WPE Debug: wpe-linux-bot-3 and wpe-linux-bot-4 Both bots have already the credentials ready to authenticated against build.webkit.org. They provides the bots for the "debug" configuration over the "WPE" platform and building for the "x86_64" architecture: WPE Linux 64-bit Debug (Build) and WPE Linux 64-bit Debug (Tests)  * BuildSlaveSupport/build.webkit.org-config/config.json: * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: 2018-04-23 Chris Dumez HTML String load cannot be prevented by responding 'Cancel' asynchronously in decidePolicyForNavigationAction https://bugs.webkit.org/show_bug.cgi?id=184848 Reviewed by Brady Eidson. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm: (-[DecidePolicyForNavigationActionController webView:decidePolicyForNavigationAction:decisionHandler:]): (TEST): 2018-04-23 Michael Catanzaro [GTK][WPE] TestSSL fails due to additional TLS errors returned https://bugs.webkit.org/show_bug.cgi?id=184860 Reviewed by Carlos Garcia Campos. Add script and config file for regenerating the test certificate. Regenerate it. TestSSL no longer fails on my machine. I do see a ton of network process crashes and JavaScript errors, none of which prevent the test from passing, but this commit only claims to fix the certificate validation portion of the test. * TestWebKitAPI/Tests/WebKitGLib/resources/generate-test-cert.sh: Added. * TestWebKitAPI/Tests/WebKitGLib/resources/test-cert.conf: Added. * TestWebKitAPI/Tests/WebKitGLib/resources/test-cert.pem: 2018-04-20 Carlos Garcia Campos [GLIB] ERROR: Thread was unable to be detached when running /jsc/vm test in debug https://bugs.webkit.org/show_bug.cgi?id=184815 Reviewed by Michael Catanzaro. This is because in the test we are calling both join and detach. We should only call join. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testsJSCVirtualMachine): 2018-04-20 Carlos Garcia Campos [GLIB] Test /jsc/prototypes crashes in debug https://bugs.webkit.org/show_bug.cgi?id=184814 Reviewed by Michael Catanzaro. We should also call the constructor/destructor of Bar struct to ensure Foo is constructed. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (barCreate): (barFree): 2018-04-20 Michael Catanzaro REGRESSION(r228088): [SOUP] Check TLS errors for WebSockets on GTlsConnection::accept-certificate https://bugs.webkit.org/show_bug.cgi?id=184804 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp: (WebSocketTest::WebSocketTest): (WebSocketTest::~WebSocketTest): (WebSocketTest::serverWebSocketCallback): (WebSocketTest::webSocketTestResultCallback): (WebSocketTest::connectToServerAndWaitForEvents): (testWebSocketTLSErrors): (beforeAll): 2018-04-20 Chris Dumez Unreviewed, update 2 more API tests after r230876. * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: (TEST): * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: (TestWebKitAPI::TEST): 2018-04-20 Tim Horton Adjust geolocation feature flag https://bugs.webkit.org/show_bug.cgi?id=184856 Reviewed by Wenson Hsieh. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-04-20 Chris Dumez REGRESSION (r229828): web view doesn’t update or respond to resizing until client calls policy decision handler https://bugs.webkit.org/show_bug.cgi?id=184210 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKit/large-red-square-image.html: * TestWebKitAPI/Tests/WebKitCocoa/dragstart-change-selection-offscreen.html: Add viewport meta tags. * TestWebKitAPI/cocoa/TestNavigationDelegate.mm: (-[WKWebView _test_waitForDidFinishNavigation]): Update _test_waitForDidFinishNavigation to wait for the next presentation update to make iOS API tests happy without having to modify each of them. 2018-04-20 Timothy Hatcher REGRESSION: API test WebKit.BackgroundColorSystemColor is failing https://bugs.webkit.org/show_bug.cgi?id=184849 rdar://problem/39386405 Reviewed by Brian Burg. * TestWebKitAPI/Tests/mac/BackgroundColor.mm: (TestWebKitAPI::TEST): Use CGColorEqualToColor since we might get a different CGColor pointer from NSColor each time. 2018-04-20 Wenson Hsieh [Extra zoom mode] Injected bundle form client should be notified when editing text fields https://bugs.webkit.org/show_bug.cgi?id=184822 Reviewed by Tim Horton. Add WebKitTestRunner support for listening to form editing SPI hooks in the injected bundle. The new layout test installs callbacks that listen for "begin editing", "end editing", and "text changed" calls to injected bundle SPI. See other ChangeLogs for more detail. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::enterText): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: Add UIScriptController support for simulating text entry in the currently focused element. * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::enterText): * TestRunnerShared/UIScriptContext/UIScriptController.h: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Add TestRunner bindings for registering injected bundle form client callbacks. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::handleTextDidChangeInTextField): (WTR::handleTextFieldDidBeginEditing): (WTR::handleTextFieldDidEndEditing): (WTR::InjectedBundle::didCreatePage): Set the injected bundle form editor client. (WTR::InjectedBundle::setUpInjectedBundleClients): (WTR::InjectedBundle::textDidChangeInTextField): (WTR::InjectedBundle::textFieldDidBeginEditing): (WTR::InjectedBundle::textFieldDidEndEditing): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::installTextDidChangeInTextFieldCallback): (WTR::TestRunner::textDidChangeInTextFieldCallback): (WTR::TestRunner::installTextFieldDidBeginEditingCallback): (WTR::TestRunner::textFieldDidBeginEditingCallback): (WTR::TestRunner::installTextFieldDidEndEditingCallback): (WTR::TestRunner::textFieldDidEndEditingCallback): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::enterText): 2018-04-20 Youenn Fablet WebPage sometimes incorrectly rules out PDF as a mime type that can be showed https://bugs.webkit.org/show_bug.cgi?id=184369 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm: (TEST): 2018-04-20 Daniel Bates Remove Strong Password decoration when text field type changes https://bugs.webkit.org/show_bug.cgi?id=184795 Reviewed by Antti Koivisto. Add a unit test to ensure the injected bundle API and WebKit UI delegate SPI is invoked when the field has the Strong Password button and its type changes. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm: Added. (didResignInputElementStrongPasswordAppearance): (-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]): * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[DidResignInputElementStrongPasswordAppearanceDelegate _webView:didResignInputElementStrongPasswordAppearanceWithUserInfo:]): (-[DidResignInputElementStrongPasswordAppearanceDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TEST): 2018-04-20 Brady Eidson Add a test to verify load/unload/pageshow/pagehide all work with process swapping. https://bugs.webkit.org/show_bug.cgi?id=184807 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]): 2018-04-20 Carlos Garcia Campos Unreviewed. Mark TestJSC as slow in debug. Only /jsc/vm is slow, but GLib API test runner only checks the test binary for GLib tests. * TestWebKitAPI/glib/TestExpectations.json: 2018-04-20 Carlos Garcia Campos [GTK] Local cross references are broken in API documentation https://bugs.webkit.org/show_bug.cgi?id=184771 Reviewed by Michael Catanzaro. The problem is that gtkdoc-fixxref expects the links to be in the form html/modulename (like the installed ones), but we generate the documentation as modulename/html. So, links to WebKitDOM or JSC are generated as ../html/Foo. The rebase command considers html to be the module name in this case, creating broken links in all the cases. * gtk/gtkdoc.py: (GTKDoc._copy_doc_files_to_output_dir): We don't have any html dir in the source tree so, we are not copying anything here. (GTKDoc._run_gtkdoc_mkhtml): Create the html dir here using html/modulename instead now. (GTKDoc._run_gtkdoc_fixxref): Pass the new directory as module dir to gtkdoc-fixxref and fix several links for which gtkdoc-fixxref always uses absolute paths. * gtk/manifest.txt.in: Update the documentation html paths and include the JSC GLib API in the tarball too. 2018-04-19 Brady Eidson Make back forward cache work with process swapping. and https://bugs.webkit.org/show_bug.cgi?id=184793 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2018-04-19 David Kilzer Enable Objective-C weak references Reviewed by Dan Bernstein. * ContentExtensionTester/Configurations/Base.xcconfig: (CLANG_ENABLE_OBJC_WEAK): Enable. * DumpRenderTree/mac/Configurations/Base.xcconfig: (CLANG_ENABLE_OBJC_WEAK): Enable. * ImageDiff/cg/Configurations/Base.xcconfig: (CLANG_ENABLE_OBJC_WEAK): Enable. * MiniBrowser/Configurations/Base.xcconfig: (CLANG_ENABLE_OBJC_WEAK): Enable. * TestWebKitAPI/Configurations/Base.xcconfig: (CLANG_ENABLE_OBJC_WEAK): Enable. * WebEditingTester/Configurations/Base.xcconfig: (CLANG_ENABLE_OBJC_ARC): Re-order. * WebKitLauncher/Configurations/Base.xcconfig: Add newline at end of file. (CLANG_ENABLE_OBJC_WEAK): Enable. * WebKitTestRunner/Configurations/Base.xcconfig: (CLANG_ENABLE_OBJC_WEAK): Enable. 2018-04-19 Chris Dumez REGRESSION (r229133): decidePolicyForNavigationAction not called for loading an HTML string https://bugs.webkit.org/show_bug.cgi?id=184209 Reviewed by Ryosuke Niwa. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm: (TEST): 2018-04-18 Ross Kirsling [WinCairo][EWS] Build bot should clean user temp directory each time. https://bugs.webkit.org/show_bug.cgi?id=184761 Reviewed by Lucas Forschler. * EWSTools/Start-Queue.ps1: Clean user's temp directory before each build, so that Windows git doesn't fill it up over time. 2018-04-18 Ross Kirsling Buildbots using Python zipfile should enable compression https://bugs.webkit.org/show_bug.cgi?id=184759 Reviewed by Lucas Forschler. * BuildSlaveSupport/built-product-archive: (createZipManually): Default is to archive without compressing, so tell it to compress as well. 2018-04-18 Nan Wang AX: [macOS] WebKit hangs when triggering an alert from an AOM increment event https://bugs.webkit.org/show_bug.cgi?id=184742 Reviewed by Chris Fleizach. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (AccessibilityUIElement::increment): (AccessibilityUIElement::decrement): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: (WTR::AccessibilityUIElement::asyncIncrement): (WTR::AccessibilityUIElement::asyncDecrement): * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::increment): (WTR::AccessibilityUIElement::decrement): (WTR::AccessibilityUIElement::asyncIncrement): (WTR::AccessibilityUIElement::asyncDecrement): 2018-04-18 Ross Kirsling Fix archive step for WinCairo build bot. https://bugs.webkit.org/show_bug.cgi?id=184715 Reviewed by Lucas Forschler. * BuildSlaveSupport/built-product-archive: (archiveBuiltProduct): (extractBuiltProduct): 2018-04-18 Sihui Liu REGRESSION: Using the reload button while offline pushes identical pages onto the back/forward list https://bugs.webkit.org/show_bug.cgi?id=184570 Reviewed by Chris Dumez. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm: (TEST): 2018-04-18 Chris Dumez Add support for converting a local window to a remote window https://bugs.webkit.org/show_bug.cgi?id=184515 Reviewed by Ryosuke Niwa. * MiniBrowser/mac/AppDelegate.m: (defaultConfiguration): * MiniBrowser/mac/SettingsController.h: * MiniBrowser/mac/SettingsController.m: (-[SettingsController _populateMenu]): (-[SettingsController validateMenuItem:]): (-[SettingsController processSwapOnWindowOpenWithOpenerEnabled]): (-[SettingsController toggleProcessSwapOnWindowOpenWithOpener:]): Add menu entry in minibrowser to turn on process swap on cross-origin window.open(). * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Turn on process swap on cross-origin window.open() for corresponding test and update test to expect that a new WebProcess is created. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::decidePolicyForResponse): Add null checks for injectedBundle.testRunner(). When we swap process on navigation, the InjectedBundlePage::decidePolicyForResponse() gets called in the new process. In this new process, we have constructed a InjectedBundlePage for the page but we have not initialized the InjectedBundle members such as testRunner. * WebKitTestRunner/TestController.cpp: (WTR::TestController::createWebViewWithOptions): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): Add a way for layout tests to turn on process swap on navigation via a test header. 2018-04-18 Yusuke Suzuki Unreviewed, reland r230697, r230720, and r230724. https://bugs.webkit.org/show_bug.cgi?id=184600 * Scripts/run-jsc-stress-tests: 2018-04-17 Carlos Garcia Campos [GLIB] Make it possible to handle JSCClass external properties not added to the prototype https://bugs.webkit.org/show_bug.cgi?id=184687 Reviewed by Michael Catanzaro. Add test cases for the new API. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (fooCreate): (fooFree): (fooGetProperty): (fooSetProperty): (testJSCPromises): (testJSCGarbageCollector): (testsJSCVirtualMachine): * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp: (windowObjectClearedCallback): 2018-04-17 Wenson Hsieh [Extra zoom mode] Programmatically changing focus when an element already has focus is a confusing experience https://bugs.webkit.org/show_bug.cgi?id=184635 Reviewed by Tim Horton. Add plumbing to support invoking `didHideKeyboardCallback` and `didShowKeyboardCallback` when (respectively) dismissing or presenting fullscreen input view controllers in extra zoom mode. * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView initWithFrame:configuration:]): (-[TestRunnerWKWebView dealloc]): (-[TestRunnerWKWebView _invokeShowKeyboardCallbackIfNecessary]): (-[TestRunnerWKWebView _invokeHideKeyboardCallbackIfNecessary]): (-[TestRunnerWKWebView _keyboardDidShow:]): (-[TestRunnerWKWebView _keyboardDidHide:]): (-[TestRunnerWKWebView _webView:didPresentFocusedElementViewController:]): (-[TestRunnerWKWebView _webView:didDismissFocusedElementViewController:]): 2018-04-17 Michael Catanzaro [GTK] Webkit should spoof as Safari on a Mac for Outlook.com https://bugs.webkit.org/show_bug.cgi?id=184573 Reviewed by Carlos Alberto Lopez Perez. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2018-04-17 Fujii Hironori [WinCairo][TestWebKitAPI] Implement PlatformWebView for TestWebKit https://bugs.webkit.org/show_bug.cgi?id=184524 Reviewed by Alex Christensen. Resurrect PlatformWebView for Windows port which was removed in Bug 104607. * TestWebKitAPI/PlatformWebView.h: * TestWebKitAPI/PlatformWin.cmake: * TestWebKitAPI/win/InjectedBundleControllerWin.cpp: Added. (TestWebKitAPI::InjectedBundleController::platformInitialize): * TestWebKitAPI/win/PlatformUtilitiesWin.cpp: Added. (TestWebKitAPI::Util::moduleDirectory): (TestWebKitAPI::Util::createInjectedBundlePath): (TestWebKitAPI::Util::createURLForResource): (TestWebKitAPI::Util::URLForNonExistentResource): (TestWebKitAPI::Util::isKeyDown): * TestWebKitAPI/win/PlatformWebViewWin.cpp: Added. (TestWebKitAPI::PlatformWebView::registerWindowClass): (TestWebKitAPI::PlatformWebView::PlatformWebView): (TestWebKitAPI::PlatformWebView::initialize): (TestWebKitAPI::PlatformWebView::~PlatformWebView): (TestWebKitAPI::PlatformWebView::page const): (TestWebKitAPI::PlatformWebView::resizeTo): (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress): (TestWebKitAPI::PlatformWebView::simulateAltKeyPress): (TestWebKitAPI::PlatformWebView::simulateRightClick): (TestWebKitAPI::PlatformWebView::simulateMouseMove): (TestWebKitAPI::PlatformWebView::wndProc): * TestWebKitAPI/win/UtilitiesWin.cpp: Added. (TestWebKitAPI::Util::run): (TestWebKitAPI::Util::spinRunLoop): (TestWebKitAPI::Util::sleep): 2018-04-17 Jonathan Bedard Fix hasher tests for system with 32 bit longs https://bugs.webkit.org/show_bug.cgi?id=184708 Reviewed by Mark Lam. Some systems have 32 bit longs. The Hasher WTF tests should handle this case. * TestWebKitAPI/Tests/WTF/Hasher.cpp: (TestWebKitAPI::TEST): 2018-04-17 Commit Queue Unreviewed, rolling out r230697, r230720, and r230724. https://bugs.webkit.org/show_bug.cgi?id=184717 These caused multiple failures on the Test262 testers. (Requested by mlewis13 on #webkit). Reverted changesets: "[WebAssembly][Modules] Prototype wasm import" https://bugs.webkit.org/show_bug.cgi?id=184600 https://trac.webkit.org/changeset/230697 "[WebAssembly][Modules] Implement function import from wasm modules" https://bugs.webkit.org/show_bug.cgi?id=184689 https://trac.webkit.org/changeset/230720 "[JSC] Rename runWebAssembly to runWebAssemblySuite" https://bugs.webkit.org/show_bug.cgi?id=184703 https://trac.webkit.org/changeset/230724 2018-04-17 Jonathan Bedard Unreviewed rollout of r230632. Regression in memory usage. That bug tracked in https://bugs.webkit.org/show_bug.cgi?id=184569. * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference): Deleted. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::TestOptions): (WTR::isLegacyAnimationEngineTestPath): Deleted. * WebKitTestRunner/TestOptions.h: 2018-04-17 Yusuke Suzuki [JSC] Rename runWebAssembly to runWebAssemblySuite https://bugs.webkit.org/show_bug.cgi?id=184703 Reviewed by JF Bastien. * Scripts/run-jsc-stress-tests: 2018-04-17 Yusuke Suzuki [WebAssembly][Modules] Implement function import from wasm modules https://bugs.webkit.org/show_bug.cgi?id=184689 Reviewed by JF Bastien. Add runWebAssemblyDirect, which runs wasm file directly. * Scripts/run-jsc-stress-tests: 2018-04-17 Saam Barati Add system trace points for process launch and for initializeWebProcess https://bugs.webkit.org/show_bug.cgi?id=184669 Reviewed by Simon Fraser. * Tracing/SystemTracePoints.plist: 2018-04-17 Ross Kirsling Add debug bots for WinCairo. https://bugs.webkit.org/show_bug.cgi?id=184663 Reviewed by Lucas Forschler. * BuildSlaveSupport/build.webkit.org-config/config.json: Add a debug build bot and two debug test bots. * BuildSlaveSupport/build.webkit.org-config/loadConfig.py: * BuildSlaveSupport/build.webkit.org-config/templates/root.html: Add a WinCairo category to build.webkit.org. 2018-04-17 Zalan Bujtas [LayoutReloaded] Set inline-block box position. https://bugs.webkit.org/show_bug.cgi?id=184690 Reviewed by Antti Koivisto. * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: (InlineFormattingContext.prototype._handleInlineBlock): * LayoutReloaded/Utils.js: (Utils._dumpBox): * LayoutReloaded/test/inline-block-with-fixed-width-height.html: 2018-04-17 Carlos Garcia Campos [GLIB] Add API to clear JSCContext uncaught exception https://bugs.webkit.org/show_bug.cgi?id=184685 Reviewed by Žan Doberšek. Add test cases for the new API. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCExceptions): 2018-04-17 Carlos Garcia Campos [GLIB] Add API to query, delete and enumerate properties https://bugs.webkit.org/show_bug.cgi?id=184647 Reviewed by Michael Catanzaro. Add test cases for the new API. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCObject): (testJSCClass): (testJSCPrototypes): 2018-04-16 Zalan Bujtas [LayoutReloaded] Add support for replaced box. https://bugs.webkit.org/show_bug.cgi?id=184680 Reviewed by Antti Koivisto. Basic support for inline replaced. * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: (InlineFormattingContext.prototype._handleInlineBox): (InlineFormattingContext.prototype._handleInlineBlock): (InlineFormattingContext.prototype._handleReplaced): * LayoutReloaded/FormattingContext/InlineFormatting/Line.js: (Line.prototype.lastLineBox): (Line.prototype.addInlineBox): (Line.prototype.addInlineContainerBox): Deleted. * LayoutReloaded/TreeBuilder.js: (TreeBuilder.prototype._createAndAttachBox): * LayoutReloaded/Utils.js: (Utils._dumpBox): * LayoutReloaded/test/index.html: * LayoutReloaded/test/inline-simple-replaced.html: Added. 2018-04-16 Zalan Bujtas [LayoutReloaded] Minor InlineFormattingContext::layout() cleanup. https://bugs.webkit.org/show_bug.cgi?id=184679 Reviewed by Antti Koivisto. * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: (InlineFormattingContext): (InlineFormattingContext.prototype.layout): (InlineFormattingContext.prototype._handleInlineContainer): (InlineFormattingContext.prototype._handleInlineContent): (InlineFormattingContext.prototype._handleInlineBlock): (InlineFormattingContext.prototype._handleReplacedBox): (InlineFormattingContext.prototype._clearNeedsLayoutAndMoveToNextSibling): (InlineFormattingContext.prototype._handleInlineBlockContainer): Deleted. (InlineFormattingContext.prototype._clearAndMoveToNext): Deleted. 2018-04-16 Zalan Bujtas [LayoutReloaded] Introduce fragmentation state/context. https://bugs.webkit.org/show_bug.cgi?id=184677 Reviewed by Antti Koivisto. State/context for fragmented content (multicol, regions, pagination etc). * LayoutReloaded/FormattingContext/FragmentationContext.js: Added. (FragmentationContext): * LayoutReloaded/FormattingState/FragmentationState.js: Added. (FragmentationState): (FragmentationState.prototype.formattingState): 2018-04-16 Andy Estes [iOS] Enable WKPDFView by default https://bugs.webkit.org/show_bug.cgi?id=184675 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm: 2018-04-16 Leo Balter Perl-based Test262 runner https://bugs.webkit.org/show_bug.cgi?id=183343 Reviewed by Michael Saboff. * Scripts/test262-helpers/README.md: Added. * Scripts/test262-helpers/agent.js: Added. (262.getGlobal): (262.setGlobal): (262.destroy): (262.IsHTMLDDA): * Scripts/test262-helpers/cpanfile: Added. * Scripts/test262-helpers/cpanfile.snapshot: Added. * Scripts/test262-helpers/test262-runner.pl: Added. (main): (processFile): (getScenarios): (addScenario): (compileTest): (runTest): (processResult): (getTempFile): (getContents): (parseData): (getHarness): * Scripts/test262-helpers/tests.log: Added. 2018-04-15 Andy Estes [iOS] Add API tests for PDF find-in-page https://bugs.webkit.org/show_bug.cgi?id=184634 Reviewed by Dan Bernstein. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/find.pdf: Added. * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm: (-[TestFindDelegate findString]): (-[TestFindDelegate _webView:didCountMatches:forString:]): (-[TestFindDelegate _webView:didFindMatches:forString:withMatchIndex:]): (-[TestFindDelegate _webView:didFailToFindString:]): (loadWebView): (TEST): 2018-04-13 Zalan Bujtas [LayoutReloaded] Update class documentation https://bugs.webkit.org/show_bug.cgi?id=184625 Reviewed by Antti Koivisto. * LayoutReloaded/DisplayTree/Box.js: * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js: * LayoutReloaded/FormattingContext/FloatingContext.js: * LayoutReloaded/FormattingContext/FormattingContext.js: * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: * LayoutReloaded/FormattingContext/InlineFormatting/Line.js: * LayoutReloaded/FormattingState/BlockFormattingState.js: * LayoutReloaded/FormattingState/FloatingState.js: * LayoutReloaded/FormattingState/FormattingState.js: * LayoutReloaded/FormattingState/InlineFormattingState.js: * LayoutReloaded/LayoutState.js: * LayoutReloaded/LayoutTree/BlockContainer.js: * LayoutReloaded/LayoutTree/Box.js: * LayoutReloaded/LayoutTree/Container.js: * LayoutReloaded/LayoutTree/InlineBox.js: * LayoutReloaded/LayoutTree/InlineContainer.js: * LayoutReloaded/LayoutTree/Text.js: * LayoutReloaded/misc/headers/BlockContainer.h: Removed. * LayoutReloaded/misc/headers/BlockFormattingContext.h: Removed. * LayoutReloaded/misc/headers/BlockMarginCollapse.h: Removed. * LayoutReloaded/misc/headers/Box.h: Removed. * LayoutReloaded/misc/headers/Container.h: Removed. * LayoutReloaded/misc/headers/FloatingContext.h: Removed. * LayoutReloaded/misc/headers/FormattingContext.h: Removed. * LayoutReloaded/misc/headers/InitialBlockContainer.h: Removed. * LayoutReloaded/misc/headers/InlineBox.h: Removed. * LayoutReloaded/misc/headers/LayoutContext.h: Removed. * LayoutReloaded/misc/headers/Line.h: Removed. * LayoutReloaded/misc/headers/Text.h: Removed. 2018-04-13 Zalan Bujtas [LayoutReloaded] Add simple implementation for FormattingState::markNeedsLayout() https://bugs.webkit.org/show_bug.cgi?id=184621 Reviewed by Antti Koivisto. This is just a simple, mark ancestors dirty implementation. * LayoutReloaded/FormattingState/FormattingState.js: (FormattingState.prototype.markNeedsLayout): * LayoutReloaded/LayoutState.js: (LayoutState.prototype.markNeedsLayout): (LayoutState.prototype.setNeedsLayoutById): Deleted. (LayoutState.prototype.setNeedsLayout): Deleted. * LayoutReloaded/TreeBuilder.js: (TreeBuilder.prototype._createAndAttachBox): (TreeBuilder.prototype._findBox): Deleted. * LayoutReloaded/Utils.js: (Utils.layoutBoxById): * LayoutReloaded/test/index.html: * LayoutReloaded/test/simple-incremental-layout-with-static-content.html: 2018-04-13 Carlos Alberto Lopez Perez [WPE] [webkitpy] The driver requirements should be checked before starting the tests https://bugs.webkit.org/show_bug.cgi?id=184595 Reviewed by Michael Catanzaro. Ensure Driver.check_driver() is checked at check_sys_deps() time. * Scripts/webkitpy/port/wpe.py: (WPEPort.check_sys_deps): 2018-04-13 Zalan Bujtas Rebaseline LayoutReloaded patch file (collectRenderersWithNeedsLayout). * LayoutReloaded/misc/LayoutReloadedWebKit.patch: 2018-04-13 Jonathan Bedard Boot fewer simulators in CI/EWS machines https://bugs.webkit.org/show_bug.cgi?id=184594 Reviewed by Alexey Proskuryakov. This is a temporary workaround fro . * Scripts/webkitpy/xcode/simulated_device.py: (SimulatedDeviceManager): Treat simulators as taking 6 gigs instead of 2. 2018-04-13 Brady Eidson Introduce SuspendedPageProxy to keep old web processes around after their WebPageProxy has been swapped to a new one. https://bugs.webkit.org/show_bug.cgi?id=184559 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2018-04-13 Chris Dumez input.webkitEntries does not work as expected when folder contains accented chars https://bugs.webkit.org/show_bug.cgi?id=184517 Reviewed by Alex Christensen. Add API test coverage. * TestWebKitAPI/Tests/WebCore/FileSystem.cpp: (TestWebKitAPI::TEST_F): 2018-04-13 Thibault Saunier Update my emails ordering in contributors.json https://bugs.webkit.org/show_bug.cgi?id=184587 Rubber-stamped by Philippe Normand. Bugzilla seems to pick up tsaunier@igalia.com which is not the one I use there. * Scripts/webkitpy/common/config/contributors.json: 2018-04-13 Michael Catanzaro [WPE] xkbcommon: ERROR: failed to add default include path /home/mcatanzaro/Projects/WebKit/WebKitBuild/DependenciesWPE/Root/share/X11/xkb https://bugs.webkit.org/show_bug.cgi?id=184388 Reviewed by Carlos Alberto Lopez Perez. Remove libxkbcommon from the JHBuild environment. We could alternatively add xkeyboard-config, but there doesn't seem to be any need to build libxkbcommon because I do not believe it depends on anything else in the JHBuild environment. * wpe/install-dependencies: * wpe/jhbuild.modules: 2018-04-12 Antoine Quint [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default https://bugs.webkit.org/show_bug.cgi?id=184569 Reviewed by Jon Lee. We set the default value for the CSS Animations and CSS Transitions as Web Animations flag to true but override it to be false always in the LayoutTests/legacy-animation-engine directory. * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference): (runTest): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): * WebKitTestRunner/TestOptions.cpp: (WTR::isLegacyAnimationEngineTestPath): (WTR::TestOptions::TestOptions): * WebKitTestRunner/TestOptions.h: 2018-04-13 Carlos Garcia Campos [GLIB] Tests WTF_RefPtr.ReleaseInNonMainThread and WTF_RefPtr.ReleaseInNonMainThreadDestroyInMainThread are crashing since they were added https://bugs.webkit.org/show_bug.cgi?id=184531 Reviewed by Michael Catanzaro. It's not a bug in WebKit, but in the tests. The problem is that those tests are using RunLoop::main() but main run loop hasn't been initialized. ReleaseInNonMainThread doesn't really need to initialize the main run loop if we change Util::run() to always use RunLop::current() instead of RunLoop::main(). But ReleaseInNonMainThreadDestroyInMainThread ends up scheduling a task to the main thread, and the generic implementation fo that uses RunLoop::main(), so we need to initialize the main loop in this case. * TestWebKitAPI/Tests/WTF/RefPtr.cpp: (TestWebKitAPI::TEST): Call RunLoop::initializeMainRunLoop(). * TestWebKitAPI/glib/UtilitiesGLib.cpp: (TestWebKitAPI::Util::run): Use RunLop::current() to stop the current run loop. (TestWebKitAPI::Util::sleep): Ditto. 2018-04-12 Zalan Bujtas [LayoutReloaded] Add support for incremental layout https://bugs.webkit.org/show_bug.cgi?id=184578 Reviewed by Antti Koivisto. * LayoutReloaded/Layout.js: (layout): * LayoutReloaded/LayoutState.js: (LayoutState.prototype.rootContainer): (LayoutState.prototype.setNeedsLayoutById): * LayoutReloaded/Utils.js: (Utils.layoutTreeDump): * LayoutReloaded/test/TestHarness.js: (verifyLayout): (runLayout): (verifyLayoutTreeDump): Deleted. * LayoutReloaded/test/index.html: * LayoutReloaded/test/simple-incremental-layout-with-static-content.html: Added. 2018-04-12 Zalan Bujtas [LayoutReloaded] Move root container ownership to layout state https://bugs.webkit.org/show_bug.cgi?id=184575 Reviewed by Antti Koivisto. Now the root container is on the associated layout state (ICB only at this point though). * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: (BlockFormattingContext.prototype.layout): * LayoutReloaded/FormattingContext/FormattingContext.js: (FormattingContext.prototype._layoutOutOfFlowDescendants): * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: (InlineFormattingContext.prototype._handleInlineBlockContainer): (InlineFormattingContext.prototype._handleFloatingBox): * LayoutReloaded/Layout.js: (layout): * LayoutReloaded/LayoutState.js: (LayoutState): (LayoutState.prototype.formattingContext): (LayoutState.prototype.establishedFormattingState): (LayoutState.prototype.formattingStateForBox): (LayoutState.prototype.needsLayout): (LayoutState.prototype.displayBox): (LayoutState.prototype._formattingContext): (LayoutState.prototype.layout): Deleted. (LayoutState.prototype.formattingStates): Deleted. (LayoutState.prototype.initialDisplayBox): Deleted. * LayoutReloaded/Utils.js: (Utils._dumpBox): (Utils._findDisplayBox): Deleted. 2018-04-12 Jonathan Bedard Fix --build-directory flag for run-webkit-tests https://bugs.webkit.org/show_bug.cgi?id=184545 Rubber-stamped by Aakash Jain. The --build-directory path does not work with iOS-Simulator. * Scripts/webkitpy/port/base.py: (Port._build_path): Use the port configuration to calculate the root directory. * Scripts/webkitpy/port/base_unittest.py: (PortTest.test_build_path): Test build directories for embedded configurations. 2018-04-12 Ross Kirsling pemfile.py should not assume POSIX line endings https://bugs.webkit.org/show_bug.cgi?id=184507 Reviewed by Daniel Bates. * Scripts/webkitpy/common/system/pemfile.py: (_parse_pem_format): * Scripts/webkitpy/common/system/pemfile_unittest.py: (PemFileTest.test_parse_crlf): (PemFileTest.test_parse_cr): 2018-04-12 Zalan Bujtas [LayoutReloaded] Minor cleanup in LayoutSate https://bugs.webkit.org/show_bug.cgi?id=184546 Reviewed by Antti Koivisto. * LayoutReloaded/FormattingContext/FormattingContext.js: (FormattingContext.isInFormattingContext): * LayoutReloaded/FormattingState/FormattingState.js: (FormattingState.prototype.displayBoxes): (FormattingState.prototype.displayBox): (FormattingState.prototype._markSubTreeNeedsLayout): (FormattingState): (FormattingState.prototype.displayBoxMap): Deleted. * LayoutReloaded/LayoutState.js: (LayoutState.prototype.formattingStateForBox): (LayoutState.prototype.needsLayout): (LayoutState.prototype.displayBox): (LayoutState.prototype._createFormattingState): (LayoutState): * LayoutReloaded/LayoutTree/Box.js: (Layout.Box.prototype.isFormattingContextDescendant): Deleted. * LayoutReloaded/LayoutTree/Container.js: (Layout.Container.prototype.isContainingBlockDescendant): Deleted. * LayoutReloaded/Utils.js: (Utils._findDisplayBox): 2018-04-12 Zalan Bujtas [LayoutReloaded] Introduce needsLayout to InlineFormattingContext https://bugs.webkit.org/show_bug.cgi?id=184538 Reviewed by Antti Koivisto. * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: (BlockFormattingContext.prototype._adjustBottomWithFIXME): (BlockFormattingContext): (BlockFormattingContext.prototype._firstInFlowChildWithNeedsLayout): Deleted. (BlockFormattingContext.prototype._nextInFlowSiblingWithNeedsLayout): Deleted. * LayoutReloaded/FormattingContext/FormattingContext.js: (FormattingContext.prototype._firstInFlowChildWithNeedsLayout): (FormattingContext.prototype._nextInFlowSiblingWithNeedsLayout): (FormattingContext): * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: (InlineFormattingContext.prototype.layout): (InlineFormattingContext.prototype._handleInlineContainer): (InlineFormattingContext.prototype._handleInlineBlockContainer): (InlineFormattingContext.prototype._handleInlineContent): (InlineFormattingContext.prototype._clearAndMoveToNext): (InlineFormattingContext): 2018-04-12 Xabier Rodriguez Calvar [GStreamer] Speed up GStreamer dependency build by removing examples compilation https://bugs.webkit.org/show_bug.cgi?id=184528 Reviewed by Philippe Normand. * gstreamer/jhbuild.modules: Added --disable-examples for GStreamer package. 2018-04-12 Zan Dobersek [WPE] Switch testing process to using WPEBackend-fdo https://bugs.webkit.org/show_bug.cgi?id=184357 Reviewed by Carlos Alberto Lopez Perez. Switch WPE testing to using the WPEBackend-fdo implementation that depends on the WL_bind_wayland_display EGL extension, as defined under the freedesktop.org project. https://cgit.freedesktop.org/mesa/mesa/tree/docs/specs/WL_bind_wayland_display.spec HeadlessViewBackend is refactored to use the WPEBackend-fdo API, but otherwise is not changed in functionality. Unit tests now have to unconditionally use HeadlessViewBackend as a wpe_view_backend provider, since WPEBackend-fdo does not provide a default wpe_view_backend implementation. Unit tests covering that are adjusted to instead use a mock wpe_view_backend interface. * Scripts/webkitdirs.pm: (builtDylibPathForName): Fix the libWPEWebKit.so name to also include the API version that was added in r230449. * Scripts/webkitpy/port/waylanddriver.py: (WaylandDriver._setup_environ_for_test): Export EGL_PLATFORM=wayland. * Scripts/webkitpy/port/wpe.py: (WPEPort._driver_class): Use WaylandDriver by default. * TestWebKitAPI/PlatformWebView.h: (): Deleted. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewWebBackend): * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::createWebViewBackend): * TestWebKitAPI/wpe/PlatformWebViewWPE.cpp: (TestWebKitAPI::PlatformWebView::~PlatformWebView): (TestWebKitAPI::PlatformWebView::initialize): * wpe/HeadlessViewBackend/CMakeLists.txt: * wpe/HeadlessViewBackend/HeadlessViewBackend.cpp: (getEGLDisplay): (HeadlessViewBackend::HeadlessViewBackend): (HeadlessViewBackend::~HeadlessViewBackend): (HeadlessViewBackend::backend const): (HeadlessViewBackend::createSnapshot): (HeadlessViewBackend::performUpdate): (HeadlessViewBackend::makeCurrent): Deleted. * wpe/HeadlessViewBackend/HeadlessViewBackend.h: * wpe/jhbuild.modules: Module name cleanup. Dyz version is bumped. 2018-04-12 Carlos Garcia Campos [GTK] Switch to use always complex text code path https://bugs.webkit.org/show_bug.cgi?id=183285 Reviewed by Michael Catanzaro. Keep the auto mode for the layout tests to avoid having to rebaseline a lot of tests. * WebKitTestRunner/gtk/main.cpp: (main): Set WEBKIT_FORCE_COMPLEX_TEXT to 0 unless it's already present in the environment. 2018-04-11 Carlos Garcia Campos [GLIB] Handle strings containing null characters https://bugs.webkit.org/show_bug.cgi?id=184450 Reviewed by Michael Catanzaro. Add test case for strings with null characters and update all calls to evaluate to pass the script length. * TestWebKitAPI/PlatformGTK.cmake: * TestWebKitAPI/PlatformWPE.cmake: * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCBasic): (testJSCFunction): (testJSCObject): (testJSCClass): (testJSCPrototypes): (testJSCExceptions): (testJSCPromises): (testJSCGarbageCollector): (testJSCWeakValue): (testsJSCVirtualMachine): (testsJSCAutocleanups): * TestWebKitAPI/Tests/JavaScriptCore/glib/script.js: Added. * TestWebKitAPI/Tests/WebKitGLib/DOMElementTest.cpp: (DOMElementTest::testAutoFill): * TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp: (WebKitWebEditorTest::testSelectionChanged): * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp: (WebKitFrameTest::testJavaScriptValues): * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp: (consoleMessageSentCallback): (methodCallCallback): 2018-04-11 Zan Dobersek [WPE] Make WebKitWebViewBackend object mandatory for webkit_web_view_new*() constructors https://bugs.webkit.org/show_bug.cgi?id=184513 Reviewed by Michael Catanzaro. Update the WPE-specific testWebViewWebBackend() test case, removing the test that passes a null WebKitWebViewBackend object to the webkit_web_view_new() call. Helper createWebViewBackend() that's called via Test::createWebView() variations is updated to, in case of not using the headless backend, return a WebKitWebViewBackend instance that wraps around a default wpe_view_backend object. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewWebBackend): * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::createWebViewBackend): 2018-04-11 Zalan Bujtas [LayoutReloaded] Introduce needsLayout flag https://bugs.webkit.org/show_bug.cgi?id=184527 Reviewed by Antti Koivisto. Use the formatting state to mark boxes dirty. * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: (BlockFormattingContext.prototype.layout): (BlockFormattingContext.prototype._firstInFlowChildWithNeedsLayout): (BlockFormattingContext.prototype._nextInFlowSiblingWithNeedsLayout): (BlockFormattingContext): * LayoutReloaded/FormattingContext/FormattingContext.js: (FormattingContext.prototype._layoutOutOfFlowDescendants): * LayoutReloaded/FormattingState/FormattingState.js: (FormattingState): (FormattingState.prototype.markNeedsLayout): (FormattingState.prototype.clearNeedsLayout): (FormattingState.prototype.needsLayout): (FormattingState.prototype.layoutNeeded): (FormattingState.prototype._markSubTreeNeedsLayout): * LayoutReloaded/LayoutState.js: (LayoutState.prototype.formattingStateForBox): (LayoutState.prototype.setNeedsLayout): (LayoutState.prototype.needsLayout): * LayoutReloaded/LayoutTree/Box.js: (Layout.Box.prototype.isFormattingContextDescendant): * LayoutReloaded/LayoutTree/Container.js: (Layout.Container.prototype.isContainingBlockDescendant): 2018-04-11 Jonathan Bedard Fix TestInvocation class for newer versions of clang. https://bugs.webkit.org/show_bug.cgi?id=184508 Reviewed by Alexey Proskuryakov. Declare TestInvocation to be final so it does not require a virtual destructor. * WebKitTestRunner/TestInvocation.h: 2018-04-10 Alex Christensen IDN spoofing with Hebrew combining characters https://bugs.webkit.org/show_bug.cgi?id=184472 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): 2018-04-11 Wenson Hsieh [Extra zoom mode] Missing label when focusing a