Remove WebRTC legacy API implementation
[WebKit-https.git] / Tools / ChangeLog
1 2018-08-29  Youenn Fablet  <youenn@apple.com>
2
3         Remove WebRTC legacy API implementation
4         https://bugs.webkit.org/show_bug.cgi?id=189040
5
6         Reviewed by Eric Carlson.
7
8         * DumpRenderTree/mac/DumpRenderTree.mm:
9         (enableExperimentalFeatures):
10         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
11         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
12         (WTR::TestRunner::setWebRTCLegacyAPIEnabled): Deleted.
13         * WebKitTestRunner/InjectedBundle/TestRunner.h:
14         * WebKitTestRunner/TestController.cpp:
15         (WTR::TestController::resetPreferencesToConsistentValues):
16
17 2018-08-29  Daniel Bates  <dabates@apple.com>
18
19         lldb-webkit: KeyError thrown for uninitialized OptionSet
20         https://bugs.webkit.org/show_bug.cgi?id=189070
21
22         Reviewed by Simon Fraser.
23
24         Do not compute what enumerators are in an uninitialized OptionSet. A local OptionSet variable
25         is only considered initialized when execution passes over its assignment regardless of whether
26         the variable is in scope.
27
28         The LLDB Python API does not provide a way to determine whether an variable is initialized.
29         So, we use a simple heuristic: when the value of the OptionSet is greater than the value
30         of the bitmask with all enumerators set then we consider the OptionSet to be garbage (i.e.
31         uninitialized memory). When the variable is finally initialized LLDB will notify us to update
32         our state.
33
34         * lldb/lldb_webkit.py:
35         (WTFOptionSetProvider.update):
36
37 2018-08-29  Chris Dumez  <cdumez@apple.com>
38
39         [PSON] We should only process-swap when eTLD+1 changes on navigation
40         https://bugs.webkit.org/show_bug.cgi?id=189090
41         <rdar://problem/43799225>
42
43         Reviewed by Geoffrey Garen.
44
45         Update existing PSON API tests to use different registrable domains instead of different
46         protocols, as we now only process-swap when the eTLD+1 (aka "registrable domain") changes.
47
48         Add test coverage to make sure that we do not process swap when eTLD+1 does not change.
49
50         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
51
52 2018-08-29  Youenn Fablet  <youenn@apple.com>
53
54         Add a runtime flag for WebRTC unified plan
55         https://bugs.webkit.org/show_bug.cgi?id=189068
56
57         Reviewed by Eric Carlson.
58
59         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
60         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
61         (WTR::TestRunner::setWebRTCUnifiedPlanEnabled):
62         * WebKitTestRunner/InjectedBundle/TestRunner.h:
63
64 2018-08-29  Don Olmstead  <don.olmstead@sony.com>
65
66         [CMake] Split Tools/CMakeLists.txt into platform files
67         https://bugs.webkit.org/show_bug.cgi?id=189093
68
69         Reviewed by Michael Catanzaro.
70
71         * CMakeLists.txt:
72         * PlatformGTK.cmake: Added.
73         * PlatformMac.cmake: Added.
74         * PlatformWPE.cmake: Added.
75         * PlatformWin.cmake: Added.
76
77 2018-08-29  Jer Noble  <jer.noble@apple.com>
78
79         Muted elements do not have their Now Playing status updated when unmuted.
80         https://bugs.webkit.org/show_bug.cgi?id=189069
81
82         Reviewed by Eric Carlson.
83
84         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
85         * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Added.
86         (userInfoHasNowPlayingApplicationPID):
87         (getNowPlayingClient):
88         (getNowPlayingClientPid):
89         (NowPlayingTest::webView):
90         (NowPlayingTest::configuration):
91         (NowPlayingTest::webViewPid):
92         (NowPlayingTest::loadPage):
93         (NowPlayingTest::runScriptWithUserGesture):
94         (NowPlayingTest::runScriptWithoutUserGesture):
95         (NowPlayingTest::executeAndWaitForPlaying):
96         (NowPlayingTest::executeAndWaitForWebViewToBecomeNowPlaying):
97         (NowPlayingTest::observers):
98         (NowPlayingTest::addObserver):
99         (NowPlayingTest::removeObserver):
100         (NowPlayingTest::notificationCallback):
101         (NowPlayingTest::receivedNotification):
102         (NowPlayingTest::performAfterReceivingNotification):
103         (TEST_F):
104         * TestWebKitAPI/Tests/WebKitCocoa/now-playing.html: Added.
105
106 2018-08-29  Thomas Denney  <tdenney@apple.com>
107
108         [WHLSL] Ensure that isLValue is copied by the rewriter
109         https://bugs.webkit.org/show_bug.cgi?id=189083
110
111         The value of isLValue was not propagated when new TernaryExpressions are
112         created in Rewriter.
113
114         Reviewed by Myles C. Maxfield.
115
116         * WebGPUShadingLanguageRI/Rewriter.js:
117         (Rewriter.prototype.visitTernaryExpression):
118         * WebGPUShadingLanguageRI/Test.js: Add new test to verify the value is
119         propagated.
120
121 2018-08-29  Myles C. Maxfield  <mmaxfield@apple.com>
122
123         [WHLSL] Add more functions to the standard library
124         https://bugs.webkit.org/show_bug.cgi?id=188873
125
126         Reviewed by Filip Pizlo.
127
128         This patch adds the rest of the standard library to StandardLibrary.js, and updates the compiler to be able to compile it.
129
130         There are a few major pieces:
131         1. Swizzle operators are now implemented in the language, instead of as native functions
132         2. Vector constructors are now implemented in the language, instead of as native functions
133         3. The matrix type is implemented
134         4. Vector operator&[] is illegal, and is removed from the compiler
135         5. Vector index setters & index getters are now implemented in the language, instead of as native functions
136         6. Vector and matrix equality operators are implemented in the language, instead of as native functions
137         7. Casting a scalar to a boolean is implemented in the language, instead of as native functions
138         8. Casting a vector to a boolean is not part of the language, and is removed from the compiler
139         9. Half-precision floating point types are implemented
140
141         * WebGPUShadingLanguageRI/All.js:
142         * WebGPUShadingLanguageRI/BuiltinMatrixGetter.js: Copied from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
143         (BuiltinMatrixGetter):
144         (BuiltinMatrixGetter.prototype.get height):
145         (BuiltinMatrixGetter.prototype.get width):
146         (BuiltinMatrixGetter.prototype.toString):
147         (BuiltinMatrixGetter.functions):
148         (BuiltinMatrixGetter.prototype.instantiateImplementation):
149         * WebGPUShadingLanguageRI/BuiltinMatrixSetter.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
150         (BuiltinMatrixSetter):
151         (BuiltinMatrixSetter.prototype.get height):
152         (BuiltinMatrixSetter.prototype.get width):
153         (BuiltinMatrixSetter.prototype.toString):
154         (BuiltinMatrixSetter.functions):
155         (BuiltinMatrixSetter.prototype.instantiateImplementation):
156         * WebGPUShadingLanguageRI/BuiltinVectorConstructors.js: Removed.
157         * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Removed.
158         * WebGPUShadingLanguageRI/BuiltinVectorGetter.js:
159         (BuiltinVectorGetter.prototype.instantiateImplementation):
160         (BuiltinVectorGetter):
161         * WebGPUShadingLanguageRI/BuiltinVectorSetter.js:
162         (BuiltinVectorSetter.functions):
163         (BuiltinVectorSetter.prototype.instantiateImplementation):
164         (BuiltinVectorSetter):
165         * WebGPUShadingLanguageRI/CallExpression.js:
166         (CallExpression.prototype.resolve):
167         * WebGPUShadingLanguageRI/CheckTypesWithArguments.js:
168         (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
169         (checkTypesWithArguments.TypeWithArgumentsChecker):
170         (checkTypesWithArguments):
171         * WebGPUShadingLanguageRI/Checker.js:
172         (Checker.prototype.visitVectorType):
173         (Checker.prototype.visitMatrixType):
174         * WebGPUShadingLanguageRI/ConstexprFolder.js:
175         (ConstexprFolder.prototype.visitCallExpression):
176         (ConstexprFolder):
177         * WebGPUShadingLanguageRI/Evaluator.js:
178         (Evaluator.prototype.visitTernaryExpression):
179         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
180         (FlattenedStructOffsetGatherer.prototype.visitMatrixType):
181         (FlattenedStructOffsetGatherer):
182         * WebGPUShadingLanguageRI/Intrinsics.js:
183         (Intrinsics.):
184         (Intrinsics):
185         * WebGPUShadingLanguageRI/MatrixType.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js.
186         (MatrixType):
187         (MatrixType.prototype.get elementType):
188         (MatrixType.prototype.get numRows):
189         (MatrixType.prototype.get numColumns):
190         (MatrixType.prototype.get numRowsValue):
191         (MatrixType.prototype.get numColumnsValue):
192         (MatrixType.prototype.get size):
193         (MatrixType.prototype.unifyImpl):
194         (MatrixType.prototype.populateDefaultValue):
195         (MatrixType.prototype.toString):
196         * WebGPUShadingLanguageRI/NameContext.js:
197         (NameContext.prototype.add):
198         * WebGPUShadingLanguageRI/NativeType.js:
199         (NativeType.create):
200         (NativeType):
201         * WebGPUShadingLanguageRI/OperatorAnderIndexer.js: Renamed from Tools/WebGPUShadingLanguageRI/OperatorAnderIndex.js.
202         (OperatorAnderIndexer):
203         * WebGPUShadingLanguageRI/OperatorBool.js: Removed.
204         * WebGPUShadingLanguageRI/Prepare.js:
205         (let.prepare):
206         * WebGPUShadingLanguageRI/Program.js:
207         (Program.prototype.add):
208         * WebGPUShadingLanguageRI/Rewriter.js:
209         (Rewriter.prototype.visitMatrixType):
210         (Rewriter):
211         * WebGPUShadingLanguageRI/SPIRV.html:
212         * WebGPUShadingLanguageRI/StandardLibrary.js:
213         (operator.bool):
214         (bool.operator):
215         (uchar.operator):
216         (ushort.operator):
217         (char.operator):
218         (short.operator):
219         (uint.operator):
220         (int.operator):
221         (half.operator):
222         (float.operator):
223         (uchar2.operator):
224         (uchar3.operator):
225         (uchar4.operator):
226         (ushort2.operator):
227         (ushort3.operator):
228         (ushort4.operator):
229         (uint2.operator):
230         (uint3.operator):
231         (uint4.operator):
232         (char2.operator):
233         (char3.operator):
234         (char4.operator):
235         (short2.operator):
236         (short3.operator):
237         (short4.operator):
238         (int2.operator):
239         (int3.operator):
240         (int4.operator):
241         (half2.operator):
242         (half3.operator):
243         (half4.operator):
244         (float2.operator):
245         (float3.operator):
246         (float4.operator):
247         (half2x2.operator):
248         (half2x3.operator):
249         (half2x4.operator):
250         (half3x2.operator):
251         (half3x3.operator):
252         (half3x4.operator):
253         (half4x2.operator):
254         (half4x3.operator):
255         (half4x4.operator):
256         (float2x2.operator):
257         (float2x3.operator):
258         (float2x4.operator):
259         (float3x2.operator):
260         (float3x3.operator):
261         (float3x4.operator):
262         (float4x2.operator):
263         (float4x3.operator):
264         (float4x4.operator):
265         (operator.bool2):
266         (operator.bool3):
267         (operator.bool4):
268         (uint.operator.length):
269         (operator.uchar2):
270         (operator.uchar3):
271         (operator.uchar4):
272         (operator.ushort2):
273         (operator.ushort3):
274         (operator.ushort4):
275         (operator.uint2):
276         (operator.uint3):
277         (operator.uint4):
278         (operator.char2):
279         (operator.char3):
280         (operator.char4):
281         (operator.short2):
282         (operator.short3):
283         (operator.short4):
284         (operator.int2):
285         (operator.int3):
286         (operator.int4):
287         (operator.half2):
288         (operator.half3):
289         (operator.half4):
290         (operator.float2):
291         (operator.float3):
292         (operator.float4):
293         (bool2.operator):
294         (bool3.operator):
295         (bool4.operator):
296         (allVectorTypeNames):
297         * WebGPUShadingLanguageRI/SwizzleOp.js: Removed.
298         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js:
299         (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitMatrixType):
300         (synthesizeDefaultConstructorOperator.FindAllTypes):
301         (synthesizeDefaultConstructorOperator):
302         * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Removed.
303         * WebGPUShadingLanguageRI/Test.html:
304         * WebGPUShadingLanguageRI/Test.js:
305         (makeHalf):
306         (checkHalf):
307         * WebGPUShadingLanguageRI/Visitor.js:
308         (Visitor.prototype.visitMatrixType):
309         (Visitor):
310         * WebGPUShadingLanguageRI/index.html:
311
312 2018-08-29  Simon Fraser  <simon.fraser@apple.com>
313
314         Teach webkitpy how to check leaks and treat leaks as test failures
315         https://bugs.webkit.org/show_bug.cgi?id=189067
316
317         Reviewed by Darin Adler.
318         
319         Add a new "--world-leaks" argument to run-webkit-tests. When enabled, DRT/WTR are launched
320         with a --world-leaks argument (which is renamed in this patch for consistency). This enables the
321         behavior added in r235408, namely that they check for leaked documents after each test, and at
322         the end of one (if --run-singly) or a set of tests run in a single DRT/WTR instance handle the
323         "#CHECK FOR WORLD LEAKS" command to get still-live documents.
324         
325         LayoutTestRunner in webkitpy now has the notion of doing "post-tests work", called via _finished_test_group(),
326         and here it sends the "#CHECK FOR WORLD LEAKS" command to the runner and parses the resulting output block.
327         If this results block includes leaks, we convert an existing TestResult into a LEAK failure
328         in TestRunResults.change_result_to_failure(). Leaks are then added to the ouput JSON for display in results.html
329
330         Unit tests are updated with some leak examples.
331
332         * DumpRenderTree/mac/DumpRenderTree.mm:
333         (initializeGlobalsFromCommandLineOptions):
334         * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
335         (ParsedJSONResultsTest):
336         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
337         (LayoutTestRunner._annotate_results_with_additional_failures):
338         (LayoutTestRunner._handle_finished_test_group):
339         (Worker.handle):
340         (Worker._run_test):
341         (Worker._do_post_tests_work):
342         (Worker._finished_test_group):
343         (Worker._run_test_in_another_thread):
344         * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
345         (JSONLayoutResultsGenerator):
346         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
347         (TestExpectationParser):
348         (TestExpectations):
349         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
350         (Base.get_basic_tests):
351         * Scripts/webkitpy/layout_tests/models/test_failures.py:
352         (determine_result_type):
353         (FailureLeak):
354         (FailureLeak.__init__):
355         (FailureLeak.message):
356         (FailureDocumentLeak):
357         (FailureDocumentLeak.__init__):
358         (FailureDocumentLeak.message):
359         * Scripts/webkitpy/layout_tests/models/test_results.py:
360         (TestResult.convert_to_failure):
361         * Scripts/webkitpy/layout_tests/models/test_run_results.py:
362         (TestRunResults.change_result_to_failure):
363         (_interpret_test_failures):
364         (summarize_results):
365         * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
366         (get_result):
367         (run_results):
368         (summarized_results):
369         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
370         (parse_args):
371         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
372         (parse_args):
373         (RunTest.test_check_for_world_leaks):
374         * Scripts/webkitpy/port/driver.py:
375         (DriverPostTestOutput):
376         (DriverPostTestOutput.__init__):
377         (Driver.do_post_tests_work):
378         (Driver._parse_world_leaks_output):
379         (Driver.cmd_line):
380         (DriverProxy.do_post_tests_work):
381         * Scripts/webkitpy/port/test.py:
382         (unit_test_list):
383         * WebKitTestRunner/Options.cpp:
384         (WTR::OptionsHandler::OptionsHandler):
385         * WebKitTestRunner/TestController.cpp:
386         (WTR::TestController::checkForWorldLeaks):
387
388 2018-08-29  David Kilzer  <ddkilzer@apple.com>
389
390         Remove empty directories from from svn.webkit.org repository
391         <https://webkit.org/b/189081>
392
393         * DumpRenderTree/TestNetscapePlugIn/unix: Removed.
394         * WebKitTestRunner/UIScriptContext: Removed.
395
396 2018-08-29  Pablo Saavedra  <psaavedra@igalia.com>
397
398         [GTK][WPE] Add JSCOnly Release bot for Linux ARMv7 Thumb2 SoftFP
399         https://bugs.webkit.org/show_bug.cgi?id=189077
400
401         Reviewed by Michael Catanzaro.
402
403         Deployed new bot for WPE Release in Linux ARMv7 Thumb2 SoftFP
404         This bot (jsconly-linux-igalia-bot-5) will run the 'JSCOnly
405         Linux ARMv7 Thumb2 SoftFP Release' buildjob.
406
407         * BuildSlaveSupport/build.webkit.org-config/config.json:
408         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
409
410 2018-08-28  Daniel Bates  <dabates@apple.com>
411
412         lldb-webkit: KeyError thrown for OptionSet
413         https://bugs.webkit.org/show_bug.cgi?id=189062
414
415         Reviewed by Simon Fraser.
416
417         For some reason lldb(1) may not retrieve the enumerator names for an enum value
418         when it calls update() on the synthetic children provider. If this occurs then
419         bail out as we cannot compute what enumerators are in the set.
420
421         * lldb/lldb_webkit.py:
422         (WTFOptionSetProvider.update):
423
424 2018-08-28  Sihui Liu  <sihui_liu@apple.com>
425
426         Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback
427         https://bugs.webkit.org/show_bug.cgi?id=189037
428
429         Reviewed by Chris Dumez.
430
431         * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
432         (TEST):
433
434 2018-08-28  David Kilzer  <ddkilzer@apple.com>
435
436         Fix incorrect use of `sourceTree = "<group>";` for built products and frameworks in Xcode projects
437
438         Found by tidy-Xcode-project-file script (see Bug 188754).
439
440         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
441         (IOKit.framework): Use `sourceTree = "<absolute>";` to match
442         other frameworks in the project.
443         * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
444         (WebKit.framework): Use `sourceTree = BUILT_PRODUCTS_DIR;` for
445         built product instead of relative build directory path.
446         * jsc-cli/jsc-cli.xcodeproj/project.pbxproj:
447         (JavaScriptCore.framework): Ditto.
448         * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
449         (libWTF.a): Use `sourceTree = BUILT_PRODUCTS_DIR;` for built
450         product.
451
452 2018-08-28  Alex Christensen  <achristensen@webkit.org>
453
454         Fix 32-bit Mac build.
455
456         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
457
458 2018-08-28  Alex Christensen  <achristensen@webkit.org>
459
460         REGRESSION (r235391): [iOS] TestWebKitAPI.WebKit.RestoreSessionStateWithoutNavigation is timing out
461         https://bugs.webkit.org/show_bug.cgi?id=189050
462
463         Reviewed by Tim Horton.
464
465         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
466         This test wasn't run on iOS before.  Let's re-introduce the WK_HAVE_C_SPI guard.
467
468 2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
469
470         [iOS] WKAttachmentTests.DropFolderAsAttachmentAndMoveByDragging encounters an exception on iOS simulator
471         https://bugs.webkit.org/show_bug.cgi?id=189049
472
473         Reviewed by Tim Horton.
474
475         Wrap an NSURL in a RetainPtr to prevent it from being freed prematurely. It seems this broke when I changed the
476         load handler from an Objective-C block that captured `folderURL` to a C++ lambda that didn't retain `folderURL`.
477
478         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
479         (simulateFolderDragWithURL):
480
481 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
482
483         [Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends
484         https://bugs.webkit.org/show_bug.cgi?id=189004
485
486         Reviewed by Dan Bernstein.
487
488         Move off of deprecated attachment insertion SPI.
489
490         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
491         (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
492         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
493         (-[_WKAttachment synchronouslySetDisplayOptions:error:]): Deleted.
494
495 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
496
497         Teach WebKitTestRunner and DumpRenderTree about detecting world leaks
498         https://bugs.webkit.org/show_bug.cgi?id=188994
499
500         Reviewed by Tim Horton.
501         
502         This patch adds the notion of a "control command" in the protocol between webkitpy and 
503         WebKitTestRunner/DumpRenderTree. A command is simply an input string starting with a #
504         that is checked for before trying to parse the input as test URL. For now, just one
505         commmand is supported, which is "#CHECK FOR WORLD LEAKS".
506         
507         In response to the command, the tool dumps an output block in the usual pseudo-MIME-style,
508         with a trailing "#EOF". Future patches will add support to webkitpy to parse this output.
509         
510         DumpRenderTree stubs out the command, returning an empty block.
511         
512         WebKitTestRunner responds to the command by dumping the list of live documents, if it was
513         run with the --check-for-world-leaks option.
514         
515         When run with --check-for-world-leaks, WebKitTestRunner gets the list of live documents via
516         WKBundleGetLiveDocumentURLs() after every test (this allows it to detect the first test
517         that leaked a document), and keeps them in a map of document identifier to test and live document URL.
518         Then when it receives the "#CHECK FOR WORLD LEAKS" command, it calls into the bundle to
519         clear the page and memory caches, runs a GC, then posts a task (in the Document::postTaks() sense)
520         after which it requests the list of live documents for a final time, excluding any that are loaded
521         in live Frames (thus omitting the about:blank that will be loaded at this point). Documents in this
522         list are therefore leaked (or abandoned).
523         
524         Future patches will hook up webkitpy reporting for leaked documents.
525
526         * DumpRenderTree/mac/DumpRenderTree.mm:
527         (initializeGlobalsFromCommandLineOptions):
528         (handleControlCommand):
529         (runTestingServerLoop):
530         * DumpRenderTree/win/DumpRenderTree.cpp:
531         (handleControlCommand):
532         (main):
533         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
534         (WTR::postGCTask):
535         (WTR::InjectedBundle::reportLiveDocuments):
536         (WTR::InjectedBundle::didReceiveMessageToPage):
537         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
538         * WebKitTestRunner/Options.cpp:
539         (WTR::handleOptionCheckForWorldLeaks):
540         (WTR::OptionsHandler::OptionsHandler):
541         * WebKitTestRunner/Options.h:
542         * WebKitTestRunner/TestController.cpp:
543         (WTR::AsyncTask::run):
544         (WTR::AsyncTask::currentTask):
545         (WTR::TestController::initialize):
546         (WTR::TestController::ensureViewSupportsOptionsForTest):
547         (WTR::TestController::resetStateToConsistentValues):
548         (WTR::TestController::updateLiveDocumentsAfterTest):
549         (WTR::TestController::checkForWorldLeaks):
550         (WTR::TestController::findAndDumpWorldLeaks):
551         (WTR::TestController::willDestroyWebView):
552         (WTR::parseInputLine):
553         (WTR::TestController::waitForCompletion):
554         (WTR::TestController::handleControlCommand):
555         (WTR::TestController::runTestingServerLoop):
556         (WTR::TestController::run):
557         (WTR::TestController::didReceiveLiveDocumentsList):
558         (WTR::TestController::didReceiveMessageFromInjectedBundle):
559         * WebKitTestRunner/TestController.h:
560         (WTR::AsyncTask::AsyncTask):
561         (WTR::AsyncTask::taskComplete):
562         (WTR::TestController::AbandonedDocumentInfo::AbandonedDocumentInfo):
563         * WebKitTestRunner/TestInvocation.cpp:
564         (WTR::TestInvocation::invoke):
565         * WebKitTestRunner/TestOptions.h:
566         (WTR::TestOptions::hasSameInitializationOptions const):
567
568 2018-08-27  Alex Christensen  <achristensen@webkit.org>
569
570         Fix API test after r235398
571         https://bugs.webkit.org/show_bug.cgi?id=188997
572
573         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
574         (TestWebKitAPI::setPageLoaderClient):
575         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
576         willGoToBackForwardListItem is unused and unsupported.  Removing its check.
577
578 2018-08-27  Daniel Bates  <dabates@apple.com>
579
580         Partial revert of r235376
581         https://bugs.webkit.org/show_bug.cgi?id=189011
582
583         For now revert the unit tests added in r235376 as the following tests are failing on Apple Sierra
584         Debug and Apple High Sierra Debug bots:
585
586             lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_simple
587             lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple
588
589         Will investigate offline.
590
591         * lldb/lldbWebKitTester/main.cpp:
592         (testSummaryProviders):
593         * lldb/lldb_webkit_unittest.py:
594         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
595         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty): Deleted.
596         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple): Deleted.
597         (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Deleted.
598         (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple): Deleted.
599
600 2018-08-27  Aditya Keerthi  <akeerthi@apple.com>
601
602         Consolidate ENABLE_INPUT_TYPE_COLOR and ENABLE_INPUT_TYPE_COLOR_POPOVER
603         https://bugs.webkit.org/show_bug.cgi?id=188931
604
605         Reviewed by Wenson Hsieh.
606
607         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed ENABLE_INPUT_TYPE_COLOR_POPOVER.
608
609 2018-08-27  Justin Fan  <justin_fan@apple.com>
610
611         Add Justin Fan to list of WebKit contributors
612         https://bugs.webkit.org/show_bug.cgi?id=184431
613
614         * Scripts/webkitpy/common/config/contributors.json:
615
616 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
617
618         Convert timeout values in WebKitTestRunner to WTF::Seconds
619         https://bugs.webkit.org/show_bug.cgi?id=188987
620
621         Reviewed by Ryosuke Niwa.
622         
623         Replace various 'int' timeout values with WTF::Seconds. The timeout argument
624         comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
625         using integers, convert to and from milliseconds.
626         
627         Also do some #pragma once, and initializer cleanup.
628
629         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
630         (WTR::InjectedBundle::didReceiveMessageToPage):
631         (WTR::InjectedBundle::beginTesting):
632         (WTR::InjectedBundle::InjectedBundle): Deleted.
633         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
634         * WebKitTestRunner/InjectedBundle/TestRunner.h:
635         (WTR::TestRunner::timeout):
636         (WTR::TestRunner::setCustomTimeout):
637         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
638         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
639         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
640         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
641         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
642         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
643         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
644         * WebKitTestRunner/TestController.cpp:
645         (WTR::TestController::TestController):
646         (WTR::parseInputLine):
647         (WTR::TestController::runTest):
648         (WTR::TestController::runUntil):
649         (WTR::TestController::didReceiveMessageFromInjectedBundle):
650         * WebKitTestRunner/TestController.h:
651         * WebKitTestRunner/TestInvocation.cpp:
652         (WTR::TestInvocation::shortTimeout const):
653         (WTR::TestInvocation::createTestSettingsDictionary):
654         * WebKitTestRunner/TestInvocation.h:
655         * WebKitTestRunner/TestOptions.h:
656         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
657         (WTR::TestController::platformRunUntil):
658         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
659         (WTR::TestController::platformRunUntil):
660         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
661         (WTR::TestController::platformRunUntil):
662
663 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
664
665         Convert timeout values in WebKitTestRunner to WTF::Seconds
666         https://bugs.webkit.org/show_bug.cgi?id=188987
667
668         Reviewed by Ryosuke Niwa.
669         
670         Replace various 'int' timeout values with WTF::Seconds. The timeout argument
671         comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
672         using integers, convert to and from milliseconds.
673         
674         Also do some #pragma once, and initializer cleanup.
675
676         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
677         (WTR::InjectedBundle::didReceiveMessageToPage):
678         (WTR::InjectedBundle::beginTesting):
679         (WTR::InjectedBundle::InjectedBundle): Deleted.
680         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
681         * WebKitTestRunner/InjectedBundle/TestRunner.h:
682         (WTR::TestRunner::timeout):
683         (WTR::TestRunner::setCustomTimeout):
684         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
685         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
686         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
687         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
688         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
689         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
690         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
691         * WebKitTestRunner/TestController.cpp:
692         (WTR::TestController::TestController):
693         (WTR::parseInputLine):
694         (WTR::TestController::runTest):
695         (WTR::TestController::runUntil):
696         (WTR::TestController::didReceiveMessageFromInjectedBundle):
697         * WebKitTestRunner/TestController.h:
698         * WebKitTestRunner/TestInvocation.cpp:
699         (WTR::TestInvocation::shortTimeout const):
700         (WTR::TestInvocation::createTestSettingsDictionary):
701         * WebKitTestRunner/TestInvocation.h:
702         * WebKitTestRunner/TestOptions.h:
703         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
704         (WTR::TestController::platformRunUntil):
705         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
706         (WTR::TestController::platformRunUntil):
707         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
708         (WTR::TestController::platformRunUntil):
709
710 2018-08-27  Alex Christensen  <achristensen@webkit.org>
711
712         REGRESSION(r234985/r234989) WKPageLoadHTMLString with a 16-bit String has the wrong encoding
713         https://bugs.webkit.org/show_bug.cgi?id=189002
714
715         Reviewed by Tim Horton.
716
717         * TestWebKitAPI/Tests/WebKit/WillLoad.cpp:
718         (TestWebKitAPI::TEST_F):
719
720 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
721
722         [Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory
723         https://bugs.webkit.org/show_bug.cgi?id=188903
724         <rdar://problem/43702993>
725
726         Reviewed by Tim Horton.
727
728         Add two API tests and adjust existing WKAttachment API tests. The new tests exercise the following scenarios, in
729         both iOS and macOS:
730         •       Dropping a folder as an attachment element, and then moving that attachment element in the document by
731                 dragging and dropping.
732         •       Using WKWebView SPI to insert a folder and a file with an unknown extension, and then using more
733                 _WKAttachment SPI to swap the attachments' backing file wrappers.
734
735         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
736         (runTestWithTemporaryFolder):
737
738         Add a helper function to run a test with a new folder path, created in the temporary directory and populated
739         with some sample content. This folder is deleted after running the test.
740
741         (simulateFolderDragWithURL):
742
743         Add a helper function to prepare a given DragAndDropSimulator for simulating a dragged folder from a source
744         external to the web view.
745
746         (platformCopyRichTextWithMultipleAttachments):
747         (platformCopyRichTextWithImage):
748         (platformCopyPNG):
749         (TestWebKitAPI::TEST):
750
751         Add new API tests, and adjust existing tests to reflect new -setFileWrapper:…: behavior. Specifically,
752         ChangeAttachmentDataAndFileInformation previously required that changing a _WKAttachment's NSFileWrapper would
753         preserve the previous NSFileWrapper's preferred name if the new file wrapper does not have a preferred name, but
754         this quirk is no longer supported.
755
756         Also add a few bridging casts for the eventual transition of TestWebKitAPI to ARC.
757
758         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
759
760         Add a new hook to clear any external drag information on an existing DragAndDropSimulator. This is convenient
761         when using the same DragAndDropSimulator to perform multiple drags in a single test.
762
763         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
764         (-[DragAndDropSimulator clearExternalDragInformation]):
765         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
766         (-[DragAndDropSimulator clearExternalDragInformation]):
767
768 2018-08-27  Alex Christensen  <achristensen@webkit.org>
769
770         Translate 4 tests using WKPageLoaderClient to ObjC
771         https://bugs.webkit.org/show_bug.cgi?id=188827
772
773         Reviewed by Tim Horton.
774
775         They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
776         Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
777         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
778         bundle functionality any more.
779
780         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
781         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
782         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
783         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
784         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
785         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
786         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
787         (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
788         (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
789         (TestWebKitAPI::TEST):
790         (): Deleted.
791         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
792         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
793         (TestWebKitAPI::setPageLoaderClient): Deleted.
794         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
795         (-[ResponsivenessDelegate webView:didFinishNavigation:]):
796         (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
797         (TestWebKitAPI::TEST):
798         (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
799         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
800         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
801         (TestWebKitAPI::setInjectedBundleClient): Deleted.
802         (TestWebKitAPI::setPageLoaderClient): Deleted.
803         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
804         (-[SessionStateDelegate webView:didFinishNavigation:]):
805         (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
806         (TestWebKitAPI::createSessionStateData):
807         (TestWebKitAPI::TEST):
808         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
809         (TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
810         (TestWebKitAPI::setPageLoaderClient): Deleted.
811         * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
812         (-[BackForwardClient webView:didFinishNavigation:]):
813         (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
814         (TestWebKitAPI::TEST):
815         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
816         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
817         (TestWebKitAPI::setPageLoaderClient): Deleted.
818
819 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
820
821         [Cocoa] "video.html" appears at the top level of the TestWebKitAPI Xcode project
822         https://bugs.webkit.org/show_bug.cgi?id=188989
823
824         Reviewed by Andy Estes.
825
826         Move this into the Tests/WebKit/Resources group in the project.
827
828         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
829
830 2018-08-27  Thomas Denney  <tdenney@apple.com>
831
832         Avoid an exception in the interactive interpreter
833         https://bugs.webkit.org/show_bug.cgi?id=188991
834
835         Reviewed by Myles C. Maxfield.
836
837         * WebGPUShadingLanguageRI/index.html: Corrects a typo in the name of a
838         local variable
839
840 2018-08-27  Thomas Denney  <tdenney@apple.com>
841
842         Allow new vector types to work with the interactive interpreter
843         https://bugs.webkit.org/show_bug.cgi?id=188988
844
845         Reviewed by Myles C. Maxfield.
846
847         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
848         (FlattenedStructOffsetGatherer.prototype.visitTypeRef): Do not
849         unncessarily visit the type arguments of a TypeRef, as by this point
850         there are none that are relevant.
851         * WebGPUShadingLanguageRI/Intrinsics.js:
852         (Intrinsics): Treat VectorType as a primitive type.
853
854 2018-08-27  Keith Rollin  <krollin@apple.com>
855
856         Build system support for LTO
857         https://bugs.webkit.org/show_bug.cgi?id=187785
858         <rdar://problem/42353132>
859
860         Reviewed by Dan Bernstein.
861
862         Add tools/scripts support for controlling LTO builds.
863
864         * Scripts/build-webkit: Add --lto-mode={none,thin,full}.
865         * Scripts/set-webkit-configuration: Add support for saving LTO
866         configuration to WebKitBuild/LTO.
867         * Scripts/webkitdirs.pm: Add support for reading configuration from
868         WebKitBuild/LTO and providing it to xcodebuild.
869         (determineLTOMode):
870         (ltoMode):
871         (XcodeOptions):
872
873 2018-08-27  Daniel Bates  <dabates@apple.com>
874
875         lldb-webkit: Pretty-print OptionSet
876         https://bugs.webkit.org/show_bug.cgi?id=188936
877
878         Reviewed by Simon Fraser.
879
880         Add LLDB formatters to pretty-print an OptionSet.
881
882         * lldb/lldbWebKitTester/main.cpp:
883         (testSummaryProviders):
884         * lldb/lldb_webkit.py:
885         (__lldb_init_module):
886         (__lldb_init_module.lldb_webkit):
887         (WTFOptionSet_SummaryProvider):
888         (WTFOptionSetProvider):
889         (WTFOptionSetProvider.__init__):
890         (WTFOptionSetProvider.has_children):
891         (WTFOptionSetProvider.num_children):
892         (WTFOptionSetProvider.get_child_index):
893         (WTFOptionSetProvider.get_child_at_index):
894         (WTFOptionSetProvider.update):
895         * lldb/lldb_webkit_unittest.py:
896         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
897         (TestSummaryProviders):
898         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty):
899         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple):
900         (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty):
901         (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple):
902
903 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
904
905         [Attachment Support] [WK2] Images copied from Mail message view paste with the wrong file name in compose
906         https://bugs.webkit.org/show_bug.cgi?id=188957
907         <rdar://problem/43737715>
908
909         Reviewed by Darin Adler.
910
911         Add a new API test to verify that pasting a web archive containing several image elements with alt attributes
912         generates _WKAttachments whose names reflect those alt attributes.
913
914         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
915         (testGIFFileURL):
916         (testGIFData):
917         (TestWebKitAPI::TEST):
918
919 2018-08-27  Alex Christensen  <achristensen@webkit.org>
920
921         Unreviewed, rolling out r235367.
922
923         Broke iOS build.
924
925         Reverted changeset:
926
927         "Translate 4 tests using WKPageLoaderClient to ObjC"
928         https://bugs.webkit.org/show_bug.cgi?id=188827
929         https://trac.webkit.org/changeset/235367
930
931 2018-08-27  Alex Christensen  <achristensen@webkit.org>
932
933         Fix GTK build.
934
935         * TestWebKitAPI/CMakeLists.txt:
936
937 2018-08-27  Alex Christensen  <achristensen@webkit.org>
938
939         Fix iOS build.
940
941         * TestWebKitAPI/PlatformWebView.h:
942
943 2018-08-27  Alex Christensen  <achristensen@webkit.org>
944
945         Translate 4 tests using WKPageLoaderClient to ObjC
946         https://bugs.webkit.org/show_bug.cgi?id=188827
947
948         Reviewed by Tim Horton.
949
950         They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
951         Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
952         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
953         bundle functionality any more.
954
955         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
956         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
957         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
958         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
959         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
960         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
961         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
962         (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
963         (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
964         (TestWebKitAPI::TEST):
965         (): Deleted.
966         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
967         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
968         (TestWebKitAPI::setPageLoaderClient): Deleted.
969         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
970         (-[ResponsivenessDelegate webView:didFinishNavigation:]):
971         (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
972         (TestWebKitAPI::TEST):
973         (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
974         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
975         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
976         (TestWebKitAPI::setInjectedBundleClient): Deleted.
977         (TestWebKitAPI::setPageLoaderClient): Deleted.
978         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
979         (-[SessionStateDelegate webView:didFinishNavigation:]):
980         (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
981         (TestWebKitAPI::createSessionStateData):
982         (TestWebKitAPI::TEST):
983         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
984         (TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
985         (TestWebKitAPI::setPageLoaderClient): Deleted.
986         * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
987         (-[BackForwardClient webView:didFinishNavigation:]):
988         (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
989         (TestWebKitAPI::TEST):
990         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
991         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
992         (TestWebKitAPI::setPageLoaderClient): Deleted.
993
994 2018-08-27  Keith Miller  <keith_miller@apple.com>
995
996         test262-runner -s --test-only should replace test results
997         https://bugs.webkit.org/show_bug.cgi?id=188450
998
999         Reviewed by Michael Saboff.
1000
1001         * Scripts/test262/Runner.pm:
1002         (main):
1003         (SetFailureForTest):
1004         (UpdateResults):
1005
1006 2018-08-26  Sam Weinig  <sam@webkit.org>
1007
1008         Using _WKRemoteObjectInterface with a protocol that inherits from a non-NSObject protocol crashes
1009         https://bugs.webkit.org/show_bug.cgi?id=188958
1010
1011         Reviewed by Anders Carlsson.
1012
1013         * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:
1014         Update test protocol to have inheritance.
1015
1016 2018-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
1017
1018         [Attachment Support] Dropping and pasting images should insert inline image elements with _WKAttachments
1019         https://bugs.webkit.org/show_bug.cgi?id=188933
1020         <rdar://problem/43699724>
1021
1022         Reviewed by Darin Adler.
1023
1024         Rebaseline existing API tests that involve dropping or pasting image files, and additionally write some new
1025         tests. These new tests exercise the following cases:
1026         •       Inserting and removing newlines before an inline image with an attachment element does not cause new
1027                 _WKAttachments to be created and destroyed.
1028         •       Pasting an image, cutting it, and then pasting it again propagates an attachment update to the UI
1029                 process with the original _WKAttachment.
1030         •       A pasted attachment in the document can be moved around by dragging, and doing so does not cause us to
1031                 lose a _WKAttachment.
1032
1033         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1034         (-[TestWKWebView expectElementCount:tagName:]):
1035         (TestWebKitAPI::TEST):
1036
1037         Add the new tests described above, and also adjust existing tests to check that images are dropped or pasted
1038         as image elements, but still have associated attachment elements whose attachment identifiers (observed via
1039         script) match that of the corresponding _WKAttachment's uniqueIdentifier in the UI process.
1040
1041         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
1042         (-[DragAndDropSimulator runFrom:to:]):
1043         (-[DragAndDropSimulator continueDragSession]):
1044         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
1045
1046         Teach DragAndDropSimulator on macOS to wait until the drop has been handled by the web process before returning
1047         execution to the caller. This ensures that tests which involve dropping promised files as attachments aren't
1048         flaky, due to how the promised data is retrieved asynchronously when performing the drop.
1049
1050         (-[DragAndDropSimulator _webView:didPerformDragOperation:]):
1051
1052 2018-08-26  Lucas Forschler  <lforschler@apple.com>
1053
1054         Open svn.webkit.org for commits.
1055
1056 2018-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
1057
1058         Unreviewed test fix after r235249
1059         https://bugs.webkit.org/show_bug.cgi?id=178981
1060
1061         * WebGPUShadingLanguageRI/Test.js:
1062
1063 2018-08-24  Alex Christensen  <achristensen@webkit.org>
1064
1065         Introduce _WKInspector
1066         https://bugs.webkit.org/show_bug.cgi?id=188923
1067         <rdar://problem/34657861>
1068
1069         Reviewed by Brian Burg.
1070
1071         * MiniBrowser/mac/WK2BrowserWindowController.m:
1072         (-[WK2BrowserWindowController validateMenuItem:]):
1073         (-[WK2BrowserWindowController showHideWebInspector:]):
1074
1075 2018-08-24  Jonathan Bedard  <jbedard@apple.com>
1076
1077         Fix handling of iOS minor versions in default_baseline_search_path
1078         https://bugs.webkit.org/show_bug.cgi?id=188902
1079
1080         Reviewed by Aakash Jain.
1081
1082         * Scripts/webkitpy/port/ios.py:
1083         (IOSPort.default_baseline_search_path): When the major version matches the major version of the CURRENT_VERSION, treat
1084         it as a the CURRENT_VERSION.
1085
1086 2018-08-24  Antti Koivisto  <antti@apple.com>
1087
1088         Allow creating WeakPtrs to const objects
1089         https://bugs.webkit.org/show_bug.cgi?id=188785
1090
1091         Reviewed by Geoff Garen.
1092
1093         * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
1094         (TestWebKitAPI::Base::weakPtrFactory const):
1095         (TestWebKitAPI::TEST):
1096         (TestWebKitAPI::Base::weakPtrFactory): Deleted.
1097
1098 2018-08-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1099
1100         [GTK][WPE] Add API to inject/register user content in isolated worlds
1101         https://bugs.webkit.org/show_bug.cgi?id=188883
1102
1103         Reviewed by Michael Catanzaro.
1104
1105         Add test cases for the new API.
1106
1107         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
1108         (isStyleSheetInjectedForURLAtPath):
1109         (isScriptInjectedForURLAtPath):
1110         (testUserContentManagerInjectedStyleSheet):
1111         (testUserContentManagerInjectedScript):
1112         (UserScriptMessageTest::registerHandler):
1113         (UserScriptMessageTest::unregisterHandler):
1114         (UserScriptMessageTest::postMessageAndWaitUntilReceived):
1115         (testUserContentManagerScriptMessageInWorldReceived):
1116         (beforeAll):
1117
1118 2018-08-23  Simon Fraser  <simon.fraser@apple.com>
1119
1120         Add support for dumping GC heap snapshots, and a viewer
1121         https://bugs.webkit.org/show_bug.cgi?id=186416
1122
1123         Reviewed by Joseph Pecoraro.
1124
1125         Add a viewer for GC heap snapshots. A snapshot JSON file can be dragged into this
1126         page for inspection (or set via the 'filename' URL parameter).
1127
1128         For now, this page shows all objects, all roots, and the shortest path from a root
1129         to all HTMLDocuments and Windows.
1130
1131         * GCHeapInspector/gc-heap-inspector.html: Added.
1132         * GCHeapInspector/heap-analysis/HeapSnapshot.js: Copied from Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js.
1133         * GCHeapInspector/script/interface.js: Added.
1134
1135 2018-08-23  Alex Christensen  <achristensen@webkit.org>
1136
1137         Add new _webViewRequestPointerLock SPI with a completionHandler
1138         https://bugs.webkit.org/show_bug.cgi?id=188907
1139         <rdar://problem/35871109>
1140
1141         Reviewed by Andy Estes.
1142
1143         * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
1144         (-[PointerLockDelegate _webViewRequestPointerLock:completionHandler:]):
1145         (-[PointerLockDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
1146         (TEST):
1147
1148 2018-08-23  David Fenton  <david_fenton@apple.com>
1149
1150         Unreviewed, rolling out r235129.
1151
1152         broke internal builds
1153
1154         Reverted changeset:
1155
1156         "Allow creating WeakPtrs to const objects"
1157         https://bugs.webkit.org/show_bug.cgi?id=188785
1158         https://trac.webkit.org/changeset/235129
1159
1160 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
1161
1162         API tests should output json results
1163         https://bugs.webkit.org/show_bug.cgi?id=188869
1164         <rdar://problem/43615652>
1165
1166         Reviewed by Aakash Jain.
1167
1168         JSON output for API tests is of the form:
1169             {
1170                 "Failed": [{"name": <test name>, "output": <test log>}],
1171                 "Timedout": [...],
1172                 "Skipped": [...],
1173                 "Crashed": [...]
1174             }
1175         Tests which are successful are not displayed in the json output.
1176
1177         * Scripts/webkitpy/api_tests/manager.py:
1178         (Manager.run): Print test results to provided file as a json dictionary.
1179         * Scripts/webkitpy/api_tests/run_api_tests.py:
1180         (run): Pass json option.
1181         (parse_args): Add --json-output flag.
1182
1183 2018-08-23  Andy Estes  <aestes@apple.com>
1184
1185         [Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave
1186         https://bugs.webkit.org/show_bug.cgi?id=188829
1187
1188         Reviewed by Tim Horton.
1189
1190         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
1191
1192 2018-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
1193
1194         [WSL] Ternary expressions appear to be unimplemented
1195         https://bugs.webkit.org/show_bug.cgi?id=178981
1196
1197         Reviewed by Saam Barati.
1198
1199         Implement ternary statements. These can be both lvalues and rvalues. (a ? b : c ? d : e)
1200         is parsed as (a ? b : (c ? d : e)).
1201
1202         * WebGPUShadingLanguageRI/All.js:
1203         * WebGPUShadingLanguageRI/Checker.js:
1204         (Checker.prototype.visitTernaryExpression):
1205         * WebGPUShadingLanguageRI/Evaluator.js:
1206         (Evaluator.prototype.visitTernaryExpression):
1207         * WebGPUShadingLanguageRI/NormalUsePropertyResolver.js:
1208         (NormalUsePropertyResolver.prototype.visitTernaryExpression):
1209         (NormalUsePropertyResolver):
1210         * WebGPUShadingLanguageRI/Parse.js:
1211         (parsePossibleTernaryConditional):
1212         * WebGPUShadingLanguageRI/PropertyResolver.js:
1213         (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder.prototype.visitTernaryExpression):
1214         (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder):
1215         (PropertyResolver.prototype._visitRValuesWithinLValue):
1216         * WebGPUShadingLanguageRI/Rewriter.js:
1217         (Rewriter.prototype.visitTernaryExpression):
1218         * WebGPUShadingLanguageRI/SPIRV.html:
1219         * WebGPUShadingLanguageRI/Test.html:
1220         * WebGPUShadingLanguageRI/Test.js:
1221         * WebGPUShadingLanguageRI/Visitor.js:
1222         (Visitor.prototype.visitProtocolDecl):
1223         * WebGPUShadingLanguageRI/index.html:
1224
1225 2018-08-22  Ryosuke Niwa  <rniwa@webkit.org>
1226
1227         Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated
1228         https://bugs.webkit.org/show_bug.cgi?id=188880
1229
1230         Reviewed by Saam Barati.
1231
1232         Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess
1233         were asynchronously terminating respective processes. Do so synchronously so that we can deterministically
1234         test WebKit's behavior in layout tests.
1235
1236         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1237         (WTR::TestRunner::terminateNetworkProcess):
1238         (WTR::TestRunner::terminateServiceWorkerProcess):
1239         (WTR::TestRunner::terminateStorageProcess):
1240         * WebKitTestRunner/TestInvocation.cpp:
1241         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
1242         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1243
1244 2018-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
1245
1246         [WHLSL] Allow native types to have type arguments (like "vector<float, 4>")
1247         https://bugs.webkit.org/show_bug.cgi?id=188773
1248
1249         Reviewed by Filip Pizlo.
1250
1251         Before this patch, it was impossible to represent "native typedef vector<float, 4>" because NativeTypes couldn't have
1252         typeArguments.
1253
1254         Previously, the way to identify a type was strictly by name, which was represented by a string. Therefore, when something like
1255         "vector<int, 3>" was parsed, it would produce a TypeRef with the name "vector" and typeArguments [TypeRef, IntLiteral]. Then,
1256         there was a pass to convert the TypeRef to have the name "int3" and no typeArguments. After this transformation, each type could
1257         be uniquely identified by name. That name was then matched to the string-only NativeType name.
1258
1259         This is okay for vectors and matrices, but it is unfortunate for textures (e.g. Texture2D<float4>) because they don't have any
1260         natural string-only name. In addition, the canonicalization would have to be made aware of the fact that Texture2D<float4> is
1261         the same as Texture2D<vector<float, 4>>. Similarly, an author may wish to typedef float4 to a different name.
1262
1263         It would be possible to mangle the names of the texture types to something unique, but then we lose information about the inner
1264         type. For example, if we did this, Visitor wouldn't recurse into the float4 when encountering Texture2D<float4> because that
1265         information would be lost. This could potentially make operations like programWithUnnecessaryThingsRemoved() more difficult to
1266         implement in the future.
1267
1268         So, it would be better to have each type uniquely identified by (name, typeArguments). TypeRef will therefore also have
1269         typeArguments which are used to determine which type it is referencing. After this analysis is done to determine what each
1270         TypeRef is referencing, subsequent passes shouldn't care about the typeArguments and should only care about the .type field
1271         which had been set - this was true even before this patch.
1272
1273         This means that NameContext has to aggregate types that accept typeArguments into arrays, where each array holds all the Types
1274         that have the same name but different typeArguments. Then, when we need to match a TypeRef with a Type, we can ask the
1275         NameContext for the appropriate array. This is the same way that function resolution works.
1276
1277         We can use Node.unify() to determine whether a TypeRef matches a NativeType. Eventually, this will go away, but for now, this is
1278         an okay start. This works just about the same way that function overload resolution works. 
1279
1280         * WebGPUShadingLanguageRI/All.js:
1281         * WebGPUShadingLanguageRI/CallExpression.js:
1282         (CallExpression.prototype.resolve):
1283         * WebGPUShadingLanguageRI/CheckTypesWithArguments.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js. After types
1284         have been resolved, there should be no TypeRefs with name "vector" that don't have type arguments. This is just a sanity check.
1285         (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
1286         (checkTypesWithArguments.TypeWithArgumentsChecker):
1287         (checkTypesWithArguments):
1288         * WebGPUShadingLanguageRI/Checker.js:
1289         (Checker.prototype.visitProgram): Program.types mirrors NameContext: it's a Map that maps strings to types. Because types with
1290         typeArguments share names, this has to be updated to map strings to arrays for these types.
1291         (Checker.prototype.visitTypeRef):
1292         * WebGPUShadingLanguageRI/InferTypesForCall.js:
1293         (inferTypesForCall): Don't know why this was here.
1294         (inferTypesForTypeArguments): Same as inferTypesForCall, but this one is for matching type arguments.
1295         * WebGPUShadingLanguageRI/Intrinsics.js: Adding the types. This patch also adds some scalar types like half, char, etc, but they
1296         don't have any functions which accept them. Those will be tested in my next patch which adds math functions for these types. This
1297         moves in the direction of matching the standard library in the spec.
1298         (Intrinsics.cast):
1299         (Intrinsics.bitwiseCast):
1300         (Intrinsics.castToHalf):
1301         (Intrinsics.):
1302         (Intrinsics):
1303         * WebGPUShadingLanguageRI/NameContext.js: Aggregate types with typeArguments into arrays.
1304         (NameContext.prototype.add):
1305         (NameContext.prototype.get let):
1306         (NameContext.underlyingThings.prototype.else):
1307         (NameContext.prototype.Symbol.iterator):
1308         (NameContext):
1309         * WebGPUShadingLanguageRI/NameResolver.js:
1310         (NameResolver.prototype.visitTypeRef): Call TypeRef.resolve().
1311         (NameResolver.prototype.visitCallExpression):
1312         (NameResolver):
1313         (NameResolver.prototype.visitVectorType): Deleted.
1314         * WebGPUShadingLanguageRI/NativeType.js: NativeTypes can have type arguments now.
1315         (NativeType):
1316         (NativeType.prototype.get typeArguments):
1317         (NativeType.prototype.toString):
1318         (NativeType.create):
1319         * WebGPUShadingLanguageRI/Prepare.js:
1320         (let.prepare):
1321         * WebGPUShadingLanguageRI/Program.js: Update to work with types aggregated into arrays.
1322         (Program.prototype.add):
1323         (Program.prototype.toString):
1324         (Program):
1325         * WebGPUShadingLanguageRI/RemoveTypeArguments.js: Removed.
1326         * WebGPUShadingLanguageRI/ResolveNames.js: Update to work with types aggregated into arrays.
1327         (resolveNamesInTypes):
1328         * WebGPUShadingLanguageRI/ResolveOverloadImpl.js: Resolve the type overload for types with typeArguments.
1329         * WebGPUShadingLanguageRI/ResolveTypeDefs.js: Update to work with types aggregated into arrays.
1330         (resolveTypeDefsInTypes):
1331         * WebGPUShadingLanguageRI/Rewriter.js: TypeRefs and Native/Vector types can have typeArguments.
1332         (Rewriter.prototype.visitTypeRef):
1333         (Rewriter.prototype.visitVectorType):
1334         (Rewriter):
1335         * WebGPUShadingLanguageRI/SPIRV.html:
1336         * WebGPUShadingLanguageRI/StandardLibrary.js: Matches Intrinsics.
1337         (bool.operator):
1338         * WebGPUShadingLanguageRI/StatementCloner.js: Native types can have typeArguments.
1339         (StatementCloner.prototype.visitNativeType):
1340         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Vector types need constructors too.
1341         (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitVectorType):
1342         (synthesizeDefaultConstructorOperator.FindAllTypes):
1343         (synthesizeDefaultConstructorOperator):
1344         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: No reason to distinguish between wrapping and instantiating a TypeRef.
1345         (synthesizeStructAccessors.createTypeRef):
1346         * WebGPUShadingLanguageRI/Test.html:
1347         * WebGPUShadingLanguageRI/Test.js:
1348         * WebGPUShadingLanguageRI/TypeOverloadResolutionFailure.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js.
1349         (TypeOverloadResolutionFailure):
1350         (TypeOverloadResolutionFailure.prototype.get type):
1351         (TypeOverloadResolutionFailure.prototype.get reason):
1352         (TypeOverloadResolutionFailure.prototype.toString):
1353         * WebGPUShadingLanguageRI/TypeRef.js:
1354         (TypeRef.wrap):
1355         (TypeRef.prototype.resolve): Figure out which item in the possibleOverloads array matches this.
1356         (TypeRef.prototype.toString):
1357         (TypeRef):
1358         (TypeRef.instantiate): Deleted.
1359         * WebGPUShadingLanguageRI/UnificationContext.js: We need to give literals a chance to assume their preferred type. This
1360         adds this facility back into the compiler (it was previously deleted).
1361         (UnificationContext.prototype.verify):
1362         * WebGPUShadingLanguageRI/VectorType.js: Vector types have type arguments.
1363         (VectorType):
1364         (VectorType.prototype.get elementType):
1365         (VectorType.prototype.get numElements):
1366         (VectorType.prototype.get numElementsValue):
1367         (VectorType.prototype.toString):
1368         * WebGPUShadingLanguageRI/Visitor.js: Iterate over the typeArguments.
1369         (Visitor.prototype.visitTypeRef):
1370         (Visitor.prototype.visitNativeType):
1371         (Visitor.prototype.visitVectorType):
1372         (Visitor):
1373         * WebGPUShadingLanguageRI/index.html:
1374
1375 2018-08-23  Wenson Hsieh  <wenson_hsieh@apple.com>
1376
1377         [Attachment Support] Attachment elements don't appear in drag images on macOS
1378         https://bugs.webkit.org/show_bug.cgi?id=188823
1379         <rdar://problem/43616378>
1380
1381         Reviewed by Tim Horton.
1382
1383         Adjusts a couple of existing tests to additionally verify that the drag image generated when dragging an
1384         attachment element in macOS is not completely transparent.
1385
1386         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1387         (isCompletelyTransparent):
1388         (TestWebKitAPI::TEST):
1389
1390 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
1391
1392         Explain test name matching in run-api-tests help
1393         https://bugs.webkit.org/show_bug.cgi?id=188280
1394
1395         Reviewed by Ryosuke Niwa.
1396
1397         Improve the run-api-tests help message to explain how test
1398         name matching works.
1399
1400         * Scripts/webkitpy/api_tests/run_api_tests.py:
1401         (parse_args):
1402         * Scripts/webkitpy/port/base.py:
1403         (Port):
1404         (Port.path_to_api_test_binaries): Make binary names a globally accessible array.
1405         * Scripts/webkitpy/port/win.py:
1406         (WinPort):
1407         (WinPort.path_to_api_test_binaries): Ditto.
1408
1409 2018-08-23  Youenn Fablet  <youenn@apple.com>
1410
1411         Use "wpt serve" to launch WPT server
1412         https://bugs.webkit.org/show_bug.cgi?id=188848
1413
1414         Reviewed by Ryosuke Niwa.
1415
1416         Use "wpt serve" provided by WPT instead of using our custom launcher.
1417         This simplifies things and will avoid future breakage.
1418         Further simplify web_platform_test_server.py by removing no longer needed actions.
1419         - Do not copy files but use alias
1420         - Do not kill main pid, which leaves subprocesses alive, use interrupt instead.
1421         - Stop enumerating subprocess pids.
1422
1423         * Scripts/webkitpy/common/system/executive_mock.py:
1424         (MockExecutive.interrupt):
1425         * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py: Removed.
1426         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
1427         (WebPlatformTestServer.__init__):
1428         (WebPlatformTestServer.ports_to_forward):
1429         (WebPlatformTestServer._prepare_config):
1430         (WebPlatformTestServer._spawn_process):
1431         (WebPlatformTestServer._stop_running_server):
1432
1433 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
1434
1435         run-api-tests: Add --webkit-only, --webcore-only and --webkit-legacy-only options to run WebKit, WebCore and WebKitLegacy tests 
1436         https://bugs.webkit.org/show_bug.cgi?id=188262
1437
1438         Reviewed by Ryosuke Niwa.
1439
1440         * Scripts/webkitpy/api_tests/run_api_tests.py:
1441         (parse_args):
1442
1443 2018-08-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1444
1445         [Attachment Support] Support dragging attachment elements out as files on macOS
1446         https://bugs.webkit.org/show_bug.cgi?id=181294
1447         <rdar://problem/36298801>
1448
1449         Reviewed by Tim Horton.
1450
1451         Add DragAndDropSimulator support for intercepting calls to -beginDraggingSessionWithitems:event:source:. This
1452         enables us to write API tests for macOS that exercise the attachment SPI in combination with dragging attachment
1453         elements.
1454
1455         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1456         (-[TestWKWebView attachmentElementMidPoint]):
1457
1458         Add a helper method local to this test suite that grabs the midpoint (in client coordinates) or the first
1459         attachment element in the document.
1460
1461         (TestWebKitAPI::TEST):
1462
1463         Add a new API test to verify that dragging an attachment element on macOS produces file providers which may be
1464         used to write attachment data to a path on disk. Additionally, refactor an existing API test,
1465         MoveAttachmentElementAsIconByDragging, so that it runs on both iOS and macOS, to test the ability to move
1466         attachment elements around in a document by using drag and drop.
1467
1468         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
1469         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
1470         (-[DragAndDropTestWKWebView beginDraggingSessionWithItems:event:source:]):
1471         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
1472         (-[DragAndDropSimulator dealloc]):
1473         (-[DragAndDropSimulator runFrom:to:]):
1474         (-[DragAndDropSimulator beginDraggingSessionInWebView:withItems:source:]):
1475
1476         Begin a drag session and kick off the -continueDragSession loop. Unlike -performDragInWebView:…, which spins
1477         the main runloop until dragging ends, this version returns execution to the web view and schedules dragging
1478         updates asynchronously. This matches AppKit behavior.
1479
1480         (-[DragAndDropSimulator continueDragSession]):
1481
1482         Increment the dragging progress amount, send a drag update to the web view, and continue scheduling calls to
1483         itself until the progress reaches 1.
1484
1485         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
1486         (-[DragAndDropSimulator initializeDraggingInfo:dragImage:source:]):
1487
1488         Pull out common logic for creating a new TestDraggingInfo after starting a drag.
1489
1490         (-[DragAndDropSimulator insertedAttachments]):
1491         (-[DragAndDropSimulator removedAttachments]):
1492         (-[DragAndDropSimulator draggingSession]):
1493         (-[DragAndDropSimulator receivePromisedFiles]):
1494
1495         Helper method to save promised files written to the pasteboard after a drag to the temporary directory. These
1496         files are tracked by DragAndDropSimulator and automatically cleaned up after the test finishes.
1497
1498         (-[DragAndDropSimulator endDataTransfer]):
1499
1500         Add a method stub on macOS, so that MoveAttachmentElementAsIconByDragging can be made cross-platform.
1501
1502         (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
1503         (-[DragAndDropSimulator _webView:didRemoveAttachment:]):
1504
1505         Implement method stubs to keep track of inserted or removed attachments while simulating a drag.
1506
1507 2018-08-22  Aditya Keerthi  <akeerthi@apple.com>
1508
1509         [iOS] Add support for the inputmode attribute
1510         https://bugs.webkit.org/show_bug.cgi?id=183621
1511
1512         Reviewed by Tim Horton.
1513
1514         Added an API test to verify that the correct UIKeyboardType is set depending on
1515         the type, inputmode, and pattern specified for an input field.
1516
1517         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
1518         (TestWebKitAPI::TEST):
1519         * TestWebKitAPI/ios/UIKitSPI.h:
1520
1521 2018-08-22  Alex Christensen  <achristensen@webkit.org>
1522
1523         Fix API test on Sierra after r235139
1524         https://bugs.webkit.org/show_bug.cgi?id=188810
1525
1526         * TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
1527         (TEST):
1528
1529 2018-08-22  David Kilzer  <ddkilzer@apple.com>
1530
1531         Move files in WebCore project to match Xcode folder structure
1532         <https://webkit.org/b/188851>
1533
1534         Reviewed by Tim Horton.
1535
1536         * Scripts/extract-localizable-strings:
1537         * Scripts/update-webkit-localizable-strings:
1538         - Update to match new location of extract-localizable-strings.pl.
1539
1540 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1541
1542         Roll out r235139 and r235146
1543         https://bugs.webkit.org/show_bug.cgi?id=188805
1544
1545         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1546         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
1547
1548 2018-08-21  Wenson Hsieh  <wenson_hsieh@apple.com>
1549
1550         [Attachment Support] Remove _WKAttachments and notify the UI client upon mainframe navigation
1551         https://bugs.webkit.org/show_bug.cgi?id=188715
1552         <rdar://problem/43541790>
1553
1554         Reviewed by Tim Horton.
1555
1556         Adds API tests to exercises cases where (1) the UI client is notified of attachment removal upon mainframe
1557         navigation, and (2) the UI client is notified of attachment removal upon web content process termination.
1558
1559         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1560         (TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentUpdates):
1561         (TestWebKitAPI::TEST):
1562
1563 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1564
1565         Transition ResizeReversePaginatedWebView API test from WKPageLoaderClient to WKPageNavigationClient
1566         https://bugs.webkit.org/show_bug.cgi?id=188821
1567
1568         Reviewed by Simon Fraser.
1569
1570         * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:
1571         (TestWebKitAPI::didLayout):
1572         (TestWebKitAPI::TEST):
1573
1574 2018-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
1575
1576         [WHLSL] Call expressions shouldn't have type arguments
1577         https://bugs.webkit.org/show_bug.cgi?id=188770
1578
1579         Reviewed by Filip Pizlo.
1580
1581         Call expressions only had type arguments for casts, becuase native types can have type arguments.
1582         However, instead of putting those type arguments on the CallExpression, we should parse the casted
1583         type as a real type and not as an identifier, which puts the type arguments in the TypeRef.
1584
1585         Test: casts
1586
1587         * WebGPUShadingLanguageRI/CallExpression.js:
1588         (CallExpression):
1589         (CallExpression.prototype.get name):
1590         (CallExpression.resolve):
1591         (CallExpression.prototype.get typeArguments): Deleted.
1592         (CallExpression.prototype.becomeCast): Deleted.
1593         * WebGPUShadingLanguageRI/NameResolver.js:
1594         (NameResolver.prototype.visitCallExpression):
1595         * WebGPUShadingLanguageRI/Parse.js:
1596         (parseConstexpr):
1597         (parseTypeDef):
1598         (parseLeftOperatorCall):
1599         (parseCallExpression.let.parseArguments):
1600         (parsePossiblePrefix):
1601         (parsePossibleRelationalEquality):
1602         (parseLeftLogicalExpression):
1603         (parseIfStatement):
1604         (parseWhile):
1605         (parseFor):
1606         (parseDo):
1607         * WebGPUShadingLanguageRI/RemoveTypeArguments.js:
1608         * WebGPUShadingLanguageRI/Rewriter.js:
1609         (Rewriter.prototype.visitCallExpression):
1610
1611 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1612
1613         Translate WebKit.LimitTitleSize API test into ObjC
1614         https://bugs.webkit.org/show_bug.cgi?id=188810
1615
1616         Reviewed by Andy Estes.
1617
1618         It uses WKPageLoaderClient.didReceiveTitleForFrame which has been replaced by KVO.
1619         I'm translating the test into ObjC rather than introducing a new callback to WKPageNavigationClient.
1620
1621         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1622         * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp: Removed.
1623         * TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
1624         (TEST):
1625         (-[LimitTitleSizeTestObserver observeValueForKeyPath:ofObject:change:context:]):
1626         (TestWebKitAPI::TEST): Deleted.
1627
1628 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1629
1630         Remove unused shouldKeepCurrentBackForwardListItemInList check
1631         https://bugs.webkit.org/show_bug.cgi?id=188805
1632
1633         Reviewed by Andy Estes.
1634
1635         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1636         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: Removed.
1637
1638 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1639
1640         Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
1641         https://bugs.webkit.org/show_bug.cgi?id=188813
1642
1643         Reviewed by Andy Estes.
1644
1645         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp:
1646         (TestWebKitAPI::didLayout):
1647         (TestWebKitAPI::setPageLoaderClient):
1648         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
1649         (TestWebKitAPI::didFinishNavigation):
1650         (TestWebKitAPI::didLayout):
1651         (TestWebKitAPI::setPageLoaderClient):
1652         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1653         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp:
1654         (TestWebKitAPI::didLayout):
1655         (TestWebKitAPI::setPageLoaderClient):
1656
1657 2018-08-21  Wenson Hsieh  <wenson_hsieh@apple.com>
1658
1659         [Attachment Support] Augment _WKAttachment SPI to handle NSFileWrappers in addition to NSData
1660         https://bugs.webkit.org/show_bug.cgi?id=188496
1661         <rdar://problem/43216836>
1662
1663         Reviewed by Tim Horton.
1664
1665         Adjusts existing attachment API tests. See below for more detail.
1666
1667         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1668         (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
1669         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
1670         (-[_WKAttachment synchronouslySetData:newContentType:newFilename:error:]):
1671         (-[_WKAttachment synchronouslySetFileWrapper:newContentType:error:]):
1672
1673         Move off of deprecated attachment SPI, and add new helper functions to synchronously insert a new attachment or
1674         update an existing attachment with a file wrapper.
1675
1676         (-[_WKAttachment expectRequestedDataToBe:]):
1677         (TestWebKitAPI::TEST):
1678
1679         Add a new test to verify that file-URL-backed NSFileWrappers can be used to insert and update attachment data.
1680         Also augment an existing test to check that an attachment element which has been copied and pasted within the
1681         same document has a different _WKAttachment wrapper object than its duplicate, but both _WKAttachments are
1682         backed by the same NSFileWrapper that was originally used to insert the attachment.
1683
1684         Additionally, add another macOS test to verify that dropping promised files in an attachment-element-enabled
1685         editable area inserts attachment elements into the document and notifies the UI client with the inserted
1686         attachment data.
1687
1688         (-[_WKAttachment synchronouslyRequestInfo:]): Deleted.
1689         (-[_WKAttachment synchronouslyRequestData:]): Deleted.
1690         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
1691         (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
1692
1693         Move off of -_webView:didInsertAttachment:.
1694
1695         (-[DragAndDropSimulator _webView:didInsertAttachment:]): Deleted.
1696
1697 2018-08-21  David Kilzer  <ddkilzer@apple.com>
1698
1699         sort-Xcode-project-file: top-level files and folders are sorted unintentionally when `mainGroup` has no name
1700         <https://webkit.org/b/188755>
1701
1702         Reviewed by Andy Estes.
1703
1704         * Scripts/sort-Xcode-project-file: Fix regular expression to
1705         make `mainGroup` name optional.
1706
1707 2018-08-21  Andy VanWagoner  <andy@vanwagoner.family>
1708
1709         Unreviewed, add myself to committers list.
1710
1711         * Scripts/webkitpy/common/config/contributors.json:
1712
1713 2018-08-21  Antti Koivisto  <antti@apple.com>
1714
1715         Allow creating WeakPtrs to const objects
1716         https://bugs.webkit.org/show_bug.cgi?id=188785
1717
1718         Reviewed by Geoffrey Garen.
1719
1720         * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
1721         (TestWebKitAPI::Base::weakPtrFactory const):
1722         (TestWebKitAPI::TEST):
1723         (TestWebKitAPI::Base::weakPtrFactory): Deleted.
1724
1725 2018-08-21  Per Arne Vollan  <pvollan@apple.com>
1726
1727         [WebGL] Contexts are not updated when display configuration changed.
1728         https://bugs.webkit.org/show_bug.cgi?id=188750
1729
1730         Reviewed by Brent Fulgham.
1731
1732         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1733         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1734         (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting):
1735         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1736         * WebKitTestRunner/TestController.cpp:
1737         (WTR::TestController::sendDisplayConfigurationChangedMessageForTesting):
1738         * WebKitTestRunner/TestController.h:
1739         * WebKitTestRunner/TestInvocation.cpp:
1740         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1741
1742 2018-08-21  John Wilander  <wilander@apple.com>
1743
1744         Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
1745         https://bugs.webkit.org/show_bug.cgi?id=188757
1746         <rdar://problem/38713390>
1747
1748         Reviewed by Alex Christensen.
1749
1750         These changes add the new WebKitTestRunner function
1751         isStatisticsRegisteredAsSubresourceUnder().
1752
1753         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1754         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1755         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
1756         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1757         * WebKitTestRunner/TestController.cpp:
1758         (WTR::TestController::isStatisticsRegisteredAsSubresourceUnder):
1759         * WebKitTestRunner/TestController.h:
1760         * WebKitTestRunner/TestInvocation.cpp:
1761         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1762
1763 2018-08-21  Alex Christensen  <achristensen@webkit.org>
1764
1765         Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
1766         https://bugs.webkit.org/show_bug.cgi?id=188797
1767
1768         Reviewed by Tim Horton.
1769
1770         * TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp:
1771         (TestWebKitAPI::didFinishNavigation):
1772         (TestWebKitAPI::TEST):
1773         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1774         * TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp:
1775         (TestWebKitAPI::didSameDocumentNavigation):
1776         (TestWebKitAPI::TEST):
1777         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
1778         * TestWebKitAPI/Tests/WebKit/FailedLoad.cpp:
1779         (TestWebKitAPI::didFailProvisionalNavigation):
1780         (TestWebKitAPI::TEST):
1781         (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
1782         * TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp:
1783         (TestWebKitAPI::didStartProvisionalNavigation):
1784         (TestWebKitAPI::didCommitNavigation):
1785         (TestWebKitAPI::didFinishNavigation):
1786         (TestWebKitAPI::TEST):
1787         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
1788         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
1789         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1790         * TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp:
1791         (TestWebKitAPI::didStartProvisionalNavigation):
1792         (TestWebKitAPI::didCommitNavigation):
1793         (TestWebKitAPI::didFinishNavigation):
1794         (TestWebKitAPI::TEST):
1795         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
1796         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
1797         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1798         * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
1799         (TestWebKitAPI::renderingProgressDidChange):
1800         (TestWebKitAPI::TEST):
1801         (TestWebKitAPI::didLayout): Deleted.
1802         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp:
1803         (TestWebKitAPI::didFinishNavigation):
1804         (TestWebKitAPI::renderingProgressDidChange):
1805         (TestWebKitAPI::setPageLoaderClient):
1806         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1807         (TestWebKitAPI::didLayout): Deleted.
1808         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
1809         (TestWebKitAPI::State::State):
1810         (TestWebKitAPI::didStartProvisionalNavigation):
1811         (TestWebKitAPI::didCommitNavigation):
1812         (TestWebKitAPI::didFinishNavigation):
1813         (TestWebKitAPI::decidePolicyForNavigationAction):
1814         (TestWebKitAPI::decidePolicyForResponse):
1815         (TestWebKitAPI::TEST):
1816         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
1817         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
1818         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1819         (TestWebKitAPI::decidePolicyForNewWindowAction): Deleted.
1820         * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp:
1821         (TestWebKitAPI::didSameDocumentNavigation):
1822         (TestWebKitAPI::TEST):
1823         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1824         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
1825         * TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
1826         (TestWebKitAPI::TEST):
1827         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
1828         * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:
1829         (TestWebKitAPI::didFinishLoad):
1830         (TestWebKitAPI::TEST):
1831         * TestWebKitAPI/Tests/WebKit/WKBundleFileHandle.cpp:
1832         (TestWebKitAPI::didFinishNavigation):
1833         (TestWebKitAPI::TEST):
1834         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1835         * TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm:
1836         (TestWebKitAPI::didFinishLoad):
1837         (TestWebKitAPI::TEST):
1838         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
1839         (WebKit2_CommandBackForwardTestWKView::SetUp):
1840         (WebKit2_CommandBackForwardTestWKView::didFinishLoadForFrame): Deleted.
1841
1842 2018-08-20  Alex Christensen  <achristensen@webkit.org>
1843
1844         Replace WKPageLoaderClient with WKPageNavigationClient in many API tests
1845         https://bugs.webkit.org/show_bug.cgi?id=188771
1846
1847         Reviewed by Tim Horton.
1848
1849         * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp:
1850         (TestWebKitAPI::didFinishNavigation):
1851         (TestWebKitAPI::TEST):
1852         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1853         * TestWebKitAPI/Tests/WebKit/CookieManager.cpp:
1854         (TestWebKitAPI::didFinishNavigation):
1855         (TestWebKitAPI::TEST):
1856         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1857         * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm:
1858         (TestWebKitAPI::didFinishNavigation):
1859         (TestWebKitAPI::setPageLoaderClient):
1860         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1861         * TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp:
1862         (TestWebKitAPI::TEST):
1863         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1864         * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp:
1865         (TestWebKitAPI::didFinishNavigation):
1866         (TestWebKitAPI::setPageLoaderClient):
1867         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1868         * TestWebKitAPI/Tests/WebKit/EventModifiers.cpp:
1869         (TestWebKitAPI::didFinishNavigation):
1870         (TestWebKitAPI::setClients):
1871         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1872         * TestWebKitAPI/Tests/WebKit/Find.cpp:
1873         (TestWebKitAPI::didFinishNavigation):
1874         (TestWebKitAPI::TEST):
1875         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1876         * TestWebKitAPI/Tests/WebKit/FindMatches.mm:
1877         (TestWebKitAPI::didFinishNavigation):
1878         (TestWebKitAPI::TEST):
1879         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1880         * TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp:
1881         (TestWebKitAPI::didFinishNavigation):
1882         (TestWebKitAPI::TEST):
1883         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1884         * TestWebKitAPI/Tests/WebKit/FrameHandle.cpp:
1885         (TestWebKitAPI::didFinishNavigation):
1886         (TestWebKitAPI::TEST):
1887         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1888         * TestWebKitAPI/Tests/WebKit/Geolocation.cpp:
1889         (TestWebKitAPI::didFinishNavigation):
1890         (TestWebKitAPI::TEST):
1891         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1892         * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp:
1893         (TestWebKitAPI::didFinishNavigation):
1894         (TestWebKitAPI::setPageLoaderClient):
1895         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1896         * TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp:
1897         (TestWebKitAPI::didFinishNavigation):
1898         (TestWebKitAPI::TEST):
1899         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1900         * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp:
1901         (TestWebKitAPI::didFinishLoadForFrame):
1902         * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp:
1903         (TestWebKitAPI::didFinishNavigation):
1904         (TestWebKitAPI::loadAlternateHTMLString):
1905         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1906         * TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp:
1907         (TestWebKitAPI::didFinishNavigation):
1908         (TestWebKitAPI::TEST):
1909         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1910         * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp:
1911         (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):
1912         (TestWebKitAPI::didFinishLoad):
1913         * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp:
1914         (TestWebKitAPI::didFinishNavigation):
1915         (TestWebKitAPI::setPageLoaderClient):
1916         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1917         * TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp:
1918         (TestWebKitAPI::didFinishNavigation):
1919         (TestWebKitAPI::setPageLoaderClient):
1920         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1921         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
1922         (TestWebKitAPI::didFinishLoadForFrame):
1923         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
1924         (TestWebKitAPI::TEST):
1925         * TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp:
1926         (TestWebKitAPI::TEST):
1927         * TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp:
1928         (TestWebKitAPI::didFinishLoad):
1929         (TestWebKitAPI::TEST):
1930         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
1931         (TestWebKitAPI::didFinishNavigation):
1932         (TestWebKitAPI::setPageLoaderClient):
1933         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1934         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp:
1935         (TestWebKitAPI::didFinishNavigation):
1936         (TestWebKitAPI::setPageLoaderClient):
1937         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1938         * TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp:
1939         (TestWebKitAPI::didFinishNavigation):
1940         (TestWebKitAPI::TEST):
1941         (TestWebKitAPI::didFinishDocumentLoadForFrame): Deleted.
1942         * TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp:
1943         (TestWebKitAPI::didFinishNavigation):
1944         (TestWebKitAPI::TEST):
1945         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1946         * TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp:
1947         (TestWebKitAPI::didFailProvisionalNavigation):
1948         (TestWebKitAPI::TEST):
1949         (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
1950         * TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp:
1951         (TestWebKitAPI::didFinishNavigation):
1952         (TestWebKitAPI::TEST):
1953         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1954         * TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp:
1955         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishNavigation):
1956         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::setPageLoaderClient):
1957         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishLoadForFrame): Deleted.
1958         * TestWebKitAPI/Tests/WebKit/UserMessage.cpp:
1959         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishNavigation):
1960         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::setPageLoaderClient):
1961         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishLoadForFrame): Deleted.
1962         * TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp:
1963         (TestWebKitAPI::didFinishNavigation):
1964         (TestWebKitAPI::setPageLoaderClient):
1965         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1966         * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp:
1967         (TestWebKitAPI::didFinishNavigation):
1968         (TestWebKitAPI::setPageLoaderClient):
1969         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1970         * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp:
1971         (TestWebKitAPI::didFinishNavigation):
1972         (TestWebKitAPI::setPageLoaderClient):
1973         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1974         * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp:
1975         (TestWebKitAPI::didFinishNavigation):
1976         (TestWebKitAPI::setUpClients):
1977         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1978         * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:
1979         (TestWebKitAPI::didFinishNavigation):
1980         (TestWebKitAPI::setPageLoaderClient):
1981         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1982         * TestWebKitAPI/Tests/WebKit/WebArchive.cpp:
1983         (TestWebKitAPI::didFinishNavigation):
1984         (TestWebKitAPI::TEST):
1985         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1986         * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm:
1987         (TestWebKitAPI::didFinishNavigation):
1988         (TestWebKitAPI::TEST):
1989         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1990         * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm:
1991         (TestWebKitAPI::didFinishNavigation):
1992         (TestWebKitAPI::TEST):
1993         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1994         * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm:
1995         (TestWebKitAPI::didFinishNavigation):
1996         (TestWebKitAPI::TEST):
1997         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
1998         * TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm:
1999         (TestWebKitAPI::didFinishNavigation):
2000         (TestWebKitAPI::TEST):
2001         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2002         * TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp:
2003         (TestWebKitAPI::didFinishNavigation):
2004         (TestWebKitAPI::TEST):
2005         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2006         * TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp:
2007         (TestWebKitAPI::didFinishNavigation):
2008         (TestWebKitAPI::TEST):
2009         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2010         * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
2011         (didFinishNavigation):
2012         (TestWebKitAPI::TEST):
2013         (didFinishLoadForFrame): Deleted.
2014         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
2015         (didFinishNavigation):
2016         (TestWebKitAPI::TEST):
2017         (didFinishLoadForFrame): Deleted.
2018         * TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm:
2019         (TestWebKitAPI::didFinishNavigation):
2020         (TestWebKitAPI::TEST):
2021         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2022         * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
2023         (TestWebKitAPI::didFinishNavigation):
2024         (TestWebKitAPI::setPageLoaderClient):
2025         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2026
2027 2018-08-21  Adrian Perez de Castro  <aperez@igalia.com>
2028
2029         [WPE] Update to use libwpe-1.0.0 and WPEBackend-fdo-1.0.0
2030         https://bugs.webkit.org/show_bug.cgi?id=188782
2031
2032         Reviewed by Michael Catanzaro.
2033
2034         Make the build depend on wpe-0.2, and change the Flatpak and JHBuild development
2035         environments to use version 1.0.0 of libwpe and WPEBackend-fdo.
2036
2037         * flatpak/org.webkit.WPE.yaml: Update to use libwpe and WPEBackend-fdo version 1.0.0 from
2038         release tarballs, and removed the (now unneeded) Lua and LuaJIT modules.
2039         * wpe/jhbuild.modules: Ditto.
2040
2041 2018-08-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2042
2043         [Flatpak] Update to GNOME master runtime
2044         https://bugs.webkit.org/show_bug.cgi?id=188731
2045
2046         Reviewed by Philippe Normand.
2047
2048         The 3.28 runtime is pretty stale at this point. We could wait a couple weeks for the 3.30
2049         runtime, but I don't think there's any need to stick with the stable runtime when we have
2050         the ability to pin to a particular version of the master runtime. There are also several
2051         advantages to switching to the master runtime.
2052
2053         * flatpak/files/httpd-autogen.sh: Removed.
2054         * flatpak/flatpakutils.py:
2055         (WebkitFlatpak.clean_args):
2056         * flatpak/org.webkit.GTK.yaml:
2057         * flatpak/org.webkit.WebKit.yaml:
2058         * flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed.
2059         * flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed.
2060
2061 2018-08-20  Jonathan Bedard  <jbedard@apple.com>
2062
2063         WebKitTestRunner: Add watchOS entitlements
2064         https://bugs.webkit.org/show_bug.cgi?id=188758
2065
2066         Reviewed by Tim Horton.
2067
2068         watchOS needs an additional entitlement to open up a socket for on-device testing.
2069
2070         * WebKitTestRunner/Configurations/WebKitTestRunnerApp-watchOS.entitlements: Added.
2071         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
2072         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
2073
2074 2018-08-20  Thomas Denney  <tdenney@apple.com>
2075
2076         [WHLSL] Remove generics from the interpreter
2077         https://bugs.webkit.org/show_bug.cgi?id=187988
2078
2079         Reviewed by Myles C. Maxfield.
2080
2081         This patch completely removes generic and protocol support from WHLSL
2082         whilst adding back any features that were originally implemented with
2083         generics.
2084
2085         Many of the changes in this patch just remove occurrences of type
2086         arguments and type parameters --- although there are some cases where
2087         they have been deliberately left in --- as well as removing tests only
2088         relevant to those features. These changes are not listed below.
2089
2090         * WebGPUShadingLanguageRI/All.js: Add/remove JS dependencies
2091         * WebGPUShadingLanguageRI/AutoWrapper.js:
2092         (AutoWrapper.prototype.visitConstexprTypeParameter): Deleted.
2093         * WebGPUShadingLanguageRI/BuiltinVectorCasts.js: Added. The built-in
2094         vectors have many constructors for different scalar and vector types.
2095         These were originally implemented with generics.
2096         * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Adds the
2097         equality operator for built-in vectors, again this was removed with
2098         generics.
2099         * WebGPUShadingLanguageRI/BuiltinVectorGetter.js: Added, as above.
2100         Built-in vectors only support the getter and setter, and not the ander.
2101         * WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js: Added.
2102         * WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js: Added.
2103         * WebGPUShadingLanguageRI/BuiltinVectorSetter.js: Added.
2104         * WebGPUShadingLanguageRI/CallExpression.js: Adds support for
2105         instantiating functions which cannot be discovered earlier in
2106         preparation because their types are absent (specifically support for the
2107         operator &[] for array references and the length operator for array
2108         references). Previously support for these was implemented with generics.
2109         (CallExpression.resolve):
2110         (CallExpression.prototype.resolve):
2111         (CallExpression.prototype._resolveByInstantiation):
2112         (CallExpression.prototype._resolveToOperatorAnderIndexer):
2113         (CallExpression.prototype._resolveToOperatorLength):
2114         (CallExpression.prototype.resolveToOverload):
2115         (CallExpression.prototype.becomeCast):
2116         (CallExpression.prototype.toString):
2117         (CallExpression):
2118         * WebGPUShadingLanguageRI/CallExpressionTypeArgumentResolver.js: Added.
2119         We support syntax like vector<int, 2>(a, b) for constructing vectors;
2120         this new preparation step resolves them to specific constructors.
2121         * WebGPUShadingLanguageRI/CallFunction.js:
2122         * WebGPUShadingLanguageRI/Checker.js:
2123         * WebGPUShadingLanguageRI/ConstexprFolder.js:
2124         * WebGPUShadingLanguageRI/CreateLiteralType.js:
2125         * WebGPUShadingLanguageRI/ExpressionFinder.js:
2126         * WebGPUShadingLanguageRI/FlattenProtocolExtends.js: Removed.
2127         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
2128         * WebGPUShadingLanguageRI/Func.js:
2129         * WebGPUShadingLanguageRI/FuncDef.js:
2130         * WebGPUShadingLanguageRI/FuncInstantiator.js: Deleted.
2131         * WebGPUShadingLanguageRI/InferTypesForCall.js: Removed usage of type arguments.
2132         * WebGPUShadingLanguageRI/Inline.js: Remove use of FuncInstantiator.
2133         * WebGPUShadingLanguageRI/Inliner.js: Ditto.
2134         * WebGPUShadingLanguageRI/Intrinsics.js:
2135         * WebGPUShadingLanguageRI/Lexer.js:
2136         * WebGPUShadingLanguageRI/LiteralTypeChecker.js:
2137         * WebGPUShadingLanguageRI/NameContext.js:
2138         (NameContext.prototype.add):
2139         (NameContext.prototype.get let):
2140         (NameContext.underlyingThings.prototype.else):
2141         (NameContext.prototype.resolveFuncOverload):
2142         * WebGPUShadingLanguageRI/NameFinder.js:
2143         * WebGPUShadingLanguageRI/NameResolver.js:
2144         (NameResolver.prototype.visitFunc):
2145         (NameResolver.prototype.visitFuncDef):
2146         (NameResolver.prototype.visitTypeDef):
2147         (NameResolver.prototype.visitStructType):
2148         (NameResolver.prototype.visitTypeRef):
2149         (NameResolver.prototype.visitCallExpression):
2150         (NameResolver.prototype.visitVectorType):
2151         (NameResolver):
2152         (NameResolver.prototype._visitTypeParametersAndBuildNameContext): Deleted.
2153         (NameResolver.prototype.visitProtocolDecl): Deleted.
2154         * WebGPUShadingLanguageRI/NativeFunc.js:
2155         (NativeFunc):
2156         * WebGPUShadingLanguageRI/NativeFuncInstance.js: Deleted.
2157         * WebGPUShadingLanguageRI/NativeType.js:
2158         (NativeType):
2159         (NativeType.prototype.get name):
2160         (NativeType.prototype.toString):
2161         (NativeType.prototype.get typeParameters): Deleted.
2162         (NativeType.prototype.instantiate): Deleted.
2163         * WebGPUShadingLanguageRI/Node.js:
2164         (Node.prototype.commit):
2165         (Node):
2166         (Node.prototype.substitute): Deleted.
2167         (Node.prototype.substituteToUnification): Deleted.
2168         * WebGPUShadingLanguageRI/OperatorAnderIndex.js: Added, previously
2169         implemented with generics.
2170         * WebGPUShadingLanguageRI/OperatorArrayRefLength.js: Ditto.
2171         * WebGPUShadingLanguageRI/OperatorBool.js: Ditto.
2172         * WebGPUShadingLanguageRI/Parse.js: Removed everything related to
2173         generics and protocols.
2174         * WebGPUShadingLanguageRI/Prepare.js: Added new stages.
2175         * WebGPUShadingLanguageRI/Program.js:
2176         (Program):
2177         (Program.prototype.get types):
2178         (Program.prototype.add):
2179         (Program.prototype.get protocols): Deleted.
2180         * WebGPUShadingLanguageRI/ProtocolDecl.js: Removed.
2181         * WebGPUShadingLanguageRI/ProtocolRef.js: Removed.
2182         * WebGPUShadingLanguageRI/RecursiveTypeChecker.js:
2183         * WebGPUShadingLanguageRI/ResolveCallExpressionsWithTypeArguments.js: Added.
2184         * WebGPUShadingLanguageRI/ResolveNames.js:
2185         * WebGPUShadingLanguageRI/ResolveOverloadImpl.js:
2186         * WebGPUShadingLanguageRI/ResolveTypeDefs.js:
2187         (resolveTypeDefsInProtocols): Deleted.
2188         * WebGPUShadingLanguageRI/Rewriter.js: Changes for new classes.
2189         * WebGPUShadingLanguageRI/SPIRV.html:
2190         * WebGPUShadingLanguageRI/SPIRVCodegen.js:
2191         * WebGPUShadingLanguageRI/StandardLibrary.js: Replace old generic features.
2192         * WebGPUShadingLanguageRI/StatementCloner.js: Changes for new classes.
2193         (StructLayoutBuilder):
2194         * WebGPUShadingLanguageRI/StructType.js:
2195         * WebGPUShadingLanguageRI/SwizzleOp.js:
2196         (SwizzleOp):
2197         (SwizzleOp.prototype.get baseTypeName):
2198         (SwizzleOp.prototype.toString):
2199         (SwizzleOp.functions.):
2200         (SwizzleOp.functions):
2201         (SwizzleOp.prototype.instantiateImplementation):
2202         (SwizzleOp.allSwizzleOperators.): Deleted.
2203         (SwizzleOp.allSwizzleOperators): Deleted.
2204         * WebGPUShadingLanguageRI/SynthesizeArrayOperatorLength.js: Added,
2205         previously implemented with generics.
2206         * WebGPUShadingLanguageRI/SynthesizeCopyConstructorOperator.js: Ditto.
2207         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Ditto.
2208         * WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js: Ditto.
2209         * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Ditto.
2210         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js:
2211         (synthesizeStructAccessors.setupImplementationData):
2212         (synthesizeStructAccessors.createFieldType):
2213         (synthesizeStructAccessors.createTypeRef):
2214         (synthesizeStructAccessors.setupAnder):
2215         (synthesizeStructAccessors):
2216         (synthesizeStructAccessors.createTypeParameters): Deleted.
2217         (synthesizeStructAccessors.): Deleted.
2218         * WebGPUShadingLanguageRI/Test.html:
2219         * WebGPUShadingLanguageRI/Test.js: Removed redundant tests and added new
2220         tests for changed language features.
2221         * WebGPUShadingLanguageRI/Type.js:
2222         * WebGPUShadingLanguageRI/TypeDef.js:
2223         * WebGPUShadingLanguageRI/TypeDefResolver.js:
2224         * WebGPUShadingLanguageRI/TypeParameterRewriter.js: Removed.
2225         * WebGPUShadingLanguageRI/TypeRef.js:
2226         * WebGPUShadingLanguageRI/TypeVariable.js: Removed.
2227         * WebGPUShadingLanguageRI/UnificationContext.js:
2228         * WebGPUShadingLanguageRI/VectorType.js: Added.
2229         * WebGPUShadingLanguageRI/Visitor.js: Changes for new classes.
2230         * WebGPUShadingLanguageRI/WSL.md: Removed description of
2231         generics/protocols.
2232         * WebGPUShadingLanguageRI/WrapChecker.js:
2233         (WrapChecker):
2234         (WrapChecker.visitConstexprTypeParameter): Deleted.
2235         (WrapChecker.prototype.visitFuncParameter): Deleted.
2236         (WrapChecker.prototype.visitTypeVariable): Deleted.
2237         * WebGPUShadingLanguageRI/index.html:
2238
2239 2018-08-20  Thomas Denney  <tdenney@apple.com>
2240
2241         Added Thomas Denney to contributors.json.
2242         https://bugs.webkit.org/show_bug.cgi?id=188525
2243
2244         Reviewed by Myles C. Maxfield.
2245
2246         * Scripts/webkitpy/common/config/contributors.json:
2247
2248 2018-08-20  Bernhard M. Wiedemann  <bwiedemann@suse.de>
2249
2250         [GTK] Sort inspector GResource manifest to ensure reproducible builds
2251         https://bugs.webkit.org/show_bug.cgi?id=188738
2252
2253         Reviewed by Michael Catanzaro.
2254
2255         * glib/generate-inspector-gresource-manifest.py:
2256         (get_filenames): sort list of input files
2257
2258 2018-08-20  Wenson Hsieh  <wenson_hsieh@apple.com>
2259
2260         [iOS] Paste is missing from callout bar when pasteboard only contains custom data
2261         https://bugs.webkit.org/show_bug.cgi?id=184271
2262         <rdar://problem/39256708>
2263
2264         Reviewed by Andy Estes.
2265
2266         This API test is failing when run against older macOS builds, where custom pasteboard
2267         data is not enabled by default.
2268
2269         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
2270         (TestWebKitAPI::TEST):
2271
2272 2018-08-20  Claudio Saavedra  <csaavedra@igalia.com>
2273
2274         Add WPE Debug configuration to the flakiness dashboard
2275         https://bugs.webkit.org/show_bug.cgi?id=188743
2276
2277         Reviewed by Michael Catanzaro.
2278
2279         * TestResultServer/static-dashboards/builders.jsonp:
2280         * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
2281
2282 2018-08-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2283
2284         [GLIB] Add API to throw exceptions using printf formatted strings
2285         https://bugs.webkit.org/show_bug.cgi?id=188698
2286
2287         Reviewed by Michael Catanzaro.
2288
2289         Add cases to test the new API.
2290
2291         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
2292         (createFormattedError):
2293         (createCustomFormattedError):
2294         (testJSCExceptions):
2295
2296 2018-08-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2297
2298         [GLIB] Complete the JSCException API
2299         https://bugs.webkit.org/show_bug.cgi?id=188695
2300
2301         Reviewed by Michael Catanzaro.
2302
2303         Add cases to test the new API.
2304
2305         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
2306         (testJSCCheckSyntax):
2307         (createCustomError):
2308         (testJSCExceptions):
2309
2310 2018-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
2311
2312         [iOS] Paste is missing from callout bar when pasteboard only contains custom data
2313         https://bugs.webkit.org/show_bug.cgi?id=184271
2314         <rdar://problem/39256708>
2315
2316         Reviewed by Ryosuke Niwa.
2317
2318         Add a new API test to verify that on both iOS and macOS, copied custom pasteboard data can only be pasted in a
2319         matching origin. Additionally verify that on iOS, the web view is capable of performing the "paste:" selector.
2320
2321         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
2322         (TestWebKitAPI::TEST):
2323         (imagePath): Deleted.
2324         (writeTypesAndDataToPasteboard): Deleted.
2325         (setUpWebView): Deleted.
2326         (markupString): Deleted.
2327
2328         Make this test file no longer exclusive to macOS.
2329
2330         * TestWebKitAPI/cocoa/TestWKWebView.h:
2331         * TestWebKitAPI/cocoa/TestWKWebView.mm:
2332         (-[TestWKWebView synchronouslyLoadHTMLString:baseURL:]):
2333
2334         Tweak this helper to also take in a `baseURL`. Defaults to using the TestWebKitAPI bundle resource URL.
2335
2336         (-[TestWKWebView synchronouslyLoadHTMLString:]):
2337
2338 2018-08-17  Jonathan Bedard  <jbedard@apple.com>
2339
2340         Add back --wtf-only to run-api-tests
2341         https://bugs.webkit.org/show_bug.cgi?id=187893
2342         <rdar://problem/42483983>
2343
2344         Reviewed by Aakash Jain.
2345
2346         When doing WTF development, it is not necessary to build or run all of the API
2347         tests. Generally, if a user has specified a specific binary (or binaries) that
2348         they are interested in testing, it is not necessary to check all API test binaries.
2349
2350         * Scripts/webkitpy/api_tests/manager.py:
2351         (Manager._collect_tests): Only use the binaries matching the program arguments
2352         when collecting tests.
2353         (Manager._binaries_for_arguments): Generate a list of binaries which match the
2354         program arguments.
2355         (Manager.run): Pass a list binaries to check.
2356         * Scripts/webkitpy/api_tests/run_api_tests.py:
2357         (parse_args):
2358         * Scripts/webkitpy/port/base.py:
2359         (Port.check_api_test_build): If the caller specifies which API test binaries it
2360         requires, only check the ones specified.
2361         (Port.path_to_api_test_binaries): Allow the caller to only build the WTF API tests.
2362         (Port._build_api_tests): Allow the caller to only build the WTF API tests.
2363         * Scripts/webkitpy/port/win.py:
2364         (WinPort.path_to_api_test_binaries):
2365
2366 2018-08-17  Jer Noble  <jer.noble@apple.com>
2367
2368         REGRESSION (234743) Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio
2369         https://bugs.webkit.org/show_bug.cgi?id=188470
2370         <rdar://problem/43144969>
2371
2372         Reviewed by Alex Christensen.
2373
2374         On a loaded server, the WebContent process may send the "playing" message before the
2375         UIProcess has a chance to register a listener for that message. Restructure the tests
2376         so that the listener is registered before the page is loaded.
2377
2378         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
2379         (PreferredAudioBufferSize::runPlayingTestWithPageNamed):
2380         (TEST_F):
2381
2382 2018-08-16  Wenson Hsieh  <wenson_hsieh@apple.com>
2383
2384         [macOS] [WK2] Add infrastructure to test receiving file promises on drop
2385         https://bugs.webkit.org/show_bug.cgi?id=188583
2386
2387         Reviewed by Andy Estes.
2388
2389         Enable testing file promise drop handling on the WebKit2 port of macOS by introducing a subclass of
2390         NSFilePromiseReceiver and implementing `-enumerateDraggingItemsWithOptions:forView:…` on TestDraggingInfo (the
2391         concrete NSDraggingInfo implementation used by DragAndDropSimulator) using the mock file receiver. Also
2392         introduces 3 new macOS tests. See below for more details.
2393
2394         A large portion of this logic is ported over from DumpRenderTree testing infrastructure added in r229297. In a
2395         future patch, we should introduce a way to write code common to both API tests, WebKitTestRunner and
2396         DumpRenderTree, and make this code shared among all three testing harnesses.
2397
2398         Tests:  DragAndDropTests.DragImageElementIntoFileUpload
2399                 DragAndDropTests.DragPromisedImageFileIntoFileUpload
2400                 DragAndDropTests.DragImageFileIntoFileUpload
2401
2402         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2403         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
2404         (TEST):
2405
2406         Drive-by fix: Replace NSMakePoint with CGPointMake.
2407
2408         * TestWebKitAPI/Tests/WebKitCocoa/image-and-file-upload.html:
2409
2410         Add a new test page consisting of an image and a "file upload" area that updates exercises DataTransfer API to
2411         load the dropped image.
2412
2413         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
2414         (waitForConditionWithLogging):
2415
2416         Add a helper function to wait for a condition to evaluate to true. To make failures more informative,
2417         additionally add a mechanism to log a warning message after a given timeout, if the condition has yet to be met.
2418
2419         (TEST):
2420
2421         Add new tests to exercise a few cases of file upload in WebKit, including: (1) dragging from an image element,
2422         (2) dragging files written to the pasteboard as promises, and (3) files written to the pasteboard as file URLs.
2423
2424         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
2425
2426         Surface the new functionality provided by the file promise receiver mock via two new methods on
2427         DragAndDropSimulator to (1) write files as file promises to the pasteboard, and (2) write files as file paths
2428         directly to the pasteboard.
2429
2430         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
2431         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
2432         (-[DragAndDropSimulator externalPromisedFiles]):
2433         (getFilePathsAndTypeIdentifiers):
2434         (-[DragAndDropSimulator writePromisedFiles:]):
2435         (-[DragAndDropSimulator writeFiles:]):
2436         * TestWebKitAPI/mac/TestDraggingInfo.h:
2437         * TestWebKitAPI/mac/TestDraggingInfo.mm:
2438         (-[TestDraggingInfo initWithDragAndDropSimulator:]):
2439         (-[TestDraggingInfo filePromiseReceivers]):
2440         (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
2441
2442         Implement this by invoking the given block with a TestFilePromiseReceiver. While all other classes are
2443         unhandled by this testing code, WebKit only calls into this with [NSFilePromiseReceiver class], this is
2444         currently sufficient for testing purposes.
2445
2446         * TestWebKitAPI/mac/TestFilePromiseReceiver.h: Copied from Tools/TestWebKitAPI/mac/TestDraggingInfo.h.
2447         * TestWebKitAPI/mac/TestFilePromiseReceiver.mm: Added.
2448         (-[TestFilePromiseReceiver initWithPromisedTypeIdentifiers:dragAndDropSimulator:]):
2449         (-[TestFilePromiseReceiver fileTypes]):
2450         (-[TestFilePromiseReceiver fileNames]):
2451         (-[TestFilePromiseReceiver dealloc]):
2452         (-[TestFilePromiseReceiver draggingSource]):
2453         (-[TestFilePromiseReceiver setDraggingSource:]):
2454         (fileNameWithNumericSuffix):
2455         (copyFile):
2456
2457         Add a helper to copy a file into a destination directory. Used to implement the main functionality of our
2458         NSFilePromiseReceiver subclass, which copies the files specified by test code into the directory determined by
2459         WebKit.
2460
2461         (-[TestFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
2462
2463 2018-08-16  Alex Christensen  <achristensen@webkit.org>
2464
2465         Add entitlement to MiniBrowser to allow it to communicate with com.apple.Safari.SafeBrowsing.Service
2466         https://bugs.webkit.org/show_bug.cgi?id=188677
2467
2468         Reviewed by Tim Horton.
2469
2470         * MiniBrowser/MiniBrowser.entitlements:
2471         SSBLookupContext lookUpURL:completionHandler: fails to communicate with its service without this entitlement
2472         on released operating systems.  See <rdar://problem/42749777>
2473
2474 2018-08-16  Jer Noble  <jer.noble@apple.com>
2475
2476         Add option to run-api-tests to force running of DISABLED tests.
2477         https://bugs.webkit.org/show_bug.cgi?id=188674
2478
2479         Reviewed by Joseph Pecoraro.
2480
2481         * Scripts/webkitpy/api_tests/run_api_tests.py:
2482         (parse_args):
2483         * Scripts/webkitpy/api_tests/runner.py:
2484         (Runner.command_for_port):
2485         (_Worker._run_single_test):
2486
2487 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
2488
2489         [ews-build] Separate queues for Builders and Testers - macOS High Sierra
2490         https://bugs.webkit.org/show_bug.cgi?id=188540
2491
2492         Reviewed by Lucas Forschler.
2493
2494         * BuildSlaveSupport/ews-build/config.json: Splitted few macOS queues into builders and testers. 
2495
2496 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
2497
2498         [ews-build] Add build steps ArchiveTestResults, UploadTestResults and ExtractTestResults
2499         https://bugs.webkit.org/show_bug.cgi?id=188666
2500
2501         Reviewed by Lucas Forschler.
2502
2503         * BuildSlaveSupport/ews-build/steps.py:
2504         (ArchiveTestResults): Build step to Archive the test results.
2505         (UploadTestResults): Build step to upload the archive.
2506         (ExtractTestResults): Build step to unzip the archive on server and generate a link.
2507         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2508         (ExpectMasterShellCommand): Copied from other similar internal code.
2509
2510 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
2511
2512         [ews-build] Separate queues for Builders and Testers - macOS Sierra
2513         https://bugs.webkit.org/show_bug.cgi?id=188516
2514
2515         Reviewed by Lucas Forschler.
2516
2517         * BuildSlaveSupport/ews-build/config.json: Splitted macOS Sierra Release queues into builders and testers.
2518         * BuildSlaveSupport/ews-build/factories.py: Used appropriate base classes for builders and testers.
2519
2520 2018-08-16  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2521
2522         [Win][DumpRenderTree] Remove error message for duplicated tests.
2523         https://bugs.webkit.org/show_bug.cgi?id=188662
2524
2525         Reviewed by Per Arne Vollan.
2526
2527         This was added to track down an issue where the same tests appeared
2528         to be run multiple times. This turned out to not be the case.
2529         See https://bugs.webkit.org/show_bug.cgi?id=166760 .
2530
2531         * DumpRenderTree/win/DumpRenderTree.cpp:
2532         (runTest):
2533
2534 2018-08-16  Alex Christensen  <achristensen@webkit.org>
2535
2536         Re-introduce assertion removed in r234890
2537         https://bugs.webkit.org/show_bug.cgi?id=188611
2538
2539         Reviewed by Geoffrey Garen.
2540
2541         * TestWebKitAPI/Tests/WTF/Vector.cpp:
2542         (TestWebKitAPI::TEST):
2543
2544 2018-08-16  Jer Noble  <jer.noble@apple.com>
2545
2546         Add Experimental Feature support for SourceBuffer.changeType()
2547         https://bugs.webkit.org/show_bug.cgi?id=188626
2548         <rdar://problem/43356021>
2549
2550         Reviewed by Eric Carlson.
2551
2552         * DumpRenderTree/mac/DumpRenderTree.mm:
2553         (enableExperimentalFeatures):
2554         (resetWebPreferencesToConsistentValues):
2555         * WebKitTestRunner/TestController.cpp:
2556         (WTR::TestController::resetPreferencesToConsistentValues):
2557
2558 2018-08-16  Aditya Keerthi  <akeerthi@apple.com>
2559
2560         Support drag-and-drop for input[type=color]
2561         https://bugs.webkit.org/show_bug.cgi?id=188464
2562
2563         Reviewed by Wenson Hsieh.
2564
2565         Added five cross-platform API tests, to verify that dragging and dropping with
2566         color inputs changes the value of the drop target if and only if both inputs are
2567         enabled. Also tests that the change and input events are fired when changing the
2568         value of a color input through drag and drop. 
2569
2570         Additionally, added a macOS-specific test to verify that dropping an item with
2571         NSColorPboardType changes the value of the color input.
2572
2573         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2574         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
2575         (TestWebKitAPI::TEST):
2576         * TestWebKitAPI/Tests/WebKitCocoa/color-drop.html: Added.
2577         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
2578         (TestWebKitAPI::TEST):
2579
2580 2018-08-16  Antti Koivisto  <antti@apple.com>
2581
2582         Use OptionSet for ActivityState::Flags
2583         https://bugs.webkit.org/show_bug.cgi?id=188554
2584
2585         Reviewed by Brent Fulgham.
2586
2587         * TestWebKitAPI/Tests/WTF/OptionSet.cpp:
2588         (TestWebKitAPI::TEST):
2589
2590 2018-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2591
2592         [GTK] MiniBrowser: web view doesn't get the focus when new window is created
2593         https://bugs.webkit.org/show_bug.cgi?id=188546
2594
2595         Reviewed by Michael Catanzaro.
2596
2597         When a new window is created, the first widget of the windo is getting the focus, the toolbar in this case. We
2598         always want the WebView to grab the focus. In case of new empty tab, we want to the URL bar to be focused
2599         instead. This was causing failures in WebDriver tests that create a popup window with an input element that is
2600         filled with send keys command. The input element is marked as focused in the DOM, but the actual focused widget
2601         is the toolbar, so key events are sent to the toolbar instead of the web view.
2602
2603         * MiniBrowser/gtk/BrowserWindow.c:
2604         (webViewCreate):
2605         (newTabCallback):
2606         (openPrivateWindow):
2607         (browser_window_get_or_create_web_view_for_automation):
2608
2609 2018-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2610
2611         Unreviewed. Fix WebDriver tests after r234839.
2612
2613         New pytest requires to autoinstall attrs too.
2614
2615         * Scripts/webkitpy/thirdparty/__init__.py:
2616         (AutoinstallImportHook._install_pytest):
2617
2618 2018-08-15  Ansh Shukla  <ansh_shukla@apple.com>
2619
2620         NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
2621         https://bugs.webkit.org/show_bug.cgi?id=186870
2622         <rdar://problem/41314410>
2623
2624         Reviewed by Alex Christensen.
2625
2626         * WebKitTestRunner/TestController.cpp:
2627         (WTR::toString):
2628         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth.
2629         (WTR::TestController::didReceiveAuthenticationChallenge):
2630
2631 2018-08-15  Ben Richards  <benton_richards@apple.com>
2632
2633         We should cache the compiled sandbox profile in a data vault
2634         https://bugs.webkit.org/show_bug.cgi?id=184991
2635
2636         Reviewed by Ryosuke Niwa.
2637
2638         Added trace points for sandbox initialization
2639
2640         * Tracing/SystemTracePoints.plist:
2641
2642 2018-08-15  Ryan Haddad  <ryanhaddad@apple.com>
2643
2644         Unreviewed, rolling out r234870.
2645
2646         The test introduced with this change is a flaky failure.
2647
2648         Reverted changeset:
2649
2650         "NSURLAuthenticationMethodOAuth challenges are surfaced to
2651         clients in -didReceiveAuthenticationChallenge as
2652         NSURLAuthenticationMethodDefault"
2653         https://bugs.webkit.org/show_bug.cgi?id=186870
2654         https://trac.webkit.org/changeset/234870
2655
2656 2018-08-15  Jonathan Bedard  <jbedard@apple.com>
2657
2658         WebKitTestRunner should support watch devices
2659         https://bugs.webkit.org/show_bug.cgi?id=188570
2660
2661         Reviewed by Alex Christensen.
2662
2663         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
2664
2665 2018-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2666
2667         [Attachment SPI] Remove attachment display mode options
2668         https://bugs.webkit.org/show_bug.cgi?id=188596
2669
2670         Reviewed by Dan Bernstein.
2671
2672         Remove API tests and API test helpers for verifying the behavior of in-place media attachment elements.
2673
2674         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2675         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
2676         (TestWebKitAPI::TEST):
2677         (testVideoData): Deleted.
2678         (displayOptionsWithMode): Deleted.
2679         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:options:]): Deleted.
2680
2681 2018-08-14  Devin Rousso  <drousso@apple.com>
2682
2683         Unreviewed, change my emails.
2684
2685         * Scripts/webkitpy/common/config/contributors.json:
2686         * Scripts/webkitpy/common/config/watchlist:
2687
2688 2018-08-14  Saam barati  <sbarati@apple.com>
2689
2690         HashMap<Ref<P>, V> asserts when V is not zero for its empty value
2691         https://bugs.webkit.org/show_bug.cgi?id=188582
2692
2693         Reviewed by Sam Weinig.
2694
2695         * TestWebKitAPI/Tests/WTF/HashMap.cpp:
2696         (TestWebKitAPI::TEST):
2697
2698 2018-08-14  Zalan Bujtas  <zalan@apple.com>
2699
2700         [LFC][Floating] Add support for negative clearance.
2701         https://bugs.webkit.org/show_bug.cgi?id=188555
2702
2703         Reviewed by Simon Fraser.
2704
2705         * LayoutReloaded/misc/LFC-passing-tests.txt:
2706
2707 2018-08-14 Sihui Liu <sihui_liu@apple.com>
2708
2709         Crash in WebKit::filterPreloadHSTSEntry via NetworkProcess::getHostNamesWithHSTSCache
2710         https://bugs.webkit.org/show_bug.cgi?id=188576
2711         <rdar://problem/43148977>
2712
2713         Reviewed by Alex Christensen.
2714
2715         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2716         * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: Added.
2717         (TEST):
2718
2719 2018-08-14  Alex Christensen  <achristensen@webkit.org>
2720
2721         isValidCSSSelector is unsafe to be called from a non-main thread
2722         https://bugs.webkit.org/show_bug.cgi?id=188581
2723         <rdar://problem/40517358>
2724
2725         Reviewed by Sam Weinig.
2726
2727         * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
2728         (TestWebKitAPI::InMemoryCompiledContentExtension::create):
2729         (TestWebKitAPI::checkCompilerError):
2730
2731 2018-08-14  Ansh Shukla  <ansh_shukla@apple.com>
2732
2733         NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
2734         https://bugs.webkit.org/show_bug.cgi?id=186870
2735         <rdar://problem/41314410>
2736
2737         Reviewed by Alex Christensen.
2738
2739         * WebKitTestRunner/TestController.cpp:
2740         (WTR::toString):
2741         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth.
2742         (WTR::TestController::didReceiveAuthenticationChallenge):
2743
2744 2018-08-14  Fujii Hironori  <Hironori.Fujii@sony.com>
2745
2746         [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
2747         https://bugs.webkit.org/show_bug.cgi?id=187973
2748
2749         Reviewed by Alex Christensen.
2750
2751         In LayoutTests, test names have been canonicalized in Unix style
2752         since Bug 63597, for example 'fast/css/001.html'. But Bug 179219,
2753         Bug 179572, Bug 180660, and Bug 181814 have changed to use
2754         os.path.seq instead of slash if Windows Python is used.
2755
2756         Revert parts of those changes. Change relative_test_filename to
2757         return a slash-separated test name as chromium_win.py used to do.
2758
2759         This change fixes all 41 test-webkitpy failures in WinCairo port.
2760
2761         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
2762         (TestExpectationParser._parse_line): Do not convert test names with normpath.
2763         * Scripts/webkitpy/port/base.py:
2764         (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep.
2765         (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR.
2766         (Port.abspath_for_test): Replace self.TEST_PATH_SEPARATOR with self.host.filesystem.sep.
2767         * Scripts/webkitpy/port/driver.py:
2768         (Driver): Use '/' instead of os.sep.
2769         * Scripts/webkitpy/port/win.py:
2770         (WinCairoPort): Do not override TEST_PATH_SEPARATOR.
2771
2772 2018-08-14  Aakash Jain  <aakash_jain@apple.com>
2773
2774         [ews-build] Add build step to run WK1 layout-test
2775         https://bugs.webkit.org/show_bug.cgi?id=188498
2776
2777         Reviewed by Lucas Forschler.
2778
2779         * BuildSlaveSupport/ews-build/steps.py:
2780         (RunWebKit1Tests): Class to run WebKit1Tests.
2781         * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2782
2783 2018-08-14  Patrick Griffis  <pgriffis@igalia.com>
2784
2785         [Flatpak] Fix --cmakeargs
2786         https://bugs.webkit.org/show_bug.cgi?id=188567
2787
2788         Reviewed by Michael Catanzaro.
2789
2790         * flatpak/flatpakutils.py:
2791         (WebkitFlatpak.setup_dev_env):
2792
2793 2018-08-14  Darshan Kadu  <dkadu@igalia.com>
2794
2795         Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links
2796         https://bugs.webkit.org/show_bug.cgi?id=186140
2797
2798         Reviewed by Youenn Fablet.
2799
2800         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"
2801         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
2802         (Bugzilla.post_comment_to_bug):
2803         Modified mock for see_also parameter
2804         * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
2805         (MockBugzilla.post_comment_to_bug):
2806         Made following unit tests to have see_also in bug comment
2807         * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
2808         * Scripts/webkitpy/tool/bot/sheriff_unittest.py:
2809         (SheriffTest.test_post_blame_comment_on_bug):
2810         * Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py:
2811         * Scripts/webkitpy/tool/commands/queues_unittest.py:
2812         * Scripts/webkitpy/tool/commands/upload_unittest.py:
2813         * Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:
2814         * Scripts/webkitpy/w3c/test_exporter.py:
2815         (WebPlatformTestExporter.make_pull_request):
2816         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
2817         (TestExporterTest.MockBugzilla.post_comment_to_bug):
2818         (TestExporterTest.test_export):
2819
2820 2018-08-14  Aakash Jain  <aakash_jain@apple.com>
2821
2822         [ews-build] Add support for max_builds parameter for workers
2823         https://bugs.webkit.org/show_bug.cgi?id=188531
2824
2825         Reviewed by Lucas Forschler.
2826
2827         * BuildSlaveSupport/ews-build/loadConfig.py:
2828         (loadBuilderConfig): Added support for max_builds.
2829
2830 2018-08-14  Zalan Bujtas  <zalan@apple.com>
2831
2832         [LFC][Floating] Adjust vertical position with non-collapsing previous sibling margin.
2833         https://bugs.webkit.org/show_bug.cgi?id=188543
2834
2835         Reviewed by Antti Koivisto.
2836
2837         * LayoutReloaded/misc/LFC-passing-tests.txt:
2838
2839 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2840
2841         Unreviewed. Fix WebDriver tests after r234839.
2842
2843         New pytest requires to autoinstall more_itertools and six too.
2844
2845         * Scripts/webkitpy/thirdparty/__init__.py:
2846         (AutoinstallImportHook._install_pytest):
2847
2848 2018-08-14  Tomas Popela  <tpopela@redhat.com>
2849
2850         [GTK] Minibrowser: Add labels for buttons
2851         https://bugs.webkit.org/show_bug.cgi?id=188549
2852
2853         Reviewed by Carlos Garcia Campos.
2854
2855         So they are accessible easier (i.e. while testing WebKitGTK+ through Minibrowser in Dogtail).
2856
2857         * MiniBrowser/gtk/BrowserWindow.c:
2858         (webViewIsLoadingChanged):
2859         (browserWindowSetupEditorToolbar):
2860         (browser_window_init):
2861
2862 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2863
2864         Unreviewed. Fix WebDriver tests after r234839.
2865
2866         New pytest requires to autoinstall atomicwrites too.
2867
2868         * Scripts/webkitpy/thirdparty/__init__.py:
2869         (AutoinstallImportHook._install_pytest):
2870
2871 2018-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2872
2873         Unreviewed. Fix WebDriver tests after r234839.
2874
2875         New pytest requires to autoinstall pluggy and funcsigs too.
2876
2877         * Scripts/webkitpy/thirdparty/__init__.py:
2878         (AutoinstallImportHook._install_pytest):
2879
2880 2018-08-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2881
2882         Unreviewed. Update W3C WebDriver imported tests.
2883
2884         Bump pytest version to 3.6.2.
2885
2886         * Scripts/webkitpy/thirdparty/__init__.py:
2887         (AutoinstallImportHook._install_pytest):
2888
2889 2018-08-13  Thomas Denney  <tdenney@apple.com>
2890
2891         Allow the substring 'me' in contributor names and email addresses
2892         https://bugs.webkit.org/show_bug.cgi?id=188538
2893
2894         Reviewed by Tim Horton.
2895
2896         A test didn't permit the string "me" in email addresses or names of contributors.
2897
2898         * Scripts/webkitpy/common/config/committers_unittest.py:
2899         (CommittersTest.test_contributors_by_fuzzy_match):
2900
2901 2018-08-13  Commit Queue  <commit-queue@webkit.org>
2902
2903         Unreviewed, rolling out r234812.
2904         https://bugs.webkit.org/show_bug.cgi?id=188536
2905
2906         broke the build (Requested by ThomasDenney on #webkit).
2907
2908         Reverted changeset:
2909
2910         "Added Thomas Denney to contributors.json."
2911         https://bugs.webkit.org/show_bug.cgi?id=188525
2912         https://trac.webkit.org/changeset/234812
2913
2914 2018-08-13  Sihui Liu  <sihui_liu@apple.com>
2915
2916         Avoid timeout resulted from calling waitUntilDone when test is not running
2917         https://bugs.webkit.org/show_bug.cgi?id=188389
2918
2919         Reviewed by Chris Dumez.
2920
2921         If test is not running, we should not set the waitUntilDone flag, or it may cause subsequent tests timeout.
2922
2923         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2924         (WTR::TestRunner::waitUntilDone):
2925
2926 2018-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
2927
2928         [WK2] [macOS] Implement a mechanism to test drag and drop
2929         https://bugs.webkit.org/show_bug.cgi?id=181898
2930         <rdar://problem/39181698>
2931
2932         Reviewed by Simon Fraser.
2933
2934         Implements the currently stubbed DragAndDropSimulator on macOS, and introduces a new API test for r227266. See
2935         comments below for more detail.
2936
2937         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2938         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm.
2939
2940         Introduce a file for cross-platform drag and drop tests, currently for iOS and macOS. Additionally add a test
2941         for r227266, which was fixed earlier this year but could not be tested due to a lack of testing mechanism on
2942         macOS in WebKit2.
2943
2944         (TEST):
2945         * TestWebKitAPI/Tests/WebKitCocoa/full-page-dropzone.html: Added.
2946
2947         Minor tweaks to this test page to add "dragover" and "drop" event handlers.
2948
2949         * TestWebKitAPI/Tests/WebKitCocoa/image-in-link-and-input.html:
2950         * TestWebKitAPI/Tests/WebKitCocoa/link-in-iframe-and-input.html: Added.
2951
2952         Add a new test page that includes a link embedded within an iframe below a plain text input.
2953
2954         * TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm: Added.
2955         (TEST):
2956         * TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm: Renamed from Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm.
2957
2958         Move only existing WebKit2 macOS drag and drop test (DragAndDropPasteboardTests.NumberOfValidItemsForDrop) out
2959         of DragAndDropPasteboardTests.mm and into a new file, DragAndDropTestsMac.mm. Additionally, rename
2960         DragAndDropPasteboardTests to LegacyDragAndDropTests, since it now only contains two legacy WebView tests for
2961         drag and drop.
2962
2963         (+[FrameLoadCompletionListener listenerWithCompletionBlock:]):
2964         (-[FrameLoadCompletionListener initWithCompletionBlock:]):
2965         (-[FrameLoadCompletionListener webView:didFinishLoadForFrame:]):
2966         (-[DragSource draggingSourceOperationMaskForLocal:]):
2967         (-[DragInfo initWithImage:offset:pasteboard:source:destinationWindow:]):
2968         (-[DragInfo lastMousePosition]):
2969         (-[DragInfo setLastMousePosition:]):
2970         (-[DragInfo draggingDestinationWindow]):
2971         (-[DragInfo draggingSourceOperationMask]):
2972         (-[DragInfo draggingLocation]):
2973         (-[DragInfo draggedImageLocation]):
2974         (-[DragInfo draggedImage]):
2975         (-[DragInfo draggingPasteboard]):
2976         (-[DragInfo draggingSource]):
2977         (-[DragInfo draggingSequenceNumber]):
2978         (-[DragInfo slideDraggedImageTo:]):
2979         (-[DragInfo namesOfPromisedFilesDroppedAtDestination:]):
2980         (-[DragInfo draggingFormation]):
2981         (-[DragInfo setDraggingFormation:]):
2982         (-[DragInfo animatesToDestination]):
2983         (-[DragInfo setAnimatesToDestination:]):
2984         (-[DragInfo numberOfValidItemsForDrop]):
2985         (-[DragInfo setNumberOfValidItemsForDrop:]):
2986         (-[DragInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
2987         (-[DragInfo springLoadingHighlight]):
2988         (-[DragInfo resetSpringLoading]):
2989         (TestWebKitAPI::getTestImage):
2990         (TestWebKitAPI::webViewAfterPerformingDragOperation):
2991         (TestWebKitAPI::TEST):
2992         * TestWebKitAPI/Tests/mac/full-page-dropzone.html: Removed.
2993         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
2994
2995         Flesh out some of the DragAndDropSimulator API for macOS, exposing (among other things) the drag pasteboard,
2996         the current NSDraggingInfo, the initial location of the drag image, and the drag image itself.
2997
2998         * TestWebKitAPI/cocoa/TestWKWebView.h:
2999         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3000         (-[TestWKWebView mouseDownAtPoint:simulatePressure:]):
3001         (-[TestWKWebView mouseUpAtPoint:]):
3002         (-[TestWKWebView mouseMoveToPoint:withFlags:]):
3003         (-[TestWKWebView sendClicksAtPoint:numberOfClicks:]):
3004         (-[TestWKWebView mouseEnterAtPoint:]):
3005         (-[TestWKWebView mouseExitAtPoint:]):
3006         (-[TestWKWebView mouseDragToPoint:]):
3007         (-[TestWKWebView _mouseEventWithType:atLocation:]):
3008         (-[TestWKWebView _mouseEventWithType:atLocation:flags:timestamp:clickCount:]):
3009
3010         Add TestWKWebView helpers to send MouseMove, MouseEnter and MouseDrag NSEvents to the web view. Additionally,
3011         rename parameter names to these helpers to make it more obvious that these locations are all in NSWindow
3012         coordinates.
3013
3014         (-[TestWKWebView typeCharacter:]):
3015
3016         Drive-by style fix: put this opening brace on the beginning of the next line.
3017
3018         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
3019         (-[DragAndDropSimulator initWithWebViewFrame:]):
3020         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
3021         (-[DragAndDropSimulator webView]):
3022
3023         Small iOS DragAndDropSimulator adjustments for new DragAndDropSimulator interfaces.
3024
3025         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
3026         (-[DragAndDropTestWKWebView initWithFrame:configuration:simulator:]):
3027
3028         Introduce a WKWebView subclass for testing drag and drop that overrides `-dragImage:at:offset:…`, and instead
3029         allows DragAndDropSimulator to take over the drag.
3030
3031         (-[DragAndDropTestWKWebView dragImage:at:offset:event:pasteboard:source:slideBack:]):
3032
3033         Override this entry point into drag and drop code, and instead call out to the DragAndDropSimulator to
3034         coordinate the drag.
3035
3036         (-[DragAndDropTestWKWebView waitForPendingMouseEvents]):
3037
3038         Helper method to wait for the web process to finish handling all in-flight mouse events.
3039
3040         (defaultExternalDragImage):
3041
3042         Set this image as the default drag image when simulating an incoming drag session from outside of the web view.
3043
3044         (-[DragAndDropSimulator initWithWebViewFrame:]):
3045         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
3046         (-[DragAndDropSimulator flipAboutXAxisInHostWindow:]):
3047
3048         Helper method to flip a given point about the X axis of the window.
3049
3050         (-[DragAndDropSimulator locationInViewForCurrentProgress]):
3051
3052         Map a progress value (between 0 and 1) to a drag location.
3053
3054         (-[DragAndDropSimulator initialProgressForMouseDrag]):
3055
3056         Determines the initial progress value when initiation a drag in web content. This is the initial progress
3057         required to ensure that the first mouse drag event exceeds the drag distance hysteresis and causes any drag
3058         (if applicable) to begin.
3059
3060         (-[DragAndDropSimulator runFrom:to:]):
3061         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
3062
3063         Helper to coordinate drag updates in both the cases where we're simulating a drag session entering from outside
3064         of the web view, and in the case where we've initiated a drag from the web view itself.
3065
3066         (-[DragAndDropSimulator webView]):
3067         (-[DragAndDropSimulator setExternalDragPasteboard:]):
3068         (-[DragAndDropSimulator externalDragPasteboard]):
3069
3070         Just like its iOS counterpart (setExternalItemProviders:), setting an external drag pasteboard on macOS puts the
3071         DragAndDropSimulator in a mode that simulates a drag coming in from outside the web view, using the given
3072         pasteboard.
3073
3074         (-[DragAndDropSimulator setExternalDragImage:]):
3075         (-[DragAndDropSimulator externalDragImage]):
3076
3077         May be optionally set when specifying an external drag pasteboard to specify the drag image used. If no external
3078         drag image is specified, falls back to the default image returned by `defaultExternalDragImage()`.
3079
3080         (-[DragAndDropSimulator draggingInfo]):
3081         (-[DragAndDropSimulator willEndDraggingHandler]):
3082         (-[DragAndDropSimulator setWillEndDraggingHandler:]):
3083
3084         Hook to allow tests to run logic right before performing the drop (if the current drag operation is not none) or
3085         ending the drag session without performing a drag operation.
3086
3087         (-[DragAndDropSimulator initWithWebView:]): Deleted.
3088         (-[DragAndDropSimulator dealloc]): Deleted.
3089         (-[DragAndDropSimulator phase]): Deleted.
3090         * TestWebKitAPI/mac/TestDraggingInfo.h: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm.
3091         * TestWebKitAPI/mac/TestDraggingInfo.mm: Added.
3092
3093         Mock object conforming to NSDraggingInfo that is passed to WKWebView when invoking -draggingUpdated:,
3094         -draggingEntered: and -draggingExited:.
3095
3096         (-[TestDraggingInfo draggingPasteboard]):
3097         (-[TestDraggingInfo setDraggingPasteboard:]):
3098         (-[TestDraggingInfo draggingSource]):
3099         (-[TestDraggingInfo setDraggingSource:]):
3100         (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
3101         (-[TestDraggingInfo draggingDestinationWindow]):
3102         (-[TestDraggingInfo draggedImage]):
3103         (-[TestDraggingInfo setDraggedImage:]):
3104         (-[TestDraggingInfo slideDraggedImageTo:]):
3105         (-[TestDraggingInfo namesOfPromisedFilesDroppedAtDestination:]):
3106         (-[TestDraggingInfo resetSpringLoading]):
3107
3108         Empty method stubs, to be implemented in the future as needed.
3109
3110 2018-08-13  Thomas Denney  <tdenney@apple.com>
3111
3112         Added Thomas Denney to contributors.json.
3113         https://bugs.webkit.org/show_bug.cgi?id=188525
3114
3115         Reviewed by Myles C. Maxfield.
3116
3117         * Scripts/webkitpy/common/config/contributors.json:
3118
3119 2018-08-13  Antti Koivisto  <antti@apple.com>
3120
3121         Meaning of OptionSet::contains is unclear when used with OptionSet argument
3122         https://bugs.webkit.org/show_bug.cgi?id=188501
3123
3124         Reviewed by Anders Carlsson.
3125
3126         * TestWebKitAPI/Tests/WTF/OptionSet.cpp:
3127         (TestWebKitAPI::TEST):
3128
3129 2018-08-13  Commit Queue  <commit-queue@webkit.org>
3130
3131         Unreviewed, rolling out r234747.
3132         https://bugs.webkit.org/show_bug.cgi?id=188524
3133
3134         plugin processes crash on launch (Requested by smfr on
3135         #webkit).
3136
3137         Reverted changeset:
3138
3139         "We should cache the compiled sandbox profile in a data vault"
3140         https://bugs.webkit.org/show_bug.cgi?id=184991
3141         https://trac.webkit.org/changeset/234747
3142
3143 2018-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3144
3145         [iOS] Dragging a non-editable text selection into a plain text input inserts HTML markup
3146         https://bugs.webkit.org/show_bug.cgi?id=188485
3147         <rdar://problem/43168784>
3148
3149         Reviewed by Tim Horton.
3150
3151         Add a new API test to verify that dropping selected non-editable rich text into a textarea inserts text as
3152         expected, rather than markup.
3153
3154         It's somewhat interesting to note that this particular use case isn't exercised by any existing tests; the
3155         closest test is DragAndDropTests.ContentEditableToTextarea, which drags a rich text selection from a
3156         contenteditable element to a text area. However, due to logic in `DragController::concludeEditDrag` that handles
3157         drag and drop across editable content differently than drag and drop from non-editable to editable content, the
3158         bug that is fixed here doesn't surface in that existing test.
3159
3160         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3161         * TestWebKitAPI/Tests/WebKitCocoa/selected-text-and-textarea.html: Added.
3162         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
3163         (TestWebKitAPI::TEST):
3164
3165 2018-08-13  Alex Christensen  <achristensen@webkit.org>
3166
3167         Use a 1-byte enum class for TextDirection
3168         https://bugs.webkit.org/show_bug.cgi?id=188350
3169
3170         Reviewed by Simon Fraser.
3171
3172         * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
3173         (TestWebKitAPI::TEST_F):
3174         * TestWebKitAPI/Tests/WebCore/StringWithDirection.cpp:
3175         (WebCore::operator<<):
3176         (TestWebKitAPI::TEST):
3177         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
3178         (TEST_F):
3179
3180 2018-08-13  Zalan Bujtas  <zalan@apple.com>
3181
3182         [LFC][Floating] Add basic clearance support
3183         https://bugs.webkit.org/show_bug.cgi?id=188492
3184
3185         Reviewed by Antti Koivisto.
3186
3187         * LayoutReloaded/misc/LFC-passing-tests.txt:
3188
3189 2018-08-12  Zalan Bujtas  <zalan@apple.com>
3190
3191         [LFC] Float prev/next sibling should prevent top/bottom margin collapsing with parent.
3192         https://bugs.webkit.org/show_bug.cgi?id=188487
3193
3194         Reviewed by Antti Koivisto.
3195
3196         * LayoutReloaded/misc/LFC-passing-tests.txt:
3197
3198 2018-08-11  Aakash Jain  <aakash_jain@apple.com>
3199
3200         [ews-build] Separate queues for Builders and Testers - iOS
3201         https://bugs.webkit.org/show_bug.cgi?id=188396
3202
3203         Reviewed by Lucas Forschler.
3204
3205         * BuildSlaveSupport/ews-build/config.json: Splitted iOS queues into builders and testers.
3206         Also added ews121 and ews122 to match with current EWS configuration.
3207         * BuildSlaveSupport/ews-build/factories.py:
3208         (TestsFactory): Base classes for various Test factories.
3209         (TestsFactory.getProduct): Download and extract the archive.
3210
3211 2018-08-10  Daniel Bates  <dabates@apple.com>
3212
3213         webkit-patch setup-git-clone should set Git core editor to commit-log-editor
3214         https://bugs.webkit.org/show_bug.cgi?id=188473
3215
3216         Reviewed by Ryosuke Niwa.
3217
3218         Have "webkit-patch setup-git-clone" set the Git core editor to "perl Tools/Scripts/commit-log-editor --regenerate-log"
3219         so that the Git commit message is generated from the ChangeLog for developers that manually
3220         generate their ChangeLog using prepare-ChangeLog.
3221
3222         * Scripts/webkitpy/tool/commands/setupgitclone.py:
3223         (SetupGitClone.execute):
3224
3225 2018-08-10  Truitt Savell  <tsavell@apple.com>
3226
3227         Unreviewed, rolling out r234749.
3228
3229         Caused all perf tests to fail in Sierra
3230
3231         Reverted changeset:
3232
3233         "[webkitpy][Win] LayoutTests: test names should be Unix style,
3234         separated by slash not backslash"
3235         https://bugs.webkit.org/show_bug.cgi?id=187973
3236         https://trac.webkit.org/changeset/234749
3237
3238 2018-08-10  David Fenton  <david_fenton@apple.com>
3239
3240         Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio.
3241         https://bugs.webkit.org/show_bug.cgi?id=188470.
3242
3243         Unreviewed test gardening, disabling the tests.
3244
3245         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
3246         (TEST_F):
3247
3248 2018-08-10  Joseph Pecoraro  <pecoraro@apple.com>
3249
3250         Eliminate remaining instances of "ElCapitan" from LayoutTests / Tools
3251         https://bugs.webkit.org/show_bug.cgi?id=188458
3252
3253         Reviewed by Alex Christensen.
3254
3255         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
3256         (TestExpectationParser):
3257         * TestResultServer/static-dashboards/flakiness_dashboard.js:
3258
3259 2018-08-09  Fujii Hironori  <Hironori.Fujii@sony.com>
3260
3261         [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
3262         https://bugs.webkit.org/show_bug.cgi?id=187973
3263
3264         Reviewed by Alex Christensen.
3265
3266         In LayoutTests, test names have been canonicalized in Unix style
3267         since Bug 63597, for example 'fast/css/001.html'. But, Bug 179219,
3268         Bug 179572, Bug 180660 and Bug 181814 have changed to use
3269         os.path.seq instead of slash if Windows Python is used.
3270
3271         Revert parts of those changes. Change relative_test_filename to
3272         return a slash sperated test name as well as chromium_win.py used
3273         to do.
3274
3275         This change fixes all 41 test-webkitpy failures in WinCairo port.
3276
3277         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
3278         (TestExpectationParser._parse_line): Do not convert a test name by using normpath.
3279         * Scripts/webkitpy/port/base.py:
3280         (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep.
3281         (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR.
3282         (Port.abspath_for_test): Split test_name with TEST_PATH_SEPARATOR.
3283         * Scripts/webkitpy/port/driver.py:
3284         (Driver): Use '/' instead of os.sep.
3285         * Scripts/webkitpy/port/win.py:
3286         (WinCairoPort): Do not override TEST_PATH_SEPARATOR.
3287
3288 2018-08-09  Thomas Denney  <tdenney@apple.com>
3289
3290         [WHLSL] Add individual test durations to output
3291         https://bugs.webkit.org/show_bug.cgi?id=188448
3292
3293         Reviewed by Myles C. Maxfield.
3294
3295         * WebGPUShadingLanguageRI/Test.js: Add timing output.
3296
3297 2018-08-09  Ben Richards  <benton_richards@apple.com>
3298
3299         We should cache the compiled sandbox profile in a data vault
3300         https://bugs.webkit.org/show_bug.cgi?id=184991
3301
3302         Reviewed by Ryosuke Niwa.
3303
3304         Added trace points for sandbox initialization
3305
3306         * Tracing/SystemTracePoints.plist:
3307
3308 2018-08-09  Jer Noble  <jer.noble@apple.com>
3309
3310         Video playback is using more power
3311         https://bugs.webkit.org/show_bug.cgi?id=188452
3312         <rdar://problem/42298937>
3313
3314         Reviewed by Eric Carlson.
3315
3316         * TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
3317         (PreferredAudioBufferSize::createView):
3318         (PreferredAudioBufferSize::preferredAudioBufferSize const):
3319         (TEST_F):
3320
3321 2018-08-09  Alex Christensen  <achristensen@webkit.org>
3322
3323         REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework
3324         https://bugs.webkit.org/show_bug.cgi?id=188453
3325         <rdar://problem/43102553>
3326
3327         Reviewed by Chris Dumez
3328
3329         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
3330         (TEST):
3331         (+[NullLookupContext sharedLookupContext]):
3332         (TestWebKitAPI::TEST): Deleted.
3333
3334 2018-08-09  Alex Christensen  <achristensen@webkit.org>
3335
3336         WKURLSchemeHandler crashes when sent errors with sync XHR
3337         https://bugs.webkit.org/show_bug.cgi?id=188358
3338
3339         Reviewed by Chris Dumez.
3340
3341         * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
3342         (-[SyncErrorScheme webView:startURLSchemeTask:]):
3343         (-[SyncErrorScheme webView:stopURLSchemeTask:]):
3344         (-[SyncErrorScheme webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
3345
3346 2018-08-09  Per Arne Vollan  <pvollan@apple.com>
3347
3348         REGRESSION(r234652): fast/scrolling/rtl-scrollbars-animation-property.html is failing
3349         https://bugs.webkit.org/show_bug.cgi?id=188397
3350
3351         Reviewed by Tim Horton.
3352
3353         After r234652, [NSScroller preferredScrollerStyle] is called in the UI process, and we need to set the same
3354         user defaults related to scrollbars in the UI process as we do in the WebProcess.
3355
3356         * WebKitTestRunner/mac/main.mm:
3357         (setDefaultsToConsistentValuesForTesting):
3358
3359 2018-08-09  Wenson Hsieh  <wenson_hsieh@apple.com>
3360
3361         [iOS WK2] Rename and refactor DataInteractionTests and DataInteractionSimulator
3362         https://bugs.webkit.org/show_bug.cgi?id=188439
3363
3364         Reviewed by Andy Estes and Megan Gardner.
3365
3366         Refactor DataInteractionSimulator (currently used for drag and drop testing on iOS) so that it exists across
3367         macOS and iOS, and rename it to DragAndDropSimulator. Additionally, rename DataInteractionTests to
3368         DragAndDropTests.
3369
3370         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3371         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
3372         (TestWebKitAPI::TEST):
3373         * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm.
3374         (testIconImage):
3375         (testZIPArchive):
3376         (-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]):
3377         (-[TestWKWebView editorContainsImageElement]):
3378         (-[TestWKWebView editorValue]):
3379         (makeCGRectValue):
3380         (checkCGRectIsEqualToCGRectWithLogging):
3381         (checkSelectionRectsWithLogging):
3382         (checkRichTextTypePrecedesPlainTextType):
3383         (checkFirstTypeIsPresentAndSecondTypeIsMissing):
3384         (checkTypeIdentifierIsRegisteredAtIndex):
3385         (checkEstimatedSize):
3386         (checkSuggestedNameAndEstimatedSize):
3387         (checkStringArraysAreEqual):
3388         (checkDragCaretRectIsContainedInRect):
3389         (checkJSONWithLogging):
3390         (testIconImageData):
3391         (runTestWithTemporaryTextFile):
3392         (runTestWithTemporaryFolder):
3393         (TestWebKitAPI::TEST):
3394         (TestWebKitAPI::setUpTestWebViewForDataTransferItems):
3395         (TestWebKitAPI::testDragAndDropOntoTargetElements):
3396         (TestWebKitAPI::testIconImageData):
3397         * TestWebKitAPI/cocoa/DragAndDropSimulator.h: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.h.
3398         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm.
3399         (-[WKWebView dropInteractionDelegate]):
3400         (-[WKWebView dragInteractionDelegate]):
3401         (-[WKWebView dropInteraction]):
3402         (-[WKWebView dragInteraction]):
3403         (-[MockDragDropSession initWithItems:location:window:allowMove:]):
3404         (-[MockDragDropSession allowsMoveOperation]):
3405         (-[MockDragDropSession isRestrictedToDraggingApplication]):
3406         (-[MockDragDropSession hasItemsConformingToTypeIdentifiers:]):
3407         (-[MockDragDropSession canLoadObjectsOfClass:]):
3408         (-[MockDragDropSession canLoadObjectsOfClasses:]):
3409         (-[MockDragDropSession items]):
3410         (-[MockDragDropSession setItems:]):
3411         (-[MockDragDropSession addItems:]):
3412         (-[MockDragDropSession locationInView:]):
3413         (-[MockDropSession initWithProviders:location:window:allowMove:]):
3414         (-[MockDropSession isLocal]):
3415         (-[MockDropSession progress]):
3416         (-[MockDropSession setProgressIndicatorStyle:]):
3417         (-[MockDropSession progressIndicatorStyle]):
3418         (-[MockDropSession operationMask]):
3419         (-[MockDropSession localDragSession]):
3420         (-[MockDropSession hasItemsConformingToTypeIdentifier:]):
3421         (-[MockDropSession canCreateItemsOfClass:]):
3422         (-[MockDropSession loadObjectsOfClass:completion:]):
3423         (-[MockDragSession initWithWindow:allowMove:]):
3424         (-[MockDragSession localOperationMask]):
3425         (-[MockDragSession externalOperationMask]):
3426         (-[MockDragSession session]):
3427         (-[MockDragSession localContext]):
3428         (-[MockDragSession setLocalContext:]):
3429         (dragAndDropEventNames):
3430         (-[DragAndDropSimulatorApplication _cancelAllTouches]):
3431         (-[DragAndDropSimulator initWithWebView:]):
3432         (-[DragAndDropSimulator dealloc]):
3433         (-[DragAndDropSimulator _resetSimulatedState]):
3434         (-[DragAndDropSimulator observedEventNames]):
3435         (-[DragAndDropSimulator simulateAllTouchesCanceled:]):
3436         (-[DragAndDropSimulator runFrom:to:]):
3437         (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
3438         (-[DragAndDropSimulator finalSelectionRects]):
3439         (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
3440         (-[DragAndDropSimulator _enqueuePendingAdditionalItemRequestLocations]):
3441         (-[DragAndDropSimulator _sendQueuedAdditionalItemRequest]):
3442         (-[DragAndDropSimulator _advanceProgress]):
3443         (-[DragAndDropSimulator _currentLocation]):
3444         (-[DragAndDropSimulator _scheduleAdvanceProgress]):
3445         (-[DragAndDropSimulator sourceItemProviders]):
3446         (-[DragAndDropSimulator externalItemProviders]):
3447         (-[DragAndDropSimulator setExternalItemProviders:]):
3448         (-[DragAndDropSimulator phase]):
3449         (-[DragAndDropSimulator liftPreviews]):
3450         (-[DragAndDropSimulator lastKnownDragCaretRect]):
3451         (-[DragAndDropSimulator waitForInputSession]):
3452         (-[DragAndDropSimulator insertedAttachments]):
3453         (-[DragAndDropSimulator removedAttachments]):
3454         (-[DragAndDropSimulator endDataTransfer]):
3455         (-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):
3456         (-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]):
3457         (-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
3458         (-[DragAndDropSimulator _webView:showCustomSheetForElement:]):
3459         (-[DragAndDropSimulator _webView:willPerformDropWithSession:]):
3460         (-[DragAndDropSimulator _webView:didInsertAttachment:]):
3461         (-[DragAndDropSimulator _webView:didRemoveAttachment:]):
3462         (-[DragAndDropSimulator _webView:focusShouldStartInputSession:]):
3463         (-[DragAndDropSimulator _webView:didStartInputSession:]):
3464         * TestWebKitAPI/ios/UIKitSPI.h:
3465         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: Added.
3466         (-[DragAndDropSimulator initWithWebView:]):
3467         (-[DragAndDropSimulator dealloc]):
3468         (-[DragAndDropSimulator runFrom:to:]):
3469         (-[DragAndDropSimulator insertedAttachments]):
3470         (-[DragAndDropSimulator removedAttachments]):
3471
3472 2018-08-09  Sihui Liu  <sihui_liu@apple.com>
3473
3474         REGRESSION (r232083): WKWebView loses first-party cookies on iOS
3475         https://bugs.webkit.org/show_bug.cgi?id=188443
3476         <rdar://problem/42991584>
3477
3478         Reviewed by Chris Dumez.
3479
3480         Skip WebKit.WKHTTPCookieStoreWithoutProcessPool on iOS.
3481
3482         * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
3483
3484 2018-08-09  Ross Kirsling  <ross.kirsling@sony.com>
3485
3486         Unreviewed follow-up fix for r234720.
3487
3488         * Scripts/webkitpy/bindings/main.py:
3489         (BindingsTests.close_and_remove):
3490         (BindingsTests.main):
3491         Return to the original approach, since this seems to be the simplest cross-platform solution.
3492
3493 2018-08-09  Ali Juma  <ajuma@chromium.org>
3494
3495         Import WPTs for IntersectionObserver
3496         https://bugs.webkit.org/show_bug.cgi?id=188416
3497
3498         Reviewed by Simon Fraser.
3499
3500         Enable IntersectionObserver in DumpRenderTree. 
3501
3502         * DumpRenderTree/mac/DumpRenderTree.mm:
3503         (enableExperimentalFeatures):
3504         (setWebPreferencesForTestOptions):
3505         * WebKitTestRunner/TestController.cpp:
3506         (WTR::TestController::resetPreferencesToConsistentValues):
3507
3508 2018-08-08  Ross Kirsling  <ross.kirsling@sony.com>
3509
3510         run-bindings-tests is not Win32-compatible
3511         https://bugs.webkit.org/show_bug.cgi?id=188424
3512
3513         Reviewed by Fujii Hironori.
3514
3515         * Scripts/webkitpy/bindings/main.py:
3516         (BindingsTests.main):
3517         Stop leaking file descriptors.
3518         (See https://www.logilab.org/blogentry/17873 for details, though the solution here is even simpler.)
3519
3520 2018-08-08  Alex Christensen  <achristensen@webkit.org>
3521
3522         Fix possible null dereference in WebBackForwardList::restoreFromState
3523         https://bugs.webkit.org/show_bug.cgi?id=188418
3524         <rdar://problem/42531726>
3525
3526         Reviewed by Chris Dumez.
3527
3528         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
3529         (TestWebKitAPI::TEST):
3530
3531 2018-08-08  Ross Kirsling  <ross.kirsling@sony.com>
3532
3533         run-builtins-generator-tests does not correctly handle CRLFs from stderr
3534         https://bugs.webkit.org/show_bug.cgi?id=188392
3535
3536         Reviewed by Fujii Hironori.
3537
3538         Background:
3539         file.write converts LF to os.linesep, so if the input string contains CRLF, we end up writing CRCRLF to the file.
3540
3541         * Scripts/webkitpy/common/system/executive.py:
3542         (Executive.run_command):
3543         Normalize CRLF to LF in decoded stdout/stderr data, so that we don't return consumers a platform-specific string.
3544
3545 2018-08-08  Aditya Keerthi  <akeerthi@apple.com>
3546
3547         Unreviewed, add myself to committers list.
3548
3549         * Scripts/webkitpy/common/config/contributors.json:
3550
3551 2018-08-08  Commit Queue  <commit-queue@webkit.org>
3552
3553         Unreviewed, rolling out r234314, r234320, and r234321.
3554         https://bugs.webkit.org/show_bug.cgi?id=188414
3555
3556         Caused email sign in issue (Requested by ryanhaddad on
3557         #webkit).
3558
3559         Reverted changesets:
3560
3561         "Remove unused WKNavigationDelegatePrivate
3562         decidePolicyForNavigationAction SPI"
3563         https://bugs.webkit.org/show_bug.cgi?id=188077
3564         https://trac.webkit.org/changeset/234314
3565
3566         "Fix API tests after r234314"
3567         https://bugs.webkit.org/show_bug.cgi?id=188077
3568         https://trac.webkit.org/changeset/234320
3569
3570         "Fix API tests after r234314"
3571         https://bugs.webkit.org/show_bug.cgi?id=188077
3572         https://trac.webkit.org/changeset/234321
3573
3574 2018-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
3575
3576         [iOS] fast/events/ios/contenteditable-autocapitalize.html is a flaky failure
3577         https://bugs.webkit.org/show_bug.cgi?id=188401
3578         <rdar://problem/32542300>
3579
3580         Reviewed by Ryosuke Niwa.
3581
3582         When run individually, fast/events/ios/contenteditable-autocapitalize.html passes consistently; however, when
3583         run right after another layout test that finishes while the keyboard is shown, this test sometimes fails. This
3584         is because each of the three steps of this test ends when UIScriptController's `didHideKeyboardCallback` is
3585         invoked, and if the keyboard only begins to dismiss after the previous test completes, we have a race. When the
3586         keyboard finishes dismissing after the UI script is evaluated, it will trigger UI script completion early and
3587         skip over one of the steps in the layout test, resulting in a text diff failure.
3588
3589         To fix this, add a mechanism in WebKitTestRunner to wait until the keyboard is dismissed (with a short timeout)
3590         as a part of resetting test controller state, before moving on to the next layout test.
3591
3592         * WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
3593         * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
3594         (-[TestRunnerWKWebView didStartFormControlInteraction]):
3595         (-[TestRunnerWKWebView didEndFormControlInteraction]):
3596
3597         Use these hooks to keep track of whether the previous test is presenting any form input UI.
3598
3599         (-[TestRunnerWKWebView isInteractingWithFormControl]):
3600         * WebKitTestRunner/ios/TestControllerIOS.mm:
3601         (WTR::handleKeyboardWillHideNotification):
3602         (WTR::handleKeyboardDidHideNotification):
3603         (WTR::TestController::platformInitialize):
3604         (WTR::TestController::platformDestroy):
3605
3606         Register during initialization (and unregister during teardown) for keyboard hiding notifications, to keep track
3607         of when the keyboard dismissal animation ends.
3608
3609         (WTR::TestController::platformResetStateToConsistentValues):
3610
3611         Make a couple of tweaks here: (1) if form input UI is being shown, tell the web view to resign first responder,
3612         which causes the field to lose focus. (2) If necessary, wait for the current keyboard dismissal animation to
3613         finish. This includes any keyboard dismissal animations triggered as a result of step (1).
3614
3615 2018-08-05  Darin Adler  <darin@apple.com>
3616
3617         [Cocoa] More tweaks and refactoring to prepare for ARC
3618         https://bugs.webkit.org/show_bug.cgi?id=188245
3619
3620         Reviewed by Dan Bernstein.
3621
3622         * DumpRenderTree/TestNetscapePlugIn/PluginObject.h: Use const void* for a
3623         CFTypeRef instead of void*.
3624
3625         * DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
3626         (createCoreAnimationLayer): Use CFBridgingRetain.
3627
3628         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
3629         (AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging casts.
3630         (AccessibilityUIElement::textMarkerRangeForElement): Ditto.
3631         (AccessibilityUIElement::selectedTextMarkerRange): Ditto.
3632         (AccessibilityUIElement::textMarkerRangeLength): Ditto.
3633         (AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Ditto.
3634         (AccessibilityUIElement::indexForTextMarker): Ditto.
3635         (AccessibilityUIElement::textMarkerForIndex): Ditto.
3636         (AccessibilityUIElement::isTextMarkerValid): Ditto.
3637         (AccessibilityUIElement::previousTextMarker): Ditto.
3638         (AccessibilityUIElement::nextTextMarker): Ditto.
3639         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
3640         (createJSStringRef): Ditto.
3641         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
3642         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
3643         (AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
3644         (AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
3645         (AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
3646         (AccessibilityUIElement::endTextMarkerForBounds): Ditto.
3647         (AccessibilityUIElement::startTextMarkerForBounds): Ditto.
3648         (AccessibilityUIElement::textMarkerForPoint): Ditto.
3649         (AccessibilityUIElement::accessibilityElementForTextMarker): Ditto.
3650         (AccessibilityUIElement::startTextMarker): Ditto.
3651         (AccessibilityUIElement::endTextMarker): Ditto.
3652         (AccessibilityUIElement::setSelectedVisibleTextRange): Ditto.
3653         (AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
3654         (AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
3655         (AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
3656         (AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
3657         (AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
3658         (AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
3659         (AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
3660         (AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
3661         (AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
3662         (AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
3663
3664         * DumpRenderTree/mac/DumpRenderTree.mm:
3665         (resetWebPreferencesToConsistentValues): Use bridging cast.
3666         (dumpFramesAsText): Ditto.
3667         (dumpBackForwardListForAllWindows): Use a modern for loop instead of
3668         CFArray functions to iterate the array.
3669         (dump): Use bridging cast.
3670         (runTest): Ditto.
3671
3672         * DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
3673         (+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject.
3674         (toUTI): Return a RetainPtr<CFStringRef>.
3675         (-[LocalPasteboard types]): Use the above and bridging casts.
3676         (-[LocalPasteboard availableTypeFromArray:]): Ditto.
3677         (-[LocalPasteboard setData:forType:]): Ditto.
3678         (-[LocalPasteboard dataForType:]): Ditto.
3679         (-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization
3680         instead of CFPropertyList.
3681         (-[LocalPasteboard setString:forType:]): Use NSString method instead of
3682         CFStringCreateExternalRepresentation.
3683
3684         * DumpRenderTree/mac/MockGeolocationProvider.h: Put CFTypeRef in a HashSet
3685         instead of an Objective-C object pointer type.
3686         * DumpRenderTree/mac/MockGeolocationProvider.mm:
3687         (-[MockGeolocationProvider registerWebView:]): Update for above.
3688         (-[MockGeolocationProvider unregisterWebView:]): Ditto.
3689         (-[MockGeolocationProvider timerFired]): Ditto.
3690
3691         * DumpRenderTree/mac/MockWebNotificationProvider.h: Use CFTypeRef in
3692         HashMap and HashSet instead of an Objective-C object pointer type.
3693         * DumpRenderTree/mac/MockWebNotificationProvider.mm:
3694         (-[MockWebNotificationProvider registerWebView:]): Update for above.
3695         (-[MockWebNotificationProvider unregisterWebView:]): Ditto.
3696         (-[MockWebNotificationProvider showNotification:fromWebView:]): Ditto.
3697         (-[MockWebNotificationProvider cancelNotification:]): Ditto.
3698         (-[MockWebNotificationProvider simulateWebNotificationClick:]): Ditto.
3699
3700         * DumpRenderTree/mac/ObjCPlugin.m:
3701         (-[JSObjC retainObject:]): Use CFRetain instead of -[NSObject retain].
3702
3703         * DumpRenderTree/mac/TestRunnerMac.mm:
3704         (TestRunner::addDisallowedURL): Use bridging cast.
3705         (TestRunner::applicationCacheDiskUsageForOrigin): Ditto.
3706         (TestRunner::clearApplicationCacheForOrigin): Ditto.
3707         (originsArrayToJS): Ditto.
3708         (TestRunner::copyDecodedHostName): Ditto.
3709         (TestRunner::copyEncodedHostName): Ditto.
3710         (TestRunner::queueLoad): Ditto.
3711         (TestRunner::setDomainRelaxationForbiddenForURLScheme): Ditto.
3712         (TestRunner::setMockGeolocationPositionUnavailableError): Ditto.
3713         (TestRunner::setUserStyleSheetLocation): Ditto.
3714         (TestRunner::setValueForUser): Ditto.
3715         (TestRunner::overridePreference): Ditto.
3716         (TestRunner::execCommand): Ditto.
3717         (TestRunner::findString): Ditto.
3718         (TestRunner::isCommandEnabled): Ditto.
3719         (TestRunner::addOriginAccessWhitelistEntry): Ditto.
3720         (TestRunner::removeOriginAccessWhitelistEntry): Ditto.
3721         (TestRunner::addUserScript): Ditto.
3722         (TestRunner::addUserStyleSheet): Ditto.
3723         (TestRunner::evaluateInWebInspector): Ditto.
3724         (TestRunner::evaluateScriptInIsolatedWorld): Ditto.
3725         (TestRunner::authenticateSession): Ditto.
3726         (TestRunner::grantWebNotificationPermission): Ditto.
3727         (TestRunner::denyWebNotificationPermission): Ditto.
3728         * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
3729         (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Ditto.
3730
3731         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
3732         (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging cast.
3733         (WTR::AccessibilityUIElement::textMarkerRangeForElement): Ditto.
3734         (WTR::AccessibilityUIElement::previousTextMarker): Ditto.
3735         (WTR::AccessibilityUIElement::nextTextMarker): Ditto.
3736         (WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
3737         (WTR::AccessibilityUIElement::selectedTextMarkerRange): Ditto.
3738         (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
3739         (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
3740         (WTR::AccessibilityUIElement::endTextMarkerForBounds): Ditto.
3741         (WTR::AccessibilityUIElement::startTextMarkerForBounds): Ditto.
3742         (WTR::AccessibilityUIElement::textMarkerForPoint): Ditto.
3743         (WTR::AccessibilityUIElement::textMarkerForIndex): Ditto.
3744         (WTR::AccessibilityUIElement::startTextMarker): Ditto.
3745         (WTR::AccessibilityUIElement::endTextMarker): Ditto.
3746         (WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
3747         (WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
3748         (WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
3749         (WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
3750         (WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
3751         (WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
3752         (WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
3753         (WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
3754         (WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
3755         (WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
3756
3757         * WebKitTestRunner/PlatformMac.cmake: Added WebKitTestRunnerWindow.h and .mm files.
3758         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Ditto.
3759
3760         * WebKitTestRunner/mac/EventSenderProxy.mm: Add include of WebKitTestRunnerWindow.h
3761         so we can use the type and know it inherits from NSWindow.
3762
3763         * WebKitTestRunner/mac/PlatformWebViewMac.mm: Add include of WebKitTestRunnerWindow.h
3764         so we can use the type and know it inherits from NSWindow. Moved WebKitTestRunnerWindow
3765         class into a separate file.
3766         (WTR::PlatformWebView::keyWindow): Call +[WebKitTestRunnerWindow _WTR_keyWindow]
3767         instead of have a second copy of the implementation.
3768
3769         * WebKitTestRunner/mac/WebKitTestRunnerEvent.mm: Add include of WebKitTestRunnerWindow.h
3770         so we can use the type and know it inherits from NSWindow. Also removed "using namespace".
3771         (+[WebKitTestRunnerEvent mouseLocation]): Updated for above.
3772
3773         * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
3774         (+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject.
3775         (-[LocalPasteboard availableTypeFromArray:]): Use modern for loop.
3776         (-[LocalPasteboard setData:forType:]): Reordered method to be a tiny bit more efficient.
3777         (-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization
3778         instead of CFPropertyList.
3779         (-[LocalPasteboard setString:forType:]): Use NSString method instead of
3780         CFStringCreateExternalRepresentation.
3781
3782         * WebKitTestRunner/mac/WebKitTestRunnerWindow.h: Moved declaration of
3783         WebKitTestRunnerWindow here so it can be included by files that need to know
3784         what the type is and that it inherits from NSWindow.
3785
3786         * WebKitTestRunner/mac/WebKitTestRunnerWindow.mm: Added. Moved implementation here.
3787         (+[WebKitTestRunnerWindow _WTR_keyWindow]): Use modern for loop instead of the old,
3788         messier implementation.
3789
3790 2018-08-07  Alex Christensen  <achristensen@webkit.org>
3791
3792         Add a test for using SafeBrowsing
3793         https://bugs.webkit.org/show_bug.cgi?id=188290
3794
3795         Reviewed by Chris Dumez.
3796
3797         Swizzle out SSBLookupContext to write tests for how WebKit responds when it responds in different ways.
3798         We don't do anything with its results in WebKit yet, but when we do I'll add the expected behavior to this test.
3799
3800         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3801         * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: Added.
3802         (-[SafeBrowsingDelegate webView:didFinishNavigation:]):
3803         (TestWebKitAPI::TEST):
3804
3805 2018-08-07  Lucas Forschler  <lforschler@apple.com>
3806
3807         If there's a Radar in the ChangeLog, webkit-patch upload/create-bug should put the radar in the bug and set InRadar
3808         https://bugs.webkit.org/show_bug.cgi?id=188235
3809
3810         Reviewed by Daniel Bates, Kocsen Chung, and Aakash Jain.
3811
3812         * Scripts/webkitpy/common/checkout/changelog.py: 
3813         (ChangeLogEntry): Teach the ChangeLog tools how to parse a radar_id
3814         * Scripts/webkitpy/common/checkout/changelog_unittest.py: Test out the new _parse_radar_id functionality
3815         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
3816         (Bugzilla.add_keyword_to_bug): Add logic to add keywords using the changeform
3817         * Scripts/webkitpy/tool/commands/upload.py:
3818         (Upload): Teach the upload step how to add radar information when creating a new bug.
3819         * Scripts/webkitpy/tool/steps/__init__.py:
3820         * Scripts/webkitpy/tool/steps/addradar.py: Added.
3821         (AddRadar):
3822         (AddRadar.run): Contains the logic to add the radar information to bugzilla.
3823         * Scripts/webkitpy/tool/steps/createbug.py:
3824         (CreateBug.run): set a "created_new_bug" state when creating a new bugzilla bug.
3825
3826 2018-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
3827
3828         Post-review feedback after r234614.
3829         https://bugs.webkit.org/show_bug.cgi?id=188322
3830         <rdar://problem/42455270>
3831
3832         Reviewed by Sam Weinig.
3833
3834         Use std::round instead of roundl — there's no reason to go from double to long double precision when rounding.
3835
3836         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
3837         (rounded):
3838
3839 2018-08-07  Don Olmstead  <don.olmstead@sony.com>
3840
3841         [MiniBrowser][Win] Allow selection of recent user agents
3842         https://bugs.webkit.org/show_bug.cgi?id=188371
3843
3844         Reviewed by Fujii Hironori.
3845
3846         Updates the user agent spoofing strings to the latest released
3847         versions and adds Microsoft Edge's user agent.
3848
3849         Moves the menu item selection to the common base class, BrowserWindow
3850         to support user agent spoofing in a WebKitLegacyBrowserWindow and
3851         WebKitBrowserWindow.
3852
3853         * MiniBrowser/win/BrowserWindow.cpp: Added.
3854         (BrowserWindow::setUserAgent):
3855         * MiniBrowser/win/BrowserWindow.h:
3856         * MiniBrowser/win/CMakeLists.txt:
3857         * MiniBrowser/win/MainWindow.cpp:
3858         (MainWindow::toggleMenuItem):
3859         * MiniBrowser/win/MiniBrowserLib.rc:
3860         * MiniBrowser/win/MiniBrowserLibResource.h:
3861         * MiniBrowser/win/WebKitBrowserWindow.cpp:
3862         * MiniBrowser/win/WebKitBrowserWindow.h:
3863         * MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
3864         (WebKitLegacyBrowserWindow::setUserAgent):
3865         * MiniBrowser/win/WebKitLegacyBrowserWindow.h:
3866
3867 2018-08-07  Yusuke Suzuki  <utatane.tea@gmail.com>
3868
3869         Unreviewed, add a new address to my configuration
3870
3871         * Scripts/webkitpy/common/config/contributors.json:
3872
3873 2018-08-06  David Quesada  <david_quesada@apple.com>
3874
3875         webkitdirs.pm should default to iPhone SE for 64-bit testing
3876         https://bugs.webkit.org/show_bug.cgi?id=188361
3877
3878         Reviewed by Daniel Bates.
3879
3880         Use iPhone SE as the default iOS Simulator device type. This corresponds to the change to webkitpy in r234467.
3881
3882         * Scripts/webkitdirs.pm:
3883         (findOrCreateSimulatorForIOSDevice):
3884         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
3885         (parse_args):
3886             Update the help text for --device-type to reflect the new default device.
3887
3888 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3889
3890         [iOS] Caret disappears after resigning and becoming first responder if active focus state is retained
3891         https://bugs.webkit.org/show_bug.cgi?id=188322
3892         <rdar://problem/42455270>
3893
3894         Reviewed by Tim Horton.
3895
3896         Fixes an API test added in r234600, which had incorrect test expectations — namely, the width of the caret rect
3897         was not in content view coordinates, unlike the x, y, and height.
3898
3899         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
3900         (rounded):
3901         (-[TestWKWebView waitForCaretViewFrameToBecome:]):
3902         (-[TestWKWebView waitForSelectionViewRectsToBecome:]):
3903         (TestWebKitAPI::TEST):
3904
3905 2018-08-06  Ryan Haddad  <ryanhaddad@apple.com>
3906
3907         Unreviewed, rolling out r234569.
3908
3909         Breaks internal builds.
3910
3911         Reverted changeset:
3912
3913         "We should cache the compiled sandbox profile in a data vault"
3914         https://bugs.webkit.org/show_bug.cgi?id=184991
3915         https://trac.webkit.org/changeset/234569
3916
3917 2018-08-06  Fujii Hironori  <Hironori.Fujii@sony.com>
3918
3919         [Win][DLLLauncher] Remove --highDPI switch
3920         https://bugs.webkit.org/show_bug.cgi?id=188255
3921
3922         Reviewed by Yusuke Suzuki.
3923
3924         Bug 149417 has added `--highDPI` switch to make MiniBrowser DPI
3925         aware. But, Bug 158733 has made MiniBrowser always DPI aware. It
3926         became useless since the change. Remove the switch.
3927
3928         This change fixes the issue all dump render tree tests are failing
3929         in WinCairo port if high DPI display is connected.
3930
3931         * MiniBrowser/win/Common.cpp:
3932         (parseCommandLine): Removed `--highDPI` switch.
3933         * win/DLLLauncher/DLLLauncherMain.cpp:
3934         (wWinMain): Do not call SetProcessDPIAware.
3935         (shouldUseHighDPI): Deleted.
3936
3937 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3938
3939         [iOS] Tests that try to interact with the QuickType bar time out on iOS 11+
3940         https://bugs.webkit.org/show_bug.cgi?id=188335
3941         <rdar://problem/32542437> and <rdar://problem/32542433>
3942
3943         Reviewed by Tim Horton.
3944
3945         Remove a UIScriptController helper method that attempted to wait for QuickType buttons to appear, and then send
3946         touch events to the buttons. These were only used for the two tests which this patch refactors. See the
3947         LayoutTests ChangeLog for more detail.
3948
3949         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
3950         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
3951         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
3952         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
3953         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
3954         (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted.
3955         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3956         * TestRunnerShared/spi/UIKitTestSPI.h:
3957
3958         Remove an internal class declaration that is now unnecessary.
3959
3960         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
3961         (WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
3962         (WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted.
3963
3964 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3965
3966         [iOS] Caret disappears after resigning and becoming first responder if active focus state is retained
3967         https://bugs.webkit.org/show_bug.cgi?id=188322
3968         <rdar://problem/42455270>
3969
3970         Reviewed by Tim Horton.
3971
3972         Adds plumbing in UIScriptController to grab the start and end selection handle rects for use in the new layout
3973         test. Also adds new API tests to verify that when a web view resigns first responder, both caret and range
3974         selection views are hidden, and when first responder status is restored, both caret and range selection views
3975         are made visible again.
3976
3977         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
3978         (WTR::UIScriptController::selectionStartGrabberViewRect const):
3979         (WTR::UIScriptController::selectionEndGrabberViewRect const):
3980         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
3981         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
3982         (WTR::UIScriptController::selectionStartGrabberViewRect const):
3983         (WTR::UIScriptController::selectionEndGrabberViewRect const):
3984         * TestRunnerShared/UIScriptContext/UIScriptController.h:
3985         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
3986         (-[TestWKWebView waitForCaretViewFrameToBecome:]):
3987         (-[TestWKWebView waitForSelectionViewRectsToBecome:]):
3988         (webViewWithAutofocusedInput):
3989
3990         Pull out some common logic for creating a web view that allows programmatic focus to present the keyboard, and
3991         immediately loading a web page with an autofocusing text field.
3992
3993         (TestWebKitAPI::TEST):
3994         * TestWebKitAPI/cocoa/TestWKWebView.h:
3995         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3996         (-[TestWKWebView caretViewRectInContentCoordinates]):
3997         (-[TestWKWebView selectionViewRectsInContentCoordinates]):
3998         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
3999         (WTR::UIScriptController::selectionStartGrabberViewRect const):
4000         (WTR::UIScriptController::selectionEndGrabberViewRect const):
4001
4002 2018-08-06  Wenson Hsieh  <wenson_hsieh@apple.com>
4003
4004         [iOS] Layout tests that send HID events cause WebKitTestRunner to crash on recent SDKs
4005         https://bugs.webkit.org/show_bug.cgi?id=188334
4006         <rdar://problem/40630074>
4007
4008         Reviewed by Tim Horton.
4009
4010         To mark the end of previously dispatched IOHID events, HIDEventGenerator currently sends a vendor-defined event
4011         and stores the completion callback ID for the previously dispatched events as vendor-defined data. When this
4012         vendor-defined marker event is handled by the application, we then read the callback ID back from the event, map
4013         it to a completion block, and invoke the completion block to signal that the previous HID event has been
4014         processed.
4015
4016         This callback ID is an unsigned, so we tell IOKit that we need `sizeof(unsigned)` (4 bytes) to store it. On
4017         shipping software, IOKit clamps this to a minimum of 8 bytes, i.e. `sizeof(CFIndex)`. When we later call
4018         IOHIDEventGetIntegerValue to read the value of our vendor-defined data as a CFIndex, we get our expected
4019         callback ID because the buffer was clamped to 8 bytes.
4020
4021         However, on recent iOS SDKs that contain the fix for <rdar://problem/20082284>, IOKit no longer clamps the size
4022         of the vendor-defined data buffer to 8 bytes. This means that when we try to use IOHIDEventGetIntegerValue to
4023         read our callback ID back, we end up getting a CFIndex where the lower 4 bytes are the callback ID we wrote, and
4024         the upper 4 bytes are garbage. In the case where any of these upper 4 bytes are non-zero, we fail to map the
4025         callback ID to a completion handler, and so we never finish dispatching the HID event, causing an exception to
4026         be thrown.
4027
4028         To fix this, we adjust callback ID to be a CFIndex, which matches IOHIDEventGetIntegerValue's return type.
4029
4030         * WebKitTestRunner/ios/HIDEventGenerator.mm:
4031         (+[HIDEventGenerator nextEventCallbackID]):
4032         (-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
4033
4034         Also refactor a bit of `-_sendMarkerHIDEventWithCompletionBlock:` by using auto and move semantics.
4035
4036 2018-08-03  Ben Richards  <benton_richards@apple.com>
4037
4038         We should cache the compiled sandbox profile in a data vault
4039         https://bugs.webkit.org/show_bug.cgi?id=184991
4040
4041         Reviewed by Ryosuke Niwa.
4042
4043         Added trace points for sandbox initialization
4044
4045         * Tracing/SystemTracePoints.plist:
4046
4047 2018-08-03  David Fenton  <david_fenton@apple.com>
4048
4049         Unreviewed, rolling out r234517.
4050
4051         Caused API test failures on iOS
4052
4053         Reverted changeset:
4054
4055         "[Cocoa] setCookie API fails to set session cookies for
4056         defaultDataStore if processPool created but not used"
4057         https://bugs.webkit.org/show_bug.cgi?id=188209
4058         https://trac.webkit.org/changeset/234517
4059
4060 2018-08-03  Ben Richards  <benton_richards@apple.com>
4061
4062         Add configuration for automatic process pre-warming
4063         https://bugs.webkit.org/show_bug.cgi?id=187108
4064
4065         Reviewed by Ryosuke Niwa.
4066
4067         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.
4068
4069         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4070         * TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm:
4071         (TEST):
4072         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
4073         * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm:
4074         (TEST):
4075
4076 2018-08-03  Aakash Jain  <aakash_jain@apple.com>
4077
4078         [ews-build] Add build step to Check Patch Relevance
4079         https://bugs.webkit.org/show_bug.cgi?id=188295
4080
4081         Reviewed by Lucas Forschler.
4082
4083         * BuildSlaveSupport/ews-build/steps.py:
4084         (CheckPatchRelevance): Added step to check patch relevance.
4085         (CheckPatchRelevance._patch_is_relevant): Checks if the patch is relevant.
4086         (CheckPatchRelevance._get_patch): Retrieves the patch from buildbot.
4087         (CheckPatchRelevance._addToLog): Add the log message.
4088         (CheckPatchRelevance.start):
4089         * BuildSlaveSupport/ews-build/factories.py: Added CheckPatchRelevance step appropriately.
4090
4091 2018-08-03  Jer Noble  <jer.noble@apple.com>
4092
4093         Unreviewed gardening; r234534 changed the policy for what audio session is set when a
4094         media element is paused. Updating the test to reflect the new policy.
4095
4096         * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
4097         (TestWebKitAPI::TEST):
4098
4099 2018-08-03  Zalan Bujtas  <zalan@apple.com>
4100
4101         [LFC][Floating] Now that the document renderer belongs to "complicated cases", adjust viewport stretching.
4102         https://bugs.webkit.org/show_bug.cgi?id=188306
4103
4104         Reviewed by Antti Koivisto.
4105
4106         * LayoutReloaded/misc/LFC-passing-tests.txt:
4107
4108 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
4109
4110         [WPE] Use the new key mapper API from WPEBackend
4111         https://bugs.webkit.org/show_bug.cgi?id=188216
4112
4113         Reviewed by Žan Doberšek.
4114
4115         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
4116         (WTR::EventSenderProxy::keyDown): Use wpe_input_xkb_context_get_entries_for_key_code() to get the hardware key
4117         code.
4118         * wpe/backends/WindowViewBackend.cpp:
4119         (WPEToolingBackends::WindowViewBackend::WindowViewBackend):
4120         (WPEToolingBackends::WindowViewBackend::handleKeyEvent):
4121         (WPEToolingBackends::WindowViewBackend::modifiers const):
4122         * wpe/backends/WindowViewBackend.h:
4123
4124 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
4125
4126         [WPE] Implement MouseEvent.buttons
4127         https://bugs.webkit.org/show_bug.cgi?id=187998
4128
4129         Reviewed by Žan Doberšek.
4130
4131         Pass modifiers to mouse events.
4132
4133         * WebKitTestRunner/EventSenderProxy.h:
4134         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
4135         (WTR::senderButtonToWPEButton):
4136         (WTR::modifierForButton):
4137         (WTR::EventSenderProxy::mouseDown):
4138         (WTR::EventSenderProxy::mouseUp):
4139         (WTR::EventSenderProxy::mouseMoveTo):
4140         (WTR::EventSenderProxy::mouseScrollBy):
4141         (WTR::wkEventModifiersToWPE):
4142         (WTR::wpeKeySymForKeyRef):
4143         (WTR::EventSenderProxy::keyDown):
4144         (WTR::EventSenderProxy::prepareAndDispatchTouchEvent):
4145         * wpe/backends/WindowViewBackend.cpp:
4146         (WPEToolingBackends::WindowViewBackend::handleKeyEvent):
4147         (WPEToolingBackends::WindowViewBackend::modifiers const):
4148         * wpe/backends/WindowViewBackend.h:
4149
4150 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
4151
4152         [WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper
4153         https://bugs.webkit.org/show_bug.cgi?id=188093
4154
4155         Reviewed by Žan Doberšek.
4156
4157         * MiniBrowser/wpe/main.cpp: Use WPE key symbols.
4158         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: