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