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