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