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