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