2018-09-11 Jiewen Tan [WebAuthN] Polish AuthenticatorManager and rename it to AuthenticatorCoordinator https://bugs.webkit.org/show_bug.cgi?id=189277 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm: (TestWebKitAPI::TEST): 2018-09-10 Michael Saboff Test262 failure with Named Capture Groups - using a reference before the group is defined https://bugs.webkit.org/show_bug.cgi?id=189407 Reviewed by Alex Christensen. Updated test. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::TEST_F): 2018-09-10 Thomas Denney [WHLSL] Inlining should be optional https://bugs.webkit.org/show_bug.cgi?id=188641 Reviewed by Myles C. Maxfield. Inlining functions is now optional, and disabled by default. This patch additionally resolves https://bugs.webkit.org/show_bug.cgi?id=189326 as the code for calling functions was completely rewritten. * WebGPUShadingLanguageRI/All.js: Add LateCheckAndLayoutBuffers.js * WebGPUShadingLanguageRI/CallFunction.js: (callFunction): Remove dependency on inlining. * WebGPUShadingLanguageRI/Evaluator.js: (Evaluator.prototype._snapshot): Allow null srcPtr in the case of void returns from functions. (Evaluator.prototype._evaluateArguments): Abstract out argument evaluation, ensuring that the order is right-to-left for FunctionLikeBlocks (i.e. inlined functions) and regular calls. (Evaluator.prototype._evaluateFunction): Abstracted out function body evaluation for inlined and non-inlined functions. (Evaluator.prototype.visitFunctionLikeBlock): Ditto. (Evaluator.prototype.visitCallExpression): Ditto. * WebGPUShadingLanguageRI/Inline.js: (_inlineFunction): Moved logic that is needed regardless of inlining into LateCheckAndLayoutBuffers.js (resolveInlinedFunction): Deleted. * WebGPUShadingLanguageRI/LateCheckAndLayoutBuffers.js: Moved logic for late checking. * WebGPUShadingLanguageRI/Prepare.js: Make inlining optional and off by default. * WebGPUShadingLanguageRI/SPIRV.html: Update include. * WebGPUShadingLanguageRI/Test.html: Ditto. * WebGPUShadingLanguageRI/Test.js: Right-to-left argument evaluation, and inlining tests. * WebGPUShadingLanguageRI/index.html: Update include. 2018-09-10 Wenson Hsieh [iOS] Unable to change the value of select elements while preserving focus state https://bugs.webkit.org/show_bug.cgi?id=189475 Reviewed by Tim Horton. Adds a pair of new API tests to verify that (1) resigning first responder while preserving focus does not blur the focused element, and (2) if another element is focused and presents an input view while preserving focus, then we reset preservation state and allow first responder resignation to blur the focused element. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/FocusPreservationTests.mm: Added. (webViewForTestingFocusPreservation): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView textInputContentView]): * TestWebKitAPI/ios/UIKitSPI.h: 2018-09-10 Thomas Denney [WHLSL] Add the test shader type https://bugs.webkit.org/show_bug.cgi?id=189484 Reviewed by Myles C. Maxfield. Tests are now precedeed by the 'test' keyword so that they are treated as entry points, in the same way as vertex and fragment shaders. * WebGPUShadingLanguageRI/LateChecker.js: (LateChecker.prototype._checkShaderType): Allow tests to return any type, as some currently return void/pointer types. * WebGPUShadingLanguageRI/Parse.js: (parseFuncDecl): Add the test keyword. * WebGPUShadingLanguageRI/Test.js: Prepend 'test' to every single test. 2018-09-10 Don Olmstead CBOR coders should only be compiled if WebAuthN is enabled https://bugs.webkit.org/show_bug.cgi?id=189425 Reviewed by Jiewen Tan. Just places ENABLE(WEB_AUTHN) guards around CBOR test files. * TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp: * TestWebKitAPI/Tests/WebCore/CBORValueTest.cpp: * TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp: 2018-09-10 Daniel Bates [iOS] Make WKWebView become the first responder to support testing key presses to non-editable elements https://bugs.webkit.org/show_bug.cgi?id=189432 Reviewed by Simon Fraser. Make the WKWebView become the first responder immediately without the need to focus an editable element. This allows us to test that DOM keyboard events are dispatched to non-editable elements. * WebKitTestRunner/ios/PlatformWebViewIOS.mm: (WTR::PlatformWebView::PlatformWebView): 2018-09-10 Yusuke Suzuki [WTF] Add Markable https://bugs.webkit.org/show_bug.cgi?id=189231 Reviewed by Sam Weinig. Add tests for Markable. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/Markable.cpp: Added. (TestWebKitAPI::TEST): 2018-09-10 Simon Fraser Before tracking Document leaks, clear all caches https://bugs.webkit.org/show_bug.cgi?id=189459 Reviewed by Sam Weinig. It's not enough to clear the page and memory caches; font caches can reference Documents (for SVG fonts), so just call WebCore::releaseMemory(), which empties caches including the page and memory caches, and does the GC that we need to happen. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): 2018-09-07 Matt Rajca https://bugs.webkit.org/show_bug.cgi?id=189433 Touch Bar displays an active PIP button for audio elements (and it doesn't do anything) Reviewed by Eric Carlson. An API test has been added that checks the value of the canTogglePictureInPicture and ensures it is NO when audio elements are playing. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.html: * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/audio-with-controls.html: Added. 2018-09-09 Commit Queue Unreviewed, rolling out r235832. https://bugs.webkit.org/show_bug.cgi?id=189464 Broke WebKit2 tests (Requested by ap on #webkit). Reverted changeset: "[Cocoa] Turn on ARC for WebKitTestRunner" https://bugs.webkit.org/show_bug.cgi?id=189228 https://trac.webkit.org/changeset/235832 2018-09-08 Simon Fraser accessibility/notification-listeners.html abandons a document https://bugs.webkit.org/show_bug.cgi?id=188724 Reviewed by Darin Adler. AccessibilityControllerMac leaked m_globalNotificationHandler, which leaks a JSValueProtect'd function, which leaks a Document. Fix by using adoptNS(). * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::addNotificationListener): 2018-09-08 Wenson Hsieh [Cocoa] Use more bridging casts in TestWebKitAPI https://bugs.webkit.org/show_bug.cgi?id=189457 Reviewed by Darin Adler. Adds some bridging casts to TestWebKitAPI, when converting betweeen several common types of objects, including: CFStringRef <=> NSString CFURLRef <=> NSURL WKPreferences <=> WKPreferencesRef CFDataRef <=> NSData * TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm: (readHTMLFromPasteboard): (createWebViewWithCustomPasteboardDataEnabled): * TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm: (createWebViewWithCustomPasteboardDataEnabled): * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm: (writeHTMLToPasteboard): (createWebViewWithCustomPasteboardDataSetting): * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: (TestWebKitAPI::setUpWebView): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm: (writeRTFToPasteboard): (writeRTFDToPasteboard): (createWebViewWithCustomPasteboardDataEnabled): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm: (createWebViewWithCustomPasteboardDataEnabled): * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (webViewForTestingAttachments): * TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm: (writeRTFDToPasteboard): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/ios/ActionSheetTests.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (checkRichTextTypePrecedesPlainTextType): (TestWebKitAPI::TEST): (TestWebKitAPI::setUpTestWebViewForDataTransferItems): * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/mac/PlatformUtilitiesMac.mm: (TestWebKitAPI::Util::createInjectedBundlePath): (TestWebKitAPI::Util::createURLForResource): (TestWebKitAPI::Util::URLForNonExistentResource): (TestWebKitAPI::Util::MIMETypeForWKURLResponse): * TestWebKitAPI/mac/WebKitAgnosticTest.mm: (TestWebKitAPI::WebKitAgnosticTest::loadURL): 2018-09-02 Darin Adler [Cocoa] Turn on ARC for WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=189228 Reviewed by Sam Weinig. * TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm: (+[EventSerializer dictionaryForEvent:relativeToTime:]): Removed autorelease. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Removed autorelease. * WebKitTestRunner/Configurations/Base.xcconfig: Added CLANG_ENABLE_OBJC_ARC. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::accessibleElementById): Use a __bridge cast. * WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm: (WTR::AccessibilityTextMarker::isEqual): Ditto. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::AccessibilityUIElement): Removed retain. (WTR::AccessibilityUIElement::~AccessibilityUIElement): Removed release. (WTR::AccessibilityUIElement::removeNotificationListener): Removed release. (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use a __bridge cast. (WTR::AccessibilityUIElement::textMarkerRangeForElement): 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::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Ditto. (WTR::_CGPathEnumerationIteration): Ditto. (WTR::AccessibilityUIElement::pathDescription const): Ditto. * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (-[AccessibilityNotificationHandler dealloc]): Removed [super dealloc]. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::AccessibilityUIElement): Removed retain. (WTR::AccessibilityUIElement::~AccessibilityUIElement): Removed release. (WTR::AccessibilityUIElement::removeNotificationListener): Removed release. (WTR::createJSStringRef): Removed autorelease. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::initializeWebViewConfiguration): Removed release. (WTR::TestController::cocoaPlatformInitialize): Removed release. (WTR::TestController::platformCreateOtherPage): Removed autorelease. * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView dealloc]): Removed [super dealloc] and also many cases of setting properties to nil that were only present for memory management reasons. * WebKitTestRunner/ios/GeneratedTouchesDebugWindow.mm: (-[GeneratedTouchesDebugWindow dealloc]): Removed release and [super dealloc]. * WebKitTestRunner/ios/HIDEventGenerator.mm: (-[HIDEventGenerator dealloc]): Deleted. (-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]): Removed Block_copy. (-[HIDEventGenerator markerEventReceived:]): Removed Block_release. (-[HIDEventGenerator interpolatedEvents:]): Removed release. (-[HIDEventGenerator sendEventStream:completionBlock:]): Removed autorelease. * WebKitTestRunner/ios/PlatformWebViewIOS.mm: (-[WebKitTestRunnerWindow dealloc]): Removed [super dealloc]. (WTR::PlatformWebView::PlatformWebView): Removed release. (WTR::PlatformWebView::~PlatformWebView): Removed release. (WTR::PlatformWebView::addChromeInputField): Removed release. (WTR::PlatformWebView::removeChromeInputField): Removed release. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::initializeInjectedBundlePath): Use __bridge cast. (WTR::TestController::initializeTestPluginDirectory): Ditto. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::accessibilitySpeakSelectionContent const): Use __bridge cast. (WTR::UIScriptController::enterText): Ditto. (WTR::UIScriptController::selectFormPopoverTitle const): Ditto. (WTR::UIScriptController::textContentType const): Ditto. (WTR::UIScriptController::formInputLabel const): Ditto. (WTR::UIScriptController::scrollingTreeAsText const): Ditto. * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::~PlatformWebView): Removed release. (WTR::PlatformWebView::addChromeInputField): Removed release. * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::allowedFontFamilySet): Removed retain. (WTR::systemHiddenFontFamilySet): Removed retain. * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm: (-[WebKitTestRunnerDraggingInfo draggingDestinationWindow]): Removed retain. (-[WebKitTestRunnerDraggingInfo dealloc]): Deleted. * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: (+[WebKitTestRunnerPasteboard _pasteboardWithName:]): Removed release. (+[WebKitTestRunnerPasteboard releaseLocalPasteboards]): Removed release. Method name is still OK because setting localPasteboards to nil will still release them. (+[NSPasteboard superAlloc]): Added. Helper so that LocalPasteboard can bypass +[NSPasteboard alloc]. (+[NSPasteboard superAllocWithZone:]): Ditto. (+[LocalPasteboard alloc]): Call superAlloc instead of class_createInstance. This is a different way to achieve the "bypass NSPasteboard" behavior we need. (+[LocalPasteboard allocWithZone:]): Added. Calls superAllocWithZone: for the same reason as above. Needed because, at least at this time, +[NSObject alloc] calls +allocWithZone: so we have to override both. (-[LocalPasteboard dealloc]): Deleted. (-[LocalPasteboard addTypes:owner:]): Removed release. * WebKitTestRunner/mac/WebKitTestRunnerWindow.mm: (-[WebKitTestRunnerWindow dealloc]): Removed [super dealloc]. * WebKitTestRunner/mac/main.mm: (disableAppNapInUIProcess): Removed retain. 2018-09-07 Fujii Hironori [WinCairo][MiniBrowser][WebKit] REGRESSION(r235398): ASSERTION FAILED: !m_client.didReceiveTitleForFrame https://bugs.webkit.org/show_bug.cgi?id=189336 Reviewed by Alex Christensen. WKPageSetPageLoaderClient is deprecated. Replaced it with WKPageSetPageNavigationClient. * MiniBrowser/win/WebKitBrowserWindow.cpp: (WebKitBrowserWindow::WebKitBrowserWindow): Call WKPageSetPageNavigationClient instead of WKPageSetPageLoaderClient. (WebKitBrowserWindow::didFinishNavigation): Copied from didReceiveTitleForFrame. Use WKPageCopyTitle to get the title. (WebKitBrowserWindow::didCommitNavigation): Copied from didCommitLoadForFrame. Use WKPageCopyCommittedURL to get the URL. (WebKitBrowserWindow::didReceiveTitleForFrame): Deleted. (WebKitBrowserWindow::didCommitLoadForFrame): Deleted. * MiniBrowser/win/WebKitBrowserWindow.h: Renamed the class methods. 2018-09-07 Daniel Bates [iOS] uiController.typeCharacterUsingHardwareKeyboard("`", ...) dispatches DOM key events for ~ https://bugs.webkit.org/show_bug.cgi?id=189325 Reviewed by Wenson Hsieh. Fixes an issue where the test infrastructure would incorrectly synthesized a shift key press followed by a ` key press (i.e. type '~') when instructed to simulate typing a grave accent (`). Typing a grave accent does not require holding the shift key. * WebKitTestRunner/ios/HIDEventGenerator.mm: (shouldWrapWithShiftKeyEventForCharacter): 2018-09-07 Frederic Wang [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To) https://bugs.webkit.org/show_bug.cgi?id=182230 Reviewed by Simon Fraser. This patch enables CSSOMViewScrollingAPI during test execution. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (resetWebPreferencesToConsistentValues): * DumpRenderTree/win/DumpRenderTree.cpp: (enableExperimentalFeatures): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2018-09-07 Simon Fraser resultsjsonparser needs to handle leak failures https://bugs.webkit.org/show_bug.cgi?id=189430 Reviewed by Alexey Proskuryakov. Teach resultsjsonparser how to handle LEAK failures, building a FailureDocumentLeak with a list of the leaked URLs. * Scripts/webkitpy/common/net/resultsjsonparser.py: (JSONTestResult._failure_types_from_actual_result): * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py: (ParsedJSONResultsTest): (test_basic): 2018-09-07 Aakash Jain [ews-build] API tests should output result summary in json https://bugs.webkit.org/show_bug.cgi?id=189417 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (RunAPITests): Passed --json-output parameter to run-api-tests. * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests. 2018-09-07 Commit Queue Unreviewed, rolling out r235784. https://bugs.webkit.org/show_bug.cgi?id=189421 RunLoopCF does not agree to the fix (Requested by yusukesuzuki on #webkit). Reverted changeset: "[RunLoopGeneric] OneShotTimer should be inactive when fired." https://bugs.webkit.org/show_bug.cgi?id=189335 https://trac.webkit.org/changeset/235784 2018-09-07 Yoshiaki Jitsukawa [RunLoopGeneric] OneShotTimer should be inactive when fired. https://bugs.webkit.org/show_bug.cgi?id=189335 Reviewed by Yusuke Suzuki. * TestWebKitAPI/Tests/WTF/RunLoop.cpp: (TestWebKitAPI::TEST): Add test expectations about timer's active state. Add a new test to restart a one-shot timer within its fired callback. 2018-09-06 Zalan Bujtas [LFC] Add support for min/max-height percentage values. https://bugs.webkit.org/show_bug.cgi?id=189391 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-09-06 Simon Fraser Log when leak detection changes the test result https://bugs.webkit.org/show_bug.cgi?id=189293 Reviewed by Jon Lee. When you have an "Leak" expectation in TestExpectations, it's confusing to see a test unexpectedly pass, but then show up as an expected fail at the end (because leak detection happens at the end of a shard). So log when leak detection changes a test result. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (LayoutTestRunner._annotate_results_with_additional_failures): * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectations): 2018-09-06 Wenson Hsieh [macOS] [WK2] Support changing attributes for selected text (text shadow, underline, strike-through) https://bugs.webkit.org/show_bug.cgi?id=189356 Reviewed by Tim Horton. Adds a new API test to verify that some font attributes (text shadow, underline, and strike-through) can be added and removed using NSFontPanel. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/FontManagerTests.mm: Add the new API test. (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/mac/NSFontPanelTesting.h: Added. * TestWebKitAPI/mac/NSFontPanelTesting.mm: Added. Introduce a new file that extends NSFontPanel with some additional testing functionality. This includes the ability to interact with the text shadow toggle button, choose the text shadow blur radius and opacity, and change underline and strike-through styles. (findSubviewOfClass): (findMenuItemWithTitle): (-[NSFontPanel fontEffectsBox]): NSFontEffectsBox (an internal AppKit class) is the sender in the case where -changeAttributes: is invoked through interaction with the font panel. To simulate this for testing, grab this font effects box and pass it directory to -changeAttributes:. (-[NSFontPanel chooseUnderlineMenuItemWithTitle:]): (-[NSFontPanel chooseStrikeThroughMenuItemWithTitle:]): The supported values for these menu items are "none" and "single", which adds a single underline or strike-through to selected text. We grab these menu items by asking for the font panel's NSToolbar, and finding the relevant menu items via toolbar item identifiers. (-[NSFontPanel _didChangeAttributes]): (-[NSFontPanel shadowBlurSlider]): (-[NSFontPanel shadowOpacitySlider]): (-[NSFontPanel shadowToggleButton]): (-[NSFontPanel toggleShadow]): (-[NSFontPanel shadowOpacity]): (-[NSFontPanel setShadowOpacity:]): (-[NSFontPanel shadowBlur]): (-[NSFontPanel setShadowBlur:]): (-[NSFontPanel _toolbarItemWithIdentifier:]): 2018-09-06 Simon Fraser run-webkit-tests prints confusing messages when test expectations list results that are not compatible with the run options https://bugs.webkit.org/show_bug.cgi?id=189219 Reviewed by Jon Lee. If you call run-webkit-tests without --pixel-tests, and a non-ref test is marked as ImageOnlyFailure, it will be reported as unexpectedly passing. This is more confusing if you run without --world-leaks, yet tests are marked as [ Leak ] in TestExpectations. Fix by filtering out expectations that don't apply given the run options. So without --pixel-tests, a non-ref ImageOnlyFailure becomes a Pass, and without --world-leaks, a Leak becomes a Pass. Add various unit tests to test the various combinations. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (LayoutTestRunner._update_summary_with_result): (LayoutTestRunner._annotate_results_with_additional_failures): * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py: (LayoutTestRunnerTests.test_update_summary_with_result): * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationsModel.get_expectations_or_pass): (TestExpectationsModel): (TestExpectationsModel.expectations_to_string): (TestExpectationsModel.get_expectations_string): (TestExpectations.filtered_expectations_for_test): (TestExpectations): (TestExpectations.matches_an_expected_result): * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: * Scripts/webkitpy/layout_tests/models/test_run_results.py: (summarize_results): * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py: (summarized_results): (SummarizedResultsTest.setUp): (SummarizedResultsTest.test_summarized_results_include_passes): (SummarizedResultsTest): (SummarizedResultsTest.test_summarized_results_world_leaks_disabled): * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: * Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py: (BuildBotPrinterTests.test_print_unexpected_results): (BuildBotPrinterTests.test_print_unexpected_results_with_options): (BuildBotPrinterTests.test_print_results): * Scripts/webkitpy/port/test.py: (unit_test_list): 2018-09-06 Zalan Bujtas [LFC][BFC] Add support for min(max)-height https://bugs.webkit.org/show_bug.cgi?id=189377 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-09-06 Dewei Zhu BenchmarkResults.format should support specifying depth of tests to show. https://bugs.webkit.org/show_bug.cgi?id=189135 Reviewed by Ryosuke Niwa. Added the option to specify the depth of tests to show. * Scripts/webkitpy/benchmark_runner/benchmark_results.py: (BenchmarkResults): (BenchmarkResults.format): Added 'max_depth' option. (BenchmarkResults._format_tests): Added unit tests for 'max_depth'. 2018-09-06 Simon Fraser An EWS run that has leak test failures does not correctly add bugzilla comments showing the failures https://bugs.webkit.org/show_bug.cgi?id=189368 Reviewed by Alexey Proskuryakov. Include FailureDocumentLeak in ALL_FAILURE_CLASSES (with a fairly redundant test), which should fix EWS showing leaks in Bugzilla. * Scripts/webkitpy/layout_tests/models/test_failures.py: (FailureDocumentLeak.__init__): * Scripts/webkitpy/layout_tests/models/test_failures_unittest.py: (TestFailuresTest.test_all_failure_classes): 2018-09-06 Commit Queue Unreviewed, rolling out r235755. https://bugs.webkit.org/show_bug.cgi?id=189367 Didn't address the review comment (Requested by rniwa on #webkit). Reverted changeset: "BenchmarkResults.format should support specifying depth of tests to show." https://bugs.webkit.org/show_bug.cgi?id=189135 https://trac.webkit.org/changeset/235755 2018-08-29 Dewei Zhu BenchmarkResults.format should support specifying depth of tests to show. https://bugs.webkit.org/show_bug.cgi?id=189135 Reviewed by Ryosuke Niwa. Added the option to specify the depth of tests to show. * Scripts/webkitpy/benchmark_runner/benchmark_results.py: (BenchmarkResults): (BenchmarkResults.format): Added 'max_depth' option. (BenchmarkResults._format_tests): Added unit tests for 'max_depth'. 2018-09-06 Thomas Denney [WHLSL] Call arguments should be copied as soon as they are evaluated https://bugs.webkit.org/show_bug.cgi?id=189360 Reviewed by Myles C. Maxfield. Previously all call arguments were evaluated and then their results were copied into new buffers for the call. However, the results are not necessarily independent, so the result should be copied immediately after evaluation. * WebGPUShadingLanguageRI/Evaluator.js: (Evaluator.prototype.visitCallExpression): Move location of copy. (Evaluator): * WebGPUShadingLanguageRI/Test.js: Add new test to verify correct behavior. 2018-09-06 Thomas Denney [WHLSL] The test suite should log the compile time for the standard library https://bugs.webkit.org/show_bug.cgi?id=189354 Reviewed by Myles C. Maxfield. The test suite previously only logged the time for test execution, and not the compile time for the standard library. * WebGPUShadingLanguageRI/Test.js: 2018-09-06 Wenson Hsieh [macOS] Cannot change font size at selection until font panel is shown https://bugs.webkit.org/show_bug.cgi?id=189295 Reviewed by Ryosuke Niwa. Add API tests to simulate using menu items to increase or decrease font size, and also simulate using NSFontPanel to specify the font family, font size, and other traits. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/FontManagerTests.mm: Added. (-[TestWKWebView selectedText]): (-[TestWKWebView selectNextWord]): (-[TestWKWebView stylePropertyAtSelectionStart:]): (-[TestWKWebView stylePropertyAtSelectionEnd:]): (webViewForFontManagerTesting): (menuItemCellForFontAction): (TestWebKitAPI::TEST): 2018-09-06 Zalan Bujtas [LFC][BFC] Add support for min(max)-width https://bugs.webkit.org/show_bug.cgi?id=189358 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-09-06 Myles C. Maxfield [WHLSL] The parser is too slow https://bugs.webkit.org/show_bug.cgi?id=189014 Reviewed by Filip Pizlo. This patch includes three changes: 1. Migrate from using try/catch to simply returning the WSyntaxError. This means that each parser call has to check for this sentinel value. The lexer still can throw if it encounters an unknown token or an unmatched "/*" token (which is rare). 2. After removing try/catch, making the sentinel values not inherit from Error (the Error constructor was taking lots of time) 3. Previously, every time the parser failed (which is many times per expression) it was running a regex over the entire source text to figure out where the error occurred. Instead, we can preprocess the text string to find these line numbers ahead of time. Together, these make the parser 75x faster. Parsing the standard library goes from 2.5 hours down to 2 minutes. Because it's now a reasonable length, this patch uncomments the bulk of the standard library. * WebGPUShadingLanguageRI/All.js: * WebGPUShadingLanguageRI/Lexer.js: (Lexer): (Lexer.prototype.lineNumberForIndex): * WebGPUShadingLanguageRI/Parse.js: (fail): (backtrackingScope): (testScope): (genericConsume): (consumeEndOfTypeArgs): (parseTerm): (parseConstexpr): (parseTypeArguments): (parseType.getAddressSpace): (parseType): (parseTypeDef): (genericParseLeft): (parseCallExpression.let.parseArguments): (isCallExpression): (parseSuffixOperator): (parsePossibleSuffix): (parsePreIncrement): (parsePossiblePrefix): (parsePossibleTernaryConditional): (parsePossibleAssignment): (parsePostIncrement): (parseEffectfulExpression): (genericParseCommaExpression): (parseEffectfulStatement): (parseReturn): (parseBreak): (parseContinue): (parseIfStatement): (parseWhile): (parseFor): (parseDo): (parseVariableDecls): (parseSwitchCase): (parseSwitchStatement): (parseStatement): (parseBlockBody): (parseBlock): (parseParameter): (parseFuncName): (parseFuncDecl): (parseFuncDef): (parseField): (parseStructType): (parseNativeFunc): (parseNative): (parseRestrictedFuncDef): (parseEnumMember): (parseEnumType): (parse): * WebGPUShadingLanguageRI/SPIRV.html: * WebGPUShadingLanguageRI/StandardLibrary.js: (let.standardLibrary): * WebGPUShadingLanguageRI/Test.html: * WebGPUShadingLanguageRI/Test.js: (checkFail.doPrep): Deleted. * WebGPUShadingLanguageRI/WLexicalError.js: Added. (WLexicalError): * WebGPUShadingLanguageRI/index.html: 2018-09-06 Xan Lopez [test262] Do not call keys on a reference https://bugs.webkit.org/show_bug.cgi?id=189301 Reviewed by Keith Miller. * Scripts/test262/Runner.pm: (UpdateResults): 2018-09-06 David Kilzer svn-create-patch fails when svn mv is used on directory trees Reviewed by Daniel Bates. * Scripts/VCSUtils.pm: Export parseSvnDiffStartLine() for svn-create-patch. (parseDiffStartLine): Use parseSvnDiffStartLine(). (parseGitDiffStartLine): Document a prerequisite. Fix a bug when parsing Git patches using `git diff --no-prefix` that have non-native line endings. Found by new tests written for Scripts/webkitperl/VCSUtils_unittest/parseDiffStartLine.pl. (parseSvnDiffStartLine): Add. Extract logic from parseDiffStartLine() for use with svn-create-patch. * Scripts/svn-create-patch: Update copyright and license. (generateDiff): Return early for moved directories since individual files within the directory are handled separately. (generateFileList): Keep track of moved directories in the @additionWithHistoryDirectories array, then process this array in reverse order to create delete/add patches for each file in a moved directory. This also prevents duplicate patches. (manufacturePatchForAdditionWithHistory): Fix a long-standing bug where the path used to describe property changes contained the original (moved-from) path instead of the new (moved-to) path. This could cause svn-apply to fail mysteriously when trying to apply an empty patch created by the property change containing the moved-from path. * Scripts/webkitperl/VCSUtils_unittest/parseDiffStartLine.pl: Add. Tests for parseDiffStartLine(), parseGitDiffStartLine() and parseSvnDiffStartLine(). 2018-09-05 Don Olmstead [CMake] Allow port specific options on gtest https://bugs.webkit.org/show_bug.cgi?id=189313 Reviewed by Alex Christensen. Use the global property set by the gtest CMake file to add to the compilation definitions for TestWebKitAPI rather than repeating the logic. * TestWebKitAPI/CMakeLists.txt: 2018-09-05 Woodrow Wang Add infrastructure to dump resource load statistics https://bugs.webkit.org/show_bug.cgi?id=189213 Reviewed by Daniel Bates. The dumping functionality is not currently used, but will be included in tests for . * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setDumpResourceLoadStatistics): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::resourceStatisticsStringResultCallback): (WTR::TestController::dumpResourceLoadStatistics): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::dumpResults): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestInvocation::setDumpResourceLoadStatistics): * WebKitTestRunner/TestInvocation.h: 2018-09-05 Wenson Hsieh [macOS] DragAndDropTests.ExposeMultipleURLsInDataTransfer fails on macOS versions prior to Mojave https://bugs.webkit.org/show_bug.cgi?id=189315 Reviewed by Tim Horton. Fix the test failure by explicitly enabling custom pasteboard data. * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (TEST): 2018-09-05 Woodrow Wang Added runtime feature flag for web API statistics https://bugs.webkit.org/show_bug.cgi?id=189211 Reviewed by Daniel Bates. Added functionality to set the runtime flag with a JavaScript exposed function for testing. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebAPIStatisticsEnabled): * WebKitTestRunner/InjectedBundle/TestRunner.h: 2018-09-05 Ross Kirsling Add WinCairo to bot watcher's dashboard. https://bugs.webkit.org/show_bug.cgi?id=189273 Reviewed by Aakash Jain. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Windows10.png: Added. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Windows10@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: (table.queue-grid tr.platform.windows-10 img.logo): Added. (table.queue-grid tr.platform.windows-8 img.logo): Deleted. (table.queue-grid tr.platform.windows-xp img.logo): Deleted. Add Win10 section to dashboard. Remove unused WinXP and Win8 sections. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js: (BubbleQueueServer): * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: (WebKitBuildbot): Add WinCairo build, test, and EWS bots to Win10 section of dashboard. 2018-09-05 David Kilzer REGRESSION (r209470): EditingHistory folder is missing in EditingHistory Xcode project Found using `tidy-Xcode-project-file --missing` (see Bug 188754). Fixes were made manually. * EditingHistory/EditingHistory.xcodeproj/project.pbxproj: (EditingHistory): Change the path of the folder to "EditingHistory", then remove the now-redundant name. (EditingHistory/Resources/DumpEditingHistory.js): Remove redundant file reference since another file reference exists at the top of the project file list, and that file reference is the one used in the "Copy Bundle Resources" build phase. (EditingHistory/Resources/EditingHistoryUtil.js): Ditto. 2018-09-05 David Kilzer REGRESSION (r160736): Bundle folder is missing in MiniBrowser Xcode project Found using `tidy-Xcode-project-file --missing` (see Bug 188754). Folder fix was made manually. * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj: (Bundle): Change the path of the folder to "mac/Bundle", and set the name back to "Bundle". (Bundle/Info.plist): Change file reference to be relative to its group. Accomplished using Xcode after fixing the folder path. (Bundle/MiniBrowserBundle_Prefix.pch): Ditto. 2018-09-05 David Kilzer REGRESSION (r184033): ContentExtensionTester folder is missing in ContentExtensionTester Xcode project Found using `tidy-Xcode-project-file --missing` (see Bug 188754). Fixes were made manually. * ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj: (ContentExtensionTester): Change the path of the folder to map to "." (which exists and is where main.m is located), and then set the folder's name back to "ContentExtensionTester". (main.m): Change file reference to be relative to its group now that the group's path is fixed. 2018-09-04 Don Olmstead Add generic entrypoint and run loop in TestWebKitAPI https://bugs.webkit.org/show_bug.cgi?id=189287 Reviewed by Michael Catanzaro. The implementations in jsconly are platform agnostic. * TestWebKitAPI/PlatformJSCOnly.cmake: Use the glib implementation of Utilities when using that as a run loop otherwise use the generic implementation. * TestWebKitAPI/PlatformUtilities.h: Remove repeated entries from Utilities.h. * TestWebKitAPI/PlatformWPE.cmake: Use the generic main.cpp. * TestWebKitAPI/generic/UtilitiesGeneric.cpp: Renamed from Tools/TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp. (TestWebKitAPI::Util::run): (TestWebKitAPI::Util::spinRunLoop): Moved to a generic implementation and added spinRunLoop. * TestWebKitAPI/generic/main.cpp: Renamed from Tools/TestWebKitAPI/jsconly/main.cpp. Share between JSCOnly and WPE * TestWebKitAPI/wpe/main.cpp: Removed. 2018-09-04 Don Olmstead [CMake] Make TestWebKitAPI dependencies explicit https://bugs.webkit.org/show_bug.cgi?id=189282 Reviewed by Fujii Hironori. The config.h file includes files from JSC, WebCore and WebKit which places a dependency on those headers even when just building TestWTF. This makes the depedencies explicit for all CMake ports and shoud remove any race conditions that can be encountered when building tests. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformGTK.cmake: * TestWebKitAPI/PlatformWPE.cmake: * TestWebKitAPI/PlatformWin.cmake: 2018-09-04 Wenson Hsieh Populate "text/uri-list" with multiple URLs when the pasteboard contains multiple URLs https://bugs.webkit.org/show_bug.cgi?id=188890 Reviewed by Tim Horton. * DumpRenderTree/mac/DumpRenderTreePasteboard.mm: (-[LocalPasteboard pasteboardItems]): Implement this method to avoid crashing when running layout tests that access the pasteboard. * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: Add a test to verify that on macOS and iOS, multiple URLs dropped onto the page are accessible via "text/uri-list". * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: Add a test that exercises 5 different ways to write one or more URLs to the pasteboard on macOS; in all cases, the URLs written to the pasteboard should be exposed to the page via "text/uri-list". In all of these different cases, the results of using `-[NSPasteboardItem stringForType:]`, `-[NSURL URLFromPasteboard:]` and `-[NSPasteboard stringForType:]` will yield different results, so the purpose of this API test is to ensure that our logic for grabbing a list of URLs from the pasteboard on macOS is robust enough to handle all of these different behaviors. * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm: Add a test to verify that on iOS, using `-[UIPasteboard setURLs:]` to write to multiple URLs to the pasteboard and then pasting results in "text/uri-list" exposing a list of all the URLs written to the pasteboard. * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: (-[LocalPasteboard pasteboardItems]): Implement this method to avoid crashing when running layout tests that access the pasteboard. 2018-09-04 Simon Fraser REGRESSION(r235408): GTK bots exiting early https://bugs.webkit.org/show_bug.cgi?id=189063 Reviewed by Michael Catanzaro. WebKitTestRunner was running the world leak checks even when run without --world-leaks, causing GTK bot timeouts. So guard updateLiveDocumentsAfterTest(), checkForWorldLeaks() and findAndDumpWorldLeaks() with m_checkForWorldLeaks checks, and in TestController::handleControlCommand() print a message if the control script sends the "#CHECK FOR WORLD LEAKS" command if WTR was not run with --world-leaks. I tested that running with --world-leaks still works. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): (WTR::TestController::updateLiveDocumentsAfterTest): (WTR::TestController::checkForWorldLeaks): (WTR::TestController::findAndDumpWorldLeaks): (WTR::TestController::handleControlCommand): (WTR::TestController::run): 2018-09-04 Myles C. Maxfield Unreviewed follow-up to r235635 https://bugs.webkit.org/show_bug.cgi?id=188940 Use "let" variables instead of "var" variables. * WebGPUShadingLanguageRI/StandardLibrary.js: (let.standardLibrary): 2018-09-04 Myles C. Maxfield [WHLSL] Implement texture types https://bugs.webkit.org/show_bug.cgi?id=188940 Rubber-stamped by Dean Jackson. Implement the texture types and operations. This includes Sample(), Load(), Store(), Gather(), and GetDimensions(). These functions were implemented according to section 15 of the Vulkan 1.1.83 spec, which lists each operation and how to compute its results. * WebGPUShadingLanguageRI/All.js: * WebGPUShadingLanguageRI/Casts.js: Moved from Intrinsics. The texture operations need to cast too, so these are moved into a common location. (cast): (bitwiseCast): (castToUchar): (castToUshort): (castToUint): (castToChar): (castToShort): (castToInt): (castToHalf): (castToFloat): * WebGPUShadingLanguageRI/Intrinsics.js: Use Casts.js and call into TextureOperations.js. (Intrinsics.): (Intrinsics.checkFalse): (Intrinsics.boxVector): (Intrinsics.unboxVector): (Intrinsics): (Intrinsics.cast): Deleted. (Intrinsics.bitwiseCast): Deleted. (Intrinsics.castToHalf): Deleted. * WebGPUShadingLanguageRI/SPIRV.html: * WebGPUShadingLanguageRI/Sampler.js: Added. Represent the Sampler type. (Sampler): (Sampler.prototype.get rAddressMode): (Sampler.prototype.get sAddressMode): (Sampler.prototype.get tAddressMode): (Sampler.prototype.get minFilter): (Sampler.prototype.get magFilter): (Sampler.prototype.get mipmapFilter): (Sampler.prototype.get lodMinClamp): (Sampler.prototype.get lodMaxClamp): (Sampler.prototype.get maxAnisotropy): (Sampler.prototype.get compareFunction): (Sampler.prototype.get borderColor): (Sampler.prototype.calculateBorderColor.computeValues): (Sampler.prototype.calculateBorderColor): * WebGPUShadingLanguageRI/StandardLibrary.js: Update the standard library. Some of the functions were either missing or wrong. (let.standardLibrary): * WebGPUShadingLanguageRI/Test.html: * WebGPUShadingLanguageRI/Test.js: Test many, many combinations of the texture operations. (makeSampler): (make1DTexture): (make1DTextureArray): (make2DTexture): (make2DTextureArray): (make3DTexture): (makeTextureCube): (makeRW1DTexture): (makeRW1DTextureArray): (makeRW2DTexture): (makeRW2DTextureArray): (makeRW3DTexture): (make2DDepthTexture): (make2DDepthTextureArray): (makeDepthTextureCube): (makeRW2DDepthTexture): (makeRW2DDepthTextureArray): (checkFloat4): * WebGPUShadingLanguageRI/Texture.js: Added. Represents each of the texture types. (Texture): (Texture.prototype.get dimension): (Texture.prototype.get width): (Texture.prototype.get height): (Texture.prototype.get depth): (Texture.prototype.get levelCount): (Texture.prototype.get layerCount): (Texture.prototype.get innerType): (Texture.prototype.get data): (Texture.prototype.elementChecked): (Texture.prototype.setElementChecked): (Texture1D): (Texture1D.prototype.widthAtLevel): (Texture1D.prototype.heightAtLevel): (Texture1D.prototype.depthAtLevel): (Texture1D.prototype.element): (Texture1D.prototype.setElement): (Texture1DArray): (Texture1DArray.prototype.widthAtLevel): (Texture1DArray.prototype.heightAtLevel): (Texture1DArray.prototype.depthAtLevel): (Texture1DArray.prototype.element): (Texture1DArray.prototype.setElement): (Texture2D): (Texture2D.prototype.widthAtLevel): (Texture2D.prototype.heightAtLevel): (Texture2D.prototype.depthAtLevel): (Texture2D.prototype.element): (Texture2D.prototype.setElement): (Texture2DArray): (Texture2DArray.prototype.widthAtLevel): (Texture2DArray.prototype.heightAtLevel): (Texture2DArray.prototype.depthAtLevel): (Texture2DArray.prototype.element): (Texture2DArray.prototype.setElement): (Texture3D): (Texture3D.prototype.widthAtLevel): (Texture3D.prototype.heightAtLevel): (Texture3D.prototype.depthAtLevel): (Texture3D.prototype.element): (Texture3D.prototype.setElement): (TextureCube): (TextureCube.prototype.widthAtLevel): (TextureCube.prototype.heightAtLevel): (TextureCube.prototype.depthAtLevel): (TextureCube.prototype.element): (TextureCube.prototype.setElement): (Texture1DRW): (Texture1DRW.prototype.widthAtLevel): (Texture1DRW.prototype.heightAtLevel): (Texture1DRW.prototype.depthAtLevel): (Texture1DRW.prototype.element): (Texture1DRW.prototype.setElement): (Texture1DArrayRW): (Texture1DArrayRW.prototype.widthAtLevel): (Texture1DArrayRW.prototype.heightAtLevel): (Texture1DArrayRW.prototype.depthAtLevel): (Texture1DArrayRW.prototype.element): (Texture1DArrayRW.prototype.setElement): (Texture2DRW): (Texture2DRW.prototype.widthAtLevel): (Texture2DRW.prototype.heightAtLevel): (Texture2DRW.prototype.depthAtLevel): (Texture2DRW.prototype.element): (Texture2DRW.prototype.setElement): (Texture2DArrayRW): (Texture2DArrayRW.prototype.widthAtLevel): (Texture2DArrayRW.prototype.heightAtLevel): (Texture2DArrayRW.prototype.depthAtLevel): (Texture2DArrayRW.prototype.element): (Texture2DArrayRW.prototype.setElement): (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW): (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.widthAtLevel): (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.heightAtLevel): (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.depthAtLevel): (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.element): (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.setElement): * WebGPUShadingLanguageRI/TextureOperations.js: Added. This implements the texture operations as described in section 15 of the Vulkan 1.1.83 spec. (depthCompareOperation): (conversionToRGBA): (projectionOperation): (cubeMapFaceSelection): (cubeMapCoordinateTransformation): (cubeMapDerivativeTransformation): (scaleFactorOperation): (levelOfDetailOperation): (nearest): (imageLevelSelection): (strqaToUVWATransformation): (rne): (uvwaToIJKLNTransformationAndArrayLayerSelection): (integerTexelCoordinateOperations): (mirror): (transform): (wrappingOperation): (calculateLambda): (shouldBeBorder): (accessColor): (computeTau): (reduce): (texelGathering): (computeColorFromLevel): (texelFiltering): (castToInnerTypeForGather): (gatherTexture): (castToInnerType): (sampleTexture): * WebGPUShadingLanguageRI/index.html: 2018-09-04 Alexey Proskuryakov Removing an accidentally committed debugging print. * Scripts/run-leaks: (runLeaks) 2018-09-04 Alexey Proskuryakov run-leaks should run leaks with --list (on Mojave) https://bugs.webkit.org/show_bug.cgi?id=187716 Reviewed by Lucas Forschler. Also enabled dumping memgraphs. We'll be pruning these aggressively, as they take significant space. * Scripts/run-leaks: (main): Added an option to store memgraphs. (runLeaks): As there is no way to test whether the new format is supported in advance, we have to try with --list first, and retry if that fails. Also, made leaks operate on a memgraph file if we are saving it anyway. * Scripts/webkitpy/port/leakdetector.py: (LeakDetector._leaks_args): Pass --memgraph-file to run-leaks. (LeakDetector.leaks_file_name): Removed an incorrect comment. (LeakDetector.memgraph_file_name): Added. (LeakDetector.check_for_leaks): Changed how arguments are passed to _leaks_args. It is a bit ugly that leaks path ends up being computed twice, but this is the least ugly approach that I could find. * Scripts/webkitpy/port/leakdetector_unittest.py: Updated for _leaks_args changes. 2018-09-04 Chris Dumez Add process pool configuration flag to turn on automatic process pre-warming https://bugs.webkit.org/show_bug.cgi?id=189263 Reviewed by Antti Koivisto. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm. (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm: Removed. 2018-09-04 Keith Miller Perl doesn't like calling keys on a reference https://bugs.webkit.org/show_bug.cgi?id=189261 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (UpdateResults): 2018-09-04 Jer Noble REGRESSION (r234081): TestWebKitAPI.VideoControlsManager.VideoControlsManagerAudioElementFollowingUserInteraction is a flaky timeout https://bugs.webkit.org/show_bug.cgi?id=187972 Reviewed by Darin Adler. Ensure that listeners are added in time to catch messages broadcast at them. * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm: (TestWebKitAPI::TEST): 2018-09-04 Ross Kirsling Update googletest https://bugs.webkit.org/show_bug.cgi?id=175722 Reviewed by Brent Fulgham. * TestWebKitAPI/config.h: Instead of modifying the gtest source, add the necessary WTF includes here. * TestWebKitAPI/Configurations/Base.xcconfig Remove obsoleted definitions GTEST_HAS_TR1_TUPLE=0 and GTEST_HAS_RTTI=0. 2018-09-03 Pablo Saavedra [WPE] Add more WPE bots to dashboard https://bugs.webkit.org/show_bug.cgi?id=189245 Reviewed by Daniel Bates. There are two missing bots which are not listed in the dashboard for a while: WPE Linux 64-bit Debug (Build) and WPE Linux 64-bit Debug (Tests) * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: (WebKitBuildbot): 2018-09-01 Michael Catanzaro [WPE] 2.21.91 fails to build with ENABLE_MINIBROWSER https://bugs.webkit.org/show_bug.cgi?id=189006 Reviewed by Darin Adler. The MiniBrowser source code is missing from the tarball. Oops! Add it. * wpe/manifest.txt.in: 2018-09-01 Yoshiaki Jitsukawa [WinCairo] Add CryptoDigestOpenSSL https://bugs.webkit.org/show_bug.cgi?id=188978 Reviewed by Darin Adler. Add API tests for the PAL::CryptoDigest class. * TestWebKitAPI/PlatformWin.cmake: Add CryptoDigest.cpp to TestWebCoreLib_Sources. Define -DSTATICALLY_LINKED_WITH_PAL=1 to avoid warnings since without the definition the functions marked with PAL_EXPORT are supposed to be imported from another shared library, but as it is, TestWebCoreLib links PAL statically. * TestWebKitAPI/Tests/WebCore/CryptoDigest.cpp: Added. (TestWebKitAPI::toHex): (TestWebKitAPI::expect): (TestWebKitAPI::expectSHA1): (TestWebKitAPI::expectSHA224): (TestWebKitAPI::expectSHA256): (TestWebKitAPI::expectSHA384): (TestWebKitAPI::expectSHA512): (TestWebKitAPI::TEST): 2018-09-01 Dan Bernstein [Cocoa] Crash using KVO for 'serverTrust' property of WKWebView - "this class is not key value coding-compliant for the key serverTrust" https://bugs.webkit.org/show_bug.cgi?id=189222 Reviewed by Sam Weinig. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewServerTrustKVC.mm: Added. (TEST): 2018-08-31 Aditya Keerthi Unreviewed, add an alternate email for Aditya Keerthi. * Scripts/webkitpy/common/config/contributors.json: 2018-08-31 Wenson Hsieh [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm https://bugs.webkit.org/show_bug.cgi?id=189054 Reviewed by Tim Horton. See WebCore/ChangeLog for more detail. * TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm: (createWebViewWithCustomPasteboardDataEnabled): 2018-08-31 Commit Queue Unreviewed, rolling out r235565. https://bugs.webkit.org/show_bug.cgi?id=189212 Broke the WHLSL build (Requested by litherum on #webkit). Reverted changeset: "[WHLSL] Remove useless code in NameResolver" https://bugs.webkit.org/show_bug.cgi?id=189176 https://trac.webkit.org/changeset/235565 2018-08-31 Myles C. Maxfield [WHLSL] Remove useless code in NameResolver https://bugs.webkit.org/show_bug.cgi?id=189176 Reviewed by Dean Jackson and Thomas Denney. The check will always pass becase the standard library contains at least one function with the correct name. * WebGPUShadingLanguageRI/NameResolver.js: (NameResolver.prototype.visitDotExpression): (NameResolver.prototype._handlePropertyAccess): Deleted. (NameResolver.prototype.visitIndexExpression): Deleted. 2018-08-31 Simon Fraser Make it possible to mark tests as leaks in TestExpectations https://bugs.webkit.org/show_bug.cgi?id=189088 Reviewed by Jon Lee. Have webkitpy parse out "Leak" expectations in TestExpectations, and do the right thing if the test run did not use --world-leaks. Add unit tests for leaks combined with various other result combinations. * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (LayoutTestRunner._update_summary_with_result): (LayoutTestRunner._annotate_results_with_additional_failures): * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser): (TestExpectations): The 'Leak' line was duplicated here, so remove a copy. (TestExpectations.remove_leak_failures): (TestExpectations.matches_an_expected_result): * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: (Base.get_basic_tests): * Scripts/webkitpy/port/test.py: (TestList.add_reftest): (unit_test_list): 2018-08-31 Zalan Bujtas [LFC] Add margin box verification back now that Display::Box has non-computed horizontal margin. https://bugs.webkit.org/show_bug.cgi?id=189193 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-08-31 Antti Koivisto Replace OptionSet |= and -= operators with add() and remove() functions https://bugs.webkit.org/show_bug.cgi?id=189169 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WTF/OptionSet.cpp: (TestWebKitAPI::TEST): 2018-08-31 Daniel Bates lldb-webkit: KeyError thrown for OptionSet with invalid value https://bugs.webkit.org/show_bug.cgi?id=189070 Update comment to explain that we return early and do not compute the set of enumerators in the OptionSet when the underlying value of the set is an invalid value. Additionally, update the change log entry for r235482 to reflect the updated title for the bug and to better describe the change that was made. * lldb/lldb_webkit.py: (WTFOptionSetProvider.update): 2018-08-31 David Kilzer WebKitLauncher: Move WebKitLauncher.entitlements into Configurations directory This makes the Configurations folder in the Xcode project match what's in the Configurations directory on disk. Found by tidy-Xcode-project-file (see Bug 188754). * WebKitLauncher/Configurations/WebKitLauncher.entitlements: Rename from Tools/WebKitLauncher/WebKitLauncher.entitlements. * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: - Update project for file move. 2018-08-31 David Kilzer WebKitLauncher: Fix build failures * WebKitLauncher/Configurations/Base.xcconfig: (ARCHS): Use $(ARCHS_STANDARD_32_64_BIT). (MACOSX_DEPLOYMENT_TARGET): Update from Snow Leopard to Sierra. * WebKitLauncher/WebKitNightlyEnabler.m: (myApplicationWillFinishLaunching): * WebKitLauncher/main.m: (displayErrorAndQuit): (locateSafariBundle): - Use pragma to ignore deprecation warnings. 2018-08-31 David Kilzer MobileMiniBrowser: Move test2s.mp4 into Resources directory This makes the Resources folder in the Xcode project match what's in the Resources directory on disk. Found by tidy-Xcode-project-file (see Bug 188754). * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj: - Update project for file move. * MobileMiniBrowser/MobileMiniBrowserFramework/Resources/test2s.mp4: Rename from Tools/MobileMiniBrowser/MobileMiniBrowserFramework/test2s.mp4. 2018-08-31 Frederic Wang Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement https://bugs.webkit.org/show_bug.cgi?id=182053 Reviewed by Simon Fraser. Add FIXMEs comments to add the new developer flag in the future and disable it for now. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (resetWebPreferencesToConsistentValues): * DumpRenderTree/win/DumpRenderTree.cpp: (enableExperimentalFeatures): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2018-08-30 Thomas Denney [WHLSL] Fix array indexing behavior https://bugs.webkit.org/show_bug.cgi?id=189175 Array, pointer, and array ref types are now parsed and then constructed in reverse so that the declaration order matches the indexing order, as in C/C++. Reviewed by Myles C. Maxfield. * WebGPUShadingLanguageRI/Parse.js: (parseType): * WebGPUShadingLanguageRI/Test.js: 2018-08-30 Wenson Hsieh Followup to [iOS] TestWebKitAPI.PasteImage tests are flaky failures https://bugs.webkit.org/show_bug.cgi?id=185965 Reviewed by Andy Estes. The first attempt to fix these flaky tests on iOS caused timeouts on macOS while waiting for a "loaded" message from the page. To (hopefully) fix this across both platforms, make sure that we first register our script message handlers in the UI process *before* evaluating script that could propagate the script message. * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm: (-[TestWKWebView waitForMessage:afterEvaluatingScript:]): (TEST): 2018-08-30 Thomas Denney [WHLSL] Implement tests to verify array indexing order matches our desires https://bugs.webkit.org/show_bug.cgi?id=189099 Reviewed by Myles C. Maxfield. * WebGPUShadingLanguageRI/Test.js: Add new test for array indexing order and the option to explicitly disable tests (this test is disabled by default). * WebGPUShadingLanguageRI/TypeRef.js: (TypeRef.wrap): Fixes typo. 2018-08-30 Sihui Liu WKNavigation.ProcessCrashDuringCallback is failing on iOS https://bugs.webkit.org/show_bug.cgi?id=189148 Reviewed by Chris Dumez. We should not deference WebView or we may get WKErrorWebViewInvalidated error, because WebView could be destroyed before Web Process termination is noticed. * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: (TEST): 2018-08-30 Zalan Bujtas [LFC][Floating] Formatting context roots avoid floats. https://bugs.webkit.org/show_bug.cgi?id=189150 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-08-30 Wenson Hsieh [iOS] TestWebKitAPI.PasteImage tests are flaky failures https://bugs.webkit.org/show_bug.cgi?id=185965 Reviewed by Andy Estes. These tests pass reliably when run locally, but sometimes fail in automation when checking that the image element with its "src" attribute set to a new blob URL has an empty size. It's possible that this is happening because we're checking the size of the image element prior to image load after setting the blob URL; we can fix this by waiting for the "load" event (which is also done in some of the other tests in this file). * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm: (TEST): 2018-08-30 Michael Catanzaro Unreviewed, rolling out r235114. ostree server deleted our commits? Reverted changeset: "[Flatpak] Update to GNOME master runtime" https://bugs.webkit.org/show_bug.cgi?id=188731 https://trac.webkit.org/changeset/235114 2018-08-29 Myles C. Maxfield [WHLSL] Test row-majorness of matrices https://bugs.webkit.org/show_bug.cgi?id=189101 The matrix multiplication functions are temporarily commented out of the standard library, so I've temporarily copy/pasted them into the test. Matrix multiplication is not commutative, so it requires the right indexing order. Reviewed by Dean Jackson and Thomas Denney. * WebGPUShadingLanguageRI/Intrinsics.js: * WebGPUShadingLanguageRI/StandardLibrary.js: (let.standardLibrary): * WebGPUShadingLanguageRI/Test.js: 2018-08-29 Jer Noble Unreviewed test gardening; NowPlayingTest API tests require High Sierra. * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: 2018-08-29 Youenn Fablet Remove WebRTC legacy API implementation https://bugs.webkit.org/show_bug.cgi?id=189040 Reviewed by Eric Carlson. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebRTCLegacyAPIEnabled): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2018-08-29 Daniel Bates lldb-webkit: KeyError thrown for OptionSet with invalid value https://bugs.webkit.org/show_bug.cgi?id=189070 Reviewed by Simon Fraser. Do not compute what enumerators are in an OptionSet with an invalid value. A local OptionSet variable is only considered valid when execution passes over its assignment/constructor. The LLDB Python API does not provide a way to determine whether a variable has a valid value (SBValue.IsValid() does not seem to check if the actual bit pattern in memory for a variable represents a valid value). So, we use a simple heuristic: when the value of the OptionSet is greater than the value of the bitmask with all enumerators set then we consider the OptionSet to be invalid. When the variable obtains a valid value then LLDB will notify us to update our state. * lldb/lldb_webkit.py: (WTFOptionSetProvider.update): 2018-08-29 Chris Dumez [PSON] We should only process-swap when eTLD+1 changes on navigation https://bugs.webkit.org/show_bug.cgi?id=189090 Reviewed by Geoffrey Garen. Update existing PSON API tests to use different registrable domains instead of different protocols, as we now only process-swap when the eTLD+1 (aka "registrable domain") changes. Add test coverage to make sure that we do not process swap when eTLD+1 does not change. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 2018-08-29 Youenn Fablet Add a runtime flag for WebRTC unified plan https://bugs.webkit.org/show_bug.cgi?id=189068 Reviewed by Eric Carlson. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebRTCUnifiedPlanEnabled): * WebKitTestRunner/InjectedBundle/TestRunner.h: 2018-08-29 Don Olmstead [CMake] Split Tools/CMakeLists.txt into platform files https://bugs.webkit.org/show_bug.cgi?id=189093 Reviewed by Michael Catanzaro. * CMakeLists.txt: * PlatformGTK.cmake: Added. * PlatformMac.cmake: Added. * PlatformWPE.cmake: Added. * PlatformWin.cmake: Added. 2018-08-29 Jer Noble Muted elements do not have their Now Playing status updated when unmuted. https://bugs.webkit.org/show_bug.cgi?id=189069 Reviewed by Eric Carlson. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Added. (userInfoHasNowPlayingApplicationPID): (getNowPlayingClient): (getNowPlayingClientPid): (NowPlayingTest::webView): (NowPlayingTest::configuration): (NowPlayingTest::webViewPid): (NowPlayingTest::loadPage): (NowPlayingTest::runScriptWithUserGesture): (NowPlayingTest::runScriptWithoutUserGesture): (NowPlayingTest::executeAndWaitForPlaying): (NowPlayingTest::executeAndWaitForWebViewToBecomeNowPlaying): (NowPlayingTest::observers): (NowPlayingTest::addObserver): (NowPlayingTest::removeObserver): (NowPlayingTest::notificationCallback): (NowPlayingTest::receivedNotification): (NowPlayingTest::performAfterReceivingNotification): (TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/now-playing.html: Added. 2018-08-29 Thomas Denney [WHLSL] Ensure that isLValue is copied by the rewriter https://bugs.webkit.org/show_bug.cgi?id=189083 The value of isLValue was not propagated when new TernaryExpressions are created in Rewriter. Reviewed by Myles C. Maxfield. * WebGPUShadingLanguageRI/Rewriter.js: (Rewriter.prototype.visitTernaryExpression): * WebGPUShadingLanguageRI/Test.js: Add new test to verify the value is propagated. 2018-08-29 Myles C. Maxfield [WHLSL] Add more functions to the standard library https://bugs.webkit.org/show_bug.cgi?id=188873 Reviewed by Filip Pizlo. This patch adds the rest of the standard library to StandardLibrary.js, and updates the compiler to be able to compile it. There are a few major pieces: 1. Swizzle operators are now implemented in the language, instead of as native functions 2. Vector constructors are now implemented in the language, instead of as native functions 3. The matrix type is implemented 4. Vector operator&[] is illegal, and is removed from the compiler 5. Vector index setters & index getters are now implemented in the language, instead of as native functions 6. Vector and matrix equality operators are implemented in the language, instead of as native functions 7. Casting a scalar to a boolean is implemented in the language, instead of as native functions 8. Casting a vector to a boolean is not part of the language, and is removed from the compiler 9. Half-precision floating point types are implemented * WebGPUShadingLanguageRI/All.js: * WebGPUShadingLanguageRI/BuiltinMatrixGetter.js: Copied from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js. (BuiltinMatrixGetter): (BuiltinMatrixGetter.prototype.get height): (BuiltinMatrixGetter.prototype.get width): (BuiltinMatrixGetter.prototype.toString): (BuiltinMatrixGetter.functions): (BuiltinMatrixGetter.prototype.instantiateImplementation): * WebGPUShadingLanguageRI/BuiltinMatrixSetter.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js. (BuiltinMatrixSetter): (BuiltinMatrixSetter.prototype.get height): (BuiltinMatrixSetter.prototype.get width): (BuiltinMatrixSetter.prototype.toString): (BuiltinMatrixSetter.functions): (BuiltinMatrixSetter.prototype.instantiateImplementation): * WebGPUShadingLanguageRI/BuiltinVectorConstructors.js: Removed. * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Removed. * WebGPUShadingLanguageRI/BuiltinVectorGetter.js: (BuiltinVectorGetter.prototype.instantiateImplementation): (BuiltinVectorGetter): * WebGPUShadingLanguageRI/BuiltinVectorSetter.js: (BuiltinVectorSetter.functions): (BuiltinVectorSetter.prototype.instantiateImplementation): (BuiltinVectorSetter): * WebGPUShadingLanguageRI/CallExpression.js: (CallExpression.prototype.resolve): * WebGPUShadingLanguageRI/CheckTypesWithArguments.js: (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef): (checkTypesWithArguments.TypeWithArgumentsChecker): (checkTypesWithArguments): * WebGPUShadingLanguageRI/Checker.js: (Checker.prototype.visitVectorType): (Checker.prototype.visitMatrixType): * WebGPUShadingLanguageRI/ConstexprFolder.js: (ConstexprFolder.prototype.visitCallExpression): (ConstexprFolder): * WebGPUShadingLanguageRI/Evaluator.js: (Evaluator.prototype.visitTernaryExpression): * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js: (FlattenedStructOffsetGatherer.prototype.visitMatrixType): (FlattenedStructOffsetGatherer): * WebGPUShadingLanguageRI/Intrinsics.js: (Intrinsics.): (Intrinsics): * WebGPUShadingLanguageRI/MatrixType.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js. (MatrixType): (MatrixType.prototype.get elementType): (MatrixType.prototype.get numRows): (MatrixType.prototype.get numColumns): (MatrixType.prototype.get numRowsValue): (MatrixType.prototype.get numColumnsValue): (MatrixType.prototype.get size): (MatrixType.prototype.unifyImpl): (MatrixType.prototype.populateDefaultValue): (MatrixType.prototype.toString): * WebGPUShadingLanguageRI/NameContext.js: (NameContext.prototype.add): * WebGPUShadingLanguageRI/NativeType.js: (NativeType.create): (NativeType): * WebGPUShadingLanguageRI/OperatorAnderIndexer.js: Renamed from Tools/WebGPUShadingLanguageRI/OperatorAnderIndex.js. (OperatorAnderIndexer): * WebGPUShadingLanguageRI/OperatorBool.js: Removed. * WebGPUShadingLanguageRI/Prepare.js: (let.prepare): * WebGPUShadingLanguageRI/Program.js: (Program.prototype.add): * WebGPUShadingLanguageRI/Rewriter.js: (Rewriter.prototype.visitMatrixType): (Rewriter): * WebGPUShadingLanguageRI/SPIRV.html: * WebGPUShadingLanguageRI/StandardLibrary.js: (operator.bool): (bool.operator): (uchar.operator): (ushort.operator): (char.operator): (short.operator): (uint.operator): (int.operator): (half.operator): (float.operator): (uchar2.operator): (uchar3.operator): (uchar4.operator): (ushort2.operator): (ushort3.operator): (ushort4.operator): (uint2.operator): (uint3.operator): (uint4.operator): (char2.operator): (char3.operator): (char4.operator): (short2.operator): (short3.operator): (short4.operator): (int2.operator): (int3.operator): (int4.operator): (half2.operator): (half3.operator): (half4.operator): (float2.operator): (float3.operator): (float4.operator): (half2x2.operator): (half2x3.operator): (half2x4.operator): (half3x2.operator): (half3x3.operator): (half3x4.operator): (half4x2.operator): (half4x3.operator): (half4x4.operator): (float2x2.operator): (float2x3.operator): (float2x4.operator): (float3x2.operator): (float3x3.operator): (float3x4.operator): (float4x2.operator): (float4x3.operator): (float4x4.operator): (operator.bool2): (operator.bool3): (operator.bool4): (uint.operator.length): (operator.uchar2): (operator.uchar3): (operator.uchar4): (operator.ushort2): (operator.ushort3): (operator.ushort4): (operator.uint2): (operator.uint3): (operator.uint4): (operator.char2): (operator.char3): (operator.char4): (operator.short2): (operator.short3): (operator.short4): (operator.int2): (operator.int3): (operator.int4): (operator.half2): (operator.half3): (operator.half4): (operator.float2): (operator.float3): (operator.float4): (bool2.operator): (bool3.operator): (bool4.operator): (allVectorTypeNames): * WebGPUShadingLanguageRI/SwizzleOp.js: Removed. * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitMatrixType): (synthesizeDefaultConstructorOperator.FindAllTypes): (synthesizeDefaultConstructorOperator): * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Removed. * WebGPUShadingLanguageRI/Test.html: * WebGPUShadingLanguageRI/Test.js: (makeHalf): (checkHalf): * WebGPUShadingLanguageRI/Visitor.js: (Visitor.prototype.visitMatrixType): (Visitor): * WebGPUShadingLanguageRI/index.html: 2018-08-29 Simon Fraser Teach webkitpy how to check leaks and treat leaks as test failures https://bugs.webkit.org/show_bug.cgi?id=189067 Reviewed by Darin Adler. Add a new "--world-leaks" argument to run-webkit-tests. When enabled, DRT/WTR are launched with a --world-leaks argument (which is renamed in this patch for consistency). This enables the behavior added in r235408, namely that they check for leaked documents after each test, and at the end of one (if --run-singly) or a set of tests run in a single DRT/WTR instance handle the "#CHECK FOR WORLD LEAKS" command to get still-live documents. LayoutTestRunner in webkitpy now has the notion of doing "post-tests work", called via _finished_test_group(), and here it sends the "#CHECK FOR WORLD LEAKS" command to the runner and parses the resulting output block. If this results block includes leaks, we convert an existing TestResult into a LEAK failure in TestRunResults.change_result_to_failure(). Leaks are then added to the ouput JSON for display in results.html Unit tests are updated with some leak examples. * DumpRenderTree/mac/DumpRenderTree.mm: (initializeGlobalsFromCommandLineOptions): * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py: (ParsedJSONResultsTest): * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: (LayoutTestRunner._annotate_results_with_additional_failures): (LayoutTestRunner._handle_finished_test_group): (Worker.handle): (Worker._run_test): (Worker._do_post_tests_work): (Worker._finished_test_group): (Worker._run_test_in_another_thread): * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py: (JSONLayoutResultsGenerator): * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser): (TestExpectations): * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: (Base.get_basic_tests): * Scripts/webkitpy/layout_tests/models/test_failures.py: (determine_result_type): (FailureLeak): (FailureLeak.__init__): (FailureLeak.message): (FailureDocumentLeak): (FailureDocumentLeak.__init__): (FailureDocumentLeak.message): * Scripts/webkitpy/layout_tests/models/test_results.py: (TestResult.convert_to_failure): * Scripts/webkitpy/layout_tests/models/test_run_results.py: (TestRunResults.change_result_to_failure): (_interpret_test_failures): (summarize_results): * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py: (get_result): (run_results): (summarized_results): * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: (parse_args): (RunTest.test_check_for_world_leaks): * Scripts/webkitpy/port/driver.py: (DriverPostTestOutput): (DriverPostTestOutput.__init__): (Driver.do_post_tests_work): (Driver._parse_world_leaks_output): (Driver.cmd_line): (DriverProxy.do_post_tests_work): * Scripts/webkitpy/port/test.py: (unit_test_list): * WebKitTestRunner/Options.cpp: (WTR::OptionsHandler::OptionsHandler): * WebKitTestRunner/TestController.cpp: (WTR::TestController::checkForWorldLeaks): 2018-08-29 David Kilzer Remove empty directories from from svn.webkit.org repository * DumpRenderTree/TestNetscapePlugIn/unix: Removed. * WebKitTestRunner/UIScriptContext: Removed. 2018-08-29 Pablo Saavedra [GTK][WPE] Add JSCOnly Release bot for Linux ARMv7 Thumb2 SoftFP https://bugs.webkit.org/show_bug.cgi?id=189077 Reviewed by Michael Catanzaro. Deployed new bot for WPE Release in Linux ARMv7 Thumb2 SoftFP This bot (jsconly-linux-igalia-bot-5) will run the 'JSCOnly Linux ARMv7 Thumb2 SoftFP Release' buildjob. * BuildSlaveSupport/build.webkit.org-config/config.json: * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: 2018-08-28 Daniel Bates lldb-webkit: KeyError thrown for OptionSet https://bugs.webkit.org/show_bug.cgi?id=189062 Reviewed by Simon Fraser. For some reason lldb(1) may not retrieve the enumerator names for an enum value when it calls update() on the synthetic children provider. If this occurs then bail out as we cannot compute what enumerators are in the set. * lldb/lldb_webkit.py: (WTFOptionSetProvider.update): 2018-08-28 Sihui Liu Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback https://bugs.webkit.org/show_bug.cgi?id=189037 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: (TEST): 2018-08-28 David Kilzer Fix incorrect use of `sourceTree = "";` for built products and frameworks in Xcode projects Found by tidy-Xcode-project-file script (see Bug 188754). * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: (IOKit.framework): Use `sourceTree = "";` to match other frameworks in the project. * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj: (WebKit.framework): Use `sourceTree = BUILT_PRODUCTS_DIR;` for built product instead of relative build directory path. * jsc-cli/jsc-cli.xcodeproj/project.pbxproj: (JavaScriptCore.framework): Ditto. * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: (libWTF.a): Use `sourceTree = BUILT_PRODUCTS_DIR;` for built product. 2018-08-28 Alex Christensen Fix 32-bit Mac build. * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: 2018-08-28 Alex Christensen REGRESSION (r235391): [iOS] TestWebKitAPI.WebKit.RestoreSessionStateWithoutNavigation is timing out https://bugs.webkit.org/show_bug.cgi?id=189050 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: This test wasn't run on iOS before. Let's re-introduce the WK_HAVE_C_SPI guard. 2018-08-28 Wenson Hsieh [iOS] WKAttachmentTests.DropFolderAsAttachmentAndMoveByDragging encounters an exception on iOS simulator https://bugs.webkit.org/show_bug.cgi?id=189049 Reviewed by Tim Horton. Wrap an NSURL in a RetainPtr to prevent it from being freed prematurely. It seems this broke when I changed the load handler from an Objective-C block that captured `folderURL` to a C++ lambda that didn't retain `folderURL`. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (simulateFolderDragWithURL): 2018-08-27 Wenson Hsieh [Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends https://bugs.webkit.org/show_bug.cgi?id=189004 Reviewed by Dan Bernstein. Move off of deprecated attachment insertion SPI. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]): (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]): (-[_WKAttachment synchronouslySetDisplayOptions:error:]): Deleted. 2018-08-27 Simon Fraser Teach WebKitTestRunner and DumpRenderTree about detecting world leaks https://bugs.webkit.org/show_bug.cgi?id=188994 Reviewed by Tim Horton. This patch adds the notion of a "control command" in the protocol between webkitpy and WebKitTestRunner/DumpRenderTree. A command is simply an input string starting with a # that is checked for before trying to parse the input as test URL. For now, just one commmand is supported, which is "#CHECK FOR WORLD LEAKS". In response to the command, the tool dumps an output block in the usual pseudo-MIME-style, with a trailing "#EOF". Future patches will add support to webkitpy to parse this output. DumpRenderTree stubs out the command, returning an empty block. WebKitTestRunner responds to the command by dumping the list of live documents, if it was run with the --check-for-world-leaks option. When run with --check-for-world-leaks, WebKitTestRunner gets the list of live documents via WKBundleGetLiveDocumentURLs() after every test (this allows it to detect the first test that leaked a document), and keeps them in a map of document identifier to test and live document URL. Then when it receives the "#CHECK FOR WORLD LEAKS" command, it calls into the bundle to clear the page and memory caches, runs a GC, then posts a task (in the Document::postTaks() sense) after which it requests the list of live documents for a final time, excluding any that are loaded in live Frames (thus omitting the about:blank that will be loaded at this point). Documents in this list are therefore leaked (or abandoned). Future patches will hook up webkitpy reporting for leaked documents. * DumpRenderTree/mac/DumpRenderTree.mm: (initializeGlobalsFromCommandLineOptions): (handleControlCommand): (runTestingServerLoop): * DumpRenderTree/win/DumpRenderTree.cpp: (handleControlCommand): (main): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::postGCTask): (WTR::InjectedBundle::reportLiveDocuments): (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/Options.cpp: (WTR::handleOptionCheckForWorldLeaks): (WTR::OptionsHandler::OptionsHandler): * WebKitTestRunner/Options.h: * WebKitTestRunner/TestController.cpp: (WTR::AsyncTask::run): (WTR::AsyncTask::currentTask): (WTR::TestController::initialize): (WTR::TestController::ensureViewSupportsOptionsForTest): (WTR::TestController::resetStateToConsistentValues): (WTR::TestController::updateLiveDocumentsAfterTest): (WTR::TestController::checkForWorldLeaks): (WTR::TestController::findAndDumpWorldLeaks): (WTR::TestController::willDestroyWebView): (WTR::parseInputLine): (WTR::TestController::waitForCompletion): (WTR::TestController::handleControlCommand): (WTR::TestController::runTestingServerLoop): (WTR::TestController::run): (WTR::TestController::didReceiveLiveDocumentsList): (WTR::TestController::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/TestController.h: (WTR::AsyncTask::AsyncTask): (WTR::AsyncTask::taskComplete): (WTR::TestController::AbandonedDocumentInfo::AbandonedDocumentInfo): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::invoke): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): 2018-08-27 Alex Christensen Fix API test after r235398 https://bugs.webkit.org/show_bug.cgi?id=188997 * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::willGoToBackForwardListItem): Deleted. willGoToBackForwardListItem is unused and unsupported. Removing its check. 2018-08-27 Daniel Bates Partial revert of r235376 https://bugs.webkit.org/show_bug.cgi?id=189011 For now revert the unit tests added in r235376 as the following tests are failing on Apple Sierra Debug and Apple High Sierra Debug bots: lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_simple lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple Will investigate offline. * lldb/lldbWebKitTester/main.cpp: (testSummaryProviders): * lldb/lldb_webkit_unittest.py: (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size): (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty): Deleted. (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple): Deleted. (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Deleted. (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple): Deleted. 2018-08-27 Aditya Keerthi Consolidate ENABLE_INPUT_TYPE_COLOR and ENABLE_INPUT_TYPE_COLOR_POPOVER https://bugs.webkit.org/show_bug.cgi?id=188931 Reviewed by Wenson Hsieh. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed ENABLE_INPUT_TYPE_COLOR_POPOVER. 2018-08-27 Justin Fan Add Justin Fan to list of WebKit contributors https://bugs.webkit.org/show_bug.cgi?id=184431 * Scripts/webkitpy/common/config/contributors.json: 2018-08-27 Simon Fraser Convert timeout values in WebKitTestRunner to WTF::Seconds https://bugs.webkit.org/show_bug.cgi?id=188987 Reviewed by Ryosuke Niwa. Replace various 'int' timeout values with WTF::Seconds. The timeout argument comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle using integers, convert to and from milliseconds. Also do some #pragma once, and initializer cleanup. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::InjectedBundle): Deleted. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::timeout): (WTR::TestRunner::setCustomTimeout): * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp: (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded): * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer): (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded): * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp: (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded): * WebKitTestRunner/TestController.cpp: (WTR::TestController::TestController): (WTR::parseInputLine): (WTR::TestController::runTest): (WTR::TestController::runUntil): (WTR::TestController::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::shortTimeout const): (WTR::TestInvocation::createTestSettingsDictionary): * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/TestOptions.h: * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformRunUntil): * WebKitTestRunner/gtk/TestControllerGtk.cpp: (WTR::TestController::platformRunUntil): * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformRunUntil): 2018-08-27 Simon Fraser Convert timeout values in WebKitTestRunner to WTF::Seconds https://bugs.webkit.org/show_bug.cgi?id=188987 Reviewed by Ryosuke Niwa. Replace various 'int' timeout values with WTF::Seconds. The timeout argument comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle using integers, convert to and from milliseconds. Also do some #pragma once, and initializer cleanup. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::InjectedBundle): Deleted. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::timeout): (WTR::TestRunner::setCustomTimeout): * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp: (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded): * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer): (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded): * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp: (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded): * WebKitTestRunner/TestController.cpp: (WTR::TestController::TestController): (WTR::parseInputLine): (WTR::TestController::runTest): (WTR::TestController::runUntil): (WTR::TestController::didReceiveMessageFromInjectedBundle): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::shortTimeout const): (WTR::TestInvocation::createTestSettingsDictionary): * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/TestOptions.h: * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformRunUntil): * WebKitTestRunner/gtk/TestControllerGtk.cpp: (WTR::TestController::platformRunUntil): * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformRunUntil): 2018-08-27 Alex Christensen REGRESSION(r234985/r234989) WKPageLoadHTMLString with a 16-bit String has the wrong encoding https://bugs.webkit.org/show_bug.cgi?id=189002 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKit/WillLoad.cpp: (TestWebKitAPI::TEST_F): 2018-08-27 Wenson Hsieh [Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory https://bugs.webkit.org/show_bug.cgi?id=188903 Reviewed by Tim Horton. Add two API tests and adjust existing WKAttachment API tests. The new tests exercise the following scenarios, in both iOS and macOS: • Dropping a folder as an attachment element, and then moving that attachment element in the document by dragging and dropping. • Using WKWebView SPI to insert a folder and a file with an unknown extension, and then using more _WKAttachment SPI to swap the attachments' backing file wrappers. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (runTestWithTemporaryFolder): Add a helper function to run a test with a new folder path, created in the temporary directory and populated with some sample content. This folder is deleted after running the test. (simulateFolderDragWithURL): Add a helper function to prepare a given DragAndDropSimulator for simulating a dragged folder from a source external to the web view. (platformCopyRichTextWithMultipleAttachments): (platformCopyRichTextWithImage): (platformCopyPNG): (TestWebKitAPI::TEST): Add new API tests, and adjust existing tests to reflect new -setFileWrapper:…: behavior. Specifically, ChangeAttachmentDataAndFileInformation previously required that changing a _WKAttachment's NSFileWrapper would preserve the previous NSFileWrapper's preferred name if the new file wrapper does not have a preferred name, but this quirk is no longer supported. Also add a few bridging casts for the eventual transition of TestWebKitAPI to ARC. * TestWebKitAPI/cocoa/DragAndDropSimulator.h: Add a new hook to clear any external drag information on an existing DragAndDropSimulator. This is convenient when using the same DragAndDropSimulator to perform multiple drags in a single test. * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: (-[DragAndDropSimulator clearExternalDragInformation]): * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: (-[DragAndDropSimulator clearExternalDragInformation]): 2018-08-27 Alex Christensen Translate 4 tests using WKPageLoaderClient to ObjC https://bugs.webkit.org/show_bug.cgi?id=188827 Reviewed by Tim Horton. They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem. Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks. willGoToBackForwardListItem had userData from the InjectedBundle, but nobody was using it so I did not add that to the ObjC SPI, so I don't test that unused bundle functionality any more. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed. * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed. * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed. * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed. * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed. * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp. (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]): (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]): (TestWebKitAPI::TEST): (): Deleted. (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::processDidBecomeUnresponsive): Deleted. (TestWebKitAPI::setPageLoaderClient): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp. (-[ResponsivenessDelegate webView:didFinishNavigation:]): (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]): (TestWebKitAPI::TEST): (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted. (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::processDidBecomeUnresponsive): Deleted. (TestWebKitAPI::setInjectedBundleClient): Deleted. (TestWebKitAPI::setPageLoaderClient): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp. (-[SessionStateDelegate webView:didFinishNavigation:]): (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]): (TestWebKitAPI::createSessionStateData): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::didChangeBackForwardListForPage): Deleted. (TestWebKitAPI::setPageLoaderClient): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp. (-[BackForwardClient webView:didFinishNavigation:]): (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::willGoToBackForwardListItem): Deleted. (TestWebKitAPI::setPageLoaderClient): Deleted. 2018-08-27 Wenson Hsieh [Cocoa] "video.html" appears at the top level of the TestWebKitAPI Xcode project https://bugs.webkit.org/show_bug.cgi?id=188989 Reviewed by Andy Estes. Move this into the Tests/WebKit/Resources group in the project. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 2018-08-27 Thomas Denney Avoid an exception in the interactive interpreter https://bugs.webkit.org/show_bug.cgi?id=188991 Reviewed by Myles C. Maxfield. * WebGPUShadingLanguageRI/index.html: Corrects a typo in the name of a local variable 2018-08-27 Thomas Denney Allow new vector types to work with the interactive interpreter https://bugs.webkit.org/show_bug.cgi?id=188988 Reviewed by Myles C. Maxfield. * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js: (FlattenedStructOffsetGatherer.prototype.visitTypeRef): Do not unncessarily visit the type arguments of a TypeRef, as by this point there are none that are relevant. * WebGPUShadingLanguageRI/Intrinsics.js: (Intrinsics): Treat VectorType as a primitive type. 2018-08-27 Keith Rollin Build system support for LTO https://bugs.webkit.org/show_bug.cgi?id=187785 Reviewed by Dan Bernstein. Add tools/scripts support for controlling LTO builds. * Scripts/build-webkit: Add --lto-mode={none,thin,full}. * Scripts/set-webkit-configuration: Add support for saving LTO configuration to WebKitBuild/LTO. * Scripts/webkitdirs.pm: Add support for reading configuration from WebKitBuild/LTO and providing it to xcodebuild. (determineLTOMode): (ltoMode): (XcodeOptions): 2018-08-27 Daniel Bates lldb-webkit: Pretty-print OptionSet https://bugs.webkit.org/show_bug.cgi?id=188936 Reviewed by Simon Fraser. Add LLDB formatters to pretty-print an OptionSet. * lldb/lldbWebKitTester/main.cpp: (testSummaryProviders): * lldb/lldb_webkit.py: (__lldb_init_module): (__lldb_init_module.lldb_webkit): (WTFOptionSet_SummaryProvider): (WTFOptionSetProvider): (WTFOptionSetProvider.__init__): (WTFOptionSetProvider.has_children): (WTFOptionSetProvider.num_children): (WTFOptionSetProvider.get_child_index): (WTFOptionSetProvider.get_child_at_index): (WTFOptionSetProvider.update): * lldb/lldb_webkit_unittest.py: (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size): (TestSummaryProviders): (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty): (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple): (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple): 2018-08-27 Wenson Hsieh [Attachment Support] [WK2] Images copied from Mail message view paste with the wrong file name in compose https://bugs.webkit.org/show_bug.cgi?id=188957 Reviewed by Darin Adler. Add a new API test to verify that pasting a web archive containing several image elements with alt attributes generates _WKAttachments whose names reflect those alt attributes. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (testGIFFileURL): (testGIFData): (TestWebKitAPI::TEST): 2018-08-27 Alex Christensen Unreviewed, rolling out r235367. Broke iOS build. Reverted changeset: "Translate 4 tests using WKPageLoaderClient to ObjC" https://bugs.webkit.org/show_bug.cgi?id=188827 https://trac.webkit.org/changeset/235367 2018-08-27 Alex Christensen Fix GTK build. * TestWebKitAPI/CMakeLists.txt: 2018-08-27 Alex Christensen Fix iOS build. * TestWebKitAPI/PlatformWebView.h: 2018-08-27 Alex Christensen Translate 4 tests using WKPageLoaderClient to ObjC https://bugs.webkit.org/show_bug.cgi?id=188827 Reviewed by Tim Horton. They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem. Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks. willGoToBackForwardListItem had userData from the InjectedBundle, but nobody was using it so I did not add that to the ObjC SPI, so I don't test that unused bundle functionality any more. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed. * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed. * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed. * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed. * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed. * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp. (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]): (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]): (TestWebKitAPI::TEST): (): Deleted. (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::processDidBecomeUnresponsive): Deleted. (TestWebKitAPI::setPageLoaderClient): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp. (-[ResponsivenessDelegate webView:didFinishNavigation:]): (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]): (TestWebKitAPI::TEST): (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted. (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::processDidBecomeUnresponsive): Deleted. (TestWebKitAPI::setInjectedBundleClient): Deleted. (TestWebKitAPI::setPageLoaderClient): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp. (-[SessionStateDelegate webView:didFinishNavigation:]): (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]): (TestWebKitAPI::createSessionStateData): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::didChangeBackForwardListForPage): Deleted. (TestWebKitAPI::setPageLoaderClient): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp. (-[BackForwardClient webView:didFinishNavigation:]): (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::willGoToBackForwardListItem): Deleted. (TestWebKitAPI::setPageLoaderClient): Deleted. 2018-08-27 Keith Miller test262-runner -s --test-only should replace test results https://bugs.webkit.org/show_bug.cgi?id=188450 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (main): (SetFailureForTest): (UpdateResults): 2018-08-26 Sam Weinig Using _WKRemoteObjectInterface with a protocol that inherits from a non-NSObject protocol crashes https://bugs.webkit.org/show_bug.cgi?id=188958 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h: Update test protocol to have inheritance. 2018-08-26 Wenson Hsieh [Attachment Support] Dropping and pasting images should insert inline image elements with _WKAttachments https://bugs.webkit.org/show_bug.cgi?id=188933 Reviewed by Darin Adler. Rebaseline existing API tests that involve dropping or pasting image files, and additionally write some new tests. These new tests exercise the following cases: • Inserting and removing newlines before an inline image with an attachment element does not cause new _WKAttachments to be created and destroyed. • Pasting an image, cutting it, and then pasting it again propagates an attachment update to the UI process with the original _WKAttachment. • A pasted attachment in the document can be moved around by dragging, and doing so does not cause us to lose a _WKAttachment. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (-[TestWKWebView expectElementCount:tagName:]): (TestWebKitAPI::TEST): Add the new tests described above, and also adjust existing tests to check that images are dropped or pasted as image elements, but still have associated attachment elements whose attachment identifiers (observed via script) match that of the corresponding _WKAttachment's uniqueIdentifier in the UI process. * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: (-[DragAndDropSimulator runFrom:to:]): (-[DragAndDropSimulator continueDragSession]): (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]): Teach DragAndDropSimulator on macOS to wait until the drop has been handled by the web process before returning execution to the caller. This ensures that tests which involve dropping promised files as attachments aren't flaky, due to how the promised data is retrieved asynchronously when performing the drop. (-[DragAndDropSimulator _webView:didPerformDragOperation:]): 2018-08-26 Lucas Forschler Open svn.webkit.org for commits. 2018-08-24 Myles C. Maxfield Unreviewed test fix after r235249 https://bugs.webkit.org/show_bug.cgi?id=178981 * WebGPUShadingLanguageRI/Test.js: 2018-08-24 Alex Christensen Introduce _WKInspector https://bugs.webkit.org/show_bug.cgi?id=188923 Reviewed by Brian Burg. * MiniBrowser/mac/WK2BrowserWindowController.m: (-[WK2BrowserWindowController validateMenuItem:]): (-[WK2BrowserWindowController showHideWebInspector:]): 2018-08-24 Jonathan Bedard Fix handling of iOS minor versions in default_baseline_search_path https://bugs.webkit.org/show_bug.cgi?id=188902 Reviewed by Aakash Jain. * Scripts/webkitpy/port/ios.py: (IOSPort.default_baseline_search_path): When the major version matches the major version of the CURRENT_VERSION, treat it as a the CURRENT_VERSION. 2018-08-24 Antti Koivisto Allow creating WeakPtrs to const objects https://bugs.webkit.org/show_bug.cgi?id=188785 Reviewed by Geoff Garen. * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::Base::weakPtrFactory const): (TestWebKitAPI::TEST): (TestWebKitAPI::Base::weakPtrFactory): Deleted. 2018-08-23 Carlos Garcia Campos [GTK][WPE] Add API to inject/register user content in isolated worlds https://bugs.webkit.org/show_bug.cgi?id=188883 Reviewed by Michael Catanzaro. Add test cases for the new API. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp: (isStyleSheetInjectedForURLAtPath): (isScriptInjectedForURLAtPath): (testUserContentManagerInjectedStyleSheet): (testUserContentManagerInjectedScript): (UserScriptMessageTest::registerHandler): (UserScriptMessageTest::unregisterHandler): (UserScriptMessageTest::postMessageAndWaitUntilReceived): (testUserContentManagerScriptMessageInWorldReceived): (beforeAll): 2018-08-23 Simon Fraser Add support for dumping GC heap snapshots, and a viewer https://bugs.webkit.org/show_bug.cgi?id=186416 Reviewed by Joseph Pecoraro. Add a viewer for GC heap snapshots. A snapshot JSON file can be dragged into this page for inspection (or set via the 'filename' URL parameter). For now, this page shows all objects, all roots, and the shortest path from a root to all HTMLDocuments and Windows. * GCHeapInspector/gc-heap-inspector.html: Added. * GCHeapInspector/heap-analysis/HeapSnapshot.js: Copied from Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js. * GCHeapInspector/script/interface.js: Added. 2018-08-23 Alex Christensen Add new _webViewRequestPointerLock SPI with a completionHandler https://bugs.webkit.org/show_bug.cgi?id=188907 Reviewed by Andy Estes. * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[PointerLockDelegate _webViewRequestPointerLock:completionHandler:]): (-[PointerLockDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TEST): 2018-08-23 David Fenton Unreviewed, rolling out r235129. broke internal builds Reverted changeset: "Allow creating WeakPtrs to const objects" https://bugs.webkit.org/show_bug.cgi?id=188785 https://trac.webkit.org/changeset/235129 2018-08-23 Jonathan Bedard API tests should output json results https://bugs.webkit.org/show_bug.cgi?id=188869 Reviewed by Aakash Jain. JSON output for API tests is of the form: { "Failed": [{"name": , "output": }], "Timedout": [...], "Skipped": [...], "Crashed": [...] } Tests which are successful are not displayed in the json output. * Scripts/webkitpy/api_tests/manager.py: (Manager.run): Print test results to provided file as a json dictionary. * Scripts/webkitpy/api_tests/run_api_tests.py: (run): Pass json option. (parse_args): Add --json-output flag. 2018-08-23 Andy Estes [Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave https://bugs.webkit.org/show_bug.cgi?id=188829 Reviewed by Tim Horton. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-08-23 Myles C. Maxfield [WSL] Ternary expressions appear to be unimplemented https://bugs.webkit.org/show_bug.cgi?id=178981 Reviewed by Saam Barati. Implement ternary statements. These can be both lvalues and rvalues. (a ? b : c ? d : e) is parsed as (a ? b : (c ? d : e)). * WebGPUShadingLanguageRI/All.js: * WebGPUShadingLanguageRI/Checker.js: (Checker.prototype.visitTernaryExpression): * WebGPUShadingLanguageRI/Evaluator.js: (Evaluator.prototype.visitTernaryExpression): * WebGPUShadingLanguageRI/NormalUsePropertyResolver.js: (NormalUsePropertyResolver.prototype.visitTernaryExpression): (NormalUsePropertyResolver): * WebGPUShadingLanguageRI/Parse.js: (parsePossibleTernaryConditional): * WebGPUShadingLanguageRI/PropertyResolver.js: (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder.prototype.visitTernaryExpression): (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder): (PropertyResolver.prototype._visitRValuesWithinLValue): * WebGPUShadingLanguageRI/Rewriter.js: (Rewriter.prototype.visitTernaryExpression): * WebGPUShadingLanguageRI/SPIRV.html: * WebGPUShadingLanguageRI/Test.html: * WebGPUShadingLanguageRI/Test.js: * WebGPUShadingLanguageRI/Visitor.js: (Visitor.prototype.visitProtocolDecl): * WebGPUShadingLanguageRI/index.html: 2018-08-22 Ryosuke Niwa Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated https://bugs.webkit.org/show_bug.cgi?id=188880 Reviewed by Saam Barati. Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess were asynchronously terminating respective processes. Do so synchronously so that we can deterministically test WebKit's behavior in layout tests. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::terminateNetworkProcess): (WTR::TestRunner::terminateServiceWorkerProcess): (WTR::TestRunner::terminateStorageProcess): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): 2018-08-23 Myles C. Maxfield [WHLSL] Allow native types to have type arguments (like "vector") https://bugs.webkit.org/show_bug.cgi?id=188773 Reviewed by Filip Pizlo. Before this patch, it was impossible to represent "native typedef vector" because NativeTypes couldn't have typeArguments. Previously, the way to identify a type was strictly by name, which was represented by a string. Therefore, when something like "vector" was parsed, it would produce a TypeRef with the name "vector" and typeArguments [TypeRef, IntLiteral]. Then, there was a pass to convert the TypeRef to have the name "int3" and no typeArguments. After this transformation, each type could be uniquely identified by name. That name was then matched to the string-only NativeType name. This is okay for vectors and matrices, but it is unfortunate for textures (e.g. Texture2D) because they don't have any natural string-only name. In addition, the canonicalization would have to be made aware of the fact that Texture2D is the same as Texture2D>. Similarly, an author may wish to typedef float4 to a different name. It would be possible to mangle the names of the texture types to something unique, but then we lose information about the inner type. For example, if we did this, Visitor wouldn't recurse into the float4 when encountering Texture2D because that information would be lost. This could potentially make operations like programWithUnnecessaryThingsRemoved() more difficult to implement in the future. So, it would be better to have each type uniquely identified by (name, typeArguments). TypeRef will therefore also have typeArguments which are used to determine which type it is referencing. After this analysis is done to determine what each TypeRef is referencing, subsequent passes shouldn't care about the typeArguments and should only care about the .type field which had been set - this was true even before this patch. This means that NameContext has to aggregate types that accept typeArguments into arrays, where each array holds all the Types that have the same name but different typeArguments. Then, when we need to match a TypeRef with a Type, we can ask the NameContext for the appropriate array. This is the same way that function resolution works. We can use Node.unify() to determine whether a TypeRef matches a NativeType. Eventually, this will go away, but for now, this is an okay start. This works just about the same way that function overload resolution works. * WebGPUShadingLanguageRI/All.js: * WebGPUShadingLanguageRI/CallExpression.js: (CallExpression.prototype.resolve): * WebGPUShadingLanguageRI/CheckTypesWithArguments.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js. After types have been resolved, there should be no TypeRefs with name "vector" that don't have type arguments. This is just a sanity check. (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef): (checkTypesWithArguments.TypeWithArgumentsChecker): (checkTypesWithArguments): * WebGPUShadingLanguageRI/Checker.js: (Checker.prototype.visitProgram): Program.types mirrors NameContext: it's a Map that maps strings to types. Because types with typeArguments share names, this has to be updated to map strings to arrays for these types. (Checker.prototype.visitTypeRef): * WebGPUShadingLanguageRI/InferTypesForCall.js: (inferTypesForCall): Don't know why this was here. (inferTypesForTypeArguments): Same as inferTypesForCall, but this one is for matching type arguments. * WebGPUShadingLanguageRI/Intrinsics.js: Adding the types. This patch also adds some scalar types like half, char, etc, but they don't have any functions which accept them. Those will be tested in my next patch which adds math functions for these types. This moves in the direction of matching the standard library in the spec. (Intrinsics.cast): (Intrinsics.bitwiseCast): (Intrinsics.castToHalf): (Intrinsics.): (Intrinsics): * WebGPUShadingLanguageRI/NameContext.js: Aggregate types with typeArguments into arrays. (NameContext.prototype.add): (NameContext.prototype.get let): (NameContext.underlyingThings.prototype.else): (NameContext.prototype.Symbol.iterator): (NameContext): * WebGPUShadingLanguageRI/NameResolver.js: (NameResolver.prototype.visitTypeRef): Call TypeRef.resolve(). (NameResolver.prototype.visitCallExpression): (NameResolver): (NameResolver.prototype.visitVectorType): Deleted. * WebGPUShadingLanguageRI/NativeType.js: NativeTypes can have type arguments now. (NativeType): (NativeType.prototype.get typeArguments): (NativeType.prototype.toString): (NativeType.create): * WebGPUShadingLanguageRI/Prepare.js: (let.prepare): * WebGPUShadingLanguageRI/Program.js: Update to work with types aggregated into arrays. (Program.prototype.add): (Program.prototype.toString): (Program): * WebGPUShadingLanguageRI/RemoveTypeArguments.js: Removed. * WebGPUShadingLanguageRI/ResolveNames.js: Update to work with types aggregated into arrays. (resolveNamesInTypes): * WebGPUShadingLanguageRI/ResolveOverloadImpl.js: Resolve the type overload for types with typeArguments. * WebGPUShadingLanguageRI/ResolveTypeDefs.js: Update to work with types aggregated into arrays. (resolveTypeDefsInTypes): * WebGPUShadingLanguageRI/Rewriter.js: TypeRefs and Native/Vector types can have typeArguments. (Rewriter.prototype.visitTypeRef): (Rewriter.prototype.visitVectorType): (Rewriter): * WebGPUShadingLanguageRI/SPIRV.html: * WebGPUShadingLanguageRI/StandardLibrary.js: Matches Intrinsics. (bool.operator): * WebGPUShadingLanguageRI/StatementCloner.js: Native types can have typeArguments. (StatementCloner.prototype.visitNativeType): * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Vector types need constructors too. (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitVectorType): (synthesizeDefaultConstructorOperator.FindAllTypes): (synthesizeDefaultConstructorOperator): * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: No reason to distinguish between wrapping and instantiating a TypeRef. (synthesizeStructAccessors.createTypeRef): * WebGPUShadingLanguageRI/Test.html: * WebGPUShadingLanguageRI/Test.js: * WebGPUShadingLanguageRI/TypeOverloadResolutionFailure.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js. (TypeOverloadResolutionFailure): (TypeOverloadResolutionFailure.prototype.get type): (TypeOverloadResolutionFailure.prototype.get reason): (TypeOverloadResolutionFailure.prototype.toString): * WebGPUShadingLanguageRI/TypeRef.js: (TypeRef.wrap): (TypeRef.prototype.resolve): Figure out which item in the possibleOverloads array matches this. (TypeRef.prototype.toString): (TypeRef): (TypeRef.instantiate): Deleted. * WebGPUShadingLanguageRI/UnificationContext.js: We need to give literals a chance to assume their preferred type. This adds this facility back into the compiler (it was previously deleted). (UnificationContext.prototype.verify): * WebGPUShadingLanguageRI/VectorType.js: Vector types have type arguments. (VectorType): (VectorType.prototype.get elementType): (VectorType.prototype.get numElements): (VectorType.prototype.get numElementsValue): (VectorType.prototype.toString): * WebGPUShadingLanguageRI/Visitor.js: Iterate over the typeArguments. (Visitor.prototype.visitTypeRef): (Visitor.prototype.visitNativeType): (Visitor.prototype.visitVectorType): (Visitor): * WebGPUShadingLanguageRI/index.html: 2018-08-23 Wenson Hsieh [Attachment Support] Attachment elements don't appear in drag images on macOS https://bugs.webkit.org/show_bug.cgi?id=188823 Reviewed by Tim Horton. Adjusts a couple of existing tests to additionally verify that the drag image generated when dragging an attachment element in macOS is not completely transparent. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (isCompletelyTransparent): (TestWebKitAPI::TEST): 2018-08-23 Jonathan Bedard Explain test name matching in run-api-tests help https://bugs.webkit.org/show_bug.cgi?id=188280 Reviewed by Ryosuke Niwa. Improve the run-api-tests help message to explain how test name matching works. * Scripts/webkitpy/api_tests/run_api_tests.py: (parse_args): * Scripts/webkitpy/port/base.py: (Port): (Port.path_to_api_test_binaries): Make binary names a globally accessible array. * Scripts/webkitpy/port/win.py: (WinPort): (WinPort.path_to_api_test_binaries): Ditto. 2018-08-23 Youenn Fablet Use "wpt serve" to launch WPT server https://bugs.webkit.org/show_bug.cgi?id=188848 Reviewed by Ryosuke Niwa. Use "wpt serve" provided by WPT instead of using our custom launcher. This simplifies things and will avoid future breakage. Further simplify web_platform_test_server.py by removing no longer needed actions. - Do not copy files but use alias - Do not kill main pid, which leaves subprocesses alive, use interrupt instead. - Stop enumerating subprocess pids. * Scripts/webkitpy/common/system/executive_mock.py: (MockExecutive.interrupt): * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py: Removed. * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py: (WebPlatformTestServer.__init__): (WebPlatformTestServer.ports_to_forward): (WebPlatformTestServer._prepare_config): (WebPlatformTestServer._spawn_process): (WebPlatformTestServer._stop_running_server): 2018-08-23 Jonathan Bedard run-api-tests: Add --webkit-only, --webcore-only and --webkit-legacy-only options to run WebKit, WebCore and WebKitLegacy tests https://bugs.webkit.org/show_bug.cgi?id=188262 Reviewed by Ryosuke Niwa. * Scripts/webkitpy/api_tests/run_api_tests.py: (parse_args): 2018-08-22 Wenson Hsieh [Attachment Support] Support dragging attachment elements out as files on macOS https://bugs.webkit.org/show_bug.cgi?id=181294 Reviewed by Tim Horton. Add DragAndDropSimulator support for intercepting calls to -beginDraggingSessionWithitems:event:source:. This enables us to write API tests for macOS that exercise the attachment SPI in combination with dragging attachment elements. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (-[TestWKWebView attachmentElementMidPoint]): Add a helper method local to this test suite that grabs the midpoint (in client coordinates) or the first attachment element in the document. (TestWebKitAPI::TEST): Add a new API test to verify that dragging an attachment element on macOS produces file providers which may be used to write attachment data to a path on disk. Additionally, refactor an existing API test, MoveAttachmentElementAsIconByDragging, so that it runs on both iOS and macOS, to test the ability to move attachment elements around in a document by using drag and drop. * TestWebKitAPI/cocoa/DragAndDropSimulator.h: * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: (-[DragAndDropTestWKWebView beginDraggingSessionWithItems:event:source:]): (-[DragAndDropSimulator initWithWebViewFrame:configuration:]): (-[DragAndDropSimulator dealloc]): (-[DragAndDropSimulator runFrom:to:]): (-[DragAndDropSimulator beginDraggingSessionInWebView:withItems:source:]): Begin a drag session and kick off the -continueDragSession loop. Unlike -performDragInWebView:…, which spins the main runloop until dragging ends, this version returns execution to the web view and schedules dragging updates asynchronously. This matches AppKit behavior. (-[DragAndDropSimulator continueDragSession]): Increment the dragging progress amount, send a drag update to the web view, and continue scheduling calls to itself until the progress reaches 1. (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]): (-[DragAndDropSimulator initializeDraggingInfo:dragImage:source:]): Pull out common logic for creating a new TestDraggingInfo after starting a drag. (-[DragAndDropSimulator insertedAttachments]): (-[DragAndDropSimulator removedAttachments]): (-[DragAndDropSimulator draggingSession]): (-[DragAndDropSimulator receivePromisedFiles]): Helper method to save promised files written to the pasteboard after a drag to the temporary directory. These files are tracked by DragAndDropSimulator and automatically cleaned up after the test finishes. (-[DragAndDropSimulator endDataTransfer]): Add a method stub on macOS, so that MoveAttachmentElementAsIconByDragging can be made cross-platform. (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]): (-[DragAndDropSimulator _webView:didRemoveAttachment:]): Implement method stubs to keep track of inserted or removed attachments while simulating a drag. 2018-08-22 Aditya Keerthi [iOS] Add support for the inputmode attribute https://bugs.webkit.org/show_bug.cgi?id=183621 Reviewed by Tim Horton. Added an API test to verify that the correct UIKeyboardType is set depending on the type, inputmode, and pattern specified for an input field. * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/ios/UIKitSPI.h: 2018-08-22 Alex Christensen Fix API test on Sierra after r235139 https://bugs.webkit.org/show_bug.cgi?id=188810 * TestWebKitAPI/Tests/mac/LimitTitleSize.mm: (TEST): 2018-08-22 David Kilzer Move files in WebCore project to match Xcode folder structure Reviewed by Tim Horton. * Scripts/extract-localizable-strings: * Scripts/update-webkit-localizable-strings: - Update to match new location of extract-localizable-strings.pl. 2018-08-21 Alex Christensen Roll out r235139 and r235146 https://bugs.webkit.org/show_bug.cgi?id=188805 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: 2018-08-21 Wenson Hsieh [Attachment Support] Remove _WKAttachments and notify the UI client upon mainframe navigation https://bugs.webkit.org/show_bug.cgi?id=188715 Reviewed by Tim Horton. Adds API tests to exercises cases where (1) the UI client is notified of attachment removal upon mainframe navigation, and (2) the UI client is notified of attachment removal upon web content process termination. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentUpdates): (TestWebKitAPI::TEST): 2018-08-21 Alex Christensen Transition ResizeReversePaginatedWebView API test from WKPageLoaderClient to WKPageNavigationClient https://bugs.webkit.org/show_bug.cgi?id=188821 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp: (TestWebKitAPI::didLayout): (TestWebKitAPI::TEST): 2018-08-21 Myles C. Maxfield [WHLSL] Call expressions shouldn't have type arguments https://bugs.webkit.org/show_bug.cgi?id=188770 Reviewed by Filip Pizlo. Call expressions only had type arguments for casts, becuase native types can have type arguments. However, instead of putting those type arguments on the CallExpression, we should parse the casted type as a real type and not as an identifier, which puts the type arguments in the TypeRef. Test: casts * WebGPUShadingLanguageRI/CallExpression.js: (CallExpression): (CallExpression.prototype.get name): (CallExpression.resolve): (CallExpression.prototype.get typeArguments): Deleted. (CallExpression.prototype.becomeCast): Deleted. * WebGPUShadingLanguageRI/NameResolver.js: (NameResolver.prototype.visitCallExpression): * WebGPUShadingLanguageRI/Parse.js: (parseConstexpr): (parseTypeDef): (parseLeftOperatorCall): (parseCallExpression.let.parseArguments): (parsePossiblePrefix): (parsePossibleRelationalEquality): (parseLeftLogicalExpression): (parseIfStatement): (parseWhile): (parseFor): (parseDo): * WebGPUShadingLanguageRI/RemoveTypeArguments.js: * WebGPUShadingLanguageRI/Rewriter.js: (Rewriter.prototype.visitCallExpression): 2018-08-21 Alex Christensen Translate WebKit.LimitTitleSize API test into ObjC https://bugs.webkit.org/show_bug.cgi?id=188810 Reviewed by Andy Estes. It uses WKPageLoaderClient.didReceiveTitleForFrame which has been replaced by KVO. I'm translating the test into ObjC rather than introducing a new callback to WKPageNavigationClient. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp: Removed. * TestWebKitAPI/Tests/mac/LimitTitleSize.mm: (TEST): (-[LimitTitleSizeTestObserver observeValueForKeyPath:ofObject:change:context:]): (TestWebKitAPI::TEST): Deleted. 2018-08-21 Alex Christensen Remove unused shouldKeepCurrentBackForwardListItemInList check https://bugs.webkit.org/show_bug.cgi?id=188805 Reviewed by Andy Estes. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: Removed. 2018-08-21 Alex Christensen Transition more API tests from WKPageLoaderClient to WKPageNavigationClient https://bugs.webkit.org/show_bug.cgi?id=188813 Reviewed by Andy Estes. * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp: (TestWebKitAPI::didLayout): (TestWebKitAPI::setPageLoaderClient): * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::didLayout): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp: (TestWebKitAPI::didLayout): (TestWebKitAPI::setPageLoaderClient): 2018-08-21 Wenson Hsieh [Attachment Support] Augment _WKAttachment SPI to handle NSFileWrappers in addition to NSData https://bugs.webkit.org/show_bug.cgi?id=188496 Reviewed by Tim Horton. Adjusts existing attachment API tests. See below for more detail. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]): (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]): (-[_WKAttachment synchronouslySetData:newContentType:newFilename:error:]): (-[_WKAttachment synchronouslySetFileWrapper:newContentType:error:]): Move off of deprecated attachment SPI, and add new helper functions to synchronously insert a new attachment or update an existing attachment with a file wrapper. (-[_WKAttachment expectRequestedDataToBe:]): (TestWebKitAPI::TEST): Add a new test to verify that file-URL-backed NSFileWrappers can be used to insert and update attachment data. Also augment an existing test to check that an attachment element which has been copied and pasted within the same document has a different _WKAttachment wrapper object than its duplicate, but both _WKAttachments are backed by the same NSFileWrapper that was originally used to insert the attachment. Additionally, add another macOS test to verify that dropping promised files in an attachment-element-enabled editable area inserts attachment elements into the document and notifies the UI client with the inserted attachment data. (-[_WKAttachment synchronouslyRequestInfo:]): Deleted. (-[_WKAttachment synchronouslyRequestData:]): Deleted. * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]): Move off of -_webView:didInsertAttachment:. (-[DragAndDropSimulator _webView:didInsertAttachment:]): Deleted. 2018-08-21 David Kilzer sort-Xcode-project-file: top-level files and folders are sorted unintentionally when `mainGroup` has no name Reviewed by Andy Estes. * Scripts/sort-Xcode-project-file: Fix regular expression to make `mainGroup` name optional. 2018-08-21 Andy VanWagoner Unreviewed, add myself to committers list. * Scripts/webkitpy/common/config/contributors.json: 2018-08-21 Antti Koivisto Allow creating WeakPtrs to const objects https://bugs.webkit.org/show_bug.cgi?id=188785 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::Base::weakPtrFactory const): (TestWebKitAPI::TEST): (TestWebKitAPI::Base::weakPtrFactory): Deleted. 2018-08-21 Per Arne Vollan [WebGL] Contexts are not updated when display configuration changed. https://bugs.webkit.org/show_bug.cgi?id=188750 Reviewed by Brent Fulgham. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::sendDisplayConfigurationChangedMessageForTesting): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): 2018-08-21 John Wilander Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames https://bugs.webkit.org/show_bug.cgi?id=188757 Reviewed by Alex Christensen. These changes add the new WebKitTestRunner function isStatisticsRegisteredAsSubresourceUnder(). * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::isStatisticsRegisteredAsSubresourceUnder): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): 2018-08-21 Alex Christensen Transition more API tests from WKPageLoaderClient to WKPageNavigationClient https://bugs.webkit.org/show_bug.cgi?id=188797 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp: (TestWebKitAPI::didSameDocumentNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/FailedLoad.cpp: (TestWebKitAPI::didFailProvisionalNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp: (TestWebKitAPI::didStartProvisionalNavigation): (TestWebKitAPI::didCommitNavigation): (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted. (TestWebKitAPI::didCommitLoadForFrame): Deleted. (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp: (TestWebKitAPI::didStartProvisionalNavigation): (TestWebKitAPI::didCommitNavigation): (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted. (TestWebKitAPI::didCommitLoadForFrame): Deleted. (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp: (TestWebKitAPI::renderingProgressDidChange): (TestWebKitAPI::TEST): (TestWebKitAPI::didLayout): Deleted. * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::renderingProgressDidChange): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::didLayout): Deleted. * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp: (TestWebKitAPI::State::State): (TestWebKitAPI::didStartProvisionalNavigation): (TestWebKitAPI::didCommitNavigation): (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::decidePolicyForNavigationAction): (TestWebKitAPI::decidePolicyForResponse): (TestWebKitAPI::TEST): (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted. (TestWebKitAPI::didCommitLoadForFrame): Deleted. (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::decidePolicyForNewWindowAction): Deleted. * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp: (TestWebKitAPI::didSameDocumentNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp: (TestWebKitAPI::TEST): (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp: (TestWebKitAPI::didFinishLoad): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/WKBundleFileHandle.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm: (TestWebKitAPI::didFinishLoad): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm: (WebKit2_CommandBackForwardTestWKView::SetUp): (WebKit2_CommandBackForwardTestWKView::didFinishLoadForFrame): Deleted. 2018-08-20 Alex Christensen Replace WKPageLoaderClient with WKPageNavigationClient in many API tests https://bugs.webkit.org/show_bug.cgi?id=188771 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/CookieManager.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp: (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/EventModifiers.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setClients): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/Find.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/FindMatches.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/FrameHandle.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/Geolocation.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp: (TestWebKitAPI::didFinishLoadForFrame): * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::loadAlternateHTMLString): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp: (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader): (TestWebKitAPI::didFinishLoad): * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp: (TestWebKitAPI::didFinishLoadForFrame): * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp: (TestWebKitAPI::didFinishLoad): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishDocumentLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp: (TestWebKitAPI::didFailProvisionalNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp: (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishNavigation): (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::setPageLoaderClient): (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/UserMessage.cpp: (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishNavigation): (TestWebKitAPI::WebKit2UserMessageRoundTripTest::setPageLoaderClient): (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setUpClients): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/WebArchive.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: (didFinishNavigation): (TestWebKitAPI::TEST): (didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: (didFinishNavigation): (TestWebKitAPI::TEST): (didFinishLoadForFrame): Deleted. * TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::TEST): (TestWebKitAPI::didFinishLoadForFrame): Deleted. * TestWebKitAPI/mac/WebKitAgnosticTest.mm: (TestWebKitAPI::didFinishNavigation): (TestWebKitAPI::setPageLoaderClient): (TestWebKitAPI::didFinishLoadForFrame): Deleted. 2018-08-21 Adrian Perez de Castro [WPE] Update to use libwpe-1.0.0 and WPEBackend-fdo-1.0.0 https://bugs.webkit.org/show_bug.cgi?id=188782 Reviewed by Michael Catanzaro. Make the build depend on wpe-0.2, and change the Flatpak and JHBuild development environments to use version 1.0.0 of libwpe and WPEBackend-fdo. * flatpak/org.webkit.WPE.yaml: Update to use libwpe and WPEBackend-fdo version 1.0.0 from release tarballs, and removed the (now unneeded) Lua and LuaJIT modules. * wpe/jhbuild.modules: Ditto. 2018-08-21 Michael Catanzaro [Flatpak] Update to GNOME master runtime https://bugs.webkit.org/show_bug.cgi?id=188731 Reviewed by Philippe Normand. The 3.28 runtime is pretty stale at this point. We could wait a couple weeks for the 3.30 runtime, but I don't think there's any need to stick with the stable runtime when we have the ability to pin to a particular version of the master runtime. There are also several advantages to switching to the master runtime. * flatpak/files/httpd-autogen.sh: Removed. * flatpak/flatpakutils.py: (WebkitFlatpak.clean_args): * flatpak/org.webkit.GTK.yaml: * flatpak/org.webkit.WebKit.yaml: * flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed. * flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed. 2018-08-20 Jonathan Bedard WebKitTestRunner: Add watchOS entitlements https://bugs.webkit.org/show_bug.cgi?id=188758 Reviewed by Tim Horton. watchOS needs an additional entitlement to open up a socket for on-device testing. * WebKitTestRunner/Configurations/WebKitTestRunnerApp-watchOS.entitlements: Added. * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: 2018-08-20 Thomas Denney [WHLSL] Remove generics from the interpreter https://bugs.webkit.org/show_bug.cgi?id=187988 Reviewed by Myles C. Maxfield. This patch completely removes generic and protocol support from WHLSL whilst adding back any features that were originally implemented with generics. Many of the changes in this patch just remove occurrences of type arguments and type parameters --- although there are some cases where they have been deliberately left in --- as well as removing tests only relevant to those features. These changes are not listed below. * WebGPUShadingLanguageRI/All.js: Add/remove JS dependencies * WebGPUShadingLanguageRI/AutoWrapper.js: (AutoWrapper.prototype.visitConstexprTypeParameter): Deleted. * WebGPUShadingLanguageRI/BuiltinVectorCasts.js: Added. The built-in vectors have many constructors for different scalar and vector types. These were originally implemented with generics. * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Adds the equality operator for built-in vectors, again this was removed with generics. * WebGPUShadingLanguageRI/BuiltinVectorGetter.js: Added, as above. Built-in vectors only support the getter and setter, and not the ander. * WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js: Added. * WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js: Added. * WebGPUShadingLanguageRI/BuiltinVectorSetter.js: Added. * WebGPUShadingLanguageRI/CallExpression.js: Adds support for instantiating functions which cannot be discovered earlier in preparation because their types are absent (specifically support for the operator &[] for array references and the length operator for array references). Previously support for these was implemented with generics. (CallExpression.resolve): (CallExpression.prototype.resolve): (CallExpression.prototype._resolveByInstantiation): (CallExpression.prototype._resolveToOperatorAnderIndexer): (CallExpression.prototype._resolveToOperatorLength): (CallExpression.prototype.resolveToOverload): (CallExpression.prototype.becomeCast): (CallExpression.prototype.toString): (CallExpression): * WebGPUShadingLanguageRI/CallExpressionTypeArgumentResolver.js: Added. We support syntax like vector(a, b) for constructing vectors; this new preparation step resolves them to specific constructors. * WebGPUShadingLanguageRI/CallFunction.js: * WebGPUShadingLanguageRI/Checker.js: * WebGPUShadingLanguageRI/ConstexprFolder.js: * WebGPUShadingLanguageRI/CreateLiteralType.js: * WebGPUShadingLanguageRI/ExpressionFinder.js: * WebGPUShadingLanguageRI/FlattenProtocolExtends.js: Removed. * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js: * WebGPUShadingLanguageRI/Func.js: * WebGPUShadingLanguageRI/FuncDef.js: * WebGPUShadingLanguageRI/FuncInstantiator.js: Deleted. * WebGPUShadingLanguageRI/InferTypesForCall.js: Removed usage of type arguments. * WebGPUShadingLanguageRI/Inline.js: Remove use of FuncInstantiator. * WebGPUShadingLanguageRI/Inliner.js: Ditto. * WebGPUShadingLanguageRI/Intrinsics.js: * WebGPUShadingLanguageRI/Lexer.js: * WebGPUShadingLanguageRI/LiteralTypeChecker.js: * WebGPUShadingLanguageRI/NameContext.js: (NameContext.prototype.add): (NameContext.prototype.get let): (NameContext.underlyingThings.prototype.else): (NameContext.prototype.resolveFuncOverload): * WebGPUShadingLanguageRI/NameFinder.js: * WebGPUShadingLanguageRI/NameResolver.js: (NameResolver.prototype.visitFunc): (NameResolver.prototype.visitFuncDef): (NameResolver.prototype.visitTypeDef): (NameResolver.prototype.visitStructType): (NameResolver.prototype.visitTypeRef): (NameResolver.prototype.visitCallExpression): (NameResolver.prototype.visitVectorType): (NameResolver): (NameResolver.prototype._visitTypeParametersAndBuildNameContext): Deleted. (NameResolver.prototype.visitProtocolDecl): Deleted. * WebGPUShadingLanguageRI/NativeFunc.js: (NativeFunc): * WebGPUShadingLanguageRI/NativeFuncInstance.js: Deleted. * WebGPUShadingLanguageRI/NativeType.js: (NativeType): (NativeType.prototype.get name): (NativeType.prototype.toString): (NativeType.prototype.get typeParameters): Deleted. (NativeType.prototype.instantiate): Deleted. * WebGPUShadingLanguageRI/Node.js: (Node.prototype.commit): (Node): (Node.prototype.substitute): Deleted. (Node.prototype.substituteToUnification): Deleted. * WebGPUShadingLanguageRI/OperatorAnderIndex.js: Added, previously implemented with generics. * WebGPUShadingLanguageRI/OperatorArrayRefLength.js: Ditto. * WebGPUShadingLanguageRI/OperatorBool.js: Ditto. * WebGPUShadingLanguageRI/Parse.js: Removed everything related to generics and protocols. * WebGPUShadingLanguageRI/Prepare.js: Added new stages. * WebGPUShadingLanguageRI/Program.js: (Program): (Program.prototype.get types): (Program.prototype.add): (Program.prototype.get protocols): Deleted. * WebGPUShadingLanguageRI/ProtocolDecl.js: Removed. * WebGPUShadingLanguageRI/ProtocolRef.js: Removed. * WebGPUShadingLanguageRI/RecursiveTypeChecker.js: * WebGPUShadingLanguageRI/ResolveCallExpressionsWithTypeArguments.js: Added. * WebGPUShadingLanguageRI/ResolveNames.js: * WebGPUShadingLanguageRI/ResolveOverloadImpl.js: * WebGPUShadingLanguageRI/ResolveTypeDefs.js: (resolveTypeDefsInProtocols): Deleted. * WebGPUShadingLanguageRI/Rewriter.js: Changes for new classes. * WebGPUShadingLanguageRI/SPIRV.html: * WebGPUShadingLanguageRI/SPIRVCodegen.js: * WebGPUShadingLanguageRI/StandardLibrary.js: Replace old generic features. * WebGPUShadingLanguageRI/StatementCloner.js: Changes for new classes. (StructLayoutBuilder): * WebGPUShadingLanguageRI/StructType.js: * WebGPUShadingLanguageRI/SwizzleOp.js: (SwizzleOp): (SwizzleOp.prototype.get baseTypeName): (SwizzleOp.prototype.toString): (SwizzleOp.functions.): (SwizzleOp.functions): (SwizzleOp.prototype.instantiateImplementation): (SwizzleOp.allSwizzleOperators.): Deleted. (SwizzleOp.allSwizzleOperators): Deleted. * WebGPUShadingLanguageRI/SynthesizeArrayOperatorLength.js: Added, previously implemented with generics. * WebGPUShadingLanguageRI/SynthesizeCopyConstructorOperator.js: Ditto. * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Ditto. * WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js: Ditto. * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Ditto. * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: (synthesizeStructAccessors.setupImplementationData): (synthesizeStructAccessors.createFieldType): (synthesizeStructAccessors.createTypeRef): (synthesizeStructAccessors.setupAnder): (synthesizeStructAccessors): (synthesizeStructAccessors.createTypeParameters): Deleted. (synthesizeStructAccessors.): Deleted. * WebGPUShadingLanguageRI/Test.html: * WebGPUShadingLanguageRI/Test.js: Removed redundant tests and added new tests for changed language features. * WebGPUShadingLanguageRI/Type.js: * WebGPUShadingLanguageRI/TypeDef.js: * WebGPUShadingLanguageRI/TypeDefResolver.js: * WebGPUShadingLanguageRI/TypeParameterRewriter.js: Removed. * WebGPUShadingLanguageRI/TypeRef.js: * WebGPUShadingLanguageRI/TypeVariable.js: Removed. * WebGPUShadingLanguageRI/UnificationContext.js: * WebGPUShadingLanguageRI/VectorType.js: Added. * WebGPUShadingLanguageRI/Visitor.js: Changes for new classes. * WebGPUShadingLanguageRI/WSL.md: Removed description of generics/protocols. * WebGPUShadingLanguageRI/WrapChecker.js: (WrapChecker): (WrapChecker.visitConstexprTypeParameter): Deleted. (WrapChecker.prototype.visitFuncParameter): Deleted. (WrapChecker.prototype.visitTypeVariable): Deleted. * WebGPUShadingLanguageRI/index.html: 2018-08-20 Thomas Denney Added Thomas Denney to contributors.json. https://bugs.webkit.org/show_bug.cgi?id=188525 Reviewed by Myles C. Maxfield. * Scripts/webkitpy/common/config/contributors.json: 2018-08-20 Bernhard M. Wiedemann [GTK] Sort inspector GResource manifest to ensure reproducible builds https://bugs.webkit.org/show_bug.cgi?id=188738 Reviewed by Michael Catanzaro. * glib/generate-inspector-gresource-manifest.py: (get_filenames): sort list of input files 2018-08-20 Wenson Hsieh [iOS] Paste is missing from callout bar when pasteboard only contains custom data https://bugs.webkit.org/show_bug.cgi?id=184271 Reviewed by Andy Estes. This API test is failing when run against older macOS builds, where custom pasteboard data is not enabled by default. * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: (TestWebKitAPI::TEST): 2018-08-20 Claudio Saavedra Add WPE Debug configuration to the flakiness dashboard https://bugs.webkit.org/show_bug.cgi?id=188743 Reviewed by Michael Catanzaro. * TestResultServer/static-dashboards/builders.jsonp: * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js: 2018-08-19 Carlos Garcia Campos [GLIB] Add API to throw exceptions using printf formatted strings https://bugs.webkit.org/show_bug.cgi?id=188698 Reviewed by Michael Catanzaro. Add cases to test the new API. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (createFormattedError): (createCustomFormattedError): (testJSCExceptions): 2018-08-19 Carlos Garcia Campos [GLIB] Complete the JSCException API https://bugs.webkit.org/show_bug.cgi?id=188695 Reviewed by Michael Catanzaro. Add cases to test the new API. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCCheckSyntax): (createCustomError): (testJSCExceptions): 2018-08-18 Wenson Hsieh [iOS] Paste is missing from callout bar when pasteboard only contains custom data https://bugs.webkit.org/show_bug.cgi?id=184271 Reviewed by Ryosuke Niwa. Add a new API test to verify that on both iOS and macOS, copied custom pasteboard data can only be pasted in a matching origin. Additionally verify that on iOS, the web view is capable of performing the "paste:" selector. * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: (TestWebKitAPI::TEST): (imagePath): Deleted. (writeTypesAndDataToPasteboard): Deleted. (setUpWebView): Deleted. (markupString): Deleted. Make this test file no longer exclusive to macOS. * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView synchronouslyLoadHTMLString:baseURL:]): Tweak this helper to also take in a `baseURL`. Defaults to using the TestWebKitAPI bundle resource URL. (-[TestWKWebView synchronouslyLoadHTMLString:]): 2018-08-17 Jonathan Bedard Add back --wtf-only to run-api-tests https://bugs.webkit.org/show_bug.cgi?id=187893 Reviewed by Aakash Jain. When doing WTF development, it is not necessary to build or run all of the API tests. Generally, if a user has specified a specific binary (or binaries) that they are interested in testing, it is not necessary to check all API test binaries. * Scripts/webkitpy/api_tests/manager.py: (Manager._collect_tests): Only use the binaries matching the program arguments when collecting tests. (Manager._binaries_for_arguments): Generate a list of binaries which match the program arguments. (Manager.run): Pass a list binaries to check. * Scripts/webkitpy/api_tests/run_api_tests.py: (parse_args): * Scripts/webkitpy/port/base.py: (Port.check_api_test_build): If the caller specifies which API test binaries it requires, only check the ones specified. (Port.path_to_api_test_binaries): Allow the caller to only build the WTF API tests. (Port._build_api_tests): Allow the caller to only build the WTF API tests. * Scripts/webkitpy/port/win.py: (WinPort.path_to_api_test_binaries): 2018-08-17 Jer Noble REGRESSION (234743) Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio https://bugs.webkit.org/show_bug.cgi?id=188470 Reviewed by Alex Christensen. On a loaded server, the WebContent process may send the "playing" message before the UIProcess has a chance to register a listener for that message. Restructure the tests so that the listener is registered before the page is loaded. * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: (PreferredAudioBufferSize::runPlayingTestWithPageNamed): (TEST_F): 2018-08-16 Wenson Hsieh [macOS] [WK2] Add infrastructure to test receiving file promises on drop https://bugs.webkit.org/show_bug.cgi?id=188583 Reviewed by Andy Estes. Enable testing file promise drop handling on the WebKit2 port of macOS by introducing a subclass of NSFilePromiseReceiver and implementing `-enumerateDraggingItemsWithOptions:forView:…` on TestDraggingInfo (the concrete NSDraggingInfo implementation used by DragAndDropSimulator) using the mock file receiver. Also introduces 3 new macOS tests. See below for more details. A large portion of this logic is ported over from DumpRenderTree testing infrastructure added in r229297. In a future patch, we should introduce a way to write code common to both API tests, WebKitTestRunner and DumpRenderTree, and make this code shared among all three testing harnesses. Tests: DragAndDropTests.DragImageElementIntoFileUpload DragAndDropTests.DragPromisedImageFileIntoFileUpload DragAndDropTests.DragImageFileIntoFileUpload * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (TEST): Drive-by fix: Replace NSMakePoint with CGPointMake. * TestWebKitAPI/Tests/WebKitCocoa/image-and-file-upload.html: Add a new test page consisting of an image and a "file upload" area that updates exercises DataTransfer API to load the dropped image. * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm: (waitForConditionWithLogging): Add a helper function to wait for a condition to evaluate to true. To make failures more informative, additionally add a mechanism to log a warning message after a given timeout, if the condition has yet to be met. (TEST): Add new tests to exercise a few cases of file upload in WebKit, including: (1) dragging from an image element, (2) dragging files written to the pasteboard as promises, and (3) files written to the pasteboard as file URLs. * TestWebKitAPI/cocoa/DragAndDropSimulator.h: Surface the new functionality provided by the file promise receiver mock via two new methods on DragAndDropSimulator to (1) write files as file promises to the pasteboard, and (2) write files as file paths directly to the pasteboard. * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]): (-[DragAndDropSimulator externalPromisedFiles]): (getFilePathsAndTypeIdentifiers): (-[DragAndDropSimulator writePromisedFiles:]): (-[DragAndDropSimulator writeFiles:]): * TestWebKitAPI/mac/TestDraggingInfo.h: * TestWebKitAPI/mac/TestDraggingInfo.mm: (-[TestDraggingInfo initWithDragAndDropSimulator:]): (-[TestDraggingInfo filePromiseReceivers]): (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]): Implement this by invoking the given block with a TestFilePromiseReceiver. While all other classes are unhandled by this testing code, WebKit only calls into this with [NSFilePromiseReceiver class], this is currently sufficient for testing purposes. * TestWebKitAPI/mac/TestFilePromiseReceiver.h: Copied from Tools/TestWebKitAPI/mac/TestDraggingInfo.h. * TestWebKitAPI/mac/TestFilePromiseReceiver.mm: Added. (-[TestFilePromiseReceiver initWithPromisedTypeIdentifiers:dragAndDropSimulator:]): (-[TestFilePromiseReceiver fileTypes]): (-[TestFilePromiseReceiver fileNames]): (-[TestFilePromiseReceiver dealloc]): (-[TestFilePromiseReceiver draggingSource]): (-[TestFilePromiseReceiver setDraggingSource:]): (fileNameWithNumericSuffix): (copyFile): Add a helper to copy a file into a destination directory. Used to implement the main functionality of our NSFilePromiseReceiver subclass, which copies the files specified by test code into the directory determined by WebKit. (-[TestFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]): 2018-08-16 Alex Christensen Add entitlement to MiniBrowser to allow it to communicate with com.apple.Safari.SafeBrowsing.Service https://bugs.webkit.org/show_bug.cgi?id=188677 Reviewed by Tim Horton. * MiniBrowser/MiniBrowser.entitlements: SSBLookupContext lookUpURL:completionHandler: fails to communicate with its service without this entitlement on released operating systems. See 2018-08-16 Jer Noble Add option to run-api-tests to force running of DISABLED tests. https://bugs.webkit.org/show_bug.cgi?id=188674 Reviewed by Joseph Pecoraro. * Scripts/webkitpy/api_tests/run_api_tests.py: (parse_args): * Scripts/webkitpy/api_tests/runner.py: (Runner.command_for_port): (_Worker._run_single_test): 2018-08-16 Aakash Jain [ews-build] Separate queues for Builders and Testers - macOS High Sierra https://bugs.webkit.org/show_bug.cgi?id=188540 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/config.json: Splitted few macOS queues into builders and testers. 2018-08-16 Aakash Jain [ews-build] Add build steps ArchiveTestResults, UploadTestResults and ExtractTestResults https://bugs.webkit.org/show_bug.cgi?id=188666 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (ArchiveTestResults): Build step to Archive the test results. (UploadTestResults): Build step to upload the archive. (ExtractTestResults): Build step to unzip the archive on server and generate a link. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. (ExpectMasterShellCommand): Copied from other similar internal code. 2018-08-16 Aakash Jain [ews-build] Separate queues for Builders and Testers - macOS Sierra https://bugs.webkit.org/show_bug.cgi?id=188516 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/config.json: Splitted macOS Sierra Release queues into builders and testers. * BuildSlaveSupport/ews-build/factories.py: Used appropriate base classes for builders and testers. 2018-08-16 Basuke Suzuki [Win][DumpRenderTree] Remove error message for duplicated tests. https://bugs.webkit.org/show_bug.cgi?id=188662 Reviewed by Per Arne Vollan. This was added to track down an issue where the same tests appeared to be run multiple times. This turned out to not be the case. See https://bugs.webkit.org/show_bug.cgi?id=166760 . * DumpRenderTree/win/DumpRenderTree.cpp: (runTest): 2018-08-16 Alex Christensen Re-introduce assertion removed in r234890 https://bugs.webkit.org/show_bug.cgi?id=188611 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WTF/Vector.cpp: (TestWebKitAPI::TEST): 2018-08-16 Jer Noble Add Experimental Feature support for SourceBuffer.changeType() https://bugs.webkit.org/show_bug.cgi?id=188626 Reviewed by Eric Carlson. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (resetWebPreferencesToConsistentValues): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2018-08-16 Aditya Keerthi Support drag-and-drop for input[type=color] https://bugs.webkit.org/show_bug.cgi?id=188464 Reviewed by Wenson Hsieh. Added five cross-platform API tests, to verify that dragging and dropping with color inputs changes the value of the drop target if and only if both inputs are enabled. Also tests that the change and input events are fired when changing the value of a color input through drag and drop. Additionally, added a macOS-specific test to verify that dropping an item with NSColorPboardType changes the value of the color input. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/color-drop.html: Added. * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm: (TestWebKitAPI::TEST): 2018-08-16 Antti Koivisto Use OptionSet for ActivityState::Flags https://bugs.webkit.org/show_bug.cgi?id=188554 Reviewed by Brent Fulgham. * TestWebKitAPI/Tests/WTF/OptionSet.cpp: (TestWebKitAPI::TEST): 2018-08-16 Carlos Garcia Campos [GTK] MiniBrowser: web view doesn't get the focus when new window is created https://bugs.webkit.org/show_bug.cgi?id=188546 Reviewed by Michael Catanzaro. When a new window is created, the first widget of the windo is getting the focus, the toolbar in this case. We always want the WebView to grab the focus. In case of new empty tab, we want to the URL bar to be focused instead. This was causing failures in WebDriver tests that create a popup window with an input element that is filled with send keys command. The input element is marked as focused in the DOM, but the actual focused widget is the toolbar, so key events are sent to the toolbar instead of the web view. * MiniBrowser/gtk/BrowserWindow.c: (webViewCreate): (newTabCallback): (openPrivateWindow): (browser_window_get_or_create_web_view_for_automation): 2018-08-16 Carlos Garcia Campos Unreviewed. Fix WebDriver tests after r234839. New pytest requires to autoinstall attrs too. * Scripts/webkitpy/thirdparty/__init__.py: (AutoinstallImportHook._install_pytest): 2018-08-15 Ansh Shukla NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault https://bugs.webkit.org/show_bug.cgi?id=186870 Reviewed by Alex Christensen. * WebKitTestRunner/TestController.cpp: (WTR::toString): (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth. (WTR::TestController::didReceiveAuthenticationChallenge): 2018-08-15 Ben Richards We should cache the compiled sandbox profile in a data vault https://bugs.webkit.org/show_bug.cgi?id=184991 Reviewed by Ryosuke Niwa. Added trace points for sandbox initialization * Tracing/SystemTracePoints.plist: 2018-08-15 Ryan Haddad Unreviewed, rolling out r234870. The test introduced with this change is a flaky failure. Reverted changeset: "NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault" https://bugs.webkit.org/show_bug.cgi?id=186870 https://trac.webkit.org/changeset/234870 2018-08-15 Jonathan Bedard WebKitTestRunner should support watch devices https://bugs.webkit.org/show_bug.cgi?id=188570 Reviewed by Alex Christensen. * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig: 2018-08-15 Wenson Hsieh [Attachment SPI] Remove attachment display mode options https://bugs.webkit.org/show_bug.cgi?id=188596 Reviewed by Dan Bernstein. Remove API tests and API test helpers for verifying the behavior of in-place media attachment elements. * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]): (TestWebKitAPI::TEST): (testVideoData): Deleted. (displayOptionsWithMode): Deleted. (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:options:]): Deleted. 2018-08-14 Devin Rousso Unreviewed, change my emails. * Scripts/webkitpy/common/config/contributors.json: * Scripts/webkitpy/common/config/watchlist: 2018-08-14 Saam barati HashMap, V> asserts when V is not zero for its empty value https://bugs.webkit.org/show_bug.cgi?id=188582 Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): 2018-08-14 Zalan Bujtas [LFC][Floating] Add support for negative clearance. https://bugs.webkit.org/show_bug.cgi?id=188555 Reviewed by Simon Fraser. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-08-14 Sihui Liu Crash in WebKit::filterPreloadHSTSEntry via NetworkProcess::getHostNamesWithHSTSCache https://bugs.webkit.org/show_bug.cgi?id=188576 Reviewed by Alex Christensen. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: Added. (TEST): 2018-08-14 Alex Christensen isValidCSSSelector is unsafe to be called from a non-main thread https://bugs.webkit.org/show_bug.cgi?id=188581 Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::InMemoryCompiledContentExtension::create): (TestWebKitAPI::checkCompilerError): 2018-08-14 Ansh Shukla NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault https://bugs.webkit.org/show_bug.cgi?id=186870 Reviewed by Alex Christensen. * WebKitTestRunner/TestController.cpp: (WTR::toString): (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth. (WTR::TestController::didReceiveAuthenticationChallenge): 2018-08-14 Fujii Hironori [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash https://bugs.webkit.org/show_bug.cgi?id=187973 Reviewed by Alex Christensen. In LayoutTests, test names have been canonicalized in Unix style since Bug 63597, for example 'fast/css/001.html'. But Bug 179219, Bug 179572, Bug 180660, and Bug 181814 have changed to use os.path.seq instead of slash if Windows Python is used. Revert parts of those changes. Change relative_test_filename to return a slash-separated test name as chromium_win.py used to do. This change fixes all 41 test-webkitpy failures in WinCairo port. * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser._parse_line): Do not convert test names with normpath. * Scripts/webkitpy/port/base.py: (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep. (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR. (Port.abspath_for_test): Replace self.TEST_PATH_SEPARATOR with self.host.filesystem.sep. * Scripts/webkitpy/port/driver.py: (Driver): Use '/' instead of os.sep. * Scripts/webkitpy/port/win.py: (WinCairoPort): Do not override TEST_PATH_SEPARATOR. 2018-08-14 Aakash Jain [ews-build] Add build step to run WK1 layout-test https://bugs.webkit.org/show_bug.cgi?id=188498 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (RunWebKit1Tests): Class to run WebKit1Tests. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 2018-08-14 Patrick Griffis [Flatpak] Fix --cmakeargs https://bugs.webkit.org/show_bug.cgi?id=188567 Reviewed by Michael Catanzaro. * flatpak/flatpakutils.py: (WebkitFlatpak.setup_dev_env): 2018-08-14 Darshan Kadu Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links https://bugs.webkit.org/show_bug.cgi?id=186140 Reviewed by Youenn Fablet. Added an optional parameter see_also to post_comment_to_bug function and used it for adding see_also variable's content in "See Also" * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: (Bugzilla.post_comment_to_bug): Modified mock for see_also parameter * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzilla.post_comment_to_bug): Made following unit tests to have see_also in bug comment * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py: * Scripts/webkitpy/tool/bot/sheriff_unittest.py: (SheriffTest.test_post_blame_comment_on_bug): * Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py: * Scripts/webkitpy/tool/commands/queues_unittest.py: * Scripts/webkitpy/tool/commands/upload_unittest.py: * Scripts/webkitpy/tool/steps/applywatchlist_unittest.py: * Scripts/webkitpy/w3c/test_exporter.py: (WebPlatformTestExporter.make_pull_request): * Scripts/webkitpy/w3c/test_exporter_unittest.py: (TestExporterTest.MockBugzilla.post_comment_to_bug): (TestExporterTest.test_export): 2018-08-14 Aakash Jain [ews-build] Add support for max_builds parameter for workers https://bugs.webkit.org/show_bug.cgi?id=188531 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/loadConfig.py: (loadBuilderConfig): Added support for max_builds. 2018-08-14 Zalan Bujtas [LFC][Floating] Adjust vertical position with non-collapsing previous sibling margin. https://bugs.webkit.org/show_bug.cgi?id=188543 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-08-14 Carlos Garcia Campos Unreviewed. Fix WebDriver tests after r234839. New pytest requires to autoinstall more_itertools and six too. * Scripts/webkitpy/thirdparty/__init__.py: (AutoinstallImportHook._install_pytest): 2018-08-14 Tomas Popela [GTK] Minibrowser: Add labels for buttons https://bugs.webkit.org/show_bug.cgi?id=188549 Reviewed by Carlos Garcia Campos. So they are accessible easier (i.e. while testing WebKitGTK+ through Minibrowser in Dogtail). * MiniBrowser/gtk/BrowserWindow.c: (webViewIsLoadingChanged): (browserWindowSetupEditorToolbar): (browser_window_init): 2018-08-14 Carlos Garcia Campos Unreviewed. Fix WebDriver tests after r234839. New pytest requires to autoinstall atomicwrites too. * Scripts/webkitpy/thirdparty/__init__.py: (AutoinstallImportHook._install_pytest): 2018-08-14 Carlos Garcia Campos Unreviewed. Fix WebDriver tests after r234839. New pytest requires to autoinstall pluggy and funcsigs too. * Scripts/webkitpy/thirdparty/__init__.py: (AutoinstallImportHook._install_pytest): 2018-08-13 Carlos Garcia Campos Unreviewed. Update W3C WebDriver imported tests. Bump pytest version to 3.6.2. * Scripts/webkitpy/thirdparty/__init__.py: (AutoinstallImportHook._install_pytest): 2018-08-13 Thomas Denney Allow the substring 'me' in contributor names and email addresses https://bugs.webkit.org/show_bug.cgi?id=188538 Reviewed by Tim Horton. A test didn't permit the string "me" in email addresses or names of contributors. * Scripts/webkitpy/common/config/committers_unittest.py: (CommittersTest.test_contributors_by_fuzzy_match): 2018-08-13 Commit Queue Unreviewed, rolling out r234812. https://bugs.webkit.org/show_bug.cgi?id=188536 broke the build (Requested by ThomasDenney on #webkit). Reverted changeset: "Added Thomas Denney to contributors.json." https://bugs.webkit.org/show_bug.cgi?id=188525 https://trac.webkit.org/changeset/234812 2018-08-13 Sihui Liu Avoid timeout resulted from calling waitUntilDone when test is not running https://bugs.webkit.org/show_bug.cgi?id=188389 Reviewed by Chris Dumez. If test is not running, we should not set the waitUntilDone flag, or it may cause subsequent tests timeout. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::waitUntilDone): 2018-08-13 Wenson Hsieh [WK2] [macOS] Implement a mechanism to test drag and drop https://bugs.webkit.org/show_bug.cgi?id=181898 Reviewed by Simon Fraser. Implements the currently stubbed DragAndDropSimulator on macOS, and introduces a new API test for r227266. See comments below for more detail. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm. Introduce a file for cross-platform drag and drop tests, currently for iOS and macOS. Additionally add a test for r227266, which was fixed earlier this year but could not be tested due to a lack of testing mechanism on macOS in WebKit2. (TEST): * TestWebKitAPI/Tests/WebKitCocoa/full-page-dropzone.html: Added. Minor tweaks to this test page to add "dragover" and "drop" event handlers. * TestWebKitAPI/Tests/WebKitCocoa/image-in-link-and-input.html: * TestWebKitAPI/Tests/WebKitCocoa/link-in-iframe-and-input.html: Added. Add a new test page that includes a link embedded within an iframe below a plain text input. * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm: Added. (TEST): * TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm: Renamed from Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm. Move only existing WebKit2 macOS drag and drop test (DragAndDropPasteboardTests.NumberOfValidItemsForDrop) out of DragAndDropPasteboardTests.mm and into a new file, DragAndDropTestsMac.mm. Additionally, rename DragAndDropPasteboardTests to LegacyDragAndDropTests, since it now only contains two legacy WebView tests for drag and drop. (+[FrameLoadCompletionListener listenerWithCompletionBlock:]): (-[FrameLoadCompletionListener initWithCompletionBlock:]): (-[FrameLoadCompletionListener webView:didFinishLoadForFrame:]): (-[DragSource draggingSourceOperationMaskForLocal:]): (-[DragInfo initWithImage:offset:pasteboard:source:destinationWindow:]): (-[DragInfo lastMousePosition]): (-[DragInfo setLastMousePosition:]): (-[DragInfo draggingDestinationWindow]): (-[DragInfo draggingSourceOperationMask]): (-[DragInfo draggingLocation]): (-[DragInfo draggedImageLocation]): (-[DragInfo draggedImage]): (-[DragInfo draggingPasteboard]): (-[DragInfo draggingSource]): (-[DragInfo draggingSequenceNumber]): (-[DragInfo slideDraggedImageTo:]): (-[DragInfo namesOfPromisedFilesDroppedAtDestination:]): (-[DragInfo draggingFormation]): (-[DragInfo setDraggingFormation:]): (-[DragInfo animatesToDestination]): (-[DragInfo setAnimatesToDestination:]): (-[DragInfo numberOfValidItemsForDrop]): (-[DragInfo setNumberOfValidItemsForDrop:]): (-[DragInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]): (-[DragInfo springLoadingHighlight]): (-[DragInfo resetSpringLoading]): (TestWebKitAPI::getTestImage): (TestWebKitAPI::webViewAfterPerformingDragOperation): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/mac/full-page-dropzone.html: Removed. * TestWebKitAPI/cocoa/DragAndDropSimulator.h: Flesh out some of the DragAndDropSimulator API for macOS, exposing (among other things) the drag pasteboard, the current NSDraggingInfo, the initial location of the drag image, and the drag image itself. * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView mouseDownAtPoint:simulatePressure:]): (-[TestWKWebView mouseUpAtPoint:]): (-[TestWKWebView mouseMoveToPoint:withFlags:]): (-[TestWKWebView sendClicksAtPoint:numberOfClicks:]): (-[TestWKWebView mouseEnterAtPoint:]): (-[TestWKWebView mouseExitAtPoint:]): (-[TestWKWebView mouseDragToPoint:]): (-[TestWKWebView _mouseEventWithType:atLocation:]): (-[TestWKWebView _mouseEventWithType:atLocation:flags:timestamp:clickCount:]): Add TestWKWebView helpers to send MouseMove, MouseEnter and MouseDrag NSEvents to the web view. Additionally, rename parameter names to these helpers to make it more obvious that these locations are all in NSWindow coordinates. (-[TestWKWebView typeCharacter:]): Drive-by style fix: put this opening brace on the beginning of the next line. * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: (-[DragAndDropSimulator initWithWebViewFrame:]): (-[DragAndDropSimulator initWithWebViewFrame:configuration:]): (-[DragAndDropSimulator webView]): Small iOS DragAndDropSimulator adjustments for new DragAndDropSimulator interfaces. * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: (-[DragAndDropTestWKWebView initWithFrame:configuration:simulator:]): Introduce a WKWebView subclass for testing drag and drop that overrides `-dragImage:at:offset:…`, and instead allows DragAndDropSimulator to take over the drag. (-[DragAndDropTestWKWebView dragImage:at:offset:event:pasteboard:source:slideBack:]): Override this entry point into drag and drop code, and instead call out to the DragAndDropSimulator to coordinate the drag. (-[DragAndDropTestWKWebView waitForPendingMouseEvents]): Helper method to wait for the web process to finish handling all in-flight mouse events. (defaultExternalDragImage): Set this image as the default drag image when simulating an incoming drag session from outside of the web view. (-[DragAndDropSimulator initWithWebViewFrame:]): (-[DragAndDropSimulator initWithWebViewFrame:configuration:]): (-[DragAndDropSimulator flipAboutXAxisInHostWindow:]): Helper method to flip a given point about the X axis of the window. (-[DragAndDropSimulator locationInViewForCurrentProgress]): Map a progress value (between 0 and 1) to a drag location. (-[DragAndDropSimulator initialProgressForMouseDrag]): Determines the initial progress value when initiation a drag in web content. This is the initial progress required to ensure that the first mouse drag event exceeds the drag distance hysteresis and causes any drag (if applicable) to begin. (-[DragAndDropSimulator runFrom:to:]): (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]): Helper to coordinate drag updates in both the cases where we're simulating a drag session entering from outside of the web view, and in the case where we've initiated a drag from the web view itself. (-[DragAndDropSimulator webView]): (-[DragAndDropSimulator setExternalDragPasteboard:]): (-[DragAndDropSimulator externalDragPasteboard]): Just like its iOS counterpart (setExternalItemProviders:), setting an external drag pasteboard on macOS puts the DragAndDropSimulator in a mode that simulates a drag coming in from outside the web view, using the given pasteboard. (-[DragAndDropSimulator setExternalDragImage:]): (-[DragAndDropSimulator externalDragImage]): May be optionally set when specifying an external drag pasteboard to specify the drag image used. If no external drag image is specified, falls back to the default image returned by `defaultExternalDragImage()`. (-[DragAndDropSimulator draggingInfo]): (-[DragAndDropSimulator willEndDraggingHandler]): (-[DragAndDropSimulator setWillEndDraggingHandler:]): Hook to allow tests to run logic right before performing the drop (if the current drag operation is not none) or ending the drag session without performing a drag operation. (-[DragAndDropSimulator initWithWebView:]): Deleted. (-[DragAndDropSimulator dealloc]): Deleted. (-[DragAndDropSimulator phase]): Deleted. * TestWebKitAPI/mac/TestDraggingInfo.h: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm. * TestWebKitAPI/mac/TestDraggingInfo.mm: Added. Mock object conforming to NSDraggingInfo that is passed to WKWebView when invoking -draggingUpdated:, -draggingEntered: and -draggingExited:. (-[TestDraggingInfo draggingPasteboard]): (-[TestDraggingInfo setDraggingPasteboard:]): (-[TestDraggingInfo draggingSource]): (-[TestDraggingInfo setDraggingSource:]): (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]): (-[TestDraggingInfo draggingDestinationWindow]): (-[TestDraggingInfo draggedImage]): (-[TestDraggingInfo setDraggedImage:]): (-[TestDraggingInfo slideDraggedImageTo:]): (-[TestDraggingInfo namesOfPromisedFilesDroppedAtDestination:]): (-[TestDraggingInfo resetSpringLoading]): Empty method stubs, to be implemented in the future as needed. 2018-08-13 Thomas Denney Added Thomas Denney to contributors.json. https://bugs.webkit.org/show_bug.cgi?id=188525 Reviewed by Myles C. Maxfield. * Scripts/webkitpy/common/config/contributors.json: 2018-08-13 Antti Koivisto Meaning of OptionSet::contains is unclear when used with OptionSet argument https://bugs.webkit.org/show_bug.cgi?id=188501 Reviewed by Anders Carlsson. * TestWebKitAPI/Tests/WTF/OptionSet.cpp: (TestWebKitAPI::TEST): 2018-08-13 Commit Queue Unreviewed, rolling out r234747. https://bugs.webkit.org/show_bug.cgi?id=188524 plugin processes crash on launch (Requested by smfr on #webkit). Reverted changeset: "We should cache the compiled sandbox profile in a data vault" https://bugs.webkit.org/show_bug.cgi?id=184991 https://trac.webkit.org/changeset/234747 2018-08-13 Wenson Hsieh [iOS] Dragging a non-editable text selection into a plain text input inserts HTML markup https://bugs.webkit.org/show_bug.cgi?id=188485 Reviewed by Tim Horton. Add a new API test to verify that dropping selected non-editable rich text into a textarea inserts text as expected, rather than markup. It's somewhat interesting to note that this particular use case isn't exercised by any existing tests; the closest test is DragAndDropTests.ContentEditableToTextarea, which drags a rich text selection from a contenteditable element to a text area. However, due to logic in `DragController::concludeEditDrag` that handles drag and drop across editable content differently than drag and drop from non-editable to editable content, the bug that is fixed here doesn't surface in that existing test. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/selected-text-and-textarea.html: Added. * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (TestWebKitAPI::TEST): 2018-08-13 Alex Christensen Use a 1-byte enum class for TextDirection https://bugs.webkit.org/show_bug.cgi?id=188350 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/StringWithDirection.cpp: (WebCore::operator<<): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm: (TEST_F): 2018-08-13 Zalan Bujtas [LFC][Floating] Add basic clearance support https://bugs.webkit.org/show_bug.cgi?id=188492 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-08-12 Zalan Bujtas [LFC] Float prev/next sibling should prevent top/bottom margin collapsing with parent. https://bugs.webkit.org/show_bug.cgi?id=188487 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-08-11 Aakash Jain [ews-build] Separate queues for Builders and Testers - iOS https://bugs.webkit.org/show_bug.cgi?id=188396 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/config.json: Splitted iOS queues into builders and testers. Also added ews121 and ews122 to match with current EWS configuration. * BuildSlaveSupport/ews-build/factories.py: (TestsFactory): Base classes for various Test factories. (TestsFactory.getProduct): Download and extract the archive. 2018-08-10 Daniel Bates webkit-patch setup-git-clone should set Git core editor to commit-log-editor https://bugs.webkit.org/show_bug.cgi?id=188473 Reviewed by Ryosuke Niwa. Have "webkit-patch setup-git-clone" set the Git core editor to "perl Tools/Scripts/commit-log-editor --regenerate-log" so that the Git commit message is generated from the ChangeLog for developers that manually generate their ChangeLog using prepare-ChangeLog. * Scripts/webkitpy/tool/commands/setupgitclone.py: (SetupGitClone.execute): 2018-08-10 Truitt Savell Unreviewed, rolling out r234749. Caused all perf tests to fail in Sierra Reverted changeset: "[webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash" https://bugs.webkit.org/show_bug.cgi?id=187973 https://trac.webkit.org/changeset/234749 2018-08-10 David Fenton Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio. https://bugs.webkit.org/show_bug.cgi?id=188470. Unreviewed test gardening, disabling the tests. * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: (TEST_F): 2018-08-10 Joseph Pecoraro Eliminate remaining instances of "ElCapitan" from LayoutTests / Tools https://bugs.webkit.org/show_bug.cgi?id=188458 Reviewed by Alex Christensen. * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser): * TestResultServer/static-dashboards/flakiness_dashboard.js: 2018-08-09 Fujii Hironori [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash https://bugs.webkit.org/show_bug.cgi?id=187973 Reviewed by Alex Christensen. In LayoutTests, test names have been canonicalized in Unix style since Bug 63597, for example 'fast/css/001.html'. But, Bug 179219, Bug 179572, Bug 180660 and Bug 181814 have changed to use os.path.seq instead of slash if Windows Python is used. Revert parts of those changes. Change relative_test_filename to return a slash sperated test name as well as chromium_win.py used to do. This change fixes all 41 test-webkitpy failures in WinCairo port. * Scripts/webkitpy/layout_tests/models/test_expectations.py: (TestExpectationParser._parse_line): Do not convert a test name by using normpath. * Scripts/webkitpy/port/base.py: (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep. (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR. (Port.abspath_for_test): Split test_name with TEST_PATH_SEPARATOR. * Scripts/webkitpy/port/driver.py: (Driver): Use '/' instead of os.sep. * Scripts/webkitpy/port/win.py: (WinCairoPort): Do not override TEST_PATH_SEPARATOR. 2018-08-09 Thomas Denney [WHLSL] Add individual test durations to output https://bugs.webkit.org/show_bug.cgi?id=188448 Reviewed by Myles C. Maxfield. * WebGPUShadingLanguageRI/Test.js: Add timing output. 2018-08-09 Ben Richards We should cache the compiled sandbox profile in a data vault https://bugs.webkit.org/show_bug.cgi?id=184991 Reviewed by Ryosuke Niwa. Added trace points for sandbox initialization * Tracing/SystemTracePoints.plist: 2018-08-09 Jer Noble Video playback is using more power https://bugs.webkit.org/show_bug.cgi?id=188452 Reviewed by Eric Carlson. * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm: (PreferredAudioBufferSize::createView): (PreferredAudioBufferSize::preferredAudioBufferSize const): (TEST_F): 2018-08-09 Alex Christensen REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework https://bugs.webkit.org/show_bug.cgi?id=188453 Reviewed by Chris Dumez * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: (TEST): (+[NullLookupContext sharedLookupContext]): (TestWebKitAPI::TEST): Deleted. 2018-08-09 Alex Christensen WKURLSchemeHandler crashes when sent errors with sync XHR https://bugs.webkit.org/show_bug.cgi?id=188358 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: (-[SyncErrorScheme webView:startURLSchemeTask:]): (-[SyncErrorScheme webView:stopURLSchemeTask:]): (-[SyncErrorScheme webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): 2018-08-09 Per Arne Vollan REGRESSION(r234652): fast/scrolling/rtl-scrollbars-animation-property.html is failing https://bugs.webkit.org/show_bug.cgi?id=188397 Reviewed by Tim Horton. After r234652, [NSScroller preferredScrollerStyle] is called in the UI process, and we need to set the same user defaults related to scrollbars in the UI process as we do in the WebProcess. * WebKitTestRunner/mac/main.mm: (setDefaultsToConsistentValuesForTesting): 2018-08-09 Wenson Hsieh [iOS WK2] Rename and refactor DataInteractionTests and DataInteractionSimulator https://bugs.webkit.org/show_bug.cgi?id=188439 Reviewed by Andy Estes and Megan Gardner. Refactor DataInteractionSimulator (currently used for drag and drop testing on iOS) so that it exists across macOS and iOS, and rename it to DragAndDropSimulator. Additionally, rename DataInteractionTests to DragAndDropTests. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm. (testIconImage): (testZIPArchive): (-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]): (-[TestWKWebView editorContainsImageElement]): (-[TestWKWebView editorValue]): (makeCGRectValue): (checkCGRectIsEqualToCGRectWithLogging): (checkSelectionRectsWithLogging): (checkRichTextTypePrecedesPlainTextType): (checkFirstTypeIsPresentAndSecondTypeIsMissing): (checkTypeIdentifierIsRegisteredAtIndex): (checkEstimatedSize): (checkSuggestedNameAndEstimatedSize): (checkStringArraysAreEqual): (checkDragCaretRectIsContainedInRect): (checkJSONWithLogging): (testIconImageData): (runTestWithTemporaryTextFile): (runTestWithTemporaryFolder): (TestWebKitAPI::TEST): (TestWebKitAPI::setUpTestWebViewForDataTransferItems): (TestWebKitAPI::testDragAndDropOntoTargetElements): (TestWebKitAPI::testIconImageData): * TestWebKitAPI/cocoa/DragAndDropSimulator.h: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.h. * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm. (-[WKWebView dropInteractionDelegate]): (-[WKWebView dragInteractionDelegate]): (-[WKWebView dropInteraction]): (-[WKWebView dragInteraction]): (-[MockDragDropSession initWithItems:location:window:allowMove:]): (-[MockDragDropSession allowsMoveOperation]): (-[MockDragDropSession isRestrictedToDraggingApplication]): (-[MockDragDropSession hasItemsConformingToTypeIdentifiers:]): (-[MockDragDropSession canLoadObjectsOfClass:]): (-[MockDragDropSession canLoadObjectsOfClasses:]): (-[MockDragDropSession items]): (-[MockDragDropSession setItems:]): (-[MockDragDropSession addItems:]): (-[MockDragDropSession locationInView:]): (-[MockDropSession initWithProviders:location:window:allowMove:]): (-[MockDropSession isLocal]): (-[MockDropSession progress]): (-[MockDropSession setProgressIndicatorStyle:]): (-[MockDropSession progressIndicatorStyle]): (-[MockDropSession operationMask]): (-[MockDropSession localDragSession]): (-[MockDropSession hasItemsConformingToTypeIdentifier:]): (-[MockDropSession canCreateItemsOfClass:]): (-[MockDropSession loadObjectsOfClass:completion:]): (-[MockDragSession initWithWindow:allowMove:]): (-[MockDragSession localOperationMask]): (-[MockDragSession externalOperationMask]): (-[MockDragSession session]): (-[MockDragSession localContext]): (-[MockDragSession setLocalContext:]): (dragAndDropEventNames): (-[DragAndDropSimulatorApplication _cancelAllTouches]): (-[DragAndDropSimulator initWithWebView:]): (-[DragAndDropSimulator dealloc]): (-[DragAndDropSimulator _resetSimulatedState]): (-[DragAndDropSimulator observedEventNames]): (-[DragAndDropSimulator simulateAllTouchesCanceled:]): (-[DragAndDropSimulator runFrom:to:]): (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]): (-[DragAndDropSimulator finalSelectionRects]): (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]): (-[DragAndDropSimulator _enqueuePendingAdditionalItemRequestLocations]): (-[DragAndDropSimulator _sendQueuedAdditionalItemRequest]): (-[DragAndDropSimulator _advanceProgress]): (-[DragAndDropSimulator _currentLocation]): (-[DragAndDropSimulator _scheduleAdvanceProgress]): (-[DragAndDropSimulator sourceItemProviders]): (-[DragAndDropSimulator externalItemProviders]): (-[DragAndDropSimulator setExternalItemProviders:]): (-[DragAndDropSimulator phase]): (-[DragAndDropSimulator liftPreviews]): (-[DragAndDropSimulator lastKnownDragCaretRect]): (-[DragAndDropSimulator waitForInputSession]): (-[DragAndDropSimulator insertedAttachments]): (-[DragAndDropSimulator removedAttachments]): (-[DragAndDropSimulator endDataTransfer]): (-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]): (-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]): (-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]): (-[DragAndDropSimulator _webView:showCustomSheetForElement:]): (-[DragAndDropSimulator _webView:willPerformDropWithSession:]): (-[DragAndDropSimulator _webView:didInsertAttachment:]): (-[DragAndDropSimulator _webView:didRemoveAttachment:]): (-[DragAndDropSimulator _webView:focusShouldStartInputSession:]): (-[DragAndDropSimulator _webView:didStartInputSession:]): * TestWebKitAPI/ios/UIKitSPI.h: * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: Added. (-[DragAndDropSimulator initWithWebView:]): (-[DragAndDropSimulator dealloc]): (-[DragAndDropSimulator runFrom:to:]): (-[DragAndDropSimulator insertedAttachments]): (-[DragAndDropSimulator removedAttachments]): 2018-08-09 Sihui Liu REGRESSION (r232083): WKWebView loses first-party cookies on iOS https://bugs.webkit.org/show_bug.cgi?id=188443 Reviewed by Chris Dumez. Skip WebKit.WKHTTPCookieStoreWithoutProcessPool on iOS. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: 2018-08-09 Ross Kirsling Unreviewed follow-up fix for r234720. * Scripts/webkitpy/bindings/main.py: (BindingsTests.close_and_remove): (BindingsTests.main): Return to the original approach, since this seems to be the simplest cross-platform solution. 2018-08-09 Ali Juma Import WPTs for IntersectionObserver https://bugs.webkit.org/show_bug.cgi?id=188416 Reviewed by Simon Fraser. Enable IntersectionObserver in DumpRenderTree. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (setWebPreferencesForTestOptions): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2018-08-08 Ross Kirsling run-bindings-tests is not Win32-compatible https://bugs.webkit.org/show_bug.cgi?id=188424 Reviewed by Fujii Hironori. * Scripts/webkitpy/bindings/main.py: (BindingsTests.main): Stop leaking file descriptors. (See https://www.logilab.org/blogentry/17873 for details, though the solution here is even simpler.) 2018-08-08 Alex Christensen Fix possible null dereference in WebBackForwardList::restoreFromState https://bugs.webkit.org/show_bug.cgi?id=188418 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp: (TestWebKitAPI::TEST): 2018-08-08 Ross Kirsling run-builtins-generator-tests does not correctly handle CRLFs from stderr https://bugs.webkit.org/show_bug.cgi?id=188392 Reviewed by Fujii Hironori. Background: file.write converts LF to os.linesep, so if the input string contains CRLF, we end up writing CRCRLF to the file. * Scripts/webkitpy/common/system/executive.py: (Executive.run_command): Normalize CRLF to LF in decoded stdout/stderr data, so that we don't return consumers a platform-specific string. 2018-08-08 Aditya Keerthi Unreviewed, add myself to committers list. * Scripts/webkitpy/common/config/contributors.json: 2018-08-08 Commit Queue Unreviewed, rolling out r234314, r234320, and r234321. https://bugs.webkit.org/show_bug.cgi?id=188414 Caused email sign in issue (Requested by ryanhaddad on #webkit). Reverted changesets: "Remove unused WKNavigationDelegatePrivate decidePolicyForNavigationAction SPI" https://bugs.webkit.org/show_bug.cgi?id=188077 https://trac.webkit.org/changeset/234314 "Fix API tests after r234314" https://bugs.webkit.org/show_bug.cgi?id=188077 https://trac.webkit.org/changeset/234320 "Fix API tests after r234314" https://bugs.webkit.org/show_bug.cgi?id=188077 https://trac.webkit.org/changeset/234321 2018-08-08 Wenson Hsieh [iOS] fast/events/ios/contenteditable-autocapitalize.html is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=188401 Reviewed by Ryosuke Niwa. When run individually, fast/events/ios/contenteditable-autocapitalize.html passes consistently; however, when run right after another layout test that finishes while the keyboard is shown, this test sometimes fails. This is because each of the three steps of this test ends when UIScriptController's `didHideKeyboardCallback` is invoked, and if the keyboard only begins to dismiss after the previous test completes, we have a race. When the keyboard finishes dismissing after the UI script is evaluated, it will trigger UI script completion early and skip over one of the steps in the layout test, resulting in a text diff failure. To fix this, add a mechanism in WebKitTestRunner to wait until the keyboard is dismissed (with a short timeout) as a part of resetting test controller state, before moving on to the next layout test. * WebKitTestRunner/cocoa/TestRunnerWKWebView.h: * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView didStartFormControlInteraction]): (-[TestRunnerWKWebView didEndFormControlInteraction]): Use these hooks to keep track of whether the previous test is presenting any form input UI. (-[TestRunnerWKWebView isInteractingWithFormControl]): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::handleKeyboardWillHideNotification): (WTR::handleKeyboardDidHideNotification): (WTR::TestController::platformInitialize): (WTR::TestController::platformDestroy): Register during initialization (and unregister during teardown) for keyboard hiding notifications, to keep track of when the keyboard dismissal animation ends. (WTR::TestController::platformResetStateToConsistentValues): Make a couple of tweaks here: (1) if form input UI is being shown, tell the web view to resign first responder, which causes the field to lose focus. (2) If necessary, wait for the current keyboard dismissal animation to finish. This includes any keyboard dismissal animations triggered as a result of step (1). 2018-08-05 Darin Adler [Cocoa] More tweaks and refactoring to prepare for ARC https://bugs.webkit.org/show_bug.cgi?id=188245 Reviewed by Dan Bernstein. * DumpRenderTree/TestNetscapePlugIn/PluginObject.h: Use const void* for a CFTypeRef instead of void*. * DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm: (createCoreAnimationLayer): Use CFBridgingRetain. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging casts. (AccessibilityUIElement::textMarkerRangeForElement): Ditto. (AccessibilityUIElement::selectedTextMarkerRange): Ditto. (AccessibilityUIElement::textMarkerRangeLength): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Ditto. (AccessibilityUIElement::indexForTextMarker): Ditto. (AccessibilityUIElement::textMarkerForIndex): Ditto. (AccessibilityUIElement::isTextMarkerValid): Ditto. (AccessibilityUIElement::previousTextMarker): Ditto. (AccessibilityUIElement::nextTextMarker): Ditto. (AccessibilityUIElement::stringForTextMarkerRange): Ditto. (createJSStringRef): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. (AccessibilityUIElement::textMarkerRangeForMarkers): Ditto. (AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto. (AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto. (AccessibilityUIElement::endTextMarkerForBounds): Ditto. (AccessibilityUIElement::startTextMarkerForBounds): Ditto. (AccessibilityUIElement::textMarkerForPoint): Ditto. (AccessibilityUIElement::accessibilityElementForTextMarker): Ditto. (AccessibilityUIElement::startTextMarker): Ditto. (AccessibilityUIElement::endTextMarker): Ditto. (AccessibilityUIElement::setSelectedVisibleTextRange): Ditto. (AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto. (AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto. (AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto. (AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto. (AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto. (AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto. (AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto. (AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto. (AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto. (AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): Use bridging cast. (dumpFramesAsText): Ditto. (dumpBackForwardListForAllWindows): Use a modern for loop instead of CFArray functions to iterate the array. (dump): Use bridging cast. (runTest): Ditto. * DumpRenderTree/mac/DumpRenderTreePasteboard.mm: (+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject. (toUTI): Return a RetainPtr. (-[LocalPasteboard types]): Use the above and bridging casts. (-[LocalPasteboard availableTypeFromArray:]): Ditto. (-[LocalPasteboard setData:forType:]): Ditto. (-[LocalPasteboard dataForType:]): Ditto. (-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization instead of CFPropertyList. (-[LocalPasteboard setString:forType:]): Use NSString method instead of CFStringCreateExternalRepresentation. * DumpRenderTree/mac/MockGeolocationProvider.h: Put CFTypeRef in a HashSet instead of an Objective-C object pointer type. * DumpRenderTree/mac/MockGeolocationProvider.mm: (-[MockGeolocationProvider registerWebView:]): Update for above. (-[MockGeolocationProvider unregisterWebView:]): Ditto. (-[MockGeolocationProvider timerFired]): Ditto. * DumpRenderTree/mac/MockWebNotificationProvider.h: Use CFTypeRef in HashMap and HashSet instead of an Objective-C object pointer type. * DumpRenderTree/mac/MockWebNotificationProvider.mm: (-[MockWebNotificationProvider registerWebView:]): Update for above. (-[MockWebNotificationProvider unregisterWebView:]): Ditto. (-[MockWebNotificationProvider showNotification:fromWebView:]): Ditto. (-[MockWebNotificationProvider cancelNotification:]): Ditto. (-[MockWebNotificationProvider simulateWebNotificationClick:]): Ditto. * DumpRenderTree/mac/ObjCPlugin.m: (-[JSObjC retainObject:]): Use CFRetain instead of -[NSObject retain]. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::addDisallowedURL): Use bridging cast. (TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (TestRunner::clearApplicationCacheForOrigin): Ditto. (originsArrayToJS): Ditto. (TestRunner::copyDecodedHostName): Ditto. (TestRunner::copyEncodedHostName): Ditto. (TestRunner::queueLoad): Ditto. (TestRunner::setDomainRelaxationForbiddenForURLScheme): Ditto. (TestRunner::setMockGeolocationPositionUnavailableError): Ditto. (TestRunner::setUserStyleSheetLocation): Ditto. (TestRunner::setValueForUser): Ditto. (TestRunner::overridePreference): Ditto. (TestRunner::execCommand): Ditto. (TestRunner::findString): Ditto. (TestRunner::isCommandEnabled): Ditto. (TestRunner::addOriginAccessWhitelistEntry): Ditto. (TestRunner::removeOriginAccessWhitelistEntry): Ditto. (TestRunner::addUserScript): Ditto. (TestRunner::addUserStyleSheet): Ditto. (TestRunner::evaluateInWebInspector): Ditto. (TestRunner::evaluateScriptInIsolatedWorld): Ditto. (TestRunner::authenticateSession): Ditto. (TestRunner::grantWebNotificationPermission): Ditto. (TestRunner::denyWebNotificationPermission): Ditto. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Ditto. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging cast. (WTR::AccessibilityUIElement::textMarkerRangeForElement): Ditto. (WTR::AccessibilityUIElement::previousTextMarker): Ditto. (WTR::AccessibilityUIElement::nextTextMarker): Ditto. (WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto. (WTR::AccessibilityUIElement::selectedTextMarkerRange): Ditto. (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto. (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto. (WTR::AccessibilityUIElement::endTextMarkerForBounds): Ditto. (WTR::AccessibilityUIElement::startTextMarkerForBounds): Ditto. (WTR::AccessibilityUIElement::textMarkerForPoint): Ditto. (WTR::AccessibilityUIElement::textMarkerForIndex): Ditto. (WTR::AccessibilityUIElement::startTextMarker): Ditto. (WTR::AccessibilityUIElement::endTextMarker): 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/PlatformMac.cmake: Added WebKitTestRunnerWindow.h and .mm files. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: Add include of WebKitTestRunnerWindow.h so we can use the type and know it inherits from NSWindow. * WebKitTestRunner/mac/PlatformWebViewMac.mm: Add include of WebKitTestRunnerWindow.h so we can use the type and know it inherits from NSWindow. Moved WebKitTestRunnerWindow class into a separate file. (WTR::PlatformWebView::keyWindow): Call +[WebKitTestRunnerWindow _WTR_keyWindow] instead of have a second copy of the implementation. * WebKitTestRunner/mac/WebKitTestRunnerEvent.mm: Add include of WebKitTestRunnerWindow.h so we can use the type and know it inherits from NSWindow. Also removed "using namespace". (+[WebKitTestRunnerEvent mouseLocation]): Updated for above. * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: (+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject. (-[LocalPasteboard availableTypeFromArray:]): Use modern for loop. (-[LocalPasteboard setData:forType:]): Reordered method to be a tiny bit more efficient. (-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization instead of CFPropertyList. (-[LocalPasteboard setString:forType:]): Use NSString method instead of CFStringCreateExternalRepresentation. * WebKitTestRunner/mac/WebKitTestRunnerWindow.h: Moved declaration of WebKitTestRunnerWindow here so it can be included by files that need to know what the type is and that it inherits from NSWindow. * WebKitTestRunner/mac/WebKitTestRunnerWindow.mm: Added. Moved implementation here. (+[WebKitTestRunnerWindow _WTR_keyWindow]): Use modern for loop instead of the old, messier implementation. 2018-08-07 Alex Christensen Add a test for using SafeBrowsing https://bugs.webkit.org/show_bug.cgi?id=188290 Reviewed by Chris Dumez. Swizzle out SSBLookupContext to write tests for how WebKit responds when it responds in different ways. We don't do anything with its results in WebKit yet, but when we do I'll add the expected behavior to this test. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: Added. (-[SafeBrowsingDelegate webView:didFinishNavigation:]): (TestWebKitAPI::TEST): 2018-08-07 Lucas Forschler If there's a Radar in the ChangeLog, webkit-patch upload/create-bug should put the radar in the bug and set InRadar https://bugs.webkit.org/show_bug.cgi?id=188235 Reviewed by Daniel Bates, Kocsen Chung, and Aakash Jain. * Scripts/webkitpy/common/checkout/changelog.py: (ChangeLogEntry): Teach the ChangeLog tools how to parse a radar_id * Scripts/webkitpy/common/checkout/changelog_unittest.py: Test out the new _parse_radar_id functionality * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: (Bugzilla.add_keyword_to_bug): Add logic to add keywords using the changeform * Scripts/webkitpy/tool/commands/upload.py: (Upload): Teach the upload step how to add radar information when creating a new bug. * Scripts/webkitpy/tool/steps/__init__.py: * Scripts/webkitpy/tool/steps/addradar.py: Added. (AddRadar): (AddRadar.run): Contains the logic to add the radar information to bugzilla. * Scripts/webkitpy/tool/steps/createbug.py: (CreateBug.run): set a "created_new_bug" state when creating a new bugzilla bug. 2018-08-07 Wenson Hsieh Post-review feedback after r234614. https://bugs.webkit.org/show_bug.cgi?id=188322 Reviewed by Sam Weinig. Use std::round instead of roundl — there's no reason to go from double to long double precision when rounding. * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (rounded): 2018-08-07 Don Olmstead [MiniBrowser][Win] Allow selection of recent user agents https://bugs.webkit.org/show_bug.cgi?id=188371 Reviewed by Fujii Hironori. Updates the user agent spoofing strings to the latest released versions and adds Microsoft Edge's user agent. Moves the menu item selection to the common base class, BrowserWindow to support user agent spoofing in a WebKitLegacyBrowserWindow and WebKitBrowserWindow. * MiniBrowser/win/BrowserWindow.cpp: Added. (BrowserWindow::setUserAgent): * MiniBrowser/win/BrowserWindow.h: * MiniBrowser/win/CMakeLists.txt: * MiniBrowser/win/MainWindow.cpp: (MainWindow::toggleMenuItem): * MiniBrowser/win/MiniBrowserLib.rc: * MiniBrowser/win/MiniBrowserLibResource.h: * MiniBrowser/win/WebKitBrowserWindow.cpp: * MiniBrowser/win/WebKitBrowserWindow.h: * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp: (WebKitLegacyBrowserWindow::setUserAgent): * MiniBrowser/win/WebKitLegacyBrowserWindow.h: 2018-08-07 Yusuke Suzuki Unreviewed, add a new address to my configuration * Scripts/webkitpy/common/config/contributors.json: 2018-08-06 David Quesada webkitdirs.pm should default to iPhone SE for 64-bit testing https://bugs.webkit.org/show_bug.cgi?id=188361 Reviewed by Daniel Bates. Use iPhone SE as the default iOS Simulator device type. This corresponds to the change to webkitpy in r234467. * Scripts/webkitdirs.pm: (findOrCreateSimulatorForIOSDevice): * Scripts/webkitpy/layout_tests/run_webkit_tests.py: (parse_args): Update the help text for --device-type to reflect the new default device. 2018-08-06 Wenson Hsieh [iOS] Caret disappears after resigning and becoming first responder if active focus state is retained https://bugs.webkit.org/show_bug.cgi?id=188322 Reviewed by Tim Horton. Fixes an API test added in r234600, which had incorrect test expectations — namely, the width of the caret rect was not in content view coordinates, unlike the x, y, and height. * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (rounded): (-[TestWKWebView waitForCaretViewFrameToBecome:]): (-[TestWKWebView waitForSelectionViewRectsToBecome:]): (TestWebKitAPI::TEST): 2018-08-06 Ryan Haddad Unreviewed, rolling out r234569. Breaks internal builds. Reverted changeset: "We should cache the compiled sandbox profile in a data vault" https://bugs.webkit.org/show_bug.cgi?id=184991 https://trac.webkit.org/changeset/234569 2018-08-06 Fujii Hironori [Win][DLLLauncher] Remove --highDPI switch https://bugs.webkit.org/show_bug.cgi?id=188255 Reviewed by Yusuke Suzuki. Bug 149417 has added `--highDPI` switch to make MiniBrowser DPI aware. But, Bug 158733 has made MiniBrowser always DPI aware. It became useless since the change. Remove the switch. This change fixes the issue all dump render tree tests are failing in WinCairo port if high DPI display is connected. * MiniBrowser/win/Common.cpp: (parseCommandLine): Removed `--highDPI` switch. * win/DLLLauncher/DLLLauncherMain.cpp: (wWinMain): Do not call SetProcessDPIAware. (shouldUseHighDPI): Deleted. 2018-08-06 Wenson Hsieh [iOS] Tests that try to interact with the QuickType bar time out on iOS 11+ https://bugs.webkit.org/show_bug.cgi?id=188335 and Reviewed by Tim Horton. Remove a UIScriptController helper method that attempted to wait for QuickType buttons to appear, and then send touch events to the buttons. These were only used for the two tests which this patch refactors. See the LayoutTests ChangeLog for more detail. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted. * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted. (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted. * TestRunnerShared/UIScriptContext/UIScriptController.h: * TestRunnerShared/spi/UIKitTestSPI.h: Remove an internal class declaration that is now unnecessary. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted. (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted. 2018-08-06 Wenson Hsieh [iOS] Caret disappears after resigning and becoming first responder if active focus state is retained https://bugs.webkit.org/show_bug.cgi?id=188322 Reviewed by Tim Horton. Adds plumbing in UIScriptController to grab the start and end selection handle rects for use in the new layout test. Also adds new API tests to verify that when a web view resigns first responder, both caret and range selection views are hidden, and when first responder status is restored, both caret and range selection views are made visible again. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::selectionStartGrabberViewRect const): (WTR::UIScriptController::selectionEndGrabberViewRect const): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::selectionStartGrabberViewRect const): (WTR::UIScriptController::selectionEndGrabberViewRect const): * TestRunnerShared/UIScriptContext/UIScriptController.h: * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (-[TestWKWebView waitForCaretViewFrameToBecome:]): (-[TestWKWebView waitForSelectionViewRectsToBecome:]): (webViewWithAutofocusedInput): Pull out some common logic for creating a web view that allows programmatic focus to present the keyboard, and immediately loading a web page with an autofocusing text field. (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView caretViewRectInContentCoordinates]): (-[TestWKWebView selectionViewRectsInContentCoordinates]): * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::selectionStartGrabberViewRect const): (WTR::UIScriptController::selectionEndGrabberViewRect const): 2018-08-06 Wenson Hsieh [iOS] Layout tests that send HID events cause WebKitTestRunner to crash on recent SDKs https://bugs.webkit.org/show_bug.cgi?id=188334 Reviewed by Tim Horton. To mark the end of previously dispatched IOHID events, HIDEventGenerator currently sends a vendor-defined event and stores the completion callback ID for the previously dispatched events as vendor-defined data. When this vendor-defined marker event is handled by the application, we then read the callback ID back from the event, map it to a completion block, and invoke the completion block to signal that the previous HID event has been processed. This callback ID is an unsigned, so we tell IOKit that we need `sizeof(unsigned)` (4 bytes) to store it. On shipping software, IOKit clamps this to a minimum of 8 bytes, i.e. `sizeof(CFIndex)`. When we later call IOHIDEventGetIntegerValue to read the value of our vendor-defined data as a CFIndex, we get our expected callback ID because the buffer was clamped to 8 bytes. However, on recent iOS SDKs that contain the fix for , IOKit no longer clamps the size of the vendor-defined data buffer to 8 bytes. This means that when we try to use IOHIDEventGetIntegerValue to read our callback ID back, we end up getting a CFIndex where the lower 4 bytes are the callback ID we wrote, and the upper 4 bytes are garbage. In the case where any of these upper 4 bytes are non-zero, we fail to map the callback ID to a completion handler, and so we never finish dispatching the HID event, causing an exception to be thrown. To fix this, we adjust callback ID to be a CFIndex, which matches IOHIDEventGetIntegerValue's return type. * WebKitTestRunner/ios/HIDEventGenerator.mm: (+[HIDEventGenerator nextEventCallbackID]): (-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]): Also refactor a bit of `-_sendMarkerHIDEventWithCompletionBlock:` by using auto and move semantics. 2018-08-03 Ben Richards We should cache the compiled sandbox profile in a data vault https://bugs.webkit.org/show_bug.cgi?id=184991 Reviewed by Ryosuke Niwa. Added trace points for sandbox initialization * Tracing/SystemTracePoints.plist: 2018-08-03 David Fenton Unreviewed, rolling out r234517. Caused API test failures on iOS Reverted changeset: "[Cocoa] setCookie API fails to set session cookies for defaultDataStore if processPool created but not used" https://bugs.webkit.org/show_bug.cgi?id=188209 https://trac.webkit.org/changeset/234517 2018-08-03 Ben Richards Add configuration for automatic process pre-warming https://bugs.webkit.org/show_bug.cgi?id=187108 Reviewed by Ryosuke Niwa. Added new test case for setting maximum prewarmed process count and updated test case for process swap on navigation to set the maximum prewarmed process count to be 1 where relevant. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm: (TEST): 2018-08-03 Aakash Jain [ews-build] Add build step to Check Patch Relevance https://bugs.webkit.org/show_bug.cgi?id=188295 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (CheckPatchRelevance): Added step to check patch relevance. (CheckPatchRelevance._patch_is_relevant): Checks if the patch is relevant. (CheckPatchRelevance._get_patch): Retrieves the patch from buildbot. (CheckPatchRelevance._addToLog): Add the log message. (CheckPatchRelevance.start): * BuildSlaveSupport/ews-build/factories.py: Added CheckPatchRelevance step appropriately. 2018-08-03 Jer Noble Unreviewed gardening; r234534 changed the policy for what audio session is set when a media element is paused. Updating the test to reflect the new policy. * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm: (TestWebKitAPI::TEST): 2018-08-03 Zalan Bujtas [LFC][Floating] Now that the document renderer belongs to "complicated cases", adjust viewport stretching. https://bugs.webkit.org/show_bug.cgi?id=188306 Reviewed by Antti Koivisto. * LayoutReloaded/misc/LFC-passing-tests.txt: 2018-08-03 Carlos Garcia Campos [WPE] Use the new key mapper API from WPEBackend https://bugs.webkit.org/show_bug.cgi?id=188216 Reviewed by Žan Doberšek. * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::EventSenderProxy::keyDown): Use wpe_input_xkb_context_get_entries_for_key_code() to get the hardware key code. * wpe/backends/WindowViewBackend.cpp: (WPEToolingBackends::WindowViewBackend::WindowViewBackend): (WPEToolingBackends::WindowViewBackend::handleKeyEvent): (WPEToolingBackends::WindowViewBackend::modifiers const): * wpe/backends/WindowViewBackend.h: 2018-08-03 Carlos Garcia Campos [WPE] Implement MouseEvent.buttons https://bugs.webkit.org/show_bug.cgi?id=187998 Reviewed by Žan Doberšek. Pass modifiers to mouse events. * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::senderButtonToWPEButton): (WTR::modifierForButton): (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): (WTR::EventSenderProxy::mouseScrollBy): (WTR::wkEventModifiersToWPE): (WTR::wpeKeySymForKeyRef): (WTR::EventSenderProxy::keyDown): (WTR::EventSenderProxy::prepareAndDispatchTouchEvent): * wpe/backends/WindowViewBackend.cpp: (WPEToolingBackends::WindowViewBackend::handleKeyEvent): (WPEToolingBackends::WindowViewBackend::modifiers const): * wpe/backends/WindowViewBackend.h: 2018-08-03 Carlos Garcia Campos [WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper https://bugs.webkit.org/show_bug.cgi?id=188093 Reviewed by Žan Doberšek. * MiniBrowser/wpe/main.cpp: Use WPE key symbols. * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::wpeKeySymForKeyRef): Use WPE key symbols and wpe_unicode_to_key_code(). (WTR::EventSenderProxy::keyDown): Do not set unicode char to the event since it was removed. * flatpak/org.webkit.WPE.yaml: Bump WPEBackend and WPEBackend-fdo versions. * wpe/backends/WindowViewBackend.cpp: (WPEToolingBackends::WindowViewBackend::handleKeyEvent): Do not set unicode char to the event since it was removed. * wpe/jhbuild.modules: Bump WPEBackend and WPEBackend-fdo versions. 2018-08-02 Nan Wang AX: [iOS] add support to return the attributed string under the element https://bugs.webkit.org/show_bug.cgi?id=188276 Reviewed by Chris Fleizach. * DumpRenderTree/AccessibilityUIElement.cpp: (attributedStringForElementCallback): (AccessibilityUIElement::getJSClass): * DumpRenderTree/AccessibilityUIElement.h: * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (AccessibilityUIElement::attributedStringForElement): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::attributedStringForElement): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::attributedStringForElement): 2018-08-02 Ryan Haddad Skip API test DataInteractionTests.CustomActionSheetPopover on current SDKs. https://bugs.webkit.org/show_bug.cgi?id=175204 Unreviewed test gardening. * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: 2018-08-02 Sihui Liu [Cocoa] setCookie API fails to set session cookies for defaultDataStore if processPool created but not used https://bugs.webkit.org/show_bug.cgi?id=188209 Reviewed by Geoffrey Garen. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (TEST): 2018-08-02 Dan Bernstein Fixed WebKit.AttrStyle timing out on build.webkit.org. * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.html: Changed from a URL that requires network access to one that doesn’t. * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm: (TEST): Updated expected value. 2018-08-02 Wenson Hsieh [iOS] Keyboard becomes unresponsive after pressing delete while pressing down on a character key with accents https://bugs.webkit.org/show_bug.cgi?id=188251 Reviewed by Tim Horton. Adds a new API test to verify that clients (in this case, UIKit) is allowed to invoke -handleKeyWebEvent:withCompletionHandler: within the completion block of a prior invocation. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: Added. (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/ios/TestInputDelegate.h: Added. Pull some logic used to force an input session to start out from an existing API test file (WKWebViewAutofillTests) and into a separate helper class that is used by both the existing API tests and the new keyboard input test. * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm: (-[AutofillTestView initWithFrame:]): (TestWebKitAPI::TEST): (-[TestInputDelegate init]): Deleted. (-[TestInputDelegate _webView:focusShouldStartInputSession:]): Deleted. * TestWebKitAPI/ios/UIKitSPI.h: Add some UIKit SPI utilized by the new API test. 2018-08-01 Dan Bernstein Optionally expose Attr::style to JavaScript https://bugs.webkit.org/show_bug.cgi?id=188226 Reviewed by Darin Adler. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm: Added. (TEST): 2018-08-02 David Fenton Unreviewed, rolling out r234489. Caused 50+ crashes and 60+ API failures on iOS Reverted changeset: "[WTF] Rename String::format to String::deprecatedFormat" https://bugs.webkit.org/show_bug.cgi?id=188191 https://trac.webkit.org/changeset/234489 2018-08-01 Ross Kirsling TestWTF.WTF_NeverDestroyed.Construct output differs for MSVC in Debug mode https://bugs.webkit.org/show_bug.cgi?id=188244 Reviewed by Daniel Bates. Follow-up to r234179. MSVC chooses not to inline the lambda in Debug mode. * TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp: 2018-08-01 Tomas Popela [WTF] Rename String::format to String::deprecatedFormat https://bugs.webkit.org/show_bug.cgi?id=188191 Reviewed by Darin Adler. It should be replaced with string concatenation. * DumpRenderTree/win/DumpRenderTree.cpp: (applicationId): (main): * TestWebKitAPI/win/PlatformUtilitiesWin.cpp: (TestWebKitAPI::Util::createURLForResource): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::cacheTestRunnerCallback): * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: (WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks): * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::attributedStringForRange): (WTR::AccessibilityUIElement::url): (WTR::stringAtOffset): * WebKitTestRunner/TestController.cpp: (WTR::TestController::didReceiveAuthenticationChallenge): (WTR::TestController::downloadDidFail): (WTR::originUserVisibleName): (WTR::userMediaOriginHash): (WTR::TestController::didNavigateWithNavigationData): (WTR::TestController::didPerformClientRedirect): (WTR::TestController::didPerformServerRedirect): (WTR::TestController::didUpdateHistoryTitle): 2018-08-01 Nan Wang AX: AOM: Add ARIA IDL Attribute Reflection https://bugs.webkit.org/show_bug.cgi?id=184676 Reviewed by Chris Fleizach. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2018-08-01 Jonathan Bedard Use iPhone SE as the default simulated device https://bugs.webkit.org/show_bug.cgi?id=188227 Reviewed by Aakash Jain. * Scripts/webkitpy/port/ios_simulator.py: (IOSSimulatorPort): 2018-08-01 Commit Queue Unreviewed, rolling out r234443 and r234445. https://bugs.webkit.org/show_bug.cgi?id=188224 Revision caused 3 api failures across all platforms. (Requested by Truitt on #webkit). Reverted changesets: "Add configuration for automatic process pre-warming" https://bugs.webkit.org/show_bug.cgi?id=187108 https://trac.webkit.org/changeset/234443 "Add configuration for automatic process pre-warming" https://bugs.webkit.org/show_bug.cgi?id=187108 https://trac.webkit.org/changeset/234445 2018-07-31 Ben Richards Add configuration for automatic process pre-warming https://bugs.webkit.org/show_bug.cgi?id=187108 Reviewed by Ryosuke Niwa. Added new test case for setting maximum prewarmed process count and updated test case for process swap on navigation to set the maximum prewarmed process count to be 1 where relevant. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm: Added. (TEST): 2018-07-31 John Wilander Resource Load Statistics: Remove partitioned cookies for reduced complexity, lower memory footprint, and ability to support more platforms https://bugs.webkit.org/show_bug.cgi?id=188109 Reviewed by Brent Fulgham, Chris Dumez, and Alex Christensen. This patch removes cookie partitioning which reduces the model to just blocked cookies (in third-party contexts) and first-party cookie access. Several of the changes are renaming to reflect that there are no more cookie partitions. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Removed or renamed functions to reflect that there are no more partitioned cookies. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::statisticsUpdateCookieBlocking): (WTR::TestRunner::statisticsCallDidSetBlockCookiesForHostCallback): (WTR::TestRunner::setCookieStoragePartitioningEnabled): Deleted. (WTR::TestRunner::setStatisticsHasHadNonRecentUserInteraction): Deleted. (WTR::TestRunner::setStatisticsTimeToLiveCookiePartitionFree): Deleted. (WTR::TestRunner::statisticsUpdateCookiePartitioning): Deleted. (WTR::TestRunner::statisticsSetShouldPartitionCookiesForHost): Deleted. (WTR::TestRunner::statisticsCallDidSetPartitionOrBlockCookiesForHostCallback): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::statisticsUpdateCookieBlocking): (WTR::TestController::setStatisticsHasHadNonRecentUserInteraction): Deleted. (WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree): Deleted. (WTR::TestController::statisticsUpdateCookiePartitioning): Deleted. (WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Deleted. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestInvocation::didSetBlockCookiesForHost): (WTR::TestInvocation::didSetHasHadUserInteraction): (WTR::TestInvocation::didSetPartitionOrBlockCookiesForHost): Deleted. (WTR::TestInvocation::didSetHasHadNonRecentUserInteraction): Deleted. * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::initializeWebViewConfiguration): 2018-07-31 Alex Christensen Build fix. Remove unused variable. * TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp: (TestWebKitAPI::TEST): transform was never used. It was introduced in r205871 Apparently I'm the first one to build in a certain configuration that found it. 2018-07-31 Fujii Hironori server_process.py should print returncode in debug log if the process crashed https://bugs.webkit.org/show_bug.cgi?id=188160 Reviewed by Konstantin Tokarev. * Scripts/webkitpy/port/server_process.py: (ServerProcess.has_crashed): Put self._proc.returncode into the debug log message. 2018-07-31 Tomas Popela [WTF] String::formatWithArguments() is unused https://bugs.webkit.org/show_bug.cgi?id=187955 Reviewed by Darin Adler. Remove tests for WTF::String::formatWithArguments() as it's unused and we are removing it. * TestWebKitAPI/Tests/WTF/WTFString.cpp: 2018-07-30 Aakash Jain [ews-build] Fix typo in builder name for Bindings-tests-EWS. * BuildSlaveSupport/ews-build/config.json: Changed 'tests' to 'Tests' to make it consistent with other builders. 2018-07-30 Aakash Jain [ews-build] Add support for API tests in OpenSource EWS https://bugs.webkit.org/show_bug.cgi?id=188156 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/config.json: * BuildSlaveSupport/ews-build/factories.py: (BuildFactory.__init__): Added triggers parameter. (BuildFactory): If trigger is defined, create and upload archive and trigger appropriate queues. (BuildFactory.propertiesToPassToTriggers): Pass all the required properties to triggered queue. (APITestsFactory): Factory for running API tests. * BuildSlaveSupport/ews-build/steps.py: (ConfigureBuild.start): Set the property only if property is defined in config.json. Also set the source of the property. 2018-07-30 Aakash Jain [ews-build] loadConfig should ensure that the triggers are valid https://bugs.webkit.org/show_bug.cgi?id=188134 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/loadConfig.py: (checkValidBuilder): Added a check to ensure that the builder doesn't refernce non-existing scheduler. (checkValidSchedulers): Ensures that the scheduler is not un-used. * BuildSlaveSupport/ews-build/loadConfig_unittest.py: Updated unit-tests. 2018-07-27 Michael Catanzaro Unreviewed, fix typo in test expectations and mark another test as timing out * TestWebKitAPI/glib/TestExpectations.json: 2018-07-27 Michael Catanzaro More unreviewed GTK test gardening * TestWebKitAPI/glib/TestExpectations.json: 2018-07-27 Simon Fraser Be more conservative with compositing layer creation when memory is low https://bugs.webkit.org/show_bug.cgi?id=187866 rdar://problem/42366345 Reviewed by Zalan Bujtas. When process physical footprint is above a fraction of the jetsam limit, be more conservative in making compositing layers. We avoid compositing for these situations: 1. Layers with 3D transforms which are affine (like translateZ(0)). 2. Layers with will-change 3. Layers for canvases (other than WebGL/WebGPU) We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS, falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%. Compositing chooses to be more conservative in either "conservative" or "strict" memory modes. Plumb through a "compositingPolicyOverride" both so that on-device testing isn't flakily falling into a different mode, and so that we can impose the conservative mode for testing. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::prepare): 2018-07-27 Michael Catanzaro Unreviewed GTK test gardening * TestWebKitAPI/glib/TestExpectations.json: 2018-07-27 Alex Christensen Fix API tests after r234314 https://bugs.webkit.org/show_bug.cgi?id=188077 Make API tests use new delegate method. * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): (-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted. 2018-07-27 Alex Christensen Fix API tests after r234314 https://bugs.webkit.org/show_bug.cgi?id=188077 Make API tests use new delegate method. * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (-[ContentBlockingWebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): (-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): (-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): (-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]): (-[ContentBlockingWebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted. (-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted. (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted. (-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted. (-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted. 2018-07-26 Andy VanWagoner [INTL] Remove INTL sub-feature compile flags https://bugs.webkit.org/show_bug.cgi?id=188081 Reviewed by Michael Catanzaro. * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-07-26 Chris Dumez Loading a file URL and then issuing a reload right away causes the load to fail due to sandboxing https://bugs.webkit.org/show_bug.cgi?id=188078 Reviewed by Geoff Garen. Add API test coverage. It exercises the right code path but unfortunately is not yet a regression test because TestWebKitAPI does not appear to be sandboxed (rdar://problem/42638129). * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm: Added. (-[LoadFileThenReloadDelegate webView:didFinishNavigation:]): (-[LoadFileThenReloadDelegate webView:didFailProvisionalNavigation:withError:]): (-[LoadFileThenReloadDelegate webView:didFailNavigation:withError:]): (TEST): 2018-07-26 Aaron Chu Add Aaron Chu as a committer to contributors.json https://bugs.webkit.org/show_bug.cgi?id=188066 Unreviwed. Added myself as committer. * Scripts/webkitpy/common/config/contributors.json: 2018-07-26 Aakash Jain [ews-build] Add build step to run API Tests https://bugs.webkit.org/show_bug.cgi?id=188079 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (TestWithFailureCount): Common class for various tests with failure count. (TestWithFailureCount.start): Configure Buildbot's logobserver. (TestWithFailureCount.commandComplete): Updates the failure count. (TestWithFailureCount.evaluateCommand): Set the step status appropriately. (TestWithFailureCount.getResultSummary): Set the step summary appropriately. (RunAPITests): Build step to run API tests. (RunAPITests.countFailures): Count the failures by parsing the output. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 2018-07-26 Ross Kirsling String(View) should have a splitAllowingEmptyEntries function instead of a flag parameter https://bugs.webkit.org/show_bug.cgi?id=187963 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WTF/WTFString.cpp: Add tests for String::split and String::splitAllowingEmptyEntries. * TestWebKitAPI/Tests/WTF/StringView.cpp: * WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader): Update split/splitAllowingEmptyEntries usage. 2018-07-26 Commit Queue Unreviewed, rolling out r234181 and r234189. https://bugs.webkit.org/show_bug.cgi?id=188075 These are not needed right now (Requested by thorton on #webkit). Reverted changesets: "Enable Web Content Filtering on watchOS" https://bugs.webkit.org/show_bug.cgi?id=187979 https://trac.webkit.org/changeset/234181 "HAVE(PARENTAL_CONTROLS) should be true on watchOS" https://bugs.webkit.org/show_bug.cgi?id=187985 https://trac.webkit.org/changeset/234189 2018-07-04 Darin Adler Improve WebGPU implementation, including using Metal Objective-C protocols more simply and correctly https://bugs.webkit.org/show_bug.cgi?id=187333 Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WebCore/mac/GPUBuffer.mm: Updated. * TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm: Updated. * TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm: Updated. * TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm: Updated. * TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm: Updated. 2018-07-25 Aakash Jain [ews-build] Add build steps DownloadBuiltProduct and ExtractBuiltProduct https://bugs.webkit.org/show_bug.cgi?id=188031 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (DownloadBuiltProduct): Added build step DownloadBuiltProduct. (ExtractBuiltProduct): Added build step ExtractBuiltProduct. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 2018-07-25 Aakash Jain [ews-build] Add build step UploadBuiltProduct https://bugs.webkit.org/show_bug.cgi?id=188016 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (UploadBuiltProduct): Added build step UploadBuiltProduct. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test. 2018-07-25 Aakash Jain [ews-build] Add build step ArchiveBuiltProduct https://bugs.webkit.org/show_bug.cgi?id=188014 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (ArchiveBuiltProduct): Added build step ArchiveBuiltProduct. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 2018-07-25 Chris Dumez navigator.userAgent may return outdated value after webView.customUserAgent is set https://bugs.webkit.org/show_bug.cgi?id=188009 Reviewed by Alex Christensen. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm: Added. (TEST): 2018-07-25 Charlie Turner [Flatpak] Pass more environment variables to sandbox https://bugs.webkit.org/show_bug.cgi?id=188002 Reviewed by Michael Catanzaro. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2018-07-25 Zan Dobersek [WPE] Switch ViewBackend to using wpe_view_backend_exportable_fdo_egl APIs https://bugs.webkit.org/show_bug.cgi?id=187997 Reviewed by Carlos Garcia Campos. Instead of the raw wpe_view_backend_exportable_fdo API, switch to using the EGL-oriented API that simply serves EGLImageKHR objects instead of raw buffer resources. This allows us not to wrangle with creating and managing lifetime of the same EGLImageKHR by ourselves. ViewBackend now defines a wpe_view_backend_exportable_fdo_egl_client struct and uses wpe_view_backend_exportable_fdo_egl_create() to create the exportable object. This means that for each frame we're served an EGLImageKHR object that is passed on to the displayBuffer() implementation. HeadlessViewBackend now just manages the pending and committed image objects. Width and height values used during pixel data retrieval are gathered from the ViewBackend's size that was specified when constructed. WindowViewBackend similarly only manages the committed image object, not having to create an equivalent EGLImageKHR object from the raw buffer resource anymore. Unused EGL entrypoints in both HeadlessViewBackend and WindowViewBackend classes are removed, and destructors for both classes are made virtual. The WPEBackend-fdo version is bumped in order to have the EGL-specific export API available. * flatpak/org.webkit.WPE.yaml: * wpe/backends/HeadlessViewBackend.cpp: (WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend): (WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend): (WPEToolingBackends::HeadlessViewBackend::createSnapshot): (WPEToolingBackends::HeadlessViewBackend::performUpdate): (WPEToolingBackends::HeadlessViewBackend::displayBuffer): * wpe/backends/HeadlessViewBackend.h: * wpe/backends/ViewBackend.cpp: (WPEToolingBackends::ViewBackend::initialize): * wpe/backends/ViewBackend.h: * wpe/backends/WindowViewBackend.cpp: (WPEToolingBackends::WindowViewBackend::WindowViewBackend): (WPEToolingBackends::WindowViewBackend::~WindowViewBackend): (WPEToolingBackends::WindowViewBackend::displayBuffer): * wpe/backends/WindowViewBackend.h: * wpe/jhbuild.modules: 2018-07-24 Thomas Denney Remove support for the double type from WHLSL https://bugs.webkit.org/show_bug.cgi?id=187977 Reviewed by Myles C. Maxfield. * WebGPUShadingLanguageRI/All.js: Removed DoubleLiteral.js and DoubleLiteralType.js include. * WebGPUShadingLanguageRI/DoubleLiteral.js: Removed. * WebGPUShadingLanguageRI/DoubleLiteralType.js: Removed. * WebGPUShadingLanguageRI/Intrinsics.js: Removed double arithmetic functions. * WebGPUShadingLanguageRI/Parse.js: (parseTerm): Removed parsing of double literals. * WebGPUShadingLanguageRI/SPIRV.html: Removed DoubleLiteral.js and DoubleLiteralType.js include. * WebGPUShadingLanguageRI/SPIRVCodegen.js: Removed double type logic. * WebGPUShadingLanguageRI/StandardLibrary.js: Removed double type declarations. * WebGPUShadingLanguageRI/Test.html: Removed DoubleLiteral.js and DoubleLiteralType.js include. * WebGPUShadingLanguageRI/Test.js: Removed tests that test doubles or ported them to use floats. * WebGPUShadingLanguageRI/index.html: Removed DoubleLiteral.js and DoubleLiteralType.js include. 2018-07-24 Tim Horton Enable Web Content Filtering on watchOS https://bugs.webkit.org/show_bug.cgi?id=187979 Reviewed by Wenson Hsieh. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-07-24 Daniel Bates Move-constructing NeverDestroyed should move construct underlying object instead of copy constructing it https://bugs.webkit.org/show_bug.cgi?id=187971 Reviewed by Saam Barati. Add unit tests to cover move constructing a NeverDestroyed with a non-const and const data type as well as invoking makeNeverDestroyed() with the result of a function that returns a move-only data type. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/MoveOnlyLifecycleLogger.cpp: Added. (TestWebKitAPI::MoveOnlyLifecycleLogger::MoveOnlyLifecycleLogger): (TestWebKitAPI::MoveOnlyLifecycleLogger::~MoveOnlyLifecycleLogger): (TestWebKitAPI::MoveOnlyLifecycleLogger::operator=): (TestWebKitAPI::MoveOnlyLifecycleLogger::setName): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/MoveOnlyLifecycleLogger.h: Added. * TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp: (TestWebKitAPI::TEST): 2018-07-24 Thomas Denney Minor changes to the WHLSL interpreter to support the new compiler https://bugs.webkit.org/show_bug.cgi?id=187728 Reviewed by Myles C. Maxfield. This bug contains small changes that are make minor changes to the behaviour of the existing interpreter (the tests are unaffected and all still pass). * WebGPUShadingLanguageRI/EnumType.js: (EnumType.prototype.get isEnum): Property added to EnumType and Type * WebGPUShadingLanguageRI/Evaluator.js: Correct typo * WebGPUShadingLanguageRI/Func.js: (Func.prototype.get isEntryPoint): Add boolean property * WebGPUShadingLanguageRI/FuncInstantiator.js: (FuncInstantiator.prototype.get instances): Public accessor for existing private field * WebGPUShadingLanguageRI/FunctionLikeBlock.js: Refactored the class so that it directly wraps a Func instance (therefore the only interface change is to the constructor and the addition of the func accessor). This change allows the de-inlining of functions. (FunctionLikeBlock): (FunctionLikeBlock.prototype.get func): (FunctionLikeBlock.prototype.get returnType): (FunctionLikeBlock.prototype.get parameters): (FunctionLikeBlock.prototype.get body): * WebGPUShadingLanguageRI/Inliner.js: Use the new FunctionLikeBlock constructor (Inliner.prototype.visitCallExpression): (Inliner): * WebGPUShadingLanguageRI/Intrinsics.js: Migrate the swizzle operators to native functions (with additional support in StandardLibrary.js). This reduces first-time compile-time from around 4s to around 0.1s. (Intrinsics): * WebGPUShadingLanguageRI/Lexer.js: Ensure that the parsing of multiline comments completes correctly (Lexer.prototype.next): (Lexer): * WebGPUShadingLanguageRI/MakeArrayRefExpression.js: Addition of type property, which is based on the type of the lValue and the semantics of the language (the @ operator yields an array reference with the thread scope). (MakeArrayRefExpression): (MakeArrayRefExpression.prototype.get type): * WebGPUShadingLanguageRI/NativeFunc.js: Add setter/getter for implementationData to support swizzle operator change (NativeFunc.prototype.get implementationData): (NativeFunc.prototype.set implementationData): * WebGPUShadingLanguageRI/Rewriter.js: Use new FunctionLikeBlock constructor (Rewriter.prototype.visitFunctionLikeBlock): * WebGPUShadingLanguageRI/StandardLibrary.js: (_generateSwizzle): Deleted. * WebGPUShadingLanguageRI/SwizzleOp.js: Introduces a new class for carrying metadata about swizzle operators so that they are implemented as native functions rather than generated at compile time. (SwizzleOp): (SwizzleOp.prototype.get outSize): (SwizzleOp.prototype.get components): (SwizzleOp.prototype.get inSize): (SwizzleOp.prototype.toString): (SwizzleOp.allSwizzleOperators.): (SwizzleOp.allSwizzleOperators): * WebGPUShadingLanguageRI/StandardLibrary.js: + (SwizzleOp): (SwizzleOp.prototype.get outSize): (SwizzleOp.prototype.get components): (SwizzleOp.prototype.get inSize): (SwizzleOp.prototype.toString): (generateSwizzles): (_generateSwizzle): Deleted. * WebGPUShadingLanguageRI/Type.js: Addition of isEnum property, as above. (Type.prototype.get isEnum): 2018-07-24 Ryan Haddad Unreviewed, rolling out r234121. Caused perf test failures. Reverted changeset: "We should cache the compiled sandbox profile in a data vault" https://bugs.webkit.org/show_bug.cgi?id=184991 https://trac.webkit.org/changeset/234121 2018-07-24 Thibault Saunier [Flatpak] Add openh264 as needed by WebRTC https://bugs.webkit.org/show_bug.cgi?id=187956 Reviewed by Philippe Normand. * flatpak/org.webkit.WebKit.yaml: 2018-07-24 Ross Kirsling WebCore::URL::hostIsIPAddress needs a Windows implementation https://bugs.webkit.org/show_bug.cgi?id=187859 Reviewed by Fujii Hironori. * TestWebKitAPI/Tests/WebCore/URL.cpp: Check for a few other ways an IP address could be invalid. 2018-07-24 Charlie Turner [Flatpak] Avoid consuming unknown arguments in flatpak wrapper https://bugs.webkit.org/show_bug.cgi?id=187951 When running run-webkit-tests --wpe --debug, it was observed that both self.platform != 'wpe' and self.debug != True. This turned out to be because of the "args" argument consuming the remainder of future arguments that came after it. Since the first argument to load_from_args was the test script to run, it would end up never processing the other arguments supplied to the wrapper script. Tested this by rebuilding GTK in debug mode, running the minibrowser with various extra options, and running some tests with various extra options. Reviewed by Michael Catanzaro. * flatpak/flatpakutils.py: (WebkitFlatpak.load_from_args): 2018-07-24 Thibault Saunier [Flatpak] Remove now unnecessary 'hacks' for running tests https://bugs.webkit.org/show_bug.cgi?id=187608 Reviewed by Philippe Normand. We used to need to not share X11 with the sandbox when running tests but it is not needed anymore as we do not mount `/tmp` on `/tmp` in the sandbox (we mount it on `/run/host/tmp` now). This has the advantage of making running the MiniBrowser to display test results working again. * flatpak/flatpakutils.py: (WebkitFlatpak.clean_args): (WebkitFlatpak.run_in_sandbox): (WebkitFlatpak._cleanup_faltpak_args_for_tests_if_needed): Deleted. 2018-07-23 Fujii Hironori webkitpy.port.server_process_unittest.TestServerProcess.test_basic failed on Windows Python https://bugs.webkit.org/show_bug.cgi?id=187581 Reviewed by Daniel Bates. There are two failures in this test case: 1. proc.poll() doesn't return 0. 2. stderr is not output. For failure #1, this is expected. the process should not exit at the time. proc.poll() should return None because the process is still alive. This change added a new test to check proc.poll() becomes 0 after the process successfully exits. For failure #2, stderr is not flushed even though stdout is flushed. This change uses '-u' command switch to force stdin, stdout and stderr to be totally unbuffered. * Scripts/webkitpy/port/server_process_unittest.py: (TestServerProcess.test_basic): Added -u command switch. Do not flush stdout. Removed the special condition for Windows. Add a new test to check proc.poll() returns 0. (TestServerProcess.test_process_crashing): Added -u command switch. Do not flush stdout. 2018-07-23 Ross Kirsling WTF::StringView::split should have an allowEmptyEntries flag https://bugs.webkit.org/show_bug.cgi?id=187864 Reviewed by Konstantin Tokarev. * TestWebKitAPI/Tests/WTF/StringView.cpp: Add test. 2018-07-23 Ben Richards We should cache the compiled sandbox profile in a data vault https://bugs.webkit.org/show_bug.cgi?id=184991 Reviewed by Ryosuke Niwa. Added trace points for sandbox initialization * Tracing/SystemTracePoints.plist: 2018-07-23 Zalan Bujtas DRT relies on [webView display] to call -viewWillDraw on the WebHTMLView https://bugs.webkit.org/show_bug.cgi?id=187924 Reviewed by Simon Fraser. WebKit relies on -viewWillDraw getting called on WebHTMLView, even though that view has not been marked as needing display. * DumpRenderTree/mac/PixelDumpSupportMac.mm: (createBitmapContextFromWebView): 2018-07-23 Chris Dumez WebResourceLoadStatisticsStore fails to unregister itself as a MessageReceiver in its destructor https://bugs.webkit.org/show_bug.cgi?id=187910 Reviewed by Brent Fulgham. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (-[DisableITPDuringNavigationDelegate webView:didCommitNavigation:]): (-[DisableITPDuringNavigationDelegate webView:didFinishNavigation:]): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/notify-resourceLoadObserver.html: Added. 2018-07-23 Daniel Bates test-webkitpy should take configuration command line options https://bugs.webkit.org/show_bug.cgi?id=187872 Reviewed by David Kilzer. Add --debug and --release optional command line options and teach the test bots to invoke test-webkitpy with the appropriate configuration. At the moment these options are only meaningful on Mac since they effect the configuration lldbWebKitTester is built with and we only build lldbWebKitTester on Mac. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunPythonTests): Pass the configuration to test-webkitpy. On Mac this will effect how lldbWebKitTester is built. All other ports do not make use of the specified configuration. * Scripts/webkitpy/test/main.py: (_build_lldb_webkit_tester): Modified to take the configuration to build lldbWebKitTester. If the specified configuration is None then we fall back to using the default configuration (as set by script set-webkit-configuration). (Tester._parse_args): Add command line options --debug and --release to build lldbWebKitTester with a Debug configuration and a Release configuration, respectively (Tester._run_tests): Pass the configuration to build lldbWebKitTester that we parsed from the command line options. It may be None if neither --debug nor --release were passed. 2018-07-23 Commit Queue Unreviewed, rolling out r233030. https://bugs.webkit.org/show_bug.cgi?id=187904 Broke tarball builds (Requested by mcatanzaro on #webkit). Reverted changeset: "run-gtk-tests (glib/common.py) cannot determine build directory when webKitBranchBuild=true" https://bugs.webkit.org/show_bug.cgi?id=185643 https://trac.webkit.org/changeset/233030 2018-07-21 Simon Fraser Fix lldb summarizers for HashMaps and HashSets https://bugs.webkit.org/show_bug.cgi?id=187883 Reviewed by Dan Bates. HashMap and HashSet summarizers were broken in various ways. The 'type summary add -x' regexp needs to match at the start and end of the string to avoid finding types nested inside other templates. The HashTable synthetic child code incorrectly used the type of the key, rather than the value when synthesizing children. Add HashMap and HashSet summarizers. I tried to get synthetic children working directly for HashMap and HashSet, but was unable. * lldb/lldbWebKitTester/main.cpp: (testSummaryProviders): * lldb/lldb_webkit.py: (__lldb_init_module): (__lldb_init_module.lldb_webkit): (WTFHashMap_SummaryProvider): (WTFHashSet_SummaryProvider): (WebCoreColorProvider._to_string_extended): (WebCoreURLProvider.to_string): (WTFHashMapProvider): (WTFHashMapProvider.__init__): (WTFHashMapProvider.tableSize): (WTFHashMapProvider.keyCount): (WTFHashSetProvider): (WTFHashSetProvider.__init__): (WTFHashSetProvider.tableSize): (WTFHashSetProvider.keyCount): (WTFHashTableProvider.tableSize): (WTFHashTableProvider): (WTFHashTableProvider.keyCount): (WTFHashTableProvider.get_child_at_index): (WTFHashTableProvider.update): * lldb/lldb_webkit_unittest.py: (TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector): (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity): (TestSummaryProviders): (TestSummaryProviders.serial_test_WTFHashMap_tablesize_and_size): (TestSummaryProviders.serial_test_WTFHashMap_of_vectors_tablesize_and_size): (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size): 2018-07-21 Simon Fraser Add lldb formatters for WebCore geometry types https://bugs.webkit.org/show_bug.cgi?id=187884 Reviewed by Daniel Bates. Add lldb formatters for IntPoint, IntSize, IntRect, FloatPoint, FloatSize, FloatRect and LayoutRect. Testing is blocked by webkit.org/b/187872. * lldb/lldbWebKitTester/main.cpp: (testSummaryProviders): * lldb/lldb_webkit.py: (__lldb_init_module.lldb_webkit): (__lldb_init_module): (WebCoreLayoutRect_SummaryProvider): (WebCoreIntSize_SummaryProvider): (WebCoreIntPoint_SummaryProvider): (WebCoreFloatSize_SummaryProvider): (WebCoreFloatPoint_SummaryProvider): (WebCoreIntRect_SummaryProvider): (WebCoreFloatRect_SummaryProvider): (WebCoreLayoutRectProvider): (WebCoreLayoutRectProvider.__init__): (WebCoreLayoutRectProvider.get_x): (WebCoreLayoutRectProvider.get_y): (WebCoreLayoutRectProvider.get_width): (WebCoreLayoutRectProvider.get_height): (WebCoreIntPointProvider): (WebCoreIntPointProvider.__init__): (WebCoreIntPointProvider.get_x): (WebCoreIntPointProvider.get_y): (WebCoreIntSizeProvider): (WebCoreIntSizeProvider.__init__): (WebCoreIntSizeProvider.get_width): (WebCoreIntSizeProvider.get_height): (WebCoreIntRectProvider): (WebCoreIntRectProvider.__init__): (WebCoreIntRectProvider.get_x): (WebCoreIntRectProvider.get_y): (WebCoreIntRectProvider.get_width): (WebCoreIntRectProvider.get_height): (WebCoreFloatPointProvider): (WebCoreFloatPointProvider.__init__): (WebCoreFloatPointProvider.get_x): (WebCoreFloatPointProvider.get_y): (WebCoreFloatSizeProvider): (WebCoreFloatSizeProvider.__init__): (WebCoreFloatSizeProvider.get_width): (WebCoreFloatSizeProvider.get_height): (WebCoreFloatRectProvider): (WebCoreFloatRectProvider.__init__): (WebCoreFloatRectProvider.get_x): (WebCoreFloatRectProvider.get_y): (WebCoreFloatRectProvider.get_width): (WebCoreFloatRectProvider.get_height): 2018-07-20 John Wilander Resource Load Statistics: Enable basic functionality in experimental debug mode https://bugs.webkit.org/show_bug.cgi?id=187835 Reviewed by Chris Dumez. This patch makes the experimental ITP Debug Mode feature work, at least to a basic level. All of the changes to TestRunner are to support the layout tests for the functionality. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setStatisticsDebugMode): (WTR::TestRunner::statisticsCallDidSetDebugModeCallback): (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): (WTR::TestRunner::statisticsCallDidSetPrevalentResourceForDebugModeCallback): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::setStatisticsDebugMode): (WTR::TestController::setStatisticsPrevalentResourceForDebugMode): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestInvocation::didSetStatisticsDebugMode): (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): * WebKitTestRunner/TestInvocation.h: 2018-07-20 Ryosuke Niwa Picking a color from the color panel for typing attributes needs to inverse transform through color-filter https://bugs.webkit.org/show_bug.cgi?id=187846 Reviewed by Simon Fraser. Fixed the bug that testRunner.execCommand was using the second argument as the value. The second argument, aShowDefaultUI, should always be ignored in testRunner.execCommand, and the third argument should be used as the value. DumpRenderTree's implementation does this already. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::execCommand): * WebKitTestRunner/InjectedBundle/TestRunner.h: 2018-07-20 Dean Jackson Accidentally checked in the wrong version of these files. * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: * lldb/lldbWebKitTester/main.cpp: (testSummaryProviders): * lldb/lldb_webkit_unittest.py: (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity): (TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color): Deleted. (TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color): Deleted. (TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color): Deleted. (TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color): Deleted. (TestSummaryProviders.serial_test_WebCoreColorProvider_semantic_color): Deleted. 2018-07-20 Dean Jackson Provide an lldb type summary for WebCore::Color https://bugs.webkit.org/show_bug.cgi?id=187776 Reviewed by Dan Bates. This time without the tests because we don't want to build all of WebKit just for python tests. * lldb/lldb_webkit.py: Add a Color summary provider. (__lldb_init_module): (WebCoreColor_SummaryProvider): (WebCoreColorProvider): (WebCoreColorProvider.__init__): (WebCoreColorProvider._is_extended): (WebCoreColorProvider._is_valid): (WebCoreColorProvider._is_semantic): (WebCoreColorProvider._to_string_extended): (WebCoreColorProvider.to_string): 2018-07-20 Brady Eidson Add WKNavigation/WKNavigationAction related SPI. https://bugs.webkit.org/show_bug.cgi?id=187826 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (-[NavigationActionHasNavigationDelegate webView:didFinishNavigation:]): (-[NavigationActionHasNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]): (TEST): 2018-07-20 Commit Queue Unreviewed, rolling out r233943, r233988, r234004, and r234012. https://bugs.webkit.org/show_bug.cgi?id=187856 webkitpy tests are failing to build lldbWebKitTester (Requested by ryanhaddad on #webkit). Reverted changesets: "Provide an lldb type summary for WebCore::Color" https://bugs.webkit.org/show_bug.cgi?id=187776 https://trac.webkit.org/changeset/233943 "Provide an lldb type summary for WebCore::Color" https://bugs.webkit.org/show_bug.cgi?id=187776 https://trac.webkit.org/changeset/233988 "Provide an lldb type summary for WebCore::Color" https://bugs.webkit.org/show_bug.cgi?id=187776 https://trac.webkit.org/changeset/234004 "Provide an lldb type summary for WebCore::Color" https://bugs.webkit.org/show_bug.cgi?id=187776 https://trac.webkit.org/changeset/234012 2018-07-20 Philippe Normand [GTK][WPE] enable-media-capabilities websetting https://bugs.webkit.org/show_bug.cgi?id=187847 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp: (testWebKitSettings): Unit test for the new enable-media-capabilities setting. 2018-07-19 Carlos Garcia Campos [GLIB] jsc_context_evaluate_in_object() should receive an instance when a JSCClass is given https://bugs.webkit.org/show_bug.cgi?id=187798 Reviewed by Michael Catanzaro. Update test cases to the new API and use a destroy function and vtable in the test case of calling jsc_context_evaluate_in_object() with a JSCClass. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCEvaluateInObject): 2018-07-19 Ross Kirsling TestWTF.WTF.StringConcatenate_Unsigned fails for unsigned short on Windows https://bugs.webkit.org/show_bug.cgi?id=187712 Reviewed by Fujii Hironori. * TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: Mark result of unsigned short test case as platform-specific, since Windows' behavior is actually *less* surprising here. 2018-07-19 Lucas Forschler Teach the AWS Lambda to use the [minified]-platforms database https://bugs.webkit.org/show_bug.cgi?id=187817 Reviewed by David Kilzer. * WebKitArchiveSupport/lambda/register-archive-in-dynamodb.py: (lambda_handler): Add support for the platforms.webkit.org database * WebKitArchiveSupport/lambda/register-minified-s3-archive-in-dynamodb.py: (lambda_handler): Add support for the minified-platforms.webkit.org database 2018-07-19 Dean Jackson Provide an lldb type summary for WebCore::Color https://bugs.webkit.org/show_bug.cgi?id=187776 Dan Bates helped me with this attempted fix. Fingers crossed! * Scripts/build-lldbwebkittester: 2018-07-19 Stephan Szabo [WinCairo] Support DEVELOPER_MODE for allowing inspection of web inspector https://bugs.webkit.org/show_bug.cgi?id=187786 Reviewed by Fujii Hironori. * Scripts/webkitdirs.pm: (generateBuildSystemFromCMakeProject): Turn on DEVELOPER_MODE for WinCairo builds. 2018-07-19 Dean Jackson Provide an lldb type summary for WebCore::Color https://bugs.webkit.org/show_bug.cgi?id=187776 Another attempted build fix for Debug. * lldb/lldbWebKitTester/Configurations/Base.xcconfig: * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: 2018-07-19 Thomas Denney [WHLSL] The interpreter doesn't support boolean short-circuiting https://bugs.webkit.org/show_bug.cgi?id=187779 Reviewed by Alex Christensen. * WebGPUShadingLanguageRI/Evaluator.js: (Evaluator.prototype.visitLogicalExpression): RHS is only evaluated when necessary * WebGPUShadingLanguageRI/Test.js: (tests.booleanShortcircuiting): Adds 4 tests for the evaluation of logical expresions 2018-07-19 Dean Jackson Provide an lldb type summary for WebCore::Color https://bugs.webkit.org/show_bug.cgi?id=187776 Attempted build fix. * lldb/lldbWebKitTester/Configurations/Base.xcconfig: 2018-07-19 Brady Eidson Add an SPI policy action to allow clients to explicitly ask for a new process on a navigation. https://bugs.webkit.org/show_bug.cgi?id=187789 Reviewed by Andy Estes. * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: (-[PSONNavigationDelegate init]): (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]): 2018-07-19 Thibault Saunier [Flatpak] Let flatpak process handle SIGINT https://bugs.webkit.org/show_bug.cgi?id=187521 Reviewed by Philippe Normand. Ensuring that flatpak process ends properly and that the sandbox is teard down. It also avoids showing usless backtrace to the end user and makes gdb much more usable. Also make flatpakutils not verbose by default * flatpak/flatpakutils.py: (disable_signals): (WebkitFlatpak.run_in_sandbox): (WebkitFlatpak.run_gdb): 2018-07-18 Stephan Szabo Unreviewed. Fix contributors entry. * Scripts/webkitpy/common/config/contributors.json: 2018-07-18 Dean Jackson Provide an lldb type summary for WebCore::Color https://bugs.webkit.org/show_bug.cgi?id=187776 Reviewed by Dan Bates. * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit to get to WebCore. * lldb/lldbWebKitTester/main.cpp: (testSummaryProviders): Create some Color objects for testing. * lldb/lldb_webkit.py: Add a Color summary provider. (__lldb_init_module): (WebCoreColor_SummaryProvider): (WebCoreColorProvider): (WebCoreColorProvider.__init__): (WebCoreColorProvider._is_extended): (WebCoreColorProvider._is_valid): (WebCoreColorProvider._is_semantic): (WebCoreColorProvider._to_string_extended): (WebCoreColorProvider.to_string): * lldb/lldb_webkit_unittest.py: Tests. (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity): (TestSummaryProviders): (TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color): (TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color): (TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color): (TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color): 2018-07-18 Truitt Savell Unreviewed, rolling out r233934. Revision caused 5 webkitpy failures on Mac and broke webkitpy testing on iOS simulator Reverted changeset: "Provide an lldb type summary for WebCore::Color" https://bugs.webkit.org/show_bug.cgi?id=187776 https://trac.webkit.org/changeset/233934 2018-07-18 Chris Dumez REGRESSION (r233897): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebKit: WKBooleanGetValue + 9 https://bugs.webkit.org/show_bug.cgi?id=187784 Reviewed by Brady Eidson. When process swapping on navigation, WebPageProxy::reattachToWebProcess() unregisters the page as a MessageReceiver from the old WebProcessProxy and registers itself as a MessageReceiver for the new WebProcessProxy instead. This means that after this point, IPC sent by the previous WebProcess to its WebPageProxy will fail. When we process swap, we also navigate the page in the old WebProcess to about:blank, when the navigation to about:blank would complete, the WebKitTestRunner's injected bundle would try and send IPC to the WebPageProxy which would fail and would cause WKBundlePagePostSynchronousMessageForTesting() to return a null result. WKTR would crash when dereferencing this null result. This patch addresses this by dealing with the potential null result. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::shouldProcessWorkQueue const): 2018-07-18 Dean Jackson Provide an lldb type summary for WebCore::Color https://bugs.webkit.org/show_bug.cgi?id=187776 Reviewed by Dan Bates. * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit to get to WebCore. * lldb/lldbWebKitTester/main.cpp: (testSummaryProviders): Create some Color objects for testing. * lldb/lldb_webkit.py: Add a Color summary provider. (__lldb_init_module): (WebCoreColor_SummaryProvider): (WebCoreColorProvider): (WebCoreColorProvider.__init__): (WebCoreColorProvider._is_extended): (WebCoreColorProvider._is_valid): (WebCoreColorProvider._is_semantic): (WebCoreColorProvider._to_string_extended): (WebCoreColorProvider.to_string): * lldb/lldb_webkit_unittest.py: Tests. (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity): (TestSummaryProviders): (TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color): (TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color): (TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color): (TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color): 2018-07-18 Stephan Szabo Adding myself to contributors.json Unreviewed contributors.json change. * Scripts/webkitpy/common/config/contributors.json: 2018-07-18 Jer Noble -_beginAnimatedResizeWithUpdates: can leave view in bad state if called during an existing animation https://bugs.webkit.org/show_bug.cgi?id=187739 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: (TEST): 2018-07-18 Jer Noble PiP from Element Fullscreen should match AVKit's behavior https://bugs.webkit.org/show_bug.cgi?id=187623 Reviewed by Jon Lee. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: Added. (-[ExitFullscreenOnEnterPiPUIDelegate _webView:hasVideoInPictureInPictureDidChange:]): (-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidEnterFullscreen:]): (-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidExitFullscreen:]): (TestWebKitAPI::TEST): 2018-07-18 Aakash Jain [ews-build] Add build step to run layout-test https://bugs.webkit.org/show_bug.cgi?id=187674 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (RunWebKitTests): Added build step to run layout-tests. This is similar to current EWS. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. * BuildSlaveSupport/ews-build/factories.py: Added build-step to run layout-test in iOSSimulatorFactory. 2018-07-18 Wenson Hsieh Add SPI to defer running async script until after document load https://bugs.webkit.org/show_bug.cgi?id=187748 Reviewed by Ryosuke Niwa and Tim Horton. Add an API test to verify that when the deferred async script configuration is set, async scripts will be executed after the DOMContentLoaded event. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/RunScriptAfterDocumentLoad.mm: Added. (TEST): 2018-07-18 Charlie Turner [WPE] Update WPEBackend in flatpak https://bugs.webkit.org/show_bug.cgi?id=187753 r233763 updated WPEBackend for the jhbuild, but not the flatpak. This caused WPE_BACKEND_CHECK_VERSION to not be defined, triggering a bug in the version guard, #if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 2, 0) This doesn't work as intended, since the C preprocessor first expands all macro arguments in the #if expression before evaluating the expression. When WPE_BACKEND_CHECK_VERSION is not defined, this will lead to a syntax error and some head scratching. A future patch should address the buggy macro check, when it is decided whether the assume the macro is always defined and bump the API requirements on WPEBackend, or to move the check into two conditionals to avoid the expansion problem. Unreviewed build fix. * flatpak/org.webkit.WPE.yaml: 2018-07-18 Simon Fraser Fix the parsing of colors in attributed string tests, and make it possible to dump the typing attributes https://bugs.webkit.org/show_bug.cgi?id=187747 Reviewed by Ryosuke Niwa. Add textInputController.attributedStringForTyping(), which returns a one-character attributed string whose attributes are the typing attributes, making it possible to test -[WebView typingAttributes]. Sadly WebCore's convertObjcValueToValue() doesn't know how to convert NSDictionary, so we can't return -typingAttributes directly. * DumpRenderTree/mac/TextInputControllerMac.m: (+[TextInputController isSelectorExcludedFromWebScript:]): (-[TextInputController attributedStringForTyping]): 2018-07-18 Carlos Garcia Campos [GLIB] Add jsc_context_check_syntax() to GLib API https://bugs.webkit.org/show_bug.cgi?id=187694 Reviewed by Yusuke Suzuki. Add a new test case. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCCheckSyntax): (main): 2018-07-17 Sihui Liu REGRESSION: [macOS Sierra] TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=187066 Reviewed by Chris Dumez. In r232668 we started to do reload if web process crashes by default. As we killed the web process explicitly in this test, if web page got reloaded, messages would be sent again, and flag set in message handler could keep the test continue to evaluate the expectation without waiting for removeDataOfTypes to finish. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (-[WebsiteDataStoreCustomPathsMessageHandler webViewWebContentProcessDidTerminate:]): (TEST): 2018-07-17 Chris Dumez Turn on PSON in WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=186542 Reviewed by Brady Eidson. Turn on PSON by default in WebKitTestRunner. * WebKitTestRunner/TestOptions.h: 2018-07-17 Wenson Hsieh Add an SPI hook to allow clients to yield document parsing and script execution https://bugs.webkit.org/show_bug.cgi?id=187682 Reviewed by Ryosuke Niwa. Add a few tests to exercise the new document yield token SPI, verifying that clients can use the SPI to defer document load, and that doing so doesn't cause deferred `script` to execute in the wrong order (i.e. before synchronous script, or after "DOMContentLoaded"). * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm: Added. (-[ParserYieldTokenPlugIn takeDocumentParserTokenAfterCommittingLoad]): (-[ParserYieldTokenPlugIn releaseDocumentParserToken]): (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]): (-[ParserYieldTokenPlugIn webProcessPlugIn:didCreateBrowserContextController:]): (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishDocumentLoadForFrame:]): (-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]): Add an injected bundle object that knows how to take and release multiple document parser yield tokens. * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.h: Added. * TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm: Added. (+[ParserYieldTokenTestWebView webView]): (-[ParserYieldTokenTestWebView bundle]): (-[ParserYieldTokenTestWebView schemeHandler]): (-[ParserYieldTokenTestWebView didFinishDocumentLoad]): (-[ParserYieldTokenTestWebView didFinishLoad]): (waitForDelay): (TEST): * TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h: Added. * TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.mm: Added. (-[TestURLSchemeHandler webView:startURLSchemeTask:]): (-[TestURLSchemeHandler webView:stopURLSchemeTask:]): (-[TestURLSchemeHandler setStartURLSchemeTaskHandler:]): (-[TestURLSchemeHandler startURLSchemeTaskHandler]): (-[TestURLSchemeHandler setStopURLSchemeTaskHandler:]): (-[TestURLSchemeHandler stopURLSchemeTaskHandler]): Add a new test helper class to handle custom schemes via a block-based API. * TestWebKitAPI/Tests/WebKitCocoa/text-with-async-script.html: Added. New test HTML page that contains a deferred script element, a synchronous script element, another deferred script element, and then some text, images, and links. * TestWebKitAPI/Tests/WebKitCocoa/text-with-deferred-script.html: Added. 2018-07-17 Truitt Savell Adding myself to Contributors.json Unreviewed * Scripts/webkitpy/common/config/contributors.json: 2018-07-17 Aditya Keerthi [macOS] TestWebKitAPI.PictureInPicture.WKUIDelegate is timing out https://bugs.webkit.org/show_bug.cgi?id=187730 Reviewed by Jer Noble. This regression was introduced by r233865. PIP can now only be initiated from a window that is on screen. * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: (TestWebKitAPI::TEST): 2018-07-17 John Wilander Add completion handlers to TestRunner functions setStatisticsLastSeen(), setStatisticsPrevalentResource(), setStatisticsVeryPrevalentResource(), setStatisticsHasHadUserInteraction(), and setStatisticsHasHadNonRecentUserInteraction() https://bugs.webkit.org/show_bug.cgi?id=187710 Reviewed by Chris Dumez. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setStatisticsLastSeen): (WTR::TestRunner::statisticsCallDidSetLastSeenCallback): (WTR::TestRunner::setStatisticsPrevalentResource): (WTR::TestRunner::statisticsCallDidSetPrevalentResourceCallback): (WTR::TestRunner::setStatisticsVeryPrevalentResource): (WTR::TestRunner::statisticsCallDidSetVeryPrevalentResourceCallback): (WTR::TestRunner::setStatisticsHasHadUserInteraction): (WTR::TestRunner::setStatisticsHasHadNonRecentUserInteraction): (WTR::TestRunner::statisticsCallDidSetHasHadUserInteractionCallback): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::setStatisticsLastSeen): (WTR::TestController::setStatisticsPrevalentResource): (WTR::TestController::setStatisticsVeryPrevalentResource): (WTR::TestController::setStatisticsHasHadUserInteraction): (WTR::TestController::setStatisticsHasHadNonRecentUserInteraction): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didSetLastSeen): (WTR::TestInvocation::didSetPrevalentResource): (WTR::TestInvocation::didSetVeryPrevalentResource): (WTR::TestInvocation::didSetHasHadUserInteraction): (WTR::TestInvocation::didSetHasHadNonRecentUserInteraction): * WebKitTestRunner/TestInvocation.h: 2018-07-16 Jeremy Jones Fix API Test failures introduced by r233865 https://bugs.webkit.org/show_bug.cgi?id=187720 Unreviewed APITest fix after r233865. Fullscreen can now only be initiated from a window that is on screen. * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm: (TestWebKitAPI::TEST): 2018-07-11 Dean Jackson Allow removal of white backgrounds https://bugs.webkit.org/show_bug.cgi?id=187574 Reviewed by Simon Fraser. Add a new menu item for punching out white backgrounds in MiniBrowser. In WebKitTestRunner, expose the new setting and hook that up to drawing a background in the WebView. * MiniBrowser/mac/AppDelegate.m: (defaultConfiguration): Add _punchOutWhiteBackgroundsInDarkMode. * MiniBrowser/mac/SettingsController.h: Ditto. * MiniBrowser/mac/SettingsController.m: (-[SettingsController _populateMenu]): (-[SettingsController validateMenuItem:]): (-[SettingsController togglePunchOutWhiteBackgroundsInDarkMode:]): (-[SettingsController punchOutWhiteBackgroundsInDarkMode]): * MiniBrowser/mac/WK1BrowserWindowController.m: (-[WK1BrowserWindowController didChangeSettings]): Set the new preference. * WebKitTestRunner/PlatformWebView.h: Expose a drawsBackground property. * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: Null implementation. (WTR::PlatformWebView::drawsBackground const): (WTR::PlatformWebView::setDrawsBackground): * WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Ditto. (WTR::PlatformWebView::drawsBackground const): (WTR::PlatformWebView::setDrawsBackground): * WebKitTestRunner/ios/PlatformWebViewIOS.mm: Call into the WKWebView and set its SPI. (WTR::PlatformWebView::drawsBackground const): (WTR::PlatformWebView::setDrawsBackground): * WebKitTestRunner/mac/PlatformWebViewMac.mm: Ditto. (WTR::PlatformWebView::drawsBackground const): (WTR::PlatformWebView::setDrawsBackground): * WebKitTestRunner/TestController.cpp: Reset and copy the new preference. (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): If the option for punching out the background was set, tell the WebView to not draw its background. 2018-07-16 Aditya Keerthi [Datalist][macOS] Add suggestions UI for TextFieldInputTypes https://bugs.webkit.org/show_bug.cgi?id=186531 Reviewed by Tim Horton. Added isShowingDatalistSuggestions testing hook in order to enable testing of the visibility of the suggestions view. * DumpRenderTree/mac/UIScriptControllerMac.mm: (WTR::UIScriptController::isShowingDataListSuggestions const): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::isShowingDataListSuggestions const): * TestRunnerShared/UIScriptContext/UIScriptController.h: * WebKitTestRunner/mac/UIScriptControllerMac.mm: (WTR::UIScriptController::isShowingDataListSuggestions const): 2018-07-16 Yusuke Suzuki Add --target-path option to dump-class-layout https://bugs.webkit.org/show_bug.cgi?id=187687 Reviewed by Simon Fraser. We add an escape hatch to dump-class-layout for specifying target path directly. This `--target-path` allows us to use dump-class-layout in the other ports like JSCOnly. We can dump class layout if we build the target with clang by using the following command. Tools/Scripts/dump-class-layout \ --architecture=x86_64 \ --target-path=path/to/libJavaScriptCore.so \ JavaScriptCore \ ScopeNode * Scripts/dump-class-layout: (main): 2018-07-16 Sihui Liu IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins https://bugs.webkit.org/show_bug.cgi?id=187631 Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2018-07-15 Carlos Garcia Campos [GLIB] Add API to evaluate code using a given object to store global symbols https://bugs.webkit.org/show_bug.cgi?id=187639 Reviewed by Michael Catanzaro. Add a new test case. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCEvaluateInObject): (testJSCExceptions): (main): 2018-07-15 Zan Dobersek [webkitpy] run-web-platform-tests should allow specifying custom WPT metadata directories https://bugs.webkit.org/show_bug.cgi?id=187353 Reviewed by Youenn Fablet. When using run-web-platform-tests, allow specifying custom WPT metadata directory. This will avoid generating such metadata-filled directory from the port-specific JSON expectations file, and instead will search for the metadata files and the include manifest inside the specified directory. The MANIFEST.json file will also be generated under there. Rationale for this change is prototyping using custom metadata directories and avoiding generating all this content from a JSON file. Using this by default in the future would avoid sporradic changes in how WPT handles metadata .ini files and releases us from the obligation of adjusting the generator for every such change. This would also allow managing this metadata content in a separate repository, avoiding polluting the main webkit.org repository with thousands of .ini files. If this turns out to be the preferable way of managing the metadata content, the JSON files under WebPlatformTests/ and the related code in wpt_runner.py would be removed. * Scripts/webkitpy/w3c/wpt_runner.py: (parse_args): (WPTRunner._wpt_run_paths): (WPTRunner.run): * Scripts/webkitpy/w3c/wpt_runner_unittest.py: (WPTRunnerTest.test_run_with_specified_options): 2018-07-13 Ross Kirsling [WinCairo] run-api-tests is timing out for almost all test cases https://bugs.webkit.org/show_bug.cgi?id=187547 Reviewed by Fujii Hironori. * Scripts/webkitpy/port/server_process.py: (ServerProcess._wait_for_data_and_update_buffers_using_win32_apis): Still attempt to read from stdout/stderr even if the process has exited, as long as it's before the deadline. * Scripts/webkitpy/port/server_process_unittest.py: (TestServerProcess.test_read_after_process_exits): Add test case. 2018-07-13 Ryan Haddad Add TestExpectations and baselines for iOS 12 https://bugs.webkit.org/show_bug.cgi?id=187628 Reviewed by Alexey Proskuryakov. * Scripts/webkitpy/port/ios.py: (IOSPort): Bump current version to 12. 2018-07-13 Ryan Haddad Add TestExpectations and baselines for Mojave. https://bugs.webkit.org/show_bug.cgi?id=187620 Reviewed by Alexey Proskuryakov. * Scripts/webkitpy/port/mac.py: (MacPort): Bump current version to 10.14. 2018-07-13 Timothy Hatcher Add _drawsBackground to WKWebViewConfiguration. https://bugs.webkit.org/show_bug.cgi?id=187665 rdar://problem/42182268 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm: (TestWebKitAPI.WebKit.ConfigurationDrawsBackground): Added. 2018-07-13 Chris Dumez Add a FrameLoaderClient willInjectUserScriptForFrame callback https://bugs.webkit.org/show_bug.cgi?id=187565 Unreviewed WKTR fix after r233782. * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): 2018-07-13 Chris Dumez Reduce size of WebCore::URL https://bugs.webkit.org/show_bug.cgi?id=186820 Unreviewed, re-generates Service worker registrations database used by API tests after r233789. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3: Removed. * TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3-shm: Removed. * TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-3.sqlite3: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3-wal. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2018-07-12 Wenson Hsieh Make it easier to hit the significant rendered text layout milestone on pages with main article elements https://bugs.webkit.org/show_bug.cgi?id=187578 Reviewed by Ryosuke Niwa. Tweak an existing layout test to additionally check that the significant text layout milestone is fired on a page with an article element that is clearly the "main" content on the page (i.e. much taller than all other articles). * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone-article.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html. * TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html: * TestWebKitAPI/Tests/ios/RenderingProgressTests.mm: (TEST): 2018-07-12 Fujii Hironori Change my status to be a WebKit reviewer. Unreviewed status update. * Scripts/webkitpy/common/config/contributors.json: 2018-07-12 Fujii Hironori Unreviewed contributors.json update Just run "validate-committer-lists -c" to canonicalize the style. * Scripts/webkitpy/common/config/contributors.json: 2018-07-12 Alex Christensen Reduce size of WebCore::URL https://bugs.webkit.org/show_bug.cgi?id=186820 Reviewed by Yusuke Suzuki and Youenn Fablet. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): 2018-07-12 Brady Eidson Make process-swap-on-navigation an experimental feature. and https://bugs.webkit.org/show_bug.cgi?id=187558 Reviewed by Chris Dumez. Make sure WKTR doesn't enable ProcessSwapOnNavigation by default simply because it's an experimental feature. * WebKitTestRunner/TestController.cpp: (WTR::TestController::createWebViewWithOptions): (WTR::TestController::resetPreferencesToConsistentValues): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::shouldEnableProcessSwapOnNavigation const): 2018-07-12 Youenn Fablet Add a FrameLoaderClient willInjectUserScriptForFrame callback https://bugs.webkit.org/show_bug.cgi?id=187565 Reviewed by Alex Christensen. Added new test runner API to check for willInjectUserScriptForFrame callback. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (WTR::InjectedBundle::resetUserScriptInjectedCount): (WTR::InjectedBundle::increaseUserScriptInjectedCount): (WTR::InjectedBundle::userScriptInjectedCount const): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::InjectedBundlePage): (WTR::InjectedBundlePage::resetAfterTest): (WTR::InjectedBundlePage::willInjectUserScriptForFrame): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::userScriptInjectedCount const): (WTR::TestRunner::injectUserScript): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::injectUserScript): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::injectUserScript): 2018-07-12 Sihui Liu IndexedDB: database file of subframe cannot be removed https://bugs.webkit.org/show_bug.cgi?id=187564 Reviewed by Youenn Fablet. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2018-07-12 Timothy Hatcher Make WebKit.LinkColorWithSystemAppearance work across system versions. https://bugs.webkit.org/show_bug.cgi?id=187573 Reviewed by Wenson Hsieh. * TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm: (TestWebKitAPI.WebKit.LinkColorWithSystemAppearance): Dynamically generate the expected string. 2018-07-11 Carlos Garcia Campos [WPE] Pass the backend library name as command line parameter to the web process https://bugs.webkit.org/show_bug.cgi?id=186841 Reviewed by Žan Doberšek. * MiniBrowser/wpe/main.cpp: (main): Stop using WPE_BACKEND_LIBRARY env var. * Scripts/run-wpe-tests: (WPETestRunner.__init__): Ditto. * Scripts/webkitpy/port/wpe.py: (WPEPort.setup_environ_for_server): Ditto. * wpe/backends/ViewBackend.cpp: (WPEToolingBackends::ViewBackend::ViewBackend): Call wpe_loader_init() to ensure WPEBackend-fdo is used. * wpe/jhbuild.modules: Upgrade WPEBackend to version 0.2.0. 2018-07-11 Carlos Garcia Campos [GLIB] Add API to allow creating variadic functions https://bugs.webkit.org/show_bug.cgi?id=187517 Reviewed by Michael Catanzaro. Add test cases. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCFunction): (fooCreateWithFooV): (multiplyFooV): 2018-07-11 Carlos Garcia Campos [GLIB] Add jsc_context_get_global_object() to GLib API https://bugs.webkit.org/show_bug.cgi?id=187515 Reviewed by Michael Catanzaro. Add test cases. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCGlobalObject): (main): 2018-07-11 Carlos Garcia Campos [GLIB] Handle G_TYPE_STRV in glib API https://bugs.webkit.org/show_bug.cgi?id=187512 Reviewed by Michael Catanzaro. Add test cases. * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: (testJSCTypes): (joinFunction): (testJSCFunction): 2018-07-11 Aakash Jain [ews-build] EWS should unapply patch and re-run jsc tests when patch fails jsc tests https://bugs.webkit.org/show_bug.cgi?id=187549 Reviewed by Alexey Proskuryakov. * BuildSlaveSupport/ews-build/factories.py: (JSCTestsFactory.__init__): * BuildSlaveSupport/ews-build/steps.py: (CompileJSCOnlyToT): Build ToT without patch. (CompileJSCOnlyToT.doStepIf): Run this step only if patch failed to build. (RunJavaScriptCoreTests.evaluateCommand): Set patchFailedJSCTests property appropriately. (ReRunJavaScriptCoreTests): Re-runs JSC tests. (ReRunJavaScriptCoreTests.doStepIf): Run this step only if patch failed JSC tests. (ReRunJavaScriptCoreTests.evaluateCommand): Set patchFailedJSCTests property appropriately. (RunJavaScriptCoreTestsToT): Run JSC tests on ToT without patch. (RunJavaScriptCoreTestsToT.doStepIf): Run this step only if patch failed JSC tests. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 2018-07-11 Commit Queue Unreviewed, rolling out r233742. https://bugs.webkit.org/show_bug.cgi?id=187577 Binary incompatible change with respect to Service Worker registration map (Requested by dydz on #webkit). Reverted changeset: "Reduce size of WebCore::URL" https://bugs.webkit.org/show_bug.cgi?id=186820 https://trac.webkit.org/changeset/233742 2018-07-11 Aditya Keerthi REGRESSION (231276): Attempting to copy an image fails https://bugs.webkit.org/show_bug.cgi?id=187212 Reviewed by Ryosuke Niwa. Augmented test to include a URL where the lastPathComponent looks similar to a file URL. * TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.html: * TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm: (TestWebKitAPI::TEST): 2018-07-11 Alex Christensen Add SPI for immediate injection of user scripts https://bugs.webkit.org/show_bug.cgi?id=173342 Reviewed by Brady Eidson, Youenn Fablet, and Geoff Garen. * TestWebKitAPI/Tests/WebKit2Cocoa/UserContentController.mm: (waitForMessage): (TEST): 2018-07-11 Myles C. Maxfield Move WHLSL spec work to the W3C GPUWeb GitHub repository See https://github.com/gpuweb/WHLSL * WebGPUShadingLanguageRI/SpecWork/Makefile: Removed. * WebGPUShadingLanguageRI/SpecWork/WSL.g4: Removed. * WebGPUShadingLanguageRI/SpecWork/WSL.ott: Removed. * WebGPUShadingLanguageRI/SpecWork/source/conf.py: Removed. * WebGPUShadingLanguageRI/SpecWork/source/index.rst: Removed. 2018-07-11 Dean Jackson Force WKTR to use the light appearance https://bugs.webkit.org/show_bug.cgi?id=187572 Reviewed by Simon Fraser. Set the NSAppearance on the NSWindow to light mode. * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::PlatformWebView): Use the Aqua appearance. 2018-07-11 Alex Christensen Reduce size of WebCore::URL https://bugs.webkit.org/show_bug.cgi?id=186820 Reviewed by Yusuke Suzuki. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): 2018-07-11 Youenn Fablet Fix remaining Cross-Origin-Resource-Policy failures, if any https://bugs.webkit.org/show_bug.cgi?id=186761 Reviewed by Alex Christensen. * TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp: (TestWebKitAPI::TEST): 2018-07-11 Aakash Jain [ews-build] EWS should unapply the patch and build ToT when patch fails to build https://bugs.webkit.org/show_bug.cgi?id=187358 Reviewed by Alexey Proskuryakov. * BuildSlaveSupport/ews-build/factories.py: (BuildFactory.__init__): * BuildSlaveSupport/ews-build/steps.py: (CompileWebKit): Set haltOnFailure to false so as to run next steps (e.g.: un-apply patch, compile ToT). (CompileWebKit.evaluateCommand): Set patchFailedToBuild property. (CompileWebKitToT): Build ToT without patch. (CompileWebKitToT.doStepIf): Run this step only if patch failed to build. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. Also lower-cased Release and Debug. 2018-07-11 Robin Morisset [WSL] WIP, more of the spec https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. Fixed a few issues with the formal rules (such as adding the restrictions on pointers for compilation to SpirV), and started writing some of the english in the spec. * WebGPUShadingLanguageRI/SpecWork/WSL.ott: * WebGPUShadingLanguageRI/SpecWork/source/index.rst: 2018-07-10 Aakash Jain [ews-build] Add build step to UnApply patch https://bugs.webkit.org/show_bug.cgi?id=187357 Reviewed by Alexey Proskuryakov. * BuildSlaveSupport/ews-build/steps.py: (UnApplyPatchIfRequired.__init__): Pass alwaysUseLatest parameter in order to unapply the patch. (UnApplyPatchIfRequired.doStepIf): Run this step only if patch failed to build or failed test. These properties will be set by build-steps for build and test. (UnApplyPatchIfRequired.hideStepIf): Hide this step if it is not run. 2018-07-10 Dewei Zhu Update ARES-6.patch file accordingly for r233631. https://bugs.webkit.org/show_bug.cgi?id=187534 Reviewed by Saam Barati. Update ARES-6.patch file acoordingly after ARES-6 plan file change to avoid warning while applying the patch. * Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch: 2018-07-10 Tim Horton doAfterNextPresentationUpdate should not be called while content is hidden due to animated resize https://bugs.webkit.org/show_bug.cgi?id=187500 Reviewed by Simon Fraser. * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: (-[AnimatedResizeWebView _endAnimatedResize]): Set didEndAnimatedResize before calling super, because it makes the new test easier and doesn't affect any of the existing ones. (AnimatedResizeBlocksViewportFitChanges): This doAfterNextPresentationUpdate is always called during animated resize, and then synchronously waited for, so it /must/ use _doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeWithTesting. (AnimatedResizeBlocksDoAfterNextPresentationUpdate): Add a test ensuring that doAfterNextPresentationUpdate is deferred until endAnimatedResize is called. * TestWebKitAPI/cocoa/TestNavigationDelegate.mm: (-[WKWebView _test_waitForDidFinishNavigation]): _test_waitForDidFinishNavigation is sometimes called during animated resize, and synchronously waits for a doAfterNextPresentationUpdate, so it cannot wait for the animated resize to complete. 2018-07-10 Fujii Hironori [GTK][WPE] TestWTF and TestJSC fail to compile due to missing forwarding headers https://bugs.webkit.org/show_bug.cgi?id=184441 Reviewed by Michael Catanzaro. All executables of TestWebKitAPI need the forwarding headers of WebCore and PAL because config.h includes and . The forwarding headers of WebCore are generated by generate-forwarding-headers.pl in GTK and WPE ports. The forwarding headers of PAL are generated by WEBKIT_MAKE_FORWARDING_HEADERS in all CMake ports. * TestWebKitAPI/PlatformGTK.cmake: Added PALForwardingHeaders to ForwardingHeadersForTestWebKitAPI_NAME. Added dependencies of ${ForwardingHeadersForTestWebKitAPI_NAME} to TestJSC. * TestWebKitAPI/PlatformWPE.cmake: Ditto. 2018-07-10 Stephan Szabo [WinCairo] Support display of webinspector ui on non-legacy minibrowser https://bugs.webkit.org/show_bug.cgi?id=187415 Reviewed by Brian Burg. * MiniBrowser/win/WebKitBrowserWindow.cpp: (WebKitBrowserWindow::WebKitBrowserWindow): 2018-07-10 John Wilander Resource Load Statistics: Make testRunner.statisticsResetToConsistentState() take a completion handler https://bugs.webkit.org/show_bug.cgi?id=187499 Reviewed by Chris Dumez. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::statisticsResetToConsistentState): (WTR::TestRunner::statisticsCallDidResetToConsistentStateCallback): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::statisticsResetToConsistentState): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didResetStatisticsToConsistentState): * WebKitTestRunner/TestInvocation.h: 2018-07-10 Ryosuke Niwa Disable cross-origin-window-policy by default https://bugs.webkit.org/show_bug.cgi?id=187509 Reviewed by Chris Dumez. Enable the feature for testing purposes. DumpRenderTree does this already in enableExperimentalFeatures. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): 2018-07-10 Thibault Saunier [Flatpak] Feature options to build-webkit and --makeargs are not passed inside the sandbox https://bugs.webkit.org/show_bug.cgi?id=187470 Reviewed by Philippe Normand. Never force building, the user is responsible to make that decision and the workflow is now based on external scripts so it doesn't make sense anymore. Doing that leads to ignoring the options the user passed in. * flatpak/flatpakutils.py: (WebkitFlatpak.setup_dev_env): 2018-07-10 Thibault Saunier [Flatpak] Fix running wpt tests inside flatpak https://bugs.webkit.org/show_bug.cgi?id=187490 Reviewed by Philippe Normand. Still not *all* passing but a big majority do. * Scripts/webkitpy/w3c/wpt_runner.py: (main): Generate the /etc/hosts and mount it in flatpak as required. (WPTRunner.prepare_wpt_checkout): Renamed as we need to first checkout WPT code before generating /etc/hosts. (WPTRunner._prepare_wpt_checkout): Deleted. * flatpak/flatpakutils.py: Added a stdout= argument to run_in_sandbox() and added a way to pass extra env to flatpak itself (so we can mount /etc/hosts). Stopped passing `--device=all` as it is not required since r233638 (Bug 187400). * flatpak/org.webkit.WebKit.yaml: Added virtualenv for python2 as required by wpt. 2018-07-10 Thibault Saunier [Flatpak] Use logging to print debug information https://bugs.webkit.org/show_bug.cgi?id=187496 Reviewed by Philippe Normand. * flatpak/flatpakutils.py: (WebkitFlatpak.load_from_args): (WebkitFlatpak.clean_args): (WebkitFlatpak.run_in_sandbox): 2018-07-09 Timothy Hatcher Semantic colors don't update when accessibility Increase Contrast mode is enabled. https://bugs.webkit.org/show_bug.cgi?id=187425 rdar://problem/39948240 rdar://problem/41796865 Reviewed by Tim Horton. * TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm: (TestWebKitAPI.WebKit.LinkColorWithSystemAppearance): Use new color value. 2018-07-09 Simon Fraser Fix dump-class-layout to show bit padding, and fix issues with padding offsets https://bugs.webkit.org/show_bug.cgi?id=187442 Reviewed by Daniel Bates. Synthetic padding members were shown with the wrong offset because they used the absolute offset rather than the class-relative offset. This didn't change the padding math, but made the output confusing. Also add support for showing empty bits in bitfields, and fix computation of padding after bitfields. Empty bits are computed by inserting a bit padding member after a bitfield that is not followed by another bitfield (making the assumption that bit padding will fill to the next byte boundary). The computation of padding after bitfields was also wrong, since lldb's member_type.GetByteSize() just reports the size of the type without the bitfield modifier (e.g. for "unsigned : 2" it returned 4). Fix by setting the byte size for bitfield fields to the number of bits rounded up to the next byte; this allows byte padding following the bitfield to be computed correctly. Add or modify test to cover these issues. * lldb/dump_class_layout_unittest.py: (serial_test_ClassWithPaddedBitfields): (serial_test_MemberHasBitfieldPadding): (serial_test_InheritsFromClassWithPaddedBitfields): * lldb/lldbWebKitTester/DumpClassLayoutTesting.cpp: (avoidClassDeadStripping): * lldb/lldb_dump_class_layout.py: (ClassLayoutBase): (ClassLayoutBase._to_string_recursive): (ClassLayout._parse): (ClassLayout._compute_padding_recursive): 2018-07-09 Youenn Fablet StringView operator==(char*) should check the length of the string https://bugs.webkit.org/show_bug.cgi?id=187422 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WTF/StringView.cpp: (TestWebKitAPI::equal2): (TestWebKitAPI::TEST): 2018-07-09 Ross Kirsling [WinCairo] httpd service install needs to precede server start https://bugs.webkit.org/show_bug.cgi?id=187283 Reviewed by Daniel Bates. * Scripts/webkitpy/port/base.py: (Port.check_build): Remove unused parameter `needs_http`. (Port.check_sys_deps): (Port.start_http_server): Move `check_httpd` call. * Scripts/webkitpy/port/win.py: (WinPort.check_httpd): Added. (WinCairoPort.check_httpd): Deleted. Move `httpd -k install` logic to common Windows location. * Scripts/webkitpy/layout_tests/controllers/manager.py: (Manager._set_up_run): * Scripts/webkitpy/performance_tests/perftestsrunner.py: * Scripts/webkitpy/port/gtk.py: (GtkPort.check_sys_deps): * Scripts/webkitpy/port/ios_simulator.py: (IOSSimulatorPort.check_sys_deps): * Scripts/webkitpy/port/mock_drt.py: (MockDRTPort.check_build): (MockDRTPort.check_sys_deps): * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.integration_test_check_sys_deps): (test_check_build): * Scripts/webkitpy/port/test.py: * Scripts/webkitpy/port/wpe.py: (WPEPort.check_sys_deps): * Scripts/webkitpy/tool/commands/perfalizer.py: (PerfalizerTask.run): Remove `needs_http` arguments. 2018-07-09 Philippe Normand [Flatpak] Unreviewed, switch to https for the gst-libav tarball. * flatpak/org.webkit.WebKit.yaml: 2018-07-09 Thibault Saunier [Flatpak] HTTP layout tests broken due to missing CGI.pm in the sandbox https://bugs.webkit.org/show_bug.cgi?id=187384 Reviewed by Philippe Normand. And make it usable inside the sandbox even when perl is launched "tainted" (as the PERL5LIB won't work otherwise). * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): * flatpak/org.webkit.WebKit.yaml: 2018-07-09 Thibault Saunier [WPE][GTK] Mount /dev/shm on /run/shm in sandbox https://bugs.webkit.org/show_bug.cgi?id=187400 Reviewed by Philippe Normand. This is where it is expected to be when it is a symlink, without mounting it the websocket python server can't work inside the sandbox. * flatpak/flatpakutils.py: (WebkitFlatpak.run_in_sandbox): 2018-07-08 Filip Pizlo run-benchmark should run ARES-6 1.0.1 https://bugs.webkit.org/show_bug.cgi?id=187452 Reviewed by Sam Weinig. We forgot to update this when we released 1.0.1! * Scripts/webkitpy/benchmark_runner/data/plans/ares6.plan: 2018-07-07 Youenn Fablet WPT importer should create dummy HTML files for *.window.js script files https://bugs.webkit.org/show_bug.cgi?id=187426 Reviewed by Ryosuke Niwa. Some WPT tests use *.window.js tests, which should be accessed as *.window.html. Do the same strategy as done for worker.js/any.js files. * Scripts/webkitpy/w3c/test_importer.py: (TestImporter.write_html_files_for_templated_js_tests): 2018-07-07 Wenson Hsieh Introduce a layout milestone to track when the document contains a large number of rendered characters https://bugs.webkit.org/show_bug.cgi?id=187412 Reviewed by Ryosuke Niwa. Add a new API test to check that we observe the new rendering milestone in an article-like document. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html: Added. * TestWebKitAPI/Tests/ios/RenderingProgressTests.mm: (TEST): 2018-06-30 Simon Fraser dump-class-layout reports wrong padding in many cases https://bugs.webkit.org/show_bug.cgi?id=185801 Reviewed by Dan Bates. Enhance dump-class-layout, fixing bugs and adding unit tests. This also includes the patch from bug 187141. Move the code that uses lldb to fetch the class layout to its own module, lldb_dump_class_layout.py, so it can be unit tested. Change this code to build up a data structure for the class. This is necessary since correct padding computation is easier with second traversal over the data structure. Try to deal with the empty base class optimization, which is necessary to report correct padding in classes using std::unique_ptr, and correctly handle virtual base classes. The ClassLayoutBase class knows how to test for equality and generate a string or string list representation of itself. The derived ClassLayout class knows how to build up the class layout using the lldb Python bindings. Finally we wrap the lldb debugger instance in LLDBDebuggerInstance so that we don't have to make a new one for each unit test. The tests have to run serially. Add to lldbWebKitTester a .cpp file that contains a set of C++ classes to unit-test dump-class-layout. * Scripts/dump-class-layout: (main): * lldb/dump_class_layout_unittest.py: (destroy_cached_debug_session): (TestDumpClassLayout): (TestDumpClassLayout.setUpClass): (TestDumpClassLayout.setUp): (TestDumpClassLayout.serial_test_BasicClassLayout): (serial_test_PaddingBetweenClassMembers): (serial_test_BoolPaddingClass): (serial_test_ClassWithEmptyClassMembers): (serial_test_SimpleVirtualClass): (serial_test_SimpleVirtualClassWithNonVirtualBase): (serial_test_InterleavedVirtualNonVirtual): (serial_test_ClassWithTwoVirtualBaseClasses): (serial_test_ClassWithClassMembers): (serial_test_ClassWithBitfields): (serial_test_ClassWithUniquePtrs): (serial_test_ClassWithOptionals): (TestDumpClassLayout.test_BasicClassLayout): Deleted. * lldb/lldbWebKitTester/DumpClassLayoutTesting.cpp: (EmptyClass::doStuff): (VirtualBaseClass::~VirtualBaseClass): (VirtualBaseClass2::~VirtualBaseClass2): (SimpleVirtualClass::~SimpleVirtualClass): (SimpleVirtualClass::doStuff): (SimpleVirtualClassWithNonVirtualBase::~SimpleVirtualClassWithNonVirtualBase): (SimpleVirtualClassWithNonVirtualBase::doStuff): (avoidClassDeadStripping): * lldb/lldb_dump_class_layout.py: (ansi_colors): (ClassLayoutBase): (ClassLayoutBase.__init__): (ClassLayoutBase.__ne__): (ClassLayoutBase.__eq__): (ClassLayoutBase._to_string_recursive): (ClassLayoutBase.as_string_list): (ClassLayoutBase.as_string): (ClassLayoutBase.dump): (ClassLayoutExpected): (ClassLayoutExpected.__init__): (ClassLayout): (ClassLayout.__init__): (ClassLayout._has_polymorphic_base_class): (ClassLayout._parse): (ClassLayout._probably_has_empty_base_class_optimization): (ClassLayout._compute_padding_recursive): (ClassLayout._compute_padding): (LLDBDebuggerInstance): (LLDBDebuggerInstance.__init__): (LLDBDebuggerInstance.__del__): (LLDBDebuggerInstance._get_first_file_architecture): (LLDBDebuggerInstance.layout_for_classname): (ClassLayoutDumper): Deleted. (ClassLayoutDumper.__init__): Deleted. (ClassLayoutDumper._get_first_file_architecture): Deleted. (ClassLayoutDumper.verify_type): Deleted. (ClassLayoutDumper.verify_type_recursive): Deleted. (ClassLayoutDumper._class_layout_as_string): Deleted. (ClassLayoutDumper.dump_to_string): Deleted. (ClassLayoutDumper.dump): Deleted. 2018-07-06 Christopher Reid [WinCairo] WebKit MiniBrowser crashes when attempting to navigate to certain URLs https://bugs.webkit.org/show_bug.cgi?id=187167 Reviewed by Alex Christensen. A null byte was written past the end of the buffer causing the crash. Some of the heap allocated buffers were also not getting deleted. * MiniBrowser/win/WebKitBrowserWindow.cpp: 2018-07-06 Thibault Saunier [WPE][GTK] Build php zlib plugin and enable sockets in flatpak https://bugs.webkit.org/show_bug.cgi?id=187401 Reviewed by Philippe Normand. * flatpak/org.webkit.WebKit.yaml: 2018-07-06 Aakash Jain [ews-build] EWS should run javascriptcore tests https://bugs.webkit.org/show_bug.cgi?id=187365 Reviewed by David Kilzer. * BuildSlaveSupport/ews-build/steps.py: Added step to run JavaScriptCoreTests. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. * BuildSlaveSupport/ews-build/factories.py: 2018-07-06 Carlos Garcia Campos [GTK][WPE] REGRESSION(r233111): Test /webkit/WebKitUserContentManager/script-message-received fails https://bugs.webkit.org/show_bug.cgi?id=187383 Reviewed by Žan Doberšek. This is actually a problem in the test itself. The problem is that we run js, connect to message-received and quite the main loop when the message is received, which happens before the run js operation has been completed. The test finishes early and since r233111 an IPC message is still pending (I guess the run js callback) and the web page is still protected. Just adding a run loop operation before finishing the test would fix it. We should wait for the js run to complete, instead of the message. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp: (UserScriptMessageTest::scriptMessageReceived): (UserScriptMessageTest::waitUntilMessageReceived): (UserScriptMessageTest::runJavaScriptFinished): (UserScriptMessageTest::postMessageAndWaitUntilReceived): 2018-07-05 Youenn Fablet REGRESSION (r230843): Flash doesn't work; Produces blue box on page https://bugs.webkit.org/show_bug.cgi?id=187346 Reviewed by Ryosuke Niwa. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): (WTR::TestController::setBlockAllPlugins): When not blocked, set the load policy to allow once. * WebKitTestRunner/TestController.h: 2018-07-05 Aakash Jain [ews-build] Bindings-tests-EWS should output result in json https://bugs.webkit.org/show_bug.cgi?id=187330 Reviewed by David Kilzer. * BuildSlaveSupport/ews-build/steps.py: (RunBindingsTests): Passed --json-output parameter to run-bindings-tests. * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests. 2018-07-05 Aakash Jain [ews-build] WebKitPy-Tests-EWS should output result in json https://bugs.webkit.org/show_bug.cgi?id=187331 Follow-up fix to r233527. Extracting jsonFileName as a variable and re-using it. 2018-07-05 Aakash Jain [ews-build] WebKitPy-Tests-EWS should output result in json https://bugs.webkit.org/show_bug.cgi?id=187331 Reviewed by David Kilzer. * BuildSlaveSupport/ews-build/steps.py: (RunWebKitPyTests): Passed --json-output parameter to test-webkitpy. * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests. 2018-07-05 Philippe Normand [Flatpak] Add gst-libav to dependencies https://bugs.webkit.org/show_bug.cgi?id=187340 Reviewed by Žan Doberšek. * flatpak/org.webkit.WebKit.yaml: Use tarballs instead of git clones because the FFMPeg git server doesn't support shallow clones. 2018-07-05 Thibault Saunier [WPE][GTK]: Call gtk platform 'gtk' by default as this is what PortFactory expects https://bugs.webkit.org/show_bug.cgi?id=187322 Reviewed by Žan Doberšek. * flatpak/flatpakutils.py: (WebkitFlatpak.__init__): 2018-07-05 Zan Dobersek Unreviewed, rolling out r233511. Proper fix provided in bug #187322 Reverted changeset: "Unreviewed. Fixing a call in flatpakutils.py to PortFactory.get()," https://trac.webkit.org/changeset/233511 2018-07-04 Zan Dobersek Unreviewed. Fixing a call in flatpakutils.py to PortFactory.get(), enforcing the passed platform argument to always be lowercase, as is expected from the PortFactory code. * flatpak/flatpakutils.py: (WebkitFlatpak.clean_args): 2018-07-04 Tim Horton Introduce PLATFORM(IOSMAC) https://bugs.webkit.org/show_bug.cgi?id=187315 Reviewed by Dan Bernstein. * TestWebKitAPI/Configurations/Base.xcconfig: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 2018-07-03 Brady Eidson WebKit.ResponsivenessTimerCrash sometimes fails. https://bugs.webkit.org/show_bug.cgi?id=187314 Reviewed by Tim Horton. Actually unregister observers from objects we're about to destroy before destroying them. * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm: (-[ResponsivenessTimerObserver observeValueForKeyPath:ofObject:change:context:]): 2018-07-03 Fujii Hironori update-webkitgtk-flatpak fails if running with python2 https://bugs.webkit.org/show_bug.cgi?id=187240 Reviewed by Michael Catanzaro. urllib.urlretrieve of Python2 sends invalid requests. Use urllib2.urlopen instead. * flatpak/flatpakutils.py: Import urllib2.urlopen for Python2, urllib.request.urlopen for Python3. (FlatpakRepo.repo_file): Copy the content of urlopen result to the temporary file. 2018-07-03 Chris Dumez Make CallbackMap::invalidate() safe to re-enter https://bugs.webkit.org/show_bug.cgi?id=187298 Reviewed by Geoffrey Garen. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: (TEST): 2018-07-03 Chris Dumez [Cocoa] Disable vnode guard related simulated crashes for WKTR / DRT and WebSQL https://bugs.webkit.org/show_bug.cgi?id=187270 Reviewed by Geoffrey Garen. Disable vnode guard related simulated crashes for WKTR / DRT by setting the expected environment variable in the test driver. * Scripts/webkitpy/port/driver.py: (Driver._setup_environ_for_driver): 2018-07-03 Eric Carlson Video sometimes flickers when playing to AppleTV https://bugs.webkit.org/show_bug.cgi?id=187193 Unreviewed, fix test broken by r233435. * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm: (TestWebKitAPI::waitUntilAudioSessionCategoryIsEqualTo): Poll for a change in audio session category because it doesn't necessarily happen synchronously. (TestWebKitAPI::TEST): 2018-07-03 Thibault Saunier Unreviewed, add myself as a WebKit committer. And canonicalize the file as suggested by `check-webkit-style` * Scripts/webkitpy/common/config/contributors.json: 2018-07-03 Basuke Suzuki check-webkit-style: Run the tool without SVN client. https://bugs.webkit.org/show_bug.cgi?id=187294 Reviewed by Daniel Bates. When invoking check-webkit-style without SVN client, the exception was raised and terminated. Using Git repository is acceptable workflow according to the wording on: and using Subversion is considered optional by following link: . This patch makes it so that people with only a Git checkout of WebKit that commit using the commit-queue (or another machine with an SVN checkout) can run check-webkit-style. * Scripts/webkitpy/common/checkout/scm/svn.py: (SVN.in_working_directory): 2018-07-03 Aakash Jain Remove old JSCTestsFactory Follow-up fix to r233471. 2018-07-03 Aakash Jain [ews-build] Add support for JSC-Tests-EWS https://bugs.webkit.org/show_bug.cgi?id=187201 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/factories.py: (JSCTestsFactory): Added JSCTestsFactory. * BuildSlaveSupport/ews-build/steps.py: (CompileJSCOnly): Command to compile JSC. * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests. * BuildSlaveSupport/ews-build/config.json: Changed platform to jsc-only. This matches with build.webkit.org configuration. 2018-07-03 Zalan Bujtas [LFC] Add test-list file for regression testing https://bugs.webkit.org/show_bug.cgi?id=187296 Reviewed by Antti Koivisto. run-webkit-tests --test-list=./Tools/LayoutReloaded/misc/LFC-passing-tests.txt * LayoutReloaded/misc/LFC-passing-tests.txt: Added. 2018-07-03 John Wilander Resource Load Statistics: Make WebsiteDataStore::getAllStorageAccessEntries() call the right network process instead of iterating over the process pools https://bugs.webkit.org/show_bug.cgi?id=187277 Reviewed by Chris Dumez. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::getAllStorageAccessEntries): 2018-07-02 Wenson Hsieh Fix a leak in ActionSheetTests.DismissingActionSheetShouldNotDismissPresentingViewController https://bugs.webkit.org/show_bug.cgi?id=187280 Reviewed by Tim Horton. Add a missing `adoptNS()`. * TestWebKitAPI/Tests/ios/ActionSheetTests.mm: (TestWebKitAPI::TEST): 2018-07-02 Myles C. Maxfield [Cocoa] Google Fonts doesn't work if the user has the requested font locally-installed https://bugs.webkit.org/show_bug.cgi?id=187228 Reviewed by Brent Fulgham. The test only fails before the patch if the lookup for Helvetica2 is allowed to occur. * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::allowedFontFamilySet): 2018-07-02 Ryosuke Niwa run-benchmark should include the version number of MotionMark's results https://bugs.webkit.org/show_bug.cgi?id=187274 Reviewed by Jon Lee. Append the version number as a part of the suite name. * Scripts/webkitpy/benchmark_runner/data/patches/webserver/MotionMark.patch: 2018-07-02 Wenson Hsieh [WK1] editing/spelling/markers.html is failing on recent builds of macOS Mojave https://bugs.webkit.org/show_bug.cgi?id=187253 Reviewed by Tim Horton. Enhances and refactors LayoutTestSpellChecker, which was introduced in r233412. * DumpRenderTree/TestRunner.cpp: (setSpellCheckerResultsCallback): Rename setSpellCheckerTextReplacements to setSpellCheckerResults. (TestRunner::staticFunctions): (setSpellCheckerTextReplacementsCallback): Deleted. * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setSpellCheckerResults): (TestRunner::setSpellCheckerTextReplacements): Deleted. * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::setSpellCheckerResults): (TestRunner::setSpellCheckerTextReplacements): Deleted. * TestRunnerShared/cocoa/LayoutTestSpellChecker.h: * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestTextCheckingResult initWithType:range:replacement:details:]): (-[LayoutTestTextCheckingResult grammarDetails]): (-[LayoutTestSpellChecker reset]): (-[LayoutTestSpellChecker results]): (-[LayoutTestSpellChecker setResults:]): (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Add support for passing in a list of grammar correction detail ranges. Necessary for simulating grammar errors. (-[LayoutTestSpellChecker checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:]): Tweaked to always call the superclass method. This ensures that we set the `orthography` and `wordCount` outpointers if applicable. (-[LayoutTestSpellChecker requestCheckingOfString:range:types:options:inSpellDocumentWithTag:completionHandler:]): Added support for simulating asynchronous spell checking. (-[LayoutTestTextCheckingResult initWithType:range:replacement:]): Deleted. (-[LayoutTestSpellChecker replacements]): Deleted. (-[LayoutTestSpellChecker setReplacements:]): Deleted. (-[LayoutTestSpellChecker setReplacementsFromJSObject:inContext:]): Deleted. 2018-07-02 Brady Eidson Another unreviewed followup to: Crash notifying observers of responsiveness state change * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView typeCharacter:]): Move this back to the Mac-only category, as we won't be running this test on iOS for other reasons. 2018-07-02 Brady Eidson Unreviewed followup to: Crash notifying observers of responsiveness state change * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm: Need the C-SPI for this test. 2018-07-02 Brady Eidson Crash notifying observers of responsiveness state change and https://bugs.webkit.org/show_bug.cgi?id=187262 Reviewed by Tim Horton. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm: Added. (-[RTObserver observeValueForKeyPath:ofObject:change:context:]): (TestWebKitAPI::TEST): * TestWebKitAPI/cocoa/TestWKWebView.h: * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView typeCharacter:]): (-[TestWKWebView hostWindow]): 2018-07-02 Michael Catanzaro [WPE][GTK] flatpakutils.py should respect set-webkit-configuration build type https://bugs.webkit.org/show_bug.cgi?id=187218 Reviewed by Philippe Normand. Using the webkitpy Config module, if the build type is not passed on the command line, we read it from WebKitBuild/Configuration and respect it. * flatpak/flatpakutils.py: (WebkitFlatpak.__init__): (WebkitFlatpak.clean_args): 2018-07-02 Zan Dobersek [WPE] Add touch support to WindowViewBackend https://bugs.webkit.org/show_bug.cgi?id=187245 Reviewed by Carlos Garcia Campos. Add touch input support to the WindowViewBackend implementation, plugging into the Wayland protocol in order to get properly notified about these events, and then dispatching them against the appropriate wpe_view_backend object so that WebKit can process them. * wpe/backends/ViewBackend.cpp: (WPEToolingBackends::ViewBackend::dispatchInputTouchEvent): * wpe/backends/ViewBackend.h: * wpe/backends/WindowViewBackend.cpp: * wpe/backends/WindowViewBackend.h: 2018-07-02 Rob Buis [GTK] ASSERTION FAILED: url == m_string in UserAgentQuirks test https://bugs.webkit.org/show_bug.cgi?id=186838 This URL constructor expects canonicalized input, so fix the passed URL. I missed this one some weeks ago since I had an older checkout. Reviewed by Michael Catanzaro. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2018-07-01 Wenson Hsieh [macOS] Text replacements that end with symbols are expanded immediately https://bugs.webkit.org/show_bug.cgi?id=187225 Reviewed by Darin Adler. Adds testing support for mocking NSSpellChecker's text checking results. See below for more details, and the new layout test for an example of its usage. * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: * DumpRenderTree/TestRunner.cpp: (setSpellCheckerTextReplacementsCallback): Add bindings support in TestRunner to specify a set of text replacement mappings. Each entry in the dictionary maps a string representing an input to the NSSpellChecker to some information describing the spell checking result that LayoutTestSpellChecker will return. (TestRunner::staticFunctions): * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebViewToConsistentStateBeforeTesting): Restore the original shared NSSpellchecker before transitioning to the next layout test, if needed. * DumpRenderTree/mac/DumpRenderTreeSpellChecker.mm: Removed. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::setSpellCheckerLoggingEnabled): (TestRunner::setSpellCheckerTextReplacements): These testRunner methods ensure that `-[NSSpellChecker sharedSpellChecker]` is swizzled to return our mock LayoutTestSpellChecker instance before calling into it. * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::setSpellCheckerTextReplacements): * TestRunnerShared/cocoa/LayoutTestSpellChecker.h: Renamed from Tools/DumpRenderTree/mac/DumpRenderTreeSpellChecker.h. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: Added. Moved DumpRenderTreeSpellChecker to LayoutTestSpellChecker, and made it compile for both WebKitTestRunner (modern WebKit) and DumpRenderTree (legacy WebKit) by putting it in TestRunnerShared. (existingGlobalLayoutTestSpellChecker): (ensureGlobalLayoutTestSpellChecker): (stringForCorrectionResponse): (nsTextCheckingType): (-[LayoutTestTextCheckingResult initWithType:range:replacement:]): (-[LayoutTestTextCheckingResult range]): (-[LayoutTestTextCheckingResult resultType]): (-[LayoutTestTextCheckingResult replacementString]): (-[LayoutTestTextCheckingResult description]): LayoutTestTextCheckingResult represents a fake NSTextCheckingResult containing spell checking results supplied by the layout test. (+[LayoutTestSpellChecker installIfNecessary]): (+[LayoutTestSpellChecker uninstallAndReset]): Helper methods to begin and end swizzling the shared NSSpellChecker. (-[LayoutTestSpellChecker reset]): Resets the state of the LayoutTestSpellChecker (this entails clearing the fake replacements dictionary and turning off logging for recorded spellchecking responses). (-[LayoutTestSpellChecker replacements]): (-[LayoutTestSpellChecker setReplacements:]): (-[LayoutTestSpellChecker setReplacementsFromJSObject:inContext:]): Helper method to take a `JSObjectRef` supplied by the test runner and transform it into a map of spell checking string inputs to LayoutTestTextCheckingResults. (-[LayoutTestSpellChecker checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:]): Consult the text replacement map and bail early if a match is found, before calling into real NSSpellChecker logic to perform spellchecking. (-[LayoutTestSpellChecker recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:]): Reimplement the original functionality in DumpRenderTreeSpellChecker to make `-recordResponse:…` print to stdout by overriding the method and printing if the `-spellCheckerLoggingEnabled` property has been set to YES. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: 2018-07-01 Thibault Saunier [WPE][GTK] Fix retrieving backtrace from within flatpak sandbox in test runner https://bugs.webkit.org/show_bug.cgi?id=187232 Reviewed by Michael Catanzaro. The place where host tmp folder is mounted changed to /run/host/ we need to take that into account. Also explicitely close temporary files as relying on garbage collection to remove them is a bad idea. Also minor optimization avoiding to compile regex for each backtrace retrieval. * Scripts/webkitpy/port/linux_get_crash_log.py: (GDBCrashLogGenerator): (GDBCrashLogGenerator._get_tmp_file_name): (GDBCrashLogGenerator._get_trace_from_systemd): 2018-06-30 Daniel Bates test-webkitpy never rebuilds lldbWebKitTester https://bugs.webkit.org/show_bug.cgi?id=187229 Reviewed by David Kilzer. Have test-webkitpy always call script build-lldbwebkittester to build lldbWebKitTester, if needed. Currently test-webkitpy only calls script build-lldbwebkittester if lldbWebKitTester does not exist in the build products directory for the active configuration (e.g. Debug); => we do not build lldbWebKitTester again if its source changes (say, as a result of hacking on lldbWebKitTester). Instead we should have test-webkitpy unconditionally call build-lldbwebkittester to ensure that we have an up-to-date build of lldbWebKitTester. * Scripts/webkitpy/test/main.py: (Tester._run_tests): (_find_lldb_webkit_tester): Deleted. 2018-06-30 Michael Catanzaro [CMake] build-webkit should be able to enable address sanitizer https://bugs.webkit.org/show_bug.cgi?id=187222 Reviewed by Daniel Bates. If 'set-webkit-configuration --asan' has been run, then build-webkit should pass -DENABLE_ADDRESS_SANITIZER=ON to CMake, so that it actually does something. This also works for build-jsc. * Scripts/webkitdirs.pm: (generateBuildSystemFromCMakeProject): 2018-06-30 Thibault Saunier Make check_flatpak() not verbose when only trying to run command inside flatpak https://bugs.webkit.org/show_bug.cgi?id=187187 Reviewed by Michael Catanzaro. * flatpak/flatpakutils.py: (run_in_sandbox_if_available): 2018-06-29 Daniel Bates build-webkit: Perl "use of uninitialized value $previousContents" https://bugs.webkit.org/show_bug.cgi?id=185776 Reviewed by Michael Catanzaro. Fixes an issue where reading an empty cached argument file would cause Perl "uninitialized value" warnings of the form: Use of uninitialized value $previousContents in chomp at C:/WebKit-BuildWorker/wincairo-wkl-debug/build/Tools/Scripts/webkitdirs.pm line 1969. Use of uninitialized value $previousContents in string ne at C:/WebKit-BuildWorker/wincairo-wkl-debug/build/Tools/Scripts/webkitdirs.pm line 1972. * Scripts/webkitdirs.pm: (isCachedArgumentfileOutOfDate): 2018-06-29 Daniel Bates Perl uninitialized value $isEnabled when running build-jsc using a CMake build https://bugs.webkit.org/show_bug.cgi?id=187208 Reviewed by Tim Horton. Share logic for computing the feature flags to enable in CMake with both script build-webkit and script build-jsc instead of duplicating it. This also fixes a bug in the version of this logic in build-jsc that was inadvertently not updated in r222394. In r222394 we removed the notion of a default value for a feature flag listed in webkitperl::FeatureList. We keep the current behavior of build-jsc and leave it up to the build system to determine whether to enable or disable ENABLE_EXPERIMENTAL_FEATURES. * Scripts/build-jsc: (buildMyProject): (cMakeArgsFromFeatures): Deleted. * Scripts/build-webkit: (cMakeArgsFromFeatures): Deleted; moved to webkitdirs.pm. * Scripts/webkitdirs.pm: (cmakeArgsFromFeatures): Moved code from script build-webkit so that it can be shared with build-jsc. 2018-06-29 Tim Horton Add -apple-color-filter and system appearance toggles to MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=187210 Reviewed by Simon Fraser. * MiniBrowser/mac/AppDelegate.m: (defaultConfiguration): * MiniBrowser/mac/SettingsController.h: * MiniBrowser/mac/SettingsController.m: (-[SettingsController _populateMenu]): (-[SettingsController validateMenuItem:]): (-[SettingsController toggleAppleColorFilterEnabled:]): (-[SettingsController appleColorFilterEnabled]): (-[SettingsController toggleUseSystemAppearance:]): (-[SettingsController useSystemAppearance]): * MiniBrowser/mac/WK1BrowserWindowController.m: (-[WK1BrowserWindowController didChangeSettings]): * MiniBrowser/mac/WK2BrowserWindowController.m: (-[WK2BrowserWindowController didChangeSettings]): 2018-06-29 Aditya Keerthi [macOS] Do not crash if there is an attempt to copy a file URL to the clipboard https://bugs.webkit.org/show_bug.cgi?id=187183 Reviewed by Wenson Hsieh. Added a 'runSingly' option to the TestOptions struct. Setting this option to true will force a new PlatformWebView to be created before running a test. This ensures that any state set by previous tests are not preserved. One example of the importance of having this ability is in the case where we want to test functionality that deals with read access to files. If a test were to load a valid file URL, universal read access will be granted in WebProcessProxy. This prevents us from testing cases that rely on us not have universal read access. Now, if we write the test using the 'runSingly' option, any state set by previous tests is cleared. Consequently, our test will behave as expected. * WebKitTestRunner/PlatformWebView.h: (WTR::PlatformWebView::viewSupportsOptions const): * WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): 2018-06-29 Daniel Bates [lldb-webkit] Non-empty strings may be pretty-printed as empty https://bugs.webkit.org/show_bug.cgi?id=187185 Reviewed by Simon Fraser. For some reason lldb(1) sometimes has an issue accessing members of WTF::StringImplShape via a WTF::StringImpl pointer (why?). Explicitly casting a WTF::StringImpl* to a WTF::StringImplShape* before accessing such members makes LLDB happy. I tried writing a test for this both for the LLVM project and to add to our lldb_webkit unit tests to no avail. I have only been able to reproduce this bug sporadically during my WebCore/WebKit debugging sessions so far. * lldb/lldb_webkit.py: (WTFStringImplProvider.__init__): Explicitly cast the WTF::StringImpl* to WTF::StringImplShape*. (WTFStringImplProvider.get_data8): Update code now that we are directly accessing WTF::StringImplShape*. (WTFStringImplProvider.get_data16): Ditto. 2018-06-29 Chris Dumez WebKitLegacy: Can trigger recursive loads triggering debug assertions https://bugs.webkit.org/show_bug.cgi?id=187121 Reviewed by Brent Fulgham. Add API test coverage. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/StartLoadInDidFailProvisionalLoad.mm: Added. (-[StartLoadInDidFailProvisionalLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]): (-[StartLoadInDidFailProvisionalLoadDelegate webView:didFinishLoadForFrame:]): (TestWebKitAPI::TEST): 2018-06-29 Lucas Forschler Teach bisect-builds to retrieve supported platforms from the rest api. https://bugs.webkit.org/show_bug.cgi?id=187195 This patch updates bisect-builds to use v2_2 of the API. v2_2 adds two api endpoints: /platforms, and /minified-platforms. These endpoints scan a dynamoDB database, returning the identifier key for all available platforms. The identifier keys are in the format: platform-architecture-configuration. Reviewed by Aakash Jain. * Scripts/bisect-builds: (get_api_archive_url): refactored from get_api_url. (get_platforms): helper function to retrieve from the platforms api. (minified_platforms): returns a list of minified platforms currently in the database (unminified_platforms): returns a list of unminified platforms currently in the database (is_supported_platform): checks if the platform-architecture-configuration combo is supported (fetch_revision_list): refactored to use get_api_archive_url (get_api_url): Deleted/refactored to get_api_archive_url. 2018-06-29 Keith Miller run-jsc should print when jsc exits with non-zero status https://bugs.webkit.org/show_bug.cgi?id=187192 Reviewed by Saam Barati. * Scripts/run-jsc: 2018-06-29 Aakash Jain [ews-build] Add timeout to webkitpy and webkitperl tests https://bugs.webkit.org/show_bug.cgi?id=187191 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (RunWebKitPerlTests.__init__): Set timeout of 2 minutes. (RunWebKitPyTests.__init__): Ditto. * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests. 2018-06-29 Carlos Alberto Lopez Perez [WPE]: Fix exception handling when flatpak is not installed https://bugs.webkit.org/show_bug.cgi?id=186771 Unreviewed followup-fix after r233362 This was causing failures when flatpak is not installed. * flatpak/flatpakutils.py: (check_flatpak): 2018-06-29 Ross Kirsling [JSCOnly] Restore Windows build. https://bugs.webkit.org/show_bug.cgi?id=187127 Reviewed by Michael Catanzaro. * Scripts/build-jsc: Fix condition for disabling FTL JIT on Windows. * Scripts/webkitdirs.pm: (executableProductDir): JSCOnly should still use bin64 on Windows (for consistency with full WebKit build). (determineIsWin64): JSCOnly already defaults to 64-bit on Windows with Ninja -- ensure that this is true even with MSBuild. 2018-06-29 Thibault Saunier [GTK][WPE]: Add a way to setup our development environment inside flatpak https://bugs.webkit.org/show_bug.cgi?id=186771 Reviewed by Carlos Alberto Lopez Perez. This patch introduce a way to setup the development environment inside flatpak[0] removing the need for jhbuild when doing so. Anything needed to build/run minibrowser/ run layout tests is provided either but the org.gnome.Sdk runtime or built with flatpak-builder. The workflow is very similar to the "jhbuild based" one except that you should use update-webkit$PORTNAME-flatpak instead of update-webkit$PORTNAME-libs and that script requires to specify a build configuration (--release is default). Our scripts have been updated to be able to run inside that new build environment. Since everything runs inside a flatpak sandbox, gdb needs to be run from within the sandbox, the script exposes a way to do it easily with the `--gdb` option: $ webkit-flatpak --gdb [-m COREDUMPCTL MATCHES] The Layout test `GDBCrashLogGenerator` has been taugth how to use that and is able to retrieve stacktrace as with the jhbuild based workflow. [0] http://flatpak.org * Scripts/build-webkit: * Scripts/generate-jsc-bundle: (main): * Scripts/run-gtk-tests: * Scripts/run-minibrowser: * Scripts/run-webdriver-tests: * Scripts/run-webkit-tests: * Scripts/run-wpe-tests: * Scripts/update-webkitgtk-libs: * Scripts/update-webkitwpe-libs: * Scripts/webkit-flatpak: Added. * Scripts/webkitdirs.pm: (getJhbuildPath): (getFlatpakPath): (inFlatpakSandbox): (runInFlatpak): (runInFlatpakIfAvalaible): (wrapperPrefixIfNeeded): (shouldUseFlatpak): * Scripts/webkitpy/port/base.py: (Port._path_to_apache): (Port._is_flatpak): (Port._apache_config_file_name_for_platform): (Port._should_use_flatpak): (Port): (Port._in_flatpak_sandbox): (Port._should_use_jhbuild): * Scripts/webkitpy/port/gtk.py: (GtkPort.setup_environ_for_server): * Scripts/webkitpy/port/linux_get_crash_log.py: (GDBCrashLogGenerator._get_trace_from_systemd): (GDBCrashLogGenerator.generate_crash_log): * Scripts/webkitpy/port/wpe.py: (WPEPort.setup_environ_for_server): * Scripts/webkitpy/w3c/wpt_runner.py: (main): * flatpak/files/default.xkm: Added. * flatpak/files/httpd-autogen.sh: Added. * flatpak/flatpakutils.py: Added. (Colors): (Console): (Console.message): (remove_extension_points): (remove_comments): (remove_comments._replacer): (load_manifest): (expand_manifest): (FlatpakObject): (FlatpakObject.__init__): (FlatpakObject.flatpak): (FlatpakPackages): (FlatpakPackages.__init__): (FlatpakPackages.__detect_packages): (FlatpakPackages.__detect_packages.in): (FlatpakPackages.__detect_runtimes): (FlatpakPackages.__detect_apps): (FlatpakPackages.__iter__): (FlatpakRepos): (FlatpakRepos.__init__): (FlatpakRepos.update): (FlatpakRepos.add): (FlatpakRepo): (FlatpakRepo.__init__): (FlatpakRepo.repo_file): (FlatpakPackage): (FlatpakPackage.__init__): (FlatpakPackage.__str__): (FlatpakPackage.is_installed): (FlatpakPackage.install): (FlatpakPackage.update): (WebkitFlatpak): (WebkitFlatpak.load_from_args): (WebkitFlatpak.__init__): (WebkitFlatpak.check_flatpak): (WebkitFlatpak.check_flatpak.comparable_version): (WebkitFlatpak.clean_args): (WebkitFlatpak.run_in_sandbox): (WebkitFlatpak.run): (WebkitFlatpak.has_environment): (WebkitFlatpak.setup_dev_env): (WebkitFlatpak.install_all): (WebkitFlatpak.run_gdb): (WebkitFlatpak.update_all): (is_sandboxed): (run_in_sandbox_if_available): * flatpak/org.webkit.GTK.yaml: Added. * flatpak/org.webkit.WPE.yaml: Added. * flatpak/org.webkit.WebKit.yaml: Added. * flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Added. * flatpak/patches/xvfb-0001-HACK-Avoid-compiling-a-kbm-file.patch: Added. 2018-06-28 Wenson Hsieh [iOS] DataTransfer.getData always returns the empty string when dropping text https://bugs.webkit.org/show_bug.cgi?id=187130 Reviewed by Ryosuke Niwa. Add 2 new API tests to verify that: - When dropping an item with text, markup, and URL representations, the page is allowed to get "text/html", "text/plain" and "text/uri-list" data. - Adding a suggested name to a plain text item causes WebKit to treat it as a file, and suppress access to DataTransfer.getData(). Additionally tweaks a couple of existing API tests. Namely, in two API tests (ExternalSourceOverrideDropFileUpload and ExternalSourceHTMLToUploadArea) only a markup string is dropped, and we previously expected to handle the drop as a file. To allow this test to continue serving its purpose, tweak them such that the registered items appear to be file-backed (i.e. by adding a suggested filename in one of the tests, and specifying UIPreferredPresentationStyleAttachment in the other). * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: (TestWebKitAPI::TEST): 2018-06-28 Basuke Suzuki Unreviewed, rolling out r226652. https://bugs.webkit.org/show_bug.cgi?id=180827 "PlatformInfo should never be instantiated in isolation. So, PlatformInfo should not have default argument values. The preferred way to get a PlatformInfo object is to instantiate a Host object." (Requested by dbates). Reverted changeset: "[webkitpy] PlatformInfo should have default argument for casual use" https://bugs.webkit.org/show_bug.cgi?id=180827 2018-06-28 Simon Fraser Try to address test failures on the bots. Allow the test to distinguish between a failure to find the variable, and an error reporting vector capacity. * lldb/lldb_webkit_unittest.py: (TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector): (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity): 2018-06-28 Lucas Forschler Add Windows support for WEBKIT_API_KEY. https://bugs.webkit.org/show_bug.cgi?id=187155 Reviewed by Daniel Bates. * EWSTools/start-queue-win.sh: 2018-06-28 Aakash Jain [ews-build] Add support for WebKitPy-Tests-EWS https://bugs.webkit.org/show_bug.cgi?id=187148 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/factories.py: Added WebKitPyFactory. * BuildSlaveSupport/ews-build/steps.py: Added build step RunWebKitPyTests. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. * BuildSlaveSupport/ews-build/config.json: Updated to use CamelCase. 2018-06-28 Daniel Bates Fix the iOS build following r233299 (https://bugs.webkit.org/show_bug.cgi?id=183744) Only build lldbWebKitTester on Mac as that is the only supported platform at the time of writing. * Makefile: 2018-06-28 Sihui Liu Cookie API: cookie creation time is wrong https://bugs.webkit.org/show_bug.cgi?id=187101 Reviewed by Geoffrey Garen. Add test coverage: make sure the cookie creation time returned is the same as set. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (TEST): 2018-06-28 Simon Fraser The lldb vector summary provider always shows zero capacity https://bugs.webkit.org/show_bug.cgi?id=187132 Reviewed by Daniel Bates. WTFVectorProvider in lldb_webkit.py was calling GetChildMemberWithName('m_capacity') on the buffer instead of the valobj. * lldb/lldbWebKitTester/main.cpp: (testSummaryProviders): * lldb/lldb_webkit.py: (WTFVectorProvider.update): * lldb/lldb_webkit_unittest.py: (TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string): (TestSummaryProviders): (TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector): (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity): 2018-06-28 Adam Barth Switch OS(FUCHSIA) to using JSCOnly https://bugs.webkit.org/show_bug.cgi?id=187133 Reviewed by Yusuke Suzuki. Switch Fuchsia from being a port to just being an OS. We now use a CMAKE_TOOLCHAIN_FILE to configure the toolchain and the target triple. * Scripts/webkitdirs.pm: Remove isFuchsia() and clients. Turns out we can do everything we need using a CMAKE_TOOLCHAIN_FILE via the --cmakeargs flag. 2018-06-27 Ryosuke Niwa Make MotionMark's plan file more robust against code changes https://bugs.webkit.org/show_bug.cgi?id=187116 Reviewed by Saam Barati. Moved the code to auto-start the test to the load event listener. * Scripts/webkitpy/benchmark_runner/data/patches/webserver/MotionMark.patch: 2018-06-27 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-27 Adam Barth Add Fuchsia support to build-jsc https://bugs.webkit.org/show_bug.cgi?id=187086 Reviewed by Yusuke Suzuki. Add Fuchsia port to webkitdirs.pm. This patch is sufficient to make build-jsc kick off a cmake for Fuchsia. * Scripts/webkitdirs.pm: (determineSourceDir): (argumentsForConfiguration): (determineXcodeSDK): (findMatchingArguments): (determinePortName): (isFuchsia): (setupAppleWinEnv): (wrapperPrefixIfNeeded): (relaunchIOSSimulator): (debugMiniBrowser): 2018-06-27 Daniel Bates style-queue "AttributeError: 'NoneType' object has no attribute 'is_obsolete'" when processing security patch https://bugs.webkit.org/show_bug.cgi?id=187120 Reviewed by David Kilzer. Teach the style queue how to refetch a patch from the status server as we did for non-Style EWS queues. * Scripts/webkitpy/tool/bot/stylequeuetask.py: (StyleQueueTask.validate): Similar to change made to EarlyWarningSystemTask.validate() in r233107, only check if the bug associated with the patch we are processing is closed if the attachment has a non-None Bug object. * Scripts/webkitpy/tool/commands/earlywarningsystem.py: (AbstractEarlyWarningSystem.refetch_patch): Extract logic to refetch a patch from here... * Scripts/webkitpy/tool/commands/queues.py: (PatchProcessingQueue._refetch_patch): ... to here. (StyleQueue.refetch_patch): Turn around and call PatchProcessingQueue._refetch_patch(). 2018-06-27 Tadeu Zagallo Unreviewed, add myself as a WebKit committer. * Scripts/webkitpy/common/config/contributors.json: 2018-06-27 Daniel Bates webkit-patch should ignore non-ASCII characters in the status server API key https://bugs.webkit.org/show_bug.cgi?id=187107 Reviewed by Lucas Forschler. The API key should only consists of ASCII characters. If it contains any non-ASCII characters then log a warning and ignore them. * Scripts/webkitpy/common/net/statusserver.py: (StatusServer.set_api_key): Force conversion to ASCII. * Scripts/webkitpy/tool/main.py: (WebKitPatch._status_server_api_key): Convert to ASCII, ignoring non-ASCII characters and logging a warning. 2018-06-27 Jonathan Bedard Enable WebKit iOS 12 build https://bugs.webkit.org/show_bug.cgi?id=187024 Reviewed by David Kilzer. * Scripts/configure-xcode-for-ios-development: (copyMissingHeadersFromSDKToSDKIfNeeded): Copy launch.h into embedded SDKs. 2018-06-27 Robin Morisset [WSL] Add a control-flow stack to the execution rules in WSL.ott https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. The goal of this is to enable (future) rules about uniform control flow for barriers. It required adding two new special construct: Join(s) and JoinExpr(e) whose only role is to pop the last element of the stack. * WebGPUShadingLanguageRI/SpecWork/WSL.ott: 2018-06-27 Robin Morisset [WSL] Fix minor formatting issues in the grammar section https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. * WebGPUShadingLanguageRI/SpecWork/source/index.rst: 2018-06-27 Robin Morisset [WSL] Put the full grammar in the Sphinx document https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. Put the grammar's production rules in the Sphinx document, along with a few comments and the rules for desugaring. Also includes a bit of clean-up of the antlr rules. * WebGPUShadingLanguageRI/SpecWork/WSL.g4: * WebGPUShadingLanguageRI/SpecWork/source/index.rst: 2018-06-26 Chris Dumez Deal better with the network process crashing on startup https://bugs.webkit.org/show_bug.cgi?id=187065 Reviewed by Geoffrey Garen. Add layout test coverage. * TestWebKitAPI/Tests/WebKit/NetworkProcessCrashWithPendingConnection.mm: (-[MonitorWebContentCrashNavigationDelegate _webView:webContentProcessDidTerminateWithReason:]): (-[MonitorWebContentCrashNavigationDelegate webView:didFinishNavigation:]): (TestWebKitAPI::TEST): 2018-06-25 Yusuke Suzuki Remove static initializers more https://bugs.webkit.org/show_bug.cgi?id=186969 Reviewed by Michael Catanzaro. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::assignedUrlsCache): (WTR::dumpResourceURL): (WTR::InjectedBundlePage::resetAfterTest): (WTR::InjectedBundlePage::didInitiateLoadForResource): * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: (WTR::AccessibilityNotificationHandler::setNotificationFunctionCallback): (WTR::AccessibilityNotificationHandler::removeAccessibilityNotificationHandler): (WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks): (WTR::AccessibilityNotificationHandler::disconnectAccessibilityCallbacks): * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::stringAttributeValue): Use NeverDestroyed<> and static functions. 2018-06-26 Aakash Jain [ews-build] Add support for compiling WebKit https://bugs.webkit.org/show_bug.cgi?id=187019 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/steps.py: (CompileWebKit): Added, class to compile WebKit. (CleanBuild): Added, class to clean up the build. (KillOldProcesses): Added, class to kill old processes. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. * BuildSlaveSupport/ews-build/config.json: Renamed ios-11-simulator to ios-simulator-11, to match with build.webkit.org code. Added configuration, architecture which is required for compiling. Renamed Release to release as the tools expect lower-case release. * BuildSlaveSupport/ews-build/factories.py: Added BuildFactory. * BuildSlaveSupport/ews-build/loadConfig.py: Renamed configuraton value to lower-case as tools expect lower-case values. * BuildSlaveSupport/ews-build/loadConfig_unittest.py: Ditto. 2018-06-26 Aakash Jain [ews-build] Add support for WebKitPerl-Tests-EWS https://bugs.webkit.org/show_bug.cgi?id=187023 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/config.json: Added WebKitPerl-tests-EWS. * BuildSlaveSupport/ews-build/factories.py: Added WebKitPerlFactory. * BuildSlaveSupport/ews-build/steps.py: Added build step RunWebKitPerlTests. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test. 2018-06-26 Aakash Jain [build.webkit.org] Rename badly named variable kls to schedulerType https://bugs.webkit.org/show_bug.cgi?id=186926 Reviewed by Lucas Forschler. * BuildSlaveSupport/build.webkit.org-config/loadConfig.py: (loadBuilderConfig): Renamed kls to schedulerType. 2018-06-26 Daniel Bates EWS should pass --status-host-uses-http when invoking webkit-patch, if needed https://bugs.webkit.org/show_bug.cgi?id=187061 Reviewed by Per Arne Vollan. When EWS invokes webkit-patch to perform an operation (e.g. apply an attachment) it should pass the command line option --status-host-uses-http, if EWS was started with this command line option, so that we query the status server over HTTP in child "webkit-patch" processes as we do in the main EWS process. * Scripts/webkitpy/common/net/statusserver_mock.py: (MockStatusServer.__init__): * Scripts/webkitpy/tool/commands/queues.py: (AbstractQueue.run_webkit_patch): 2018-06-26 Daniel Bates webkit-patch: Make attachment commands work with status-server hosted attachments https://bugs.webkit.org/show_bug.cgi?id=187056 Reviewed by Per Arne Vollan. Allow the EWS bots to apply, build, test, check-style, and (in the future) land attachments hosted on the status server. We only download an attachment from the status server if we do not have sufficient permission to download it from Bugzilla (e.g. security-sensitive patches). A valid status server API key is required to run these commands by hand. Otherwise, the status server will not provide attachment data. * Scripts/webkitpy/common/net/statusserver_mock.py: (MockStatusServer.fetch_attachment): Log a message for testing purposes. * Scripts/webkitpy/tool/commands/download.py: (ProcessAttachmentsMixin._fetch_list_of_patches_to_process): Fetch the attachment from the status server if we do not have permission to fetch it from Bugzilla. * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: (EarlyWarningSystemTest._default_expected_logs): Update expected result when using a custom work item and when fetching an attachment from the status server. (_test_ews): Modified to take use_security_sensitive_patch (defaults to False) as to whether to use a security-sensitive patch when testing. (test_ewses_with_security_sensitive_patch): Added. 2018-06-26 Daniel Bates contributors.json fails to parse after r233209 Removing trailing ',' that caused this file to be malformed. Also ran "validate-committer-lists -c" to canonicalize the style of this file. * Scripts/webkitpy/common/config/contributors.json: 2018-06-26 Timothy Horton Add Aditya to contributors.json as a contributor * Scripts/webkitpy/common/config/contributors.json: 2018-06-26 Brent Fulgham Provide a way for Injected Bundles to indicate classes approved for NSSecureCoding https://bugs.webkit.org/show_bug.cgi?id=186788 Reviewed by Chris Dumez. Add a new test case to exercise the class check during NSSecureCoding. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/mac/CustomBundleObject.h: Added. * TestWebKitAPI/Tests/WebKit/mac/CustomBundleObject.mm: Added. (-[CustomBundleObject initWithValue:]): (+[CustomBundleObject supportsSecureCoding]): (-[CustomBundleObject copyWithZone:]): (-[CustomBundleObject initWithCoder:]): (-[CustomBundleObject encodeWithCoder:]): * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm: Added. (TestWebKitAPI::didReceiveMessageFromInjectedBundle): (TestWebKitAPI::didFinishLoadForFrame): * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter_Bundle.mm: Added. (TestWebKitAPI::CustomBundleParameterTest::CustomBundleParameterTest): (TestWebKitAPI::CustomBundleParameterTest::didCreatePage): 2018-06-25 Daniel Bates Log a message when fetching attachment data from the status server https://bugs.webkit.org/show_bug.cgi?id=187032 Reviewed by Zalan Bujtas. Currently we silently fetch from the status server an attachment when fetching the attachment from Bugzilla fails due to an access denied error. Instead we should emit a message when fetching data from the status server to indicate that webkit-patch/EWS is still processing the command/trying to obtain the patch. * Scripts/webkitpy/common/net/statusserver.py: (StatusServer._fetch_attachment_page): 2018-06-25 Aakash Jain [ews-build] Add support for Bindings-tests-EWS https://bugs.webkit.org/show_bug.cgi?id=187014 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/factories.py: (BindingsFactory): Added RunBindingsTests build step to BindingsFactory. * BuildSlaveSupport/ews-build/steps.py: (RunBindingsTests): Added build-step for running Bindings tests. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 2018-06-25 Aakash Jain [ews-build] Add support for Style-EWS https://bugs.webkit.org/show_bug.cgi?id=186955 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/factories.py: (Factory): Base class for all the factory. * BuildSlaveSupport/ews-build/loadConfig.py: Initialize factory with required parameters. * BuildSlaveSupport/ews-build/runUnittests.py: Added, script to run all the unit tests. * BuildSlaveSupport/ews-build/steps.py: Added. * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 2018-06-25 Youenn Fablet Add API to control mock media devices https://bugs.webkit.org/show_bug.cgi?id=186958 Reviewed by Eric Carlson. Add test runner API to clear/add/remove/reset mock media devices. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::addMockMediaDevice): (WTR::TestRunner::addMockCameraDevice): (WTR::TestRunner::addMockMicrophoneDevice): (WTR::TestRunner::addMockScreenDevice): (WTR::TestRunner::clearMockMediaDevices): (WTR::TestRunner::removeMockMediaDevice): (WTR::TestRunner::resetMockMediaDevices): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::addMockMediaDevice): (WTR::TestController::clearMockMediaDevices): (WTR::TestController::removeMockMediaDevice): (WTR::TestController::resetMockMediaDevices): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): 2018-06-25 Aakash Jain [ews-build] Add support for try Buildbot try schedulers https://bugs.webkit.org/show_bug.cgi?id=186948 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/config.json: Use Try_Userpass scheduler. * BuildSlaveSupport/ews-build/loadConfig.py: Updated to use try scheduler. 2018-06-25 Ross Kirsling [WinCairo] Unreviewed build fix for r233088. * BuildSlaveSupport/built-product-archive: (extractBuiltProduct): "move" throws instead of overwriting, so just use "copy" instead. 2018-06-25 Leo Balter [test262-runner] Sort the list of failing files in the HTML report https://bugs.webkit.org/show_bug.cgi?id=186998 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (printHTMLResults): The current list of failing files it not ordered and it's hard to read. This small patch will sort the list. 2018-06-25 Robin Morisset [WSL] Start writing the Sphinx document https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. Very early work, just has the lexer and a few fragments of the parser so far. Also fixing some minor mistake in the formal rules. * WebGPUShadingLanguageRI/SpecWork/WSL.g4: * WebGPUShadingLanguageRI/SpecWork/WSL.ott: * WebGPUShadingLanguageRI/SpecWork/source/conf.py: * WebGPUShadingLanguageRI/SpecWork/source/index.rst: 2018-06-23 Yusuke Suzuki [WTF] Add user-defined literal for ASCIILiteral https://bugs.webkit.org/show_bug.cgi?id=186839 Reviewed by Darin Adler. * TestWebKitAPI/Tests/WTF/StringOperators.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/WTFString.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/WorkerPool.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: (TEST_F): * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/URL.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/ios/PreviewLoader.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/mac/GPUTest.h: * TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm: (-[MockContentFilterEnabler initWithCoder:]): * TestWebKitAPI/Tests/mac/ContentFiltering.mm: (TestWebKitAPI::loadAlternateTest): 2018-06-22 Brady Eidson WKURLSchemeHandler doesn't handle sync XHR. and https://bugs.webkit.org/show_bug.cgi?id=186902 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: (-[SyncScheme webView:startURLSchemeTask:]): (-[SyncScheme webView:stopURLSchemeTask:]): (-[SyncMessageHandler userContentController:didReceiveScriptMessage:]): (catch): 2018-06-22 Daniel Bates Security EWS: bots fails with exception 'NoneType' object has no attribute 'is_closed' https://bugs.webkit.org/show_bug.cgi?id=186923 Reviewed by Lucas Forschler. Attachments downloaded from the status server (http://webkit-queues.webkit.org) do not have an associated Bug object (i.e. Attachment.bug() is None) and reflect the state they were in, including flags set, at the time they were uploaded to the status server. We will add support for fetching up-to-date status info about the attachment and its bug in . For now, we only check if the bug associated with the patch we are processing is closed if the attachment has a non-None Bug object. * Scripts/webkitpy/tool/bot/earlywarningsystemtask.py: (EarlyWarningSystemTask.validate): 2018-06-22 Ross Kirsling [Win] ImageDiff should use DLLLauncher https://bugs.webkit.org/show_bug.cgi?id=186927 ImageDiff should use DLLLauncher to find DLLs under WEBKIT_LIBRARIES, in the same way as DRT & TestWebKitAPI. Reviewed by Per Arne Vollan. * ImageDiff/CMakeLists.txt: * ImageDiff/ImageDiff.cpp: (dllLauncherEntryPoint): * ImageDiff/PlatformWin.cmake: 2018-06-22 Basuke Suzuki [style] Fix --git-index option for check-webkit-style command https://bugs.webkit.org/show_bug.cgi?id=186810 When --git-index is specified, it should be compared with HEAD, not the origin/master. Reviewed by Daniel Bates. * Scripts/webkitpy/common/checkout/scm/git.py: (Git.create_patch): * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: (test_create_patch_with_git_index): Added. 2018-06-22 Ryan Haddad Unreviewed, fix syntax error introduced by r233088. * BuildSlaveSupport/built-product-archive: (extractBuiltProduct): 2018-06-22 Ross Kirsling [WinCairo][Buildbot] Test bots should use same WinCairoRequirements version as the triggering build https://bugs.webkit.org/show_bug.cgi?id=186857 Reviewed by Lucas Forschler. * BuildSlaveSupport/built-product-archive: (archiveBuiltProduct): (extractBuiltProduct): Save and restore the WinCairoRequirements version using the build archive. * Scripts/download-github-release.py: Renamed from Tools/Scripts/download-latest-github-release.py. Generalize download script -- get the latest version by default, but allow an arbitrary version to be specified. * Scripts/update-vswhere.py: Consume renamed script. * Scripts/update-webkit-wincairo-libs.py: Consume renamed script and specify a version to download when a config file is present. 2018-06-20 Darin Adler [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity https://bugs.webkit.org/show_bug.cgi?id=186875 Reviewed by Anders Carlsson. * DumpRenderTree/mac/DumpRenderTree.mm: (activateTestingFonts): Use isDirectory:NO to create a URL for a font file. * WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm: (WTR::activateFonts): Ditto. (WTR::installFakeHelvetica): Ditto. 2018-06-22 Carlos Garcia Campos [GTK] WebDriver: use a dictionary for session capabilities in StartAutomationSession message https://bugs.webkit.org/show_bug.cgi?id=186915 Reviewed by Žan Doberšek. Update /webkit/WebKitAutomationSession/request-session to use the new StartAutomationSession message signature. * TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp: 2018-06-22 Carlos Garcia Campos Unreviewed. Fix GLib test /webkit/WebKitSecurityManager/file-xhr after r231000 We are now receiving two console messages instead of one. Simply update the test to check both messages. * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp: (consoleMessageReceivedCallback): (testWebContextSecurityFileXHR): 2018-06-22 Carlos Garcia Campos Unreviewed GLib gardening. Update expectations of TestSSL. /webkit/WebKitWebView/tls-errors-policy and /webkit/WebKitWebView/load-failed-with-tls-errors are failing only in the bots. * TestWebKitAPI/glib/TestExpectations.json: 2018-06-21 Daniel Bates EWS for security bugs https://bugs.webkit.org/show_bug.cgi?id=186291 Substitute webkit.status-api-key for webkit.status_api_key as Git configuration variables can only consist of alphanumeric characters and underscores (_) per the second paragraph of section Configuration File of : The variable names are case-insensitive, allow only alphanumeric characters and -, and must start with an alphabetic character. * Scripts/webkitpy/tool/main.py: (WebKitPatch._status_server_api_key_from_git): 2018-06-21 Daniel Bates EWS for security bugs https://bugs.webkit.org/show_bug.cgi?id=186291 In r232979, I inadvertently removed a line of code in _parse_authorized_api_keys() to define a local called api_keys. Add this code back. * QueueStatusServer/config/authorization.py: (_parse_authorized_api_keys): 2018-06-21 Daniel Bates EWS should not try to post comments or upload result archives to security-sensitive bugs unless it has access https://bugs.webkit.org/show_bug.cgi?id=186831 Reviewed by Lucas Forschler. Following r232979 security-sensitive patches are uploaded to the status server so that they can be retrieved and processed by EWS bots without the need for Bugzilla security bug access. Although the EWS machinery is robust against unexpected exceptions, including exceptions raised when interacting with Bugzilla bugs/attachments with insufficient credentials, we should not depend on such defenses as they cause webkit- patch to log a message for the "unexpected" exception. We should reserve such logging for truly unexpected exceptions that indicate a programming mistake that we need to fix. * Scripts/webkitpy/tool/commands/earlywarningsystem.py: (AbstractEarlyWarningSystem._post_reject_message_on_bug): Bail out early if we cannot access the bug. * Scripts/webkitpy/tool/commands/queues.py: (PatchProcessingQueue._can_access_bug): Added. (PatchProcessingQueue._upload_results_archive_for_patch): Only add an attachment if we can access the bug. (CommitQueue.process_work_item): Only post a rejection comment (i.e. call CommitterValidatorreject_patch_from_commit_queue()) if we can access the bug. 2018-06-21 Lucas Forschler bisect-builds --list not showing all builds https://bugs.webkit.org/show_bug.cgi?id=185790 The AWS Gateway API call into dynamoDB is limited to returning 1MB of query data. Our archive set has overgrown this limit, causing us to retrieve a truncated list of results. Fortunately, when this limit is reached, dynamoDB returns a "LastEvaluatedKey", which can be used to continue the query in another request. This patch teaches bisect-build to pass along this key when needed. The backend api was updated from v2 to v2_1 to support this new querystring option. Any existing code using v2 will not be affected. Reviewed by Aakash Jain. * Scripts/bisect-builds: (get_api_url): added optional LastEvaluatedKey argument, which will append the query string to the base api url. (fetch_revision_list): Added to allow a recursive call which will query until we retrieve every item requested. (main): teach how to use fetch_revision_list. 2018-06-21 Keith Rollin check-webkit-style should warn about exported inline functions https://bugs.webkit.org/show_bug.cgi?id=186861 Reviewed by Brent Fulgham. When checking binaries compiled with LTO enabled, WebKit's check-for-weak-vtables-and-externals script can complain about exported inline functions. For instance, in Source/WebCore/page/scrolling/ScrollingTree.h, the following: WEBCORE_EXPORT virtual void reportSynchronousScrollingReasonsChanged(MonotonicTime, SynchronousScrollingReasons) { } WEBCORE_EXPORT virtual void reportExposedUnfilledArea(MonotonicTime, unsigned /* unfilledArea */) { } Can result in the following error messages: ERROR: WebCore has a weak external symbol in it (.../OpenSource/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore) ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library. ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file. ERROR: symbol __ZN7WebCore13ScrollingTree25reportExposedUnfilledAreaEN3WTF13MonotonicTimeEj ERROR: symbol __ZN7WebCore13ScrollingTree40reportSynchronousScrollingReasonsChangedEN3WTF13MonotonicTimeEj Unfortunately, these errors are only emitted when LTO is enabled, meaning that a developer could check-in a file that will fail an LTO build if they don't build with that option locally. Therefore, try to head this off by updating check-webkit-style to identify and warn about these cases (which includes when an export macro is applied directly to an inline method as well as when an inline method is part of an exported class). * Scripts/webkitpy/style/checkers/cpp.py: (_FunctionState.begin): (_FunctionState.export_macro): (_ClassInfo.__init__): (check_for_non_standard_constructs): (check_function_definition): (process_line): (CppChecker): * Scripts/webkitpy/style/checkers/cpp_unittest.py: (FunctionDetectionTest.perform_function_detection): (FunctionDetectionTest.test_webcore_export): 2018-06-21 Aakash Jain [ews-build] unit-tests fail when run from another directory https://bugs.webkit.org/show_bug.cgi?id=186872 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/loadConfig.py: (loadBuilderConfig): Add support for passing master_prefix_path. * BuildSlaveSupport/ews-build/loadConfig_unittest.py: (ConfigDotJSONTest.test_configuration): Set master_prefix_path as current directory. 2018-06-21 Aakash Jain Add support for using localhost worker in OpenSource EWS Buildbot https://bugs.webkit.org/show_bug.cgi?id=186871 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/loadConfig.py: (loadBuilderConfig): Added a worker named 'local-worker' if use_localhost_worker option is used. * BuildSlaveSupport/ews-build/master.cfg: Check BUILDBOT_TESTING environment variable and use_localhost_worker if so. 2018-06-21 Aakash Jain Add force schedulers to OpenSource EWS Buildbot https://bugs.webkit.org/show_bug.cgi?id=186876 Reviewed by Lucas Forschler. * BuildSlaveSupport/ews-build/loadConfig.py: (loadBuilderConfig): Added support for ForceScheduler. 2018-06-21 Robin Morisset [WSL] Merge WSL_type.ott and WSL_exec.ott https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. I moved the execution rules into WSL_type.ott, that was renamed WSL.ott. I also changed the execution judgements: - they now emit memory events instead of having an explicit store (so they can be connected later to a memory model) - the environment is now unchangeable (except inside blocks, which are the only place that variable declarations can appear) - various rules were simplified. * WebGPUShadingLanguageRI/SpecWork/WSL.ott: Copied from Tools/WebGPUShadingLanguageRI/SpecWork/WSL_type.ott. * WebGPUShadingLanguageRI/SpecWork/WSL_exec.ott: Removed. * WebGPUShadingLanguageRI/SpecWork/WSL_type.ott: Removed. 2018-06-21 Leo Balter [test262-runner] Improve failures output https://bugs.webkit.org/show_bug.cgi?id=186858 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (main): (processResult): 2018-06-21 Caitlin Potter [Tools] add a --debug option to test262/Runner.pm for buildbots https://bugs.webkit.org/show_bug.cgi?id=186113 Reviewed by Michael Saboff. test262-runner runs Debug builds by default, but this allows us to be explicit about it in buildbots. * Scripts/test262/Runner.pm: (processCLI): 2018-06-21 Carlos Garcia Campos run-gtk-tests (glib/common.py) cannot determine build directory when webKitBranchBuild=true https://bugs.webkit.org/show_bug.cgi?id=185643 Reviewed by Frédéric Wang. Check if webKitBranchBuild is true in git config to add the branch name to the build path. * Scripts/webkitpy/common/checkout/scm/git.py: (Git.read_git_config): Add output_type parameter. (Git.read_config): Call read_git_config with cws and executive. (Git._upstream_branch): Use read_config(). (Git._assert_can_squash): Ditto. (Git.remote_branch_ref): Ditto. * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: (GitSVNTest.test_read_git_config): * glib/common.py: (get_build_path): 2018-06-20 Wenson Hsieh [WebKit on watchOS] Fixed position elements sometimes flicker when scrolling https://bugs.webkit.org/show_bug.cgi?id=186860 Reviewed by Tim Horton. Add a new API test to exercise a race condition between receiving remote layer tree commits and updating visible content rects which would result in the compositing layer for a fixed position element sometimes appearing in the wrong place. See WebKit ChangeLog for more details. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/fixed-nav-bar.html: Added. * TestWebKitAPI/Tests/ios/WKScrollViewTests.mm: Added. (traverseLayerTree): (TEST): 2018-06-20 Daniel Bates AttributeError: StatusServer instance has no attribute '_api_key' thrown when processing a patch https://bugs.webkit.org/show_bug.cgi?id=186852 Fixes an issue where StatusServer._api_key may not be defined. This issue manifests itself in a Python AttributeError exception when an EWS bot tries to fetch the next patch to process. Currently StatusServer._api_key is only defined when either the environment variable WEBKIT_STATUS_API_KEY or the Git configuration key webkit.status_api_key has a non-empty value. Instead we should always define StatusServer._api_key in the StatusServer constructor. * Scripts/webkitpy/common/net/statusserver.py: (StatusServer.__init__): 2018-06-20 Robin Morisset [WSL] Add details to the sphinx outline https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. Mostly improving the sphinx outline. Also started moving the execution rules to WSL_type.ott (which will eventually become WSL.ott). Tried formalizing the gathering of declarations into the environment, but I think I will scratch it. It is both trivial to do (and to explain in english) and a bit of a pain to formalize. * WebGPUShadingLanguageRI/SpecWork/WSL_type.ott: * WebGPUShadingLanguageRI/SpecWork/source/index.rst: 2018-06-20 Commit Queue Unreviewed, rolling out r232844. https://bugs.webkit.org/show_bug.cgi?id=186843 "Too many flakiness on the tests, so the EWS bots cant process patches correctly" (Requested by clopez on #webkit). Reverted changeset: "[GTK] Enable tests on the GTK EWS queue" https://bugs.webkit.org/show_bug.cgi?id=186559 https://trac.webkit.org/changeset/232844 2018-06-20 Rob Buis [GTK] ASSERTION FAILED: url == m_string in UserAgentQuirks test https://bugs.webkit.org/show_bug.cgi?id=186838 This URL constructor expects canonicalized input, so fix the passed URL. Reviewed by Frédéric Wang. * TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: (TestWebKitAPI::TEST): 2018-06-20 Robin Morisset [WSL] Make the typing rules explicitely translate type syntax into actual types https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. The typing rules must describe how and most importantly when typedefs and the like are resolved. This is important because they can be shadowed (by type variables for example), and we want to make it unambiguous what behaviour is required in that case. * WebGPUShadingLanguageRI/SpecWork/WSL.g4: * WebGPUShadingLanguageRI/SpecWork/WSL_type.ott: 2018-06-20 Yusuke Suzuki [GTK][WPE][Nicosia] Add name for Nicosia Painting Threads https://bugs.webkit.org/show_bug.cgi?id=186836 Reviewed by Carlos Garcia Campos. * TestWebKitAPI/Tests/WTF/WorkerPool.cpp: (TestWebKitAPI::TEST): 2018-06-20 Yusuke Suzuki [WPE] Remove warnings by setting nullptr for unused listeners https://bugs.webkit.org/show_bug.cgi?id=186835 Reviewed by Carlos Garcia Campos. frame, axis_source, axis_stop, and axis_discrete are unused. Setting nullptr explicitly to remove warnings in GCC. * wpe/backends/WindowViewBackend.cpp: 2018-06-19 Leo Balter [test262-runner] Reduce flakiness of unit tests for the runner https://bugs.webkit.org/show_bug.cgi?id=186824 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (main): * Scripts/webkitperl/test262_unittest/test262-runner-tests.pl: 2018-06-19 Leo Balter [test262-runner] Print results report to HTML https://bugs.webkit.org/show_bug.cgi?id=186790 Reviewed by Michael Saboff. After runing the tests, 2 html files are created with a list to failing tests and summaries. * Scripts/test262/Runner.pm: (main): (summarizeResults): (printHTML): 2018-06-19 Keith Rollin Crash running check-webkit-style on webrtc/.../exceptions.py https://bugs.webkit.org/show_bug.cgi?id=186816 Reviewed by Michael Catanzaro. It's not apparent to me why the crash is occurring. Trying to write a unittest that checks this file in isolation does not reproduce the crash. But the crash goes away when updating to pylint-0.25.2. * Scripts/webkitpy/thirdparty/__init__.py: (AutoinstallImportHook._install_pylint): 2018-06-19 Keith Rollin cpp style checker needs to know more about NOLINT https://bugs.webkit.org/show_bug.cgi?id=186796 Reviewed by Aakash Jain. Running check-webkit-style on ThirdParty/gtest/src/gtest-internal-inl.h crashes with a KeyError as it tries to look up information about a particular #include in a dictionary it maintains. The problem has to do with the following lines in gtest-internal-inl.h: #include // NOLINT #include The NOLINT annotation will prevent the cpp-checker from processing or even seeing that line. In skipping that line, information regarding that line is NOT added to some internal tables. However, when the code that checks that #includes are correctly alphabetized gets to the "gtest-spi.h" line, it will not respect the NOLINT annotation and will see the gtest.h line. When doing so, it runs afoul of the fact that it hadn't seen that line before and it crashes when it tries to look up that line in some internal records. Fix this by catering to the possibility that a #include line may not have been entered into these internal records. * Scripts/webkitpy/style/checkers/cpp.py: (check_include_line): * Scripts/webkitpy/style/checkers/cpp_unittest.py: 2018-06-19 Daniel Bates EWS for security bugs https://bugs.webkit.org/show_bug.cgi?id=186291 Update comment in AbstractEarlyWarningSystem.refetch_patch() to reference . * Scripts/webkitpy/tool/commands/earlywarningsystem.py: (AbstractEarlyWarningSystem.refetch_patch): 2018-06-19 Daniel Bates EWS for security bugs https://bugs.webkit.org/show_bug.cgi?id=186291 Reviewed by Lucas Forschler. Part 1 of 2. Implements support for EWS processing of patches on security sensitive bugs. We add new endpoints to the status server to support uploading and downloading of patches and associated metadata. When webkit-patch submits a patch for EWS processing it will now upload the contents and metadata for the patch to the status server if the patch is on a security sensitive bug. We teach the EWS machinery in webkitpy to query the status server for a patch only if fetching the patch from Bugzilla is not permitted due to an authorization error. Fetching patches from the status server requires an API key. The API key is read from the environment variable WEBKIT_STATUS_API_KEY or the value of the Git configuration key webkit.status_api_key (in that order). Contact me or another Apple engineer for an API key. Additionally, default to using HTTPS when querying the status server and expose an optional command line option called --status-host-uses-http to use the former behavior of querying over HTTP. * QueueStatusServer/config/authorization.py: Added. (_path_to_authorized_api_keys_file): Returns the absolute filesystem path to the file authorized_api_keys.txt. (_parse_authorized_api_keys): (authorized_api_keys): (_parse_authorization_header): Parses the API key from the Authorization header. We use a custom authentication scheme: "apikey". See remark below for more details. (is_authorized): Checks if the request includes an API key and whether that API key is in the list of authorized keys (performs a case-sensitive match). The API key may be specified either in a HTTP header Authorization or in the query string argument "apikey". When using the HTTP headers approach the Authorization header should have the form: "Authorization: apikey X" where X is the case-sensitive API key. * QueueStatusServer/handlers/fetchattachment.py: Added. (FetchAttachment): (FetchAttachment.get): * QueueStatusServer/handlers/releasepatch.py: (ReleasePatch.check_processed_by_all_queues): Returns whether the specified attachment was processed by all the queues. (ReleasePatch.post): Delete the patch from AppEngine (if we have it) once the patch was processed by all the queues. * QueueStatusServer/handlers/submittoews.py: (SubmitToEWS._should_add_to_ews_queue): Fix a typo in a comment while I am working in this code. * QueueStatusServer/handlers/uploadattachment.py: Added. (UploadAttachment): (UploadAttachment.get): (UploadAttachment.post): * QueueStatusServer/main.py: Add new routes /upload-attachment and /attachment to upload an attachment and view an attachment (or its metadata), respectively. * QueueStatusServer/model/attachmentdata.py: Added. (AttachmentData): (AttachmentData.add_attachment_data): (AttachmentData.lookup_if_exists): (AttachmentData.remove_attachment_data): * QueueStatusServer/templates/uploadattachment.html: Added. * Scripts/webkitpy/common/net/bugzilla/attachment.py: (Attachment.committer): (Attachment): (Attachment.to_json): Serialize to JSON so that we can upload it to AppEngine. (Attachment.from_json): Deserialize from JSON. This is used as part of downloading a patch from AppEngine. * Scripts/webkitpy/common/net/bugzilla/attachment_unittest.py: (AttachmentTest.test_convert_to_json_and_back): Added. * Scripts/webkitpy/common/net/bugzilla/bug.py: (Bug.groups): Returns a frozenset of groups that the bug is a member of. (Bug.is_security_sensitive): Returns whether the bug is in group Security-Sensitive. * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: (BugzillaQueries.fetch_attachment_ids_from_review_queue): Modified to take an optional boolean, only_security_bugs, as to whether to only fetch attachment ids for unreviewed patches associated with security bugs. By default, we keep the current behavior and query for the attachment ids of all unreviewed patches that the currently logged in Bugzilla user can see, which may include patches associated with security bugs. (Bugzilla._parse_date): Update for moved and renamed constant. See remark for class Bugzilla. (Bugzilla._parse_bug_dictionary_from_xml): Modified to return an empty dictionary if we do not have access to view the bug. Otherwise, extract the name of the group the bug is in. (Bugzilla.fetch_bug): Modified to return None if we do not have access to view the bug. (Bugzilla._parse_bug_title_from_attachment_page): Extracted out logic to parse the title of the Attachment page from _parse_bug_id_from_attachment_page() so that it can be used from both _parse_bug_id_from_attachment_page() and get_bug_id_for_attachment_id(). (Bugzilla): Moved class constant _bugzilla_date_format to Scripts/webkitpy/common/net/bugzilla/constants.py and renamed it to BUGZILLA_DATE_FORMAT. (Bugzilla.AccessError): (Bugzilla.AccessError.__init__): (Bugzilla._parse_bug_id_from_attachment_page): Modified to return a tuple of ("bug id", "error code") so that the caller can know the reason the parse failed if it did. The parse will fail if we do not have access to view the bug. (Bugzilla.bug_id_for_attachment_id): Modified to take a boolean throw_on_access_error (default: False) as to whether to raise a Bugzilla.AccessError exception and pass it through to get_bug_id_for_attachment_id(). (Bugzilla.get_bug_id_for_attachment_id): Modified to take a boolean throw_on_access_error (default: False) as to whether to raise a Bugzilla.AccessError exception if we do not have access to the bug associated with the specified attachment id. (Bugzilla.fetch_attachment): * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: (MockBugzillaQueries.fetch_attachment_ids_from_review_queue): (MockBugzilla): (MockBugzilla.fetch_attachment): (MockBugzilla.fetch_attachment_contents): (MockBugzilla.add_patch_to_bug): * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py: * Scripts/webkitpy/common/net/bugzilla/constants.py: Added. * Scripts/webkitpy/common/net/statusserver.py: (StatusServer) (StatusServer.__init__): Modified to take an boolean use_https as to whether to query the server using HTTPS (default: True - use HTTPS). (StatusServer.set_host): Moved logic to compute the server URL from her to _server_url(). (StatusServer.set_use_https): Added. (StatusServer.set_api_key): Added. (StatusServer._server_url): Added. (StatusServer._authorization_header_name_and_value_pair): Added. (StatusServer.results_url_for_status): Update to use _server_url(). (StatusServer._post_status_to_server): Ditto. (StatusServer._post_svn_revision_to_server): Ditto. (StatusServer._post_work_items_to_server): Ditto. (StatusServer._upload_attachment_to_server): Added. (StatusServer.upload_attachment): Added. (StatusServer._post_work_item_to_ews): Update to use _server_url(). (StatusServer.next_work_item): Ditto. (StatusServer._post_release_work_item): Ditto. (StatusServer._post_release_lock): Ditto. (StatusServer._fetch_attachment_page): Added. (StatusServer.fetch_attachment): Added. (StatusServer._fetch_url): Add the API Key to the request if we have one. (StatusServer.patch_status): Update to use _server_url(). (StatusServer.svn_revision): Ditto. * Scripts/webkitpy/common/net/statusserver_mock.py: (MockStatusServer.upload_attachment): Added. (MockStatusServer.fetch_attachment): Added. * Scripts/webkitpy/tool/bot/feeders.py: (EWSFeeder.feed): Modified to download patches on security bugs and upload them to the status server (AppEngine). * Scripts/webkitpy/tool/commands/download.py: (ProcessAttachmentsMixin._fetch_list_of_patches_to_process): Modified to handle the case when fetching the bug details from Bugzilla fail, say because we are not allowed to the view the bug. (ProcessBugsMixin._fetch_list_of_patches_to_process): Filter out None values for attachments that we failed to fetch, say because we are not allowed to the view the bug the attachment is on. * Scripts/webkitpy/tool/commands/earlywarningsystem.py: (AbstractEarlyWarningSystem.refetch_patch): For now, refetch the patch from the status server. Ideally, we need a way to ask the status server to fetch the patch again from Bugzilla (or at least its metadata) so that the EWS can check the current state of the patch (i.e. is it still marked r?). * Scripts/webkitpy/tool/commands/queries_unittest.py: (QueryCommandsTest.test_patches_to_review): Update expected result. * Scripts/webkitpy/tool/commands/queues.py: (AbstractPatchQueue._next_patch): Fetch the patch from the status server if we failed to fetch it from Bugzilla because we do not have permission to view it. * Scripts/webkitpy/tool/commands/queues_unittest.py: * Scripts/webkitpy/tool/commands/upload_unittest.py: (test_upload_of_security_sensitive_patch_with_no_review_and_ews): Added. * Scripts/webkitpy/tool/main.py: (WebKitPatch): (WebKitPatch._status_server_api_key_from_git): Read the API key from the Git configuration key webkit.status_api_key. (WebKitPatch._status_server_api_key): Read the API key from the environment variable WEBKIT_STATUS_API_KEY. (WebKitPatch.handle_global_options): Read the API key and update the state of the StatusServer object, if applicable. * Scripts/webkitpy/tool/steps/obsoletepatches.py: (ObsoletePatches.run): Modified to handle the case when fetching the bug details from Bugzilla fail, say because we are not allowed to the view the bug. * Scripts/webkitpy/tool/steps/submittoews.py: (SubmitToEWS.run): Upload the contents of the patch and the Bugzilla metadata about it to the status server if the patch was posted to a security bug. 2018-06-19 Daniel Bates QueueStatusServer: "'NoneType' object has no attribute 'message'" in ReleasePatch.get() when attachment is skipped by queue https://bugs.webkit.org/show_bug.cgi?id=186748 Reviewed by Lucas Forschler. Fixes an issue where releasing a patch that was skipped by a queue would cause an AttributeError in ReleasePatch.get(). When removing a patch from a queue we update queue statistics. As part of this process we record the last message posted to the status server for the patch. Currently if a patch is skipped by the queue when picking the next patch to process (say, we failed to fetch the attachment) then the queue does not post a message to the status server before it asks the status server to remove the patch from the list of patches the queue needs to process. Instead the queue should tell the status server that it chose to skip the patch before asking for the patch to be removed from its list of patches to process. * Scripts/webkitpy/common/net/bugzilla/attachment.py: (Attachment.bug_id): Return None if we do not have a bug ID. This can happen if we failed to fetch the attachment from Bugzilla (say, Bugzilla's markup changed) or we do not have have permission to view the Bugzilla bug. * Scripts/webkitpy/common/net/bugzilla/attachment_unittest.py: Added. (AttachmentTest): (AttachmentTest.test_no_bug_id): * Scripts/webkitpy/tool/commands/queues.py: (AbstractPatchQueue._next_patch): Call AbstractPatchQueue._did_skip() to post a status update to the status server and then release the work item. * Scripts/webkitpy/tool/commands/queues_unittest.py: (AbstractPatchQueueTest.test_next_patch): Update expected result. 2018-06-19 Leo Balter Test262-Runner: Improve files queue to optimize CPU usage/balancing https://bugs.webkit.org/show_bug.cgi?id=186443 Reviewed by Michael Saboff. This patch creates a queue manager for to keep the child process open while the parent process feed each child with test files to run. * Scripts/test262/Runner.pm: (processCLI): (main): 2018-06-19 Wenson Hsieh [WebKit on watchOS] Vend username text content type when using scribble in login fields https://bugs.webkit.org/show_bug.cgi?id=186791 Reviewed by Beth Dakin. Add testing support for grabbing the current text content type of the focused element. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::textContentType const): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::textContentType const): * TestRunnerShared/UIScriptContext/UIScriptController.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::textContentType const): 2018-06-19 Robin Morisset [WSL] Improving the typing rules https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. Several changes: - added a "well_formed" judgement, and defined it on function definitions (tying together with the typing rules) - cleaned up the desugaring relation (it now works on normal statements, and deals with for loops correctly) - added the null literal, the comma operator, the not operator, and parens - fixed a bunch of minor typographic issues * WebGPUShadingLanguageRI/SpecWork/WSL_type.ott: 2018-06-18 Robin Morisset [WSL] Starting to write the spec https://bugs.webkit.org/show_bug.cgi?id=186310 Rubberstamped by Filip Pizlo. This is a snapshot of my current work on the WSL spec (I will try to commit more regularly in the future). WSL.g4 is the grammar, in antlr4 format. I only made minor changes in it since last time. source/index.rst is the Sphinx document. It currently only contain a very rough outline, and some TODOs. It can be compiled with make html or make pdf, and relies on Makefile and source/conf.py. WSL_exec.ott is the current set of execution rules I have formalized. They will need a fair bit of refactoring, to account for the new desugaring phase, to be compatible with whatever memory model we decide on, and to be explicit about the memory layout of structs and arrays They can be compiled to latex with OTT (which in turn requires OCaml and opam). Just ask me by email if you want a pdf of all the rules without having to install all that. WSL_type.ott is the current set of local typing rules I have formalized. Like WSL_exex.ott, it is very incomplete, lacking all function calls among other things. * WebGPUShadingLanguageRI/SpecWork/Makefile: Added. * WebGPUShadingLanguageRI/SpecWork/WSL.g4: * WebGPUShadingLanguageRI/SpecWork/WSL_exec.ott: Added. * WebGPUShadingLanguageRI/SpecWork/WSL_type.ott: Added. * WebGPUShadingLanguageRI/SpecWork/source: Added. * WebGPUShadingLanguageRI/SpecWork/source/conf.py: Added. * WebGPUShadingLanguageRI/SpecWork/source/index.rst: Added. 2018-06-18 Chris Dumez Crash under WebProcessPool::networkProcessFailedToLaunch(): https://bugs.webkit.org/show_bug.cgi?id=186784 Reviewed by Brady Eidson. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2018-06-18 Zan Dobersek [webkitpy] WPTRunner should remove any metadata content before (re)generating it https://bugs.webkit.org/show_bug.cgi?id=186755 Reviewed by Carlos Garcia Campos. WPTRunner generates the WPT-compliant metadata content before each test run. Before it does so, it should remove the complete target directory for this metadata, allowing any change in the expectations JSON to be immediately reflected. For example, if a test failure expectation is removed, the related .ini metadata file is not generated anymore, but the stale .ini file isn't removed from the current metadata directory. To avoid this, purging the metadata directory and regenerating it from scratch should be done for each test run. * Scripts/webkitpy/w3c/wpt_runner.py: (WPTRunner._generate_metadata_directory): * Scripts/webkitpy/w3c/wpt_runner_unittest.py: (WPTRunnerTest.test_generate_metadata_directory): 2018-06-12 Darin Adler [Cocoa] Make some RetainPtr refinements to get more ready for ARC https://bugs.webkit.org/show_bug.cgi?id=186526 Reviewed by Anders Carlsson. * DumpRenderTree/mac/LayoutTestHelper.m: (colorProfileURLForDisplay): Use CFBridgingRelease instead of using CFAutorelease for a bridging use case. 2018-06-16 Leo Balter [test262-runner] Handle items from the config list with inline comments https://bugs.webkit.org/show_bug.cgi?id=186707 Reviewed by Michael Saboff. This is a workaround for the Yaml parser that bundles inline comments together with any items. * Scripts/test262/Runner.pm: (shouldSkip): 2018-06-16 Valerie R Young test262/Runner.pm: option to run test skipped in config file https://bugs.webkit.org/show_bug.cgi?id=186660 Reviewed by Michael Saboff. Adds option --skipped-files, -S, to run all files skipped in the config.yaml file. * Scripts/test262/Runner.pm: (processCLI): (main): (getBuildPath): (processFile): (processResult): 2018-05-18 Basuke Suzuki Unreviewed, add myself as a WebKit committer. * Scripts/webkitpy/common/config/contributors.json: 2018-06-15 Chris Dumez Add API test coverage for SW RegistrationDatabase destruction and fix issues found by the test https://bugs.webkit.org/show_bug.cgi?id=186681 Reviewed by Brady Eidson. Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 2018-06-15 Brady Eidson Crash in both StorageProcess and UIProcess when using custom WKWebsiteDataStores for data management. and https://bugs.webkit.org/show_bug.cgi?id=186682 Reviewed by Chris Dumez. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): 2018-06-15 Carlos Alberto Lopez Perez [GTK] Fix adding error in browserperfdash_runner. Unreviewed follow-up fix after r232820. * Scripts/webkitpy/browserperfdash/browserperfdash_runner.py: (BrowserPerfDashRunner.run): 2018-06-15 Carlos Alberto Lopez Perez [GTK][WKE] Disable memory pressure handling when running layout tests (WTR) https://bugs.webkit.org/show_bug.cgi?id=186663 Reviewed by Michael Catanzaro. Disable memory pressure handling when running tests via WTR by setting WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR=1 on the environment. * WebKitTestRunner/gtk/main.cpp: (main): * WebKitTestRunner/wpe/main.cpp: (main): 2018-06-15 Jonathan Bedard Add iOS 12 and watchOS 5 to webkitpy https://bugs.webkit.org/show_bug.cgi?id=186285 Reviewed by Aakash Jain. * BuildSlaveSupport/build.webkit.org-config/wkbuild.py: * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py: Trigger the right build queues for iOS 12 on check-in. * Scripts/webkitpy/common/version_name_map.py: (VersionNameMap.__init__): Add iOS 12, tvOS 12 and watchOS 5. * Scripts/webkitpy/common/version_name_map_unittest.py: (VersionMapTestCase.test_ios_name_by_version): Test iOS 12 version-name mapping. * Scripts/webkitpy/port/ios_device_unittest.py: (IOSDeviceTest.test_layout_test_searchpath_without_apple_additions): * Scripts/webkitpy/port/ios_simulator_unittest.py: (IOSSimulatorTest.test_layout_test_searchpath_without_apple_additions): 2018-06-14 Saam Barati sun spider compile time benchmark fails in run-jsc-benchmarks with JSC_validateOptions=1 https://bugs.webkit.org/show_bug.cgi?id=186647 Reviewed by Yusuke Suzuki. Let's use `unset JSC_useBlah` instead of `export JSC_useBlah=` to clear environment variables. The latter was causing crashes with when JSC_validateOptions was true. * Scripts/run-jsc-benchmarks: 2018-06-14 Carlos Alberto Lopez Perez [GTK][buildbot] Raise timeouts for the step benchmark-test on the GTK perf bot https://bugs.webkit.org/show_bug.cgi?id=186635 Reviewed by Michael Catanzaro. The current maximum timeout for a run-benchmark test is 1800 (Motionmark plan), but the buildbot default timeout for the whole step without text output is 1200. That means that a timeout on a single test can cause a whole step abort because the buildbot one will trigger first. Set the benchmark-test step timeout to 2000 to avoid this. When this benchmark-test was added in r197505 it was already added with a higher timeout than default (1500) due to the above problem, but it seems this has been ignored so far because buildbot won't accept the timeout to be set on the class definition (not even on the class constructor). The new timeout has to be defined in the addStep call itself. I have double-checked that by testing locally with the script run-buildbot-test.py And this upstream issue confirms that https://github.com/buildbot/buildbot/issues/3887 * BuildSlaveSupport/build.webkit.org-config/factories.py: (BuildAndPerfTestFactory.__init__): (DownloadAndPerfTestFactory.__init__): * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunBenchmarkTests): 2018-06-14 Roy Reapor Use new jQuery file layout https://bugs.webkit.org/show_bug.cgi?id=186636 Reviewed by Aakash Jain. * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html: * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/rebaseline.html: * TestResultServer/static-dashboards/run-embedded-unittests.html: 2018-06-14 Basuke Suzuki [Win][MiniBrowser] Change to use WebKit by default if it's available https://bugs.webkit.org/show_bug.cgi?id=186633 When MiniBrowser is built with WebKit, use it by default. Also add command line switch for WebKitLegacy. Reviewed by Youenn Fablet. * MiniBrowser/win/Common.cpp: (parseCommandLine): (dllLauncherEntryPoint): Deleted. * MiniBrowser/win/Common.h: * MiniBrowser/win/WinMain.cpp: (wWinMain): (dllLauncherEntryPoint): 2018-06-14 Matt Lewis Unreviewed, rolling out r232823. This caused both test timeouts and api failures. Reverted changeset: "[Mail] Use the Mail Viewer width as the base for resolving horizontal viewport units" https://bugs.webkit.org/show_bug.cgi?id=186585 https://trac.webkit.org/changeset/232823 2018-06-14 Youenn Fablet TestWebKitAPI.WebKit.WKNavigationResponsePDFType fails after r232815 https://bugs.webkit.org/show_bug.cgi?id=186631 Reviewed by Chris Dumez. * TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm: (TEST): Update PDF plug-in identifier. 2018-06-14 Leo Balter [test262-runner] Improve displayed settings, use rel paths https://bugs.webkit.org/show_bug.cgi?id=186626 Reviewed by Michael Saboff. Use relative paths for the information printed in the settings summary after calling the Test262 Runner. This provides a cleaner summary that is easier to read and consume. * Scripts/test262/Runner.pm: (processCLI): (getBuildPath): 2018-06-14 Leo Balter Test262-Runner: Add more information in the summarized stats https://bugs.webkit.org/show_bug.cgi?id=185749 Reviewed by Michael Saboff. This patch adds extra information in the summarized stats for the given results for each run. This includes a total of files, a total of executed files and a time information per path and feature. * Scripts/test262/Runner.pm: (summarizeResults): 2018-06-14 Carlos Alberto Lopez Perez [GTK] Enable tests on the GTK EWS queue https://bugs.webkit.org/show_bug.cgi?id=186559 Reviewed by Michael Catanzaro. Enable testing for the gtk-wk2 EWS queue. * Scripts/webkitpy/common/config/ews.json: 2018-06-14 Valerie R Young [test262-runner] Test output should summarize tests that are unexpectedly passing/failing. https://bugs.webkit.org/show_bug.cgi?id=186527 Reviewed by Michael Saboff. * Scripts/test262/Runner.pm: (main): In verbose mode, a summary of all new failing tests and all new passing tests are printed at the end of the script output. 2018-06-14 Zan Dobersek [GTK][WPE] MiniBrowsers should be able to ignore TLS errors https://bugs.webkit.org/show_bug.cgi?id=186557 Reviewed by Carlos Garcia Campos. Add the --ignore-tls-errors flags to the GTK and WPE MiniBrowsers. Enabling the flag enforces ignoring of TLS errors that occur during load. This is primarily useful for loading test cases from the wpt or run-webkit-httpd servers where testing-purpose certificates are used. * MiniBrowser/gtk/main.c: (main): * MiniBrowser/wpe/main.cpp: (main): 2018-06-13 Adrian Perez de Castro [WPE] Trying to access the remote inspector hits an assertion in the UIProcess https://bugs.webkit.org/show_bug.cgi?id=186588 Reviewed by Carlos Garcia Campos. Make both the WPE and GTK+ ports use /org/webkit/inspector as base prefix for resource paths, which avoids needing a switcheroo depending on the port. * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp: (WTR::TestRunner::inspectorTestStubURL): * glib/generate-inspector-gresource-manifest.py: 2018-06-11 Carlos Alberto Lopez Perez [GTK] Add a script to upload the data generated with run-benchmark to a browserperfdash server and use it on the gtk perf bot https://bugs.webkit.org/show_bug.cgi?id=166885 Reviewed by Michael Catanzaro. This patch adds a new script that will execute run-benchmark and upload the results it generates to a browserperfdash web app. It also modifies the buildbot config file so the GTK performance bot runs this script on the perf-test step. * BuildSlaveSupport/build.webkit.org-config/steps.py: (RunBenchmarkTests): * Scripts/browserperfdash-benchmark: Added. * Scripts/webkitpy/browserperfdash/README: Added. * Scripts/webkitpy/browserperfdash/__init__.py: Added. * Scripts/webkitpy/browserperfdash/browserperfdash_runner.py: Added. (parse_args): (BrowserPerfDashRunner): (BrowserPerfDashRunner.__init__): (BrowserPerfDashRunner._parse_config_file): (BrowserPerfDashRunner._get_test_version_string): (BrowserPerfDashRunner._get_test_data_json_string): (BrowserPerfDashRunner._upload_result): (BrowserPerfDashRunner.run): (format_logger): (main): * Scripts/webkitpy/browserperfdash/browserperfdash_unittest.py: Added. (FakeBenchmarkRunner): (FakeBenchmarkRunner.__init__): (FakeBenchmarkRunner.execute): (BrowserPerfDashRunnerTest): (BrowserPerfDashRunnerTest.test_list_plans_at_least_five): (BrowserPerfDashRunnerTest.test_benchmark_runner_subclasses_at_least_two): (BrowserPerfDashRunnerTest.test_can_construct_runner_object_minimum_parameters): * Scripts/webkitpy/browserperfdash/config-file-example.txt: Added. 2018-06-13 David Fenton Unreviewed, add myself as a WebKit committer. * Scripts/webkitpy/common/config/contributors.json: 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-19 Sihui Liu Flaky API test WebKit.WKHTTPCookieStoreWithoutProcessPool: incorrect order of cookies https://bugs.webkit.org/show_bug.cgi?id=185624 Reviewed by Chris Dumez. Modified expectation to make test more robust as cookies can be returned in different orders. * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (TEST): 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