Unreviewed, rolling out r235784.
[WebKit-https.git] / Tools / ChangeLog
1 2018-09-07  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r235784.
4         https://bugs.webkit.org/show_bug.cgi?id=189421
5
6         RunLoopCF does not agree to the fix (Requested by yusukesuzuki
7         on #webkit).
8
9         Reverted changeset:
10
11         "[RunLoopGeneric] OneShotTimer should be inactive when fired."
12         https://bugs.webkit.org/show_bug.cgi?id=189335
13         https://trac.webkit.org/changeset/235784
14
15 2018-09-07  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
16
17         [RunLoopGeneric] OneShotTimer should be inactive when fired.
18         https://bugs.webkit.org/show_bug.cgi?id=189335
19
20         Reviewed by Yusuke Suzuki.
21
22         * TestWebKitAPI/Tests/WTF/RunLoop.cpp:
23         (TestWebKitAPI::TEST):
24
25         Add test expectations about timer's active state.
26
27         Add a new test to restart a one-shot timer within
28         its fired callback.
29
30 2018-09-06  Zalan Bujtas  <zalan@apple.com>
31
32         [LFC] Add support for min/max-height percentage values.
33         https://bugs.webkit.org/show_bug.cgi?id=189391
34
35         Reviewed by Antti Koivisto.
36
37         * LayoutReloaded/misc/LFC-passing-tests.txt:
38
39 2018-09-06  Simon Fraser  <simon.fraser@apple.com>
40
41         Log when leak detection changes the test result
42         https://bugs.webkit.org/show_bug.cgi?id=189293
43
44         Reviewed by Jon Lee.
45         
46         When you have an "Leak" expectation in TestExpectations, it's confusing to see a test unexpectedly pass,
47         but then show up as an expected fail at the end (because leak detection happens at the end of a shard).
48         So log when leak detection changes a test result.
49
50         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
51         (LayoutTestRunner._annotate_results_with_additional_failures):
52         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
53         (TestExpectations):
54
55 2018-09-06  Wenson Hsieh  <wenson_hsieh@apple.com>
56
57         [macOS] [WK2] Support changing attributes for selected text (text shadow, underline, strike-through)
58         https://bugs.webkit.org/show_bug.cgi?id=189356
59         <rdar://problem/44185674>
60
61         Reviewed by Tim Horton.
62
63         Adds a new API test to verify that some font attributes (text shadow, underline, and strike-through) can be
64         added and removed using NSFontPanel.
65
66         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
67         * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
68
69         Add the new API test.
70
71         (TestWebKitAPI::TEST):
72         * TestWebKitAPI/cocoa/TestWKWebView.h:
73         * TestWebKitAPI/mac/NSFontPanelTesting.h: Added.
74         * TestWebKitAPI/mac/NSFontPanelTesting.mm: Added.
75
76         Introduce a new file that extends NSFontPanel with some additional testing functionality. This includes the
77         ability to interact with the text shadow toggle button, choose the text shadow blur radius and opacity, and
78         change underline and strike-through styles.
79
80         (findSubviewOfClass):
81         (findMenuItemWithTitle):
82         (-[NSFontPanel fontEffectsBox]):
83
84         NSFontEffectsBox (an internal AppKit class) is the sender in the case where -changeAttributes: is invoked
85         through interaction with the font panel. To simulate this for testing, grab this font effects box and pass it
86         directory to -changeAttributes:.
87
88         (-[NSFontPanel chooseUnderlineMenuItemWithTitle:]):
89         (-[NSFontPanel chooseStrikeThroughMenuItemWithTitle:]):
90
91         The supported values for these menu items are "none" and "single", which adds a single underline or
92         strike-through to selected text. We grab these menu items by asking for the font panel's NSToolbar, and finding
93         the relevant menu items via toolbar item identifiers.
94
95         (-[NSFontPanel _didChangeAttributes]):
96         (-[NSFontPanel shadowBlurSlider]):
97         (-[NSFontPanel shadowOpacitySlider]):
98         (-[NSFontPanel shadowToggleButton]):
99         (-[NSFontPanel toggleShadow]):
100         (-[NSFontPanel shadowOpacity]):
101         (-[NSFontPanel setShadowOpacity:]):
102         (-[NSFontPanel shadowBlur]):
103         (-[NSFontPanel setShadowBlur:]):
104         (-[NSFontPanel _toolbarItemWithIdentifier:]):
105
106 2018-09-06  Simon Fraser  <simon.fraser@apple.com>
107
108         run-webkit-tests prints confusing messages when test expectations list results that are not compatible with the run options
109         https://bugs.webkit.org/show_bug.cgi?id=189219
110
111         Reviewed by Jon Lee.
112         
113         If you call run-webkit-tests without --pixel-tests, and a non-ref test is marked as ImageOnlyFailure,
114         it will be reported as unexpectedly passing. This is more confusing if you run without --world-leaks, yet
115         tests are marked as [ Leak ] in TestExpectations.
116         
117         Fix by filtering out expectations that don't apply given the run options. So without --pixel-tests,
118         a non-ref ImageOnlyFailure becomes a Pass, and without --world-leaks, a Leak becomes a Pass.
119         
120         Add various unit tests to test the various combinations.
121
122         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
123         (LayoutTestRunner._update_summary_with_result):
124         (LayoutTestRunner._annotate_results_with_additional_failures):
125         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
126         (LayoutTestRunnerTests.test_update_summary_with_result):
127         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
128         (TestExpectationsModel.get_expectations_or_pass):
129         (TestExpectationsModel):
130         (TestExpectationsModel.expectations_to_string):
131         (TestExpectationsModel.get_expectations_string):
132         (TestExpectations.filtered_expectations_for_test):
133         (TestExpectations):
134         (TestExpectations.matches_an_expected_result):
135         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
136         * Scripts/webkitpy/layout_tests/models/test_run_results.py:
137         (summarize_results):
138         * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
139         (summarized_results):
140         (SummarizedResultsTest.setUp):
141         (SummarizedResultsTest.test_summarized_results_include_passes):
142         (SummarizedResultsTest):
143         (SummarizedResultsTest.test_summarized_results_world_leaks_disabled):
144         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
145         * Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py:
146         (BuildBotPrinterTests.test_print_unexpected_results):
147         (BuildBotPrinterTests.test_print_unexpected_results_with_options):
148         (BuildBotPrinterTests.test_print_results):
149         * Scripts/webkitpy/port/test.py:
150         (unit_test_list):
151
152 2018-09-06  Zalan Bujtas  <zalan@apple.com>
153
154         [LFC][BFC] Add support for min(max)-height
155         https://bugs.webkit.org/show_bug.cgi?id=189377
156
157         Reviewed by Antti Koivisto.
158
159         * LayoutReloaded/misc/LFC-passing-tests.txt:
160
161 2018-09-06  Dewei Zhu  <dewei_zhu@apple.com>
162
163         BenchmarkResults.format should support specifying depth of tests to show.
164         https://bugs.webkit.org/show_bug.cgi?id=189135
165
166         Reviewed by Ryosuke Niwa.
167
168         Added the option to specify the depth of tests to show.
169
170         * Scripts/webkitpy/benchmark_runner/benchmark_results.py:
171         (BenchmarkResults):
172         (BenchmarkResults.format): Added 'max_depth' option.
173         (BenchmarkResults._format_tests): Added unit tests for 'max_depth'.
174
175
176 2018-09-06  Simon Fraser  <simon.fraser@apple.com>
177
178         An EWS run that has leak test failures does not correctly add bugzilla comments showing the failures
179         https://bugs.webkit.org/show_bug.cgi?id=189368
180
181         Reviewed by Alexey Proskuryakov.
182         
183         Include FailureDocumentLeak in ALL_FAILURE_CLASSES (with a fairly redundant test),
184         which should fix EWS showing leaks in Bugzilla.
185
186         * Scripts/webkitpy/layout_tests/models/test_failures.py:
187         (FailureDocumentLeak.__init__):
188         * Scripts/webkitpy/layout_tests/models/test_failures_unittest.py:
189         (TestFailuresTest.test_all_failure_classes):
190
191 2018-09-06  Commit Queue  <commit-queue@webkit.org>
192
193         Unreviewed, rolling out r235755.
194         https://bugs.webkit.org/show_bug.cgi?id=189367
195
196         Didn't address the review comment (Requested by rniwa on
197         #webkit).
198
199         Reverted changeset:
200
201         "BenchmarkResults.format should support specifying depth of
202         tests to show."
203         https://bugs.webkit.org/show_bug.cgi?id=189135
204         https://trac.webkit.org/changeset/235755
205
206 2018-08-29  Dewei Zhu  <dewei_zhu@apple.com>
207
208         BenchmarkResults.format should support specifying depth of tests to show.
209         https://bugs.webkit.org/show_bug.cgi?id=189135
210
211         Reviewed by Ryosuke Niwa.
212
213         Added the option to specify the depth of tests to show.
214
215         * Scripts/webkitpy/benchmark_runner/benchmark_results.py:
216         (BenchmarkResults):
217         (BenchmarkResults.format): Added 'max_depth' option.
218         (BenchmarkResults._format_tests): Added unit tests for 'max_depth'.
219
220 2018-09-06  Thomas Denney  <tdenney@apple.com>
221
222         [WHLSL] Call arguments should be copied as soon as they are evaluated
223         https://bugs.webkit.org/show_bug.cgi?id=189360
224
225         Reviewed by Myles C. Maxfield.
226
227         Previously all call arguments were evaluated and then their results were
228         copied into new buffers for the call. However, the results are not
229         necessarily independent, so the result should be copied immediately
230         after evaluation.
231
232         * WebGPUShadingLanguageRI/Evaluator.js:
233         (Evaluator.prototype.visitCallExpression): Move location of copy.
234         (Evaluator):
235         * WebGPUShadingLanguageRI/Test.js: Add new test to verify correct
236         behavior.
237
238 2018-09-06  Thomas Denney  <tdenney@apple.com>
239
240         [WHLSL] The test suite should log the compile time for the standard library
241         https://bugs.webkit.org/show_bug.cgi?id=189354
242
243         Reviewed by Myles C. Maxfield.
244
245         The test suite previously only logged the time for test execution, and
246         not the compile time for the standard library.
247
248         * WebGPUShadingLanguageRI/Test.js:
249
250 2018-09-06  Wenson Hsieh  <wenson_hsieh@apple.com>
251
252         [macOS] Cannot change font size at selection until font panel is shown
253         https://bugs.webkit.org/show_bug.cgi?id=189295
254         <rdar://problem/35593389>
255
256         Reviewed by Ryosuke Niwa.
257
258         Add API tests to simulate using menu items to increase or decrease font size, and also simulate using
259         NSFontPanel to specify the font family, font size, and other traits.
260
261         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
262         * TestWebKitAPI/Tests/mac/FontManagerTests.mm: Added.
263         (-[TestWKWebView selectedText]):
264         (-[TestWKWebView selectNextWord]):
265         (-[TestWKWebView stylePropertyAtSelectionStart:]):
266         (-[TestWKWebView stylePropertyAtSelectionEnd:]):
267         (webViewForFontManagerTesting):
268         (menuItemCellForFontAction):
269         (TestWebKitAPI::TEST):
270
271 2018-09-06  Zalan Bujtas  <zalan@apple.com>
272
273         [LFC][BFC] Add support for min(max)-width
274         https://bugs.webkit.org/show_bug.cgi?id=189358
275
276         Reviewed by Antti Koivisto.
277
278         * LayoutReloaded/misc/LFC-passing-tests.txt:
279
280 2018-09-06  Myles C. Maxfield  <mmaxfield@apple.com>
281
282         [WHLSL] The parser is too slow
283         https://bugs.webkit.org/show_bug.cgi?id=189014
284
285         Reviewed by Filip Pizlo.
286
287         This patch includes three changes:
288         1. Migrate from using try/catch to simply returning the WSyntaxError. This means that
289            each parser call has to check for this sentinel value. The lexer still can throw if
290            it encounters an unknown token or an unmatched "/*" token (which is rare).
291         2. After removing try/catch, making the sentinel values not inherit from Error (the
292            Error constructor was taking lots of time)
293         3. Previously, every time the parser failed (which is many times per expression) it was
294            running a regex over the entire source text to figure out where the error occurred.
295            Instead, we can preprocess the text string to find these line numbers ahead of time.
296
297         Together, these make the parser 75x faster. Parsing the standard library goes from 2.5
298         hours down to 2 minutes. Because it's now a reasonable length, this patch uncomments
299         the bulk of the standard library.
300
301         * WebGPUShadingLanguageRI/All.js:
302         * WebGPUShadingLanguageRI/Lexer.js:
303         (Lexer):
304         (Lexer.prototype.lineNumberForIndex):
305         * WebGPUShadingLanguageRI/Parse.js:
306         (fail):
307         (backtrackingScope):
308         (testScope):
309         (genericConsume):
310         (consumeEndOfTypeArgs):
311         (parseTerm):
312         (parseConstexpr):
313         (parseTypeArguments):
314         (parseType.getAddressSpace):
315         (parseType):
316         (parseTypeDef):
317         (genericParseLeft):
318         (parseCallExpression.let.parseArguments):
319         (isCallExpression):
320         (parseSuffixOperator):
321         (parsePossibleSuffix):
322         (parsePreIncrement):
323         (parsePossiblePrefix):
324         (parsePossibleTernaryConditional):
325         (parsePossibleAssignment):
326         (parsePostIncrement):
327         (parseEffectfulExpression):
328         (genericParseCommaExpression):
329         (parseEffectfulStatement):
330         (parseReturn):
331         (parseBreak):
332         (parseContinue):
333         (parseIfStatement):
334         (parseWhile):
335         (parseFor):
336         (parseDo):
337         (parseVariableDecls):
338         (parseSwitchCase):
339         (parseSwitchStatement):
340         (parseStatement):
341         (parseBlockBody):
342         (parseBlock):
343         (parseParameter):
344         (parseFuncName):
345         (parseFuncDecl):
346         (parseFuncDef):
347         (parseField):
348         (parseStructType):
349         (parseNativeFunc):
350         (parseNative):
351         (parseRestrictedFuncDef):
352         (parseEnumMember):
353         (parseEnumType):
354         (parse):
355         * WebGPUShadingLanguageRI/SPIRV.html:
356         * WebGPUShadingLanguageRI/StandardLibrary.js:
357         (let.standardLibrary):
358         * WebGPUShadingLanguageRI/Test.html:
359         * WebGPUShadingLanguageRI/Test.js:
360         (checkFail.doPrep): Deleted.
361         * WebGPUShadingLanguageRI/WLexicalError.js: Added.
362         (WLexicalError):
363         * WebGPUShadingLanguageRI/index.html:
364
365 2018-09-06  Xan Lopez  <xan@igalia.com>
366
367         [test262] Do not call keys on a reference
368         https://bugs.webkit.org/show_bug.cgi?id=189301
369
370         Reviewed by Keith Miller.
371
372         * Scripts/test262/Runner.pm:
373         (UpdateResults):
374
375 2018-09-06  David Kilzer  <ddkilzer@apple.com>
376
377         svn-create-patch fails when svn mv is used on directory trees
378         <https://webkit.org/b/14590>
379
380         Reviewed by Daniel Bates.
381
382         * Scripts/VCSUtils.pm: Export parseSvnDiffStartLine() for
383         svn-create-patch.
384         (parseDiffStartLine): Use parseSvnDiffStartLine().
385         (parseGitDiffStartLine): Document a prerequisite.  Fix a bug
386         when parsing Git patches using `git diff --no-prefix` that have
387         non-native line endings.  Found by new tests written for
388         Scripts/webkitperl/VCSUtils_unittest/parseDiffStartLine.pl.
389         (parseSvnDiffStartLine): Add.  Extract logic from
390         parseDiffStartLine() for use with svn-create-patch.
391
392         * Scripts/svn-create-patch: Update copyright and license.
393         (generateDiff): Return early for moved directories since
394         individual files within the directory are handled separately.
395         (generateFileList): Keep track of moved directories in the
396         @additionWithHistoryDirectories array, then process this array
397         in reverse order to create delete/add patches for each file in
398         a moved directory.  This also prevents duplicate patches.
399         (manufacturePatchForAdditionWithHistory): Fix a long-standing
400         bug where the path used to describe property changes contained
401         the original (moved-from) path instead of the new (moved-to)
402         path. This could cause svn-apply to fail mysteriously when
403         trying to apply an empty patch created by the property change
404         containing the moved-from path.
405
406         * Scripts/webkitperl/VCSUtils_unittest/parseDiffStartLine.pl: Add.
407         Tests for parseDiffStartLine(), parseGitDiffStartLine() and
408         parseSvnDiffStartLine().
409
410 2018-09-05  Don Olmstead  <don.olmstead@sony.com>
411
412         [CMake] Allow port specific options on gtest
413         https://bugs.webkit.org/show_bug.cgi?id=189313
414
415         Reviewed by Alex Christensen.
416
417         Use the global property set by the gtest CMake file to add to the
418         compilation definitions for TestWebKitAPI rather than repeating the
419         logic.
420
421         * TestWebKitAPI/CMakeLists.txt:
422
423 2018-09-05  Woodrow Wang  <woodrow_wang@apple.com>
424
425         Add infrastructure to dump resource load statistics
426         https://bugs.webkit.org/show_bug.cgi?id=189213
427
428         Reviewed by Daniel Bates.
429
430         The dumping functionality is not currently used, but will be included in tests for
431         <https://bugs.webkit.org/show_bug.cgi?id=187773>.
432
433         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
434         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
435         (WTR::TestRunner::setDumpResourceLoadStatistics):
436         * WebKitTestRunner/InjectedBundle/TestRunner.h:
437         * WebKitTestRunner/TestController.cpp:
438         (WTR::resourceStatisticsStringResultCallback):
439         (WTR::TestController::dumpResourceLoadStatistics):
440         * WebKitTestRunner/TestController.h:
441         * WebKitTestRunner/TestInvocation.cpp:
442         (WTR::TestInvocation::dumpResults):
443         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
444         (WTR::TestInvocation::setDumpResourceLoadStatistics):
445         * WebKitTestRunner/TestInvocation.h:
446
447 2018-09-05  Wenson Hsieh  <wenson_hsieh@apple.com>
448
449         [macOS] DragAndDropTests.ExposeMultipleURLsInDataTransfer fails on macOS versions prior to Mojave
450         https://bugs.webkit.org/show_bug.cgi?id=189315
451
452         Reviewed by Tim Horton.
453
454         Fix the test failure by explicitly enabling custom pasteboard data.
455
456         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
457         (TEST):
458
459 2018-09-05  Woodrow Wang  <woodrow_wang@apple.com>
460
461         Added runtime feature flag for web API statistics
462         https://bugs.webkit.org/show_bug.cgi?id=189211
463
464         Reviewed by Daniel Bates.
465
466         Added functionality to set the runtime flag with a JavaScript exposed function
467         for testing.
468
469         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
470         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
471         (WTR::TestRunner::setWebAPIStatisticsEnabled):
472         * WebKitTestRunner/InjectedBundle/TestRunner.h:
473
474 2018-09-05  Ross Kirsling  <ross.kirsling@sony.com>
475
476         Add WinCairo to bot watcher's dashboard.
477         https://bugs.webkit.org/show_bug.cgi?id=189273
478
479         Reviewed by Aakash Jain.
480
481         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Windows10.png: Added.
482         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Windows10@2x.png: Added.
483
484         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
485         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
486         (table.queue-grid tr.platform.windows-10 img.logo): Added.
487         (table.queue-grid tr.platform.windows-8 img.logo): Deleted.
488         (table.queue-grid tr.platform.windows-xp img.logo): Deleted.
489         Add Win10 section to dashboard. Remove unused WinXP and Win8 sections.
490
491         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
492         (BubbleQueueServer):
493         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
494         (WebKitBuildbot):
495         Add WinCairo build, test, and EWS bots to Win10 section of dashboard.
496
497 2018-09-05  David Kilzer  <ddkilzer@apple.com>
498
499         REGRESSION (r209470): EditingHistory folder is missing in EditingHistory Xcode project
500
501         Found using `tidy-Xcode-project-file --missing` (see Bug
502         188754).  Fixes were made manually.
503
504         * EditingHistory/EditingHistory.xcodeproj/project.pbxproj:
505         (EditingHistory): Change the path of the folder to
506         "EditingHistory", then remove the now-redundant name.
507         (EditingHistory/Resources/DumpEditingHistory.js): Remove
508         redundant file reference since another file reference exists at
509         the top of the project file list, and that file reference is the
510         one used in the "Copy Bundle Resources" build phase.
511         (EditingHistory/Resources/EditingHistoryUtil.js): Ditto.
512
513 2018-09-05  David Kilzer  <ddkilzer@apple.com>
514
515         REGRESSION (r160736): Bundle folder is missing in MiniBrowser Xcode project
516
517         Found using `tidy-Xcode-project-file --missing` (see Bug
518         188754).  Folder fix was made manually.
519
520         * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
521         (Bundle): Change the path of the folder to "mac/Bundle", and set
522         the name back to "Bundle".
523         (Bundle/Info.plist): Change file reference to be relative to its
524         group.  Accomplished using Xcode after fixing the folder path.
525         (Bundle/MiniBrowserBundle_Prefix.pch): Ditto.
526
527 2018-09-05  David Kilzer  <ddkilzer@apple.com>
528
529         REGRESSION (r184033): ContentExtensionTester folder is missing in ContentExtensionTester Xcode project
530
531         Found using `tidy-Xcode-project-file --missing` (see Bug
532         188754).  Fixes were made manually.
533
534         * ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj:
535         (ContentExtensionTester): Change the path of the folder to map
536         to "." (which exists and is where main.m is located), and then
537         set the folder's name back to "ContentExtensionTester".
538         (main.m): Change file reference to be relative to its group now
539         that the group's path is fixed.
540
541 2018-09-04  Don Olmstead  <don.olmstead@sony.com>
542
543         Add generic entrypoint and run loop in TestWebKitAPI
544         https://bugs.webkit.org/show_bug.cgi?id=189287
545
546         Reviewed by Michael Catanzaro.
547
548         The implementations in jsconly are platform agnostic.
549
550         * TestWebKitAPI/PlatformJSCOnly.cmake:
551         Use the glib implementation of Utilities when using that as a run loop
552         otherwise use the generic implementation.
553
554         * TestWebKitAPI/PlatformUtilities.h:
555         Remove repeated entries from Utilities.h.
556
557         * TestWebKitAPI/PlatformWPE.cmake:
558         Use the generic main.cpp.
559         
560         * TestWebKitAPI/generic/UtilitiesGeneric.cpp: Renamed from Tools/TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp.
561         (TestWebKitAPI::Util::run):
562         (TestWebKitAPI::Util::spinRunLoop):
563         Moved to a generic implementation and added spinRunLoop.
564
565         * TestWebKitAPI/generic/main.cpp: Renamed from Tools/TestWebKitAPI/jsconly/main.cpp.
566         Share between JSCOnly and WPE
567
568         * TestWebKitAPI/wpe/main.cpp: Removed.
569
570 2018-09-04  Don Olmstead  <don.olmstead@sony.com>
571
572         [CMake] Make TestWebKitAPI dependencies explicit
573         https://bugs.webkit.org/show_bug.cgi?id=189282
574
575         Reviewed by Fujii Hironori.
576
577         The config.h file includes files from JSC, WebCore and WebKit which
578         places a dependency on those headers even when just building TestWTF.
579         This makes the depedencies explicit for all CMake ports and shoud
580         remove any race conditions that can be encountered when building tests.
581
582         * TestWebKitAPI/CMakeLists.txt:
583         * TestWebKitAPI/PlatformGTK.cmake:
584         * TestWebKitAPI/PlatformWPE.cmake:
585         * TestWebKitAPI/PlatformWin.cmake:
586
587 2018-09-04  Wenson Hsieh  <wenson_hsieh@apple.com>
588
589         Populate "text/uri-list" with multiple URLs when the pasteboard contains multiple URLs
590         https://bugs.webkit.org/show_bug.cgi?id=188890
591         <rdar://problem/43648605>
592
593         Reviewed by Tim Horton.
594
595         * DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
596         (-[LocalPasteboard pasteboardItems]):
597
598         Implement this method to avoid crashing when running layout tests that access the pasteboard.
599
600         * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
601
602         Add a test to verify that on macOS and iOS, multiple URLs dropped onto the page are accessible via
603         "text/uri-list".
604
605         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
606
607         Add a test that exercises 5 different ways to write one or more URLs to the pasteboard on macOS; in all cases,
608         the URLs written to the pasteboard should be exposed to the page via "text/uri-list". In all of these different
609         cases, the results of using `-[NSPasteboardItem stringForType:]`, `-[NSURL URLFromPasteboard:]` and
610         `-[NSPasteboard stringForType:]` will yield different results, so the purpose of this API test is to ensure that
611         our logic for grabbing a list of URLs from the pasteboard on macOS is robust enough to handle all of these
612         different behaviors.
613
614         * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
615
616         Add a test to verify that on iOS, using `-[UIPasteboard setURLs:]` to write to multiple URLs to the pasteboard
617         and then pasting results in "text/uri-list" exposing a list of all the URLs written to the pasteboard.
618
619         * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
620         (-[LocalPasteboard pasteboardItems]):
621
622         Implement this method to avoid crashing when running layout tests that access the pasteboard.
623
624 2018-09-04  Simon Fraser  <simon.fraser@apple.com>
625
626         REGRESSION(r235408): GTK bots exiting early
627         https://bugs.webkit.org/show_bug.cgi?id=189063
628
629         Reviewed by Michael Catanzaro.
630         
631         WebKitTestRunner was running the world leak checks even when run without --world-leaks,
632         causing GTK bot timeouts. So guard updateLiveDocumentsAfterTest(), checkForWorldLeaks()
633         and findAndDumpWorldLeaks() with m_checkForWorldLeaks checks, and in
634         TestController::handleControlCommand() print a message if the control script sends the
635         "#CHECK FOR WORLD LEAKS" command if WTR was not run with --world-leaks.
636         
637         I tested that running with --world-leaks still works.
638
639         * WebKitTestRunner/TestController.cpp:
640         (WTR::TestController::resetStateToConsistentValues):
641         (WTR::TestController::updateLiveDocumentsAfterTest):
642         (WTR::TestController::checkForWorldLeaks):
643         (WTR::TestController::findAndDumpWorldLeaks):
644         (WTR::TestController::handleControlCommand):
645         (WTR::TestController::run):
646
647 2018-09-04  Myles C. Maxfield  <mmaxfield@apple.com>
648
649         Unreviewed follow-up to r235635
650         https://bugs.webkit.org/show_bug.cgi?id=188940
651
652         Use "let" variables instead of "var" variables.
653
654         * WebGPUShadingLanguageRI/StandardLibrary.js:
655         (let.standardLibrary):
656
657 2018-09-04  Myles C. Maxfield  <mmaxfield@apple.com>
658
659         [WHLSL] Implement texture types
660         https://bugs.webkit.org/show_bug.cgi?id=188940
661
662         Rubber-stamped by Dean Jackson.
663
664         Implement the texture types and operations. This includes Sample(), Load(), Store(), Gather(), and GetDimensions().
665         These functions were implemented according to section 15 of the Vulkan 1.1.83 spec, which lists each operation
666         and how to compute its results.
667
668         * WebGPUShadingLanguageRI/All.js:
669         * WebGPUShadingLanguageRI/Casts.js: Moved from Intrinsics. The texture operations need to cast too, so these are
670         moved into a common location.
671         (cast):
672         (bitwiseCast):
673         (castToUchar):
674         (castToUshort):
675         (castToUint):
676         (castToChar):
677         (castToShort):
678         (castToInt):
679         (castToHalf):
680         (castToFloat):
681         * WebGPUShadingLanguageRI/Intrinsics.js: Use Casts.js and call into TextureOperations.js.
682         (Intrinsics.):
683         (Intrinsics.checkFalse):
684         (Intrinsics.boxVector):
685         (Intrinsics.unboxVector):
686         (Intrinsics):
687         (Intrinsics.cast): Deleted.
688         (Intrinsics.bitwiseCast): Deleted.
689         (Intrinsics.castToHalf): Deleted.
690         * WebGPUShadingLanguageRI/SPIRV.html:
691         * WebGPUShadingLanguageRI/Sampler.js: Added. Represent the Sampler type. 
692         (Sampler):
693         (Sampler.prototype.get rAddressMode):
694         (Sampler.prototype.get sAddressMode):
695         (Sampler.prototype.get tAddressMode):
696         (Sampler.prototype.get minFilter):
697         (Sampler.prototype.get magFilter):
698         (Sampler.prototype.get mipmapFilter):
699         (Sampler.prototype.get lodMinClamp):
700         (Sampler.prototype.get lodMaxClamp):
701         (Sampler.prototype.get maxAnisotropy):
702         (Sampler.prototype.get compareFunction):
703         (Sampler.prototype.get borderColor):
704         (Sampler.prototype.calculateBorderColor.computeValues):
705         (Sampler.prototype.calculateBorderColor):
706         * WebGPUShadingLanguageRI/StandardLibrary.js: Update the standard library. Some of the functions were
707         either missing or wrong.
708         (let.standardLibrary):
709         * WebGPUShadingLanguageRI/Test.html:
710         * WebGPUShadingLanguageRI/Test.js: Test many, many combinations of the texture operations.
711         (makeSampler):
712         (make1DTexture):
713         (make1DTextureArray):
714         (make2DTexture):
715         (make2DTextureArray):
716         (make3DTexture):
717         (makeTextureCube):
718         (makeRW1DTexture):
719         (makeRW1DTextureArray):
720         (makeRW2DTexture):
721         (makeRW2DTextureArray):
722         (makeRW3DTexture):
723         (make2DDepthTexture):
724         (make2DDepthTextureArray):
725         (makeDepthTextureCube):
726         (makeRW2DDepthTexture):
727         (makeRW2DDepthTextureArray):
728         (checkFloat4):
729         * WebGPUShadingLanguageRI/Texture.js: Added. Represents each of the texture types.
730         (Texture):
731         (Texture.prototype.get dimension):
732         (Texture.prototype.get width):
733         (Texture.prototype.get height):
734         (Texture.prototype.get depth):
735         (Texture.prototype.get levelCount):
736         (Texture.prototype.get layerCount):
737         (Texture.prototype.get innerType):
738         (Texture.prototype.get data):
739         (Texture.prototype.elementChecked):
740         (Texture.prototype.setElementChecked):
741         (Texture1D):
742         (Texture1D.prototype.widthAtLevel):
743         (Texture1D.prototype.heightAtLevel):
744         (Texture1D.prototype.depthAtLevel):
745         (Texture1D.prototype.element):
746         (Texture1D.prototype.setElement):
747         (Texture1DArray):
748         (Texture1DArray.prototype.widthAtLevel):
749         (Texture1DArray.prototype.heightAtLevel):
750         (Texture1DArray.prototype.depthAtLevel):
751         (Texture1DArray.prototype.element):
752         (Texture1DArray.prototype.setElement):
753         (Texture2D):
754         (Texture2D.prototype.widthAtLevel):
755         (Texture2D.prototype.heightAtLevel):
756         (Texture2D.prototype.depthAtLevel):
757         (Texture2D.prototype.element):
758         (Texture2D.prototype.setElement):
759         (Texture2DArray):
760         (Texture2DArray.prototype.widthAtLevel):
761         (Texture2DArray.prototype.heightAtLevel):
762         (Texture2DArray.prototype.depthAtLevel):
763         (Texture2DArray.prototype.element):
764         (Texture2DArray.prototype.setElement):
765         (Texture3D):
766         (Texture3D.prototype.widthAtLevel):
767         (Texture3D.prototype.heightAtLevel):
768         (Texture3D.prototype.depthAtLevel):
769         (Texture3D.prototype.element):
770         (Texture3D.prototype.setElement):
771         (TextureCube):
772         (TextureCube.prototype.widthAtLevel):
773         (TextureCube.prototype.heightAtLevel):
774         (TextureCube.prototype.depthAtLevel):
775         (TextureCube.prototype.element):
776         (TextureCube.prototype.setElement):
777         (Texture1DRW):
778         (Texture1DRW.prototype.widthAtLevel):
779         (Texture1DRW.prototype.heightAtLevel):
780         (Texture1DRW.prototype.depthAtLevel):
781         (Texture1DRW.prototype.element):
782         (Texture1DRW.prototype.setElement):
783         (Texture1DArrayRW):
784         (Texture1DArrayRW.prototype.widthAtLevel):
785         (Texture1DArrayRW.prototype.heightAtLevel):
786         (Texture1DArrayRW.prototype.depthAtLevel):
787         (Texture1DArrayRW.prototype.element):
788         (Texture1DArrayRW.prototype.setElement):
789         (Texture2DRW):
790         (Texture2DRW.prototype.widthAtLevel):
791         (Texture2DRW.prototype.heightAtLevel):
792         (Texture2DRW.prototype.depthAtLevel):
793         (Texture2DRW.prototype.element):
794         (Texture2DRW.prototype.setElement):
795         (Texture2DArrayRW):
796         (Texture2DArrayRW.prototype.widthAtLevel):
797         (Texture2DArrayRW.prototype.heightAtLevel):
798         (Texture2DArrayRW.prototype.depthAtLevel):
799         (Texture2DArrayRW.prototype.element):
800         (Texture2DArrayRW.prototype.setElement):
801         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW):
802         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.widthAtLevel):
803         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.heightAtLevel):
804         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.depthAtLevel):
805         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.element):
806         (let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.setElement):
807         * WebGPUShadingLanguageRI/TextureOperations.js: Added. This implements the texture operations
808         as described in section 15 of the Vulkan 1.1.83 spec.
809         (depthCompareOperation):
810         (conversionToRGBA):
811         (projectionOperation):
812         (cubeMapFaceSelection):
813         (cubeMapCoordinateTransformation):
814         (cubeMapDerivativeTransformation):
815         (scaleFactorOperation):
816         (levelOfDetailOperation):
817         (nearest):
818         (imageLevelSelection):
819         (strqaToUVWATransformation):
820         (rne):
821         (uvwaToIJKLNTransformationAndArrayLayerSelection):
822         (integerTexelCoordinateOperations):
823         (mirror):
824         (transform):
825         (wrappingOperation):
826         (calculateLambda):
827         (shouldBeBorder):
828         (accessColor):
829         (computeTau):
830         (reduce):
831         (texelGathering):
832         (computeColorFromLevel):
833         (texelFiltering):
834         (castToInnerTypeForGather):
835         (gatherTexture):
836         (castToInnerType):
837         (sampleTexture):
838         * WebGPUShadingLanguageRI/index.html:
839
840 2018-09-04  Alexey Proskuryakov  <ap@apple.com>
841
842         Removing an accidentally committed debugging print.
843
844         * Scripts/run-leaks: (runLeaks)
845
846 2018-09-04  Alexey Proskuryakov  <ap@apple.com>
847
848         run-leaks should run leaks with --list (on Mojave)
849         https://bugs.webkit.org/show_bug.cgi?id=187716
850         <rdar://problem/42261676>
851
852         Reviewed by Lucas Forschler.
853
854         Also enabled dumping memgraphs. We'll be pruning these aggressively, as they take
855         significant space.
856
857         * Scripts/run-leaks:
858         (main): Added an option to store memgraphs.
859         (runLeaks): As there is no way to test whether the new format is supported in advance,
860         we have to try with --list first, and retry if that fails. Also, made leaks operate
861         on a memgraph file if we are saving it anyway.
862
863         * Scripts/webkitpy/port/leakdetector.py:
864         (LeakDetector._leaks_args): Pass --memgraph-file to run-leaks.
865         (LeakDetector.leaks_file_name): Removed an incorrect comment.
866         (LeakDetector.memgraph_file_name): Added.
867         (LeakDetector.check_for_leaks): Changed how arguments are passed to _leaks_args.
868         It is a bit ugly that leaks path ends up being computed twice, but this is the least
869         ugly approach that I could find.
870
871         * Scripts/webkitpy/port/leakdetector_unittest.py: Updated for _leaks_args changes.
872
873 2018-09-04  Chris Dumez  <cdumez@apple.com>
874
875         Add process pool configuration flag to turn on automatic process pre-warming
876         https://bugs.webkit.org/show_bug.cgi?id=189263
877         <rdar://problem/44101941>
878
879         Reviewed by Antti Koivisto.
880
881         Add API test coverage.
882
883         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
884         * TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm.
885         (TEST):
886         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
887         * TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm: Removed.
888
889 2018-09-04  Keith Miller  <keith_miller@apple.com>
890
891         Perl doesn't like calling keys on a reference
892         https://bugs.webkit.org/show_bug.cgi?id=189261
893
894         Reviewed by Michael Saboff.
895
896         * Scripts/test262/Runner.pm:
897         (UpdateResults):
898
899 2018-09-04  Jer Noble  <jer.noble@apple.com>
900
901         REGRESSION (r234081): TestWebKitAPI.VideoControlsManager.VideoControlsManagerAudioElementFollowingUserInteraction is a flaky timeout
902         https://bugs.webkit.org/show_bug.cgi?id=187972
903         <rdar://problem/42667737>
904
905         Reviewed by Darin Adler.
906
907         Ensure that listeners are added in time to catch messages broadcast at them.
908
909         * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
910         (TestWebKitAPI::TEST):
911
912 2018-09-04  Ross Kirsling  <ross.kirsling@sony.com>
913
914         Update googletest
915         https://bugs.webkit.org/show_bug.cgi?id=175722
916
917         Reviewed by Brent Fulgham.
918
919         * TestWebKitAPI/config.h:
920         Instead of modifying the gtest source, add the necessary WTF includes here.
921
922         * TestWebKitAPI/Configurations/Base.xcconfig
923         Remove obsoleted definitions GTEST_HAS_TR1_TUPLE=0 and GTEST_HAS_RTTI=0.
924
925 2018-09-03  Pablo Saavedra  <psaavedra@igalia.com>
926
927         [WPE] Add more WPE bots to dashboard
928         https://bugs.webkit.org/show_bug.cgi?id=189245
929
930         Reviewed by Daniel Bates.
931
932         There are two missing bots which are not listed in the dashboard for
933         a while: WPE Linux 64-bit Debug (Build) and WPE Linux 64-bit Debug (Tests)
934
935         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
936         (WebKitBuildbot):
937
938 2018-09-01  Michael Catanzaro  <mcatanzaro@igalia.com>
939
940         [WPE] 2.21.91 fails to build with ENABLE_MINIBROWSER
941         https://bugs.webkit.org/show_bug.cgi?id=189006
942
943         Reviewed by Darin Adler.
944
945         The MiniBrowser source code is missing from the tarball. Oops! Add it.
946
947         * wpe/manifest.txt.in:
948
949 2018-09-01  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
950
951         [WinCairo] Add CryptoDigestOpenSSL
952         https://bugs.webkit.org/show_bug.cgi?id=188978
953
954         Reviewed by Darin Adler.
955
956         Add API tests for the PAL::CryptoDigest class.
957
958         * TestWebKitAPI/PlatformWin.cmake:
959         Add CryptoDigest.cpp to TestWebCoreLib_Sources.
960
961         Define -DSTATICALLY_LINKED_WITH_PAL=1 to avoid warnings since
962         without the definition the functions marked with PAL_EXPORT are supposed to be
963         imported from another shared library, but as it is, TestWebCoreLib
964         links PAL statically.
965
966         * TestWebKitAPI/Tests/WebCore/CryptoDigest.cpp: Added.
967         (TestWebKitAPI::toHex):
968         (TestWebKitAPI::expect):
969         (TestWebKitAPI::expectSHA1):
970         (TestWebKitAPI::expectSHA224):
971         (TestWebKitAPI::expectSHA256):
972         (TestWebKitAPI::expectSHA384):
973         (TestWebKitAPI::expectSHA512):
974         (TestWebKitAPI::TEST):
975
976 2018-09-01  Dan Bernstein  <mitz@apple.com>
977
978         [Cocoa] Crash using KVO for 'serverTrust' property of WKWebView - "this class is not key value coding-compliant for the key serverTrust"
979         https://bugs.webkit.org/show_bug.cgi?id=189222
980         <rdar://problem/33283179>
981
982         Reviewed by Sam Weinig.
983
984         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
985         * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewServerTrustKVC.mm: Added.
986         (TEST):
987
988 2018-08-31  Aditya Keerthi  <akeerthi@apple.com>
989
990         Unreviewed, add an alternate email for Aditya Keerthi.
991
992         * Scripts/webkitpy/common/config/contributors.json:
993
994 2018-08-31  Wenson Hsieh  <wenson_hsieh@apple.com>
995
996         [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
997         https://bugs.webkit.org/show_bug.cgi?id=189054
998         <rdar://problem/43819779>
999
1000         Reviewed by Tim Horton.
1001
1002         See WebCore/ChangeLog for more detail.
1003
1004         * TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
1005         (createWebViewWithCustomPasteboardDataEnabled):
1006
1007 2018-08-31  Commit Queue  <commit-queue@webkit.org>
1008
1009         Unreviewed, rolling out r235565.
1010         https://bugs.webkit.org/show_bug.cgi?id=189212
1011
1012         Broke the WHLSL build (Requested by litherum on #webkit).
1013
1014         Reverted changeset:
1015
1016         "[WHLSL] Remove useless code in NameResolver"
1017         https://bugs.webkit.org/show_bug.cgi?id=189176
1018         https://trac.webkit.org/changeset/235565
1019
1020 2018-08-31  Myles C. Maxfield  <mmaxfield@apple.com>
1021
1022         [WHLSL] Remove useless code in NameResolver
1023         https://bugs.webkit.org/show_bug.cgi?id=189176
1024
1025         Reviewed by Dean Jackson and Thomas Denney.
1026
1027         The check will always pass becase the standard library contains at least one function with the correct name.
1028
1029         * WebGPUShadingLanguageRI/NameResolver.js:
1030         (NameResolver.prototype.visitDotExpression):
1031         (NameResolver.prototype._handlePropertyAccess): Deleted.
1032         (NameResolver.prototype.visitIndexExpression): Deleted.
1033
1034 2018-08-31  Simon Fraser  <simon.fraser@apple.com>
1035
1036         Make it possible to mark tests as leaks in TestExpectations
1037         https://bugs.webkit.org/show_bug.cgi?id=189088
1038
1039         Reviewed by Jon Lee.
1040         
1041         Have webkitpy parse out "Leak" expectations in TestExpectations, and do the right
1042         thing if the test run did not use --world-leaks. Add unit tests for leaks combined
1043         with various other result combinations.
1044
1045         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
1046         (LayoutTestRunner._update_summary_with_result):
1047         (LayoutTestRunner._annotate_results_with_additional_failures):
1048         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
1049         (TestExpectationParser):
1050         (TestExpectations): The 'Leak' line was duplicated here, so remove a copy.
1051         (TestExpectations.remove_leak_failures):
1052         (TestExpectations.matches_an_expected_result):
1053         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
1054         (Base.get_basic_tests):
1055         * Scripts/webkitpy/port/test.py:
1056         (TestList.add_reftest):
1057         (unit_test_list):
1058
1059 2018-08-31  Zalan Bujtas  <zalan@apple.com>
1060
1061         [LFC] Add margin box verification back now that Display::Box has non-computed horizontal margin.
1062         https://bugs.webkit.org/show_bug.cgi?id=189193
1063
1064         Reviewed by Antti Koivisto.
1065
1066         * LayoutReloaded/misc/LFC-passing-tests.txt:
1067
1068 2018-08-31  Antti Koivisto  <antti@apple.com>
1069
1070         Replace OptionSet |= and -= operators with add() and remove() functions
1071         https://bugs.webkit.org/show_bug.cgi?id=189169
1072
1073         Reviewed by Anders Carlsson.
1074
1075         * TestWebKitAPI/Tests/WTF/OptionSet.cpp:
1076         (TestWebKitAPI::TEST):
1077
1078 2018-08-31  Daniel Bates  <dabates@apple.com>
1079
1080         lldb-webkit: KeyError thrown for OptionSet with invalid value
1081         https://bugs.webkit.org/show_bug.cgi?id=189070
1082
1083         Update comment to explain that we return early and do not compute the set of enumerators in the
1084         OptionSet when the underlying value of the set is an invalid value.
1085
1086         Additionally, update the change log entry for r235482 to reflect the updated title for the bug
1087         and to better describe the change that was made.
1088
1089         * lldb/lldb_webkit.py:
1090         (WTFOptionSetProvider.update):
1091
1092 2018-08-31  David Kilzer  <ddkilzer@apple.com>
1093
1094         WebKitLauncher: Move WebKitLauncher.entitlements into Configurations directory
1095
1096         This makes the Configurations folder in the Xcode project match
1097         what's in the Configurations directory on disk.  Found by
1098         tidy-Xcode-project-file (see Bug 188754).
1099
1100         * WebKitLauncher/Configurations/WebKitLauncher.entitlements: Rename from Tools/WebKitLauncher/WebKitLauncher.entitlements.
1101         * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
1102         - Update project for file move.
1103
1104 2018-08-31  David Kilzer  <ddkilzer@apple.com>
1105
1106         WebKitLauncher: Fix build failures
1107
1108         * WebKitLauncher/Configurations/Base.xcconfig:
1109         (ARCHS): Use $(ARCHS_STANDARD_32_64_BIT).
1110         (MACOSX_DEPLOYMENT_TARGET): Update from Snow Leopard to Sierra.
1111
1112         * WebKitLauncher/WebKitNightlyEnabler.m:
1113         (myApplicationWillFinishLaunching):
1114         * WebKitLauncher/main.m:
1115         (displayErrorAndQuit):
1116         (locateSafariBundle):
1117         - Use pragma to ignore deprecation warnings.
1118
1119 2018-08-31  David Kilzer  <ddkilzer@apple.com>
1120
1121         MobileMiniBrowser: Move test2s.mp4 into Resources directory
1122
1123         This makes the Resources folder in the Xcode project match
1124         what's in the Resources directory on disk.  Found by
1125         tidy-Xcode-project-file (see Bug 188754).
1126
1127         * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
1128         - Update project for file move.
1129         * MobileMiniBrowser/MobileMiniBrowserFramework/Resources/test2s.mp4: Rename from Tools/MobileMiniBrowser/MobileMiniBrowserFramework/test2s.mp4.
1130
1131 2018-08-31  Frederic Wang  <fwang@igalia.com>
1132
1133         Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
1134         https://bugs.webkit.org/show_bug.cgi?id=182053
1135
1136         Reviewed by Simon Fraser.
1137
1138         Add FIXMEs comments to add the new developer flag in the future and  disable it for now.
1139
1140         * DumpRenderTree/mac/DumpRenderTree.mm:
1141         (enableExperimentalFeatures):
1142         (resetWebPreferencesToConsistentValues):
1143         * DumpRenderTree/win/DumpRenderTree.cpp:
1144         (enableExperimentalFeatures):
1145         * WebKitTestRunner/TestController.cpp:
1146         (WTR::TestController::resetPreferencesToConsistentValues):
1147
1148 2018-08-30  Thomas Denney  <tdenney@apple.com>
1149
1150         [WHLSL] Fix array indexing behavior
1151         https://bugs.webkit.org/show_bug.cgi?id=189175
1152
1153         Array, pointer, and array ref types are now parsed and then constructed
1154         in reverse so that the declaration order matches the indexing order, as
1155         in C/C++.
1156
1157         Reviewed by Myles C. Maxfield.
1158
1159         * WebGPUShadingLanguageRI/Parse.js:
1160         (parseType):
1161         * WebGPUShadingLanguageRI/Test.js:
1162
1163 2018-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1164
1165         Followup to [iOS] TestWebKitAPI.PasteImage tests are flaky failures
1166         https://bugs.webkit.org/show_bug.cgi?id=185965
1167
1168         Reviewed by Andy Estes.
1169
1170         The first attempt to fix these flaky tests on iOS caused timeouts on macOS while waiting for a "loaded" message
1171         from the page. To (hopefully) fix this across both platforms, make sure that we first register our script
1172         message handlers in the UI process *before* evaluating script that could propagate the script message.
1173
1174         * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
1175         (-[TestWKWebView waitForMessage:afterEvaluatingScript:]):
1176         (TEST):
1177
1178 2018-08-30  Thomas Denney  <tdenney@apple.com>
1179
1180         [WHLSL] Implement tests to verify array indexing order matches our desires
1181         https://bugs.webkit.org/show_bug.cgi?id=189099
1182
1183         Reviewed by Myles C. Maxfield.
1184
1185         * WebGPUShadingLanguageRI/Test.js: Add new test for array indexing order
1186         and the option to explicitly disable tests (this test is disabled by
1187         default).
1188         * WebGPUShadingLanguageRI/TypeRef.js:
1189         (TypeRef.wrap): Fixes  typo.
1190
1191 2018-08-30  Sihui Liu  <sihui_liu@apple.com>
1192
1193         WKNavigation.ProcessCrashDuringCallback is failing on iOS
1194         https://bugs.webkit.org/show_bug.cgi?id=189148
1195
1196         Reviewed by Chris Dumez.
1197
1198         We should not deference WebView or we may get WKErrorWebViewInvalidated error, because 
1199         WebView could be destroyed before Web Process termination is noticed.
1200
1201         * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
1202         (TEST):
1203
1204 2018-08-30  Zalan Bujtas  <zalan@apple.com>
1205
1206         [LFC][Floating] Formatting context roots avoid floats.
1207         https://bugs.webkit.org/show_bug.cgi?id=189150
1208
1209         Reviewed by Antti Koivisto.
1210
1211         * LayoutReloaded/misc/LFC-passing-tests.txt:
1212
1213 2018-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1214
1215         [iOS] TestWebKitAPI.PasteImage tests are flaky failures
1216         https://bugs.webkit.org/show_bug.cgi?id=185965
1217
1218         Reviewed by Andy Estes.
1219
1220         These tests pass reliably when run locally, but sometimes fail in automation when checking that the image
1221         element with its "src" attribute set to a new blob URL has an empty size. It's possible that this is happening
1222         because we're checking the size of the image element prior to image load after setting the blob URL; we can fix
1223         this by waiting for the "load" event (which is also done in some of the other tests in this file).
1224
1225         * TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
1226         (TEST):
1227
1228 2018-08-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1229
1230         Unreviewed, rolling out r235114.
1231
1232         ostree server deleted our commits?
1233
1234         Reverted changeset:
1235
1236         "[Flatpak] Update to GNOME master runtime"
1237         https://bugs.webkit.org/show_bug.cgi?id=188731
1238         https://trac.webkit.org/changeset/235114
1239
1240 2018-08-29  Myles C. Maxfield  <mmaxfield@apple.com>
1241
1242         [WHLSL] Test row-majorness of matrices
1243         https://bugs.webkit.org/show_bug.cgi?id=189101
1244
1245         The matrix multiplication functions are temporarily commented out of the standard library,
1246         so I've temporarily copy/pasted them into the test. Matrix multiplication is not
1247         commutative, so it requires the right indexing order.
1248
1249         Reviewed by Dean Jackson and Thomas Denney.
1250
1251         * WebGPUShadingLanguageRI/Intrinsics.js:
1252         * WebGPUShadingLanguageRI/StandardLibrary.js:
1253         (let.standardLibrary):
1254         * WebGPUShadingLanguageRI/Test.js:
1255
1256 2018-08-29  Jer Noble  <jer.noble@apple.com>
1257
1258         Unreviewed test gardening; NowPlayingTest API tests require High Sierra.
1259
1260         * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm:
1261
1262 2018-08-29  Youenn Fablet  <youenn@apple.com>
1263
1264         Remove WebRTC legacy API implementation
1265         https://bugs.webkit.org/show_bug.cgi?id=189040
1266
1267         Reviewed by Eric Carlson.
1268
1269         * DumpRenderTree/mac/DumpRenderTree.mm:
1270         (enableExperimentalFeatures):
1271         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1272         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1273         (WTR::TestRunner::setWebRTCLegacyAPIEnabled): Deleted.
1274         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1275         * WebKitTestRunner/TestController.cpp:
1276         (WTR::TestController::resetPreferencesToConsistentValues):
1277
1278 2018-08-29  Daniel Bates  <dabates@apple.com>
1279
1280         lldb-webkit: KeyError thrown for OptionSet with invalid value
1281         https://bugs.webkit.org/show_bug.cgi?id=189070
1282
1283         Reviewed by Simon Fraser.
1284
1285         Do not compute what enumerators are in an OptionSet with an invalid value. A local OptionSet
1286         variable is only considered valid when execution passes over its assignment/constructor.
1287
1288         The LLDB Python API does not provide a way to determine whether a variable has a valid
1289         value (SBValue.IsValid() does not seem to check if the actual bit pattern in memory for
1290         a variable represents a valid value). So, we use a simple heuristic: when the value of
1291         the OptionSet is greater than the value of the bitmask with all enumerators set then we
1292         consider the OptionSet to be invalid. When the variable obtains a valid value then LLDB
1293         will notify us to update our state.
1294
1295         * lldb/lldb_webkit.py:
1296         (WTFOptionSetProvider.update):
1297
1298 2018-08-29  Chris Dumez  <cdumez@apple.com>
1299
1300         [PSON] We should only process-swap when eTLD+1 changes on navigation
1301         https://bugs.webkit.org/show_bug.cgi?id=189090
1302         <rdar://problem/43799225>
1303
1304         Reviewed by Geoffrey Garen.
1305
1306         Update existing PSON API tests to use different registrable domains instead of different
1307         protocols, as we now only process-swap when the eTLD+1 (aka "registrable domain") changes.
1308
1309         Add test coverage to make sure that we do not process swap when eTLD+1 does not change.
1310
1311         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1312
1313 2018-08-29  Youenn Fablet  <youenn@apple.com>
1314
1315         Add a runtime flag for WebRTC unified plan
1316         https://bugs.webkit.org/show_bug.cgi?id=189068
1317
1318         Reviewed by Eric Carlson.
1319
1320         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1321         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1322         (WTR::TestRunner::setWebRTCUnifiedPlanEnabled):
1323         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1324
1325 2018-08-29  Don Olmstead  <don.olmstead@sony.com>
1326
1327         [CMake] Split Tools/CMakeLists.txt into platform files
1328         https://bugs.webkit.org/show_bug.cgi?id=189093
1329
1330         Reviewed by Michael Catanzaro.
1331
1332         * CMakeLists.txt:
1333         * PlatformGTK.cmake: Added.
1334         * PlatformMac.cmake: Added.
1335         * PlatformWPE.cmake: Added.
1336         * PlatformWin.cmake: Added.
1337
1338 2018-08-29  Jer Noble  <jer.noble@apple.com>
1339
1340         Muted elements do not have their Now Playing status updated when unmuted.
1341         https://bugs.webkit.org/show_bug.cgi?id=189069
1342
1343         Reviewed by Eric Carlson.
1344
1345         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1346         * TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Added.
1347         (userInfoHasNowPlayingApplicationPID):
1348         (getNowPlayingClient):
1349         (getNowPlayingClientPid):
1350         (NowPlayingTest::webView):
1351         (NowPlayingTest::configuration):
1352         (NowPlayingTest::webViewPid):
1353         (NowPlayingTest::loadPage):
1354         (NowPlayingTest::runScriptWithUserGesture):
1355         (NowPlayingTest::runScriptWithoutUserGesture):
1356         (NowPlayingTest::executeAndWaitForPlaying):
1357         (NowPlayingTest::executeAndWaitForWebViewToBecomeNowPlaying):
1358         (NowPlayingTest::observers):
1359         (NowPlayingTest::addObserver):
1360         (NowPlayingTest::removeObserver):
1361         (NowPlayingTest::notificationCallback):
1362         (NowPlayingTest::receivedNotification):
1363         (NowPlayingTest::performAfterReceivingNotification):
1364         (TEST_F):
1365         * TestWebKitAPI/Tests/WebKitCocoa/now-playing.html: Added.
1366
1367 2018-08-29  Thomas Denney  <tdenney@apple.com>
1368
1369         [WHLSL] Ensure that isLValue is copied by the rewriter
1370         https://bugs.webkit.org/show_bug.cgi?id=189083
1371
1372         The value of isLValue was not propagated when new TernaryExpressions are
1373         created in Rewriter.
1374
1375         Reviewed by Myles C. Maxfield.
1376
1377         * WebGPUShadingLanguageRI/Rewriter.js:
1378         (Rewriter.prototype.visitTernaryExpression):
1379         * WebGPUShadingLanguageRI/Test.js: Add new test to verify the value is
1380         propagated.
1381
1382 2018-08-29  Myles C. Maxfield  <mmaxfield@apple.com>
1383
1384         [WHLSL] Add more functions to the standard library
1385         https://bugs.webkit.org/show_bug.cgi?id=188873
1386
1387         Reviewed by Filip Pizlo.
1388
1389         This patch adds the rest of the standard library to StandardLibrary.js, and updates the compiler to be able to compile it.
1390
1391         There are a few major pieces:
1392         1. Swizzle operators are now implemented in the language, instead of as native functions
1393         2. Vector constructors are now implemented in the language, instead of as native functions
1394         3. The matrix type is implemented
1395         4. Vector operator&[] is illegal, and is removed from the compiler
1396         5. Vector index setters & index getters are now implemented in the language, instead of as native functions
1397         6. Vector and matrix equality operators are implemented in the language, instead of as native functions
1398         7. Casting a scalar to a boolean is implemented in the language, instead of as native functions
1399         8. Casting a vector to a boolean is not part of the language, and is removed from the compiler
1400         9. Half-precision floating point types are implemented
1401
1402         * WebGPUShadingLanguageRI/All.js:
1403         * WebGPUShadingLanguageRI/BuiltinMatrixGetter.js: Copied from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
1404         (BuiltinMatrixGetter):
1405         (BuiltinMatrixGetter.prototype.get height):
1406         (BuiltinMatrixGetter.prototype.get width):
1407         (BuiltinMatrixGetter.prototype.toString):
1408         (BuiltinMatrixGetter.functions):
1409         (BuiltinMatrixGetter.prototype.instantiateImplementation):
1410         * WebGPUShadingLanguageRI/BuiltinMatrixSetter.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
1411         (BuiltinMatrixSetter):
1412         (BuiltinMatrixSetter.prototype.get height):
1413         (BuiltinMatrixSetter.prototype.get width):
1414         (BuiltinMatrixSetter.prototype.toString):
1415         (BuiltinMatrixSetter.functions):
1416         (BuiltinMatrixSetter.prototype.instantiateImplementation):
1417         * WebGPUShadingLanguageRI/BuiltinVectorConstructors.js: Removed.
1418         * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Removed.
1419         * WebGPUShadingLanguageRI/BuiltinVectorGetter.js:
1420         (BuiltinVectorGetter.prototype.instantiateImplementation):
1421         (BuiltinVectorGetter):
1422         * WebGPUShadingLanguageRI/BuiltinVectorSetter.js:
1423         (BuiltinVectorSetter.functions):
1424         (BuiltinVectorSetter.prototype.instantiateImplementation):
1425         (BuiltinVectorSetter):
1426         * WebGPUShadingLanguageRI/CallExpression.js:
1427         (CallExpression.prototype.resolve):
1428         * WebGPUShadingLanguageRI/CheckTypesWithArguments.js:
1429         (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
1430         (checkTypesWithArguments.TypeWithArgumentsChecker):
1431         (checkTypesWithArguments):
1432         * WebGPUShadingLanguageRI/Checker.js:
1433         (Checker.prototype.visitVectorType):
1434         (Checker.prototype.visitMatrixType):
1435         * WebGPUShadingLanguageRI/ConstexprFolder.js:
1436         (ConstexprFolder.prototype.visitCallExpression):
1437         (ConstexprFolder):
1438         * WebGPUShadingLanguageRI/Evaluator.js:
1439         (Evaluator.prototype.visitTernaryExpression):
1440         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
1441         (FlattenedStructOffsetGatherer.prototype.visitMatrixType):
1442         (FlattenedStructOffsetGatherer):
1443         * WebGPUShadingLanguageRI/Intrinsics.js:
1444         (Intrinsics.):
1445         (Intrinsics):
1446         * WebGPUShadingLanguageRI/MatrixType.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js.
1447         (MatrixType):
1448         (MatrixType.prototype.get elementType):
1449         (MatrixType.prototype.get numRows):
1450         (MatrixType.prototype.get numColumns):
1451         (MatrixType.prototype.get numRowsValue):
1452         (MatrixType.prototype.get numColumnsValue):
1453         (MatrixType.prototype.get size):
1454         (MatrixType.prototype.unifyImpl):
1455         (MatrixType.prototype.populateDefaultValue):
1456         (MatrixType.prototype.toString):
1457         * WebGPUShadingLanguageRI/NameContext.js:
1458         (NameContext.prototype.add):
1459         * WebGPUShadingLanguageRI/NativeType.js:
1460         (NativeType.create):
1461         (NativeType):
1462         * WebGPUShadingLanguageRI/OperatorAnderIndexer.js: Renamed from Tools/WebGPUShadingLanguageRI/OperatorAnderIndex.js.
1463         (OperatorAnderIndexer):
1464         * WebGPUShadingLanguageRI/OperatorBool.js: Removed.
1465         * WebGPUShadingLanguageRI/Prepare.js:
1466         (let.prepare):
1467         * WebGPUShadingLanguageRI/Program.js:
1468         (Program.prototype.add):
1469         * WebGPUShadingLanguageRI/Rewriter.js:
1470         (Rewriter.prototype.visitMatrixType):
1471         (Rewriter):
1472         * WebGPUShadingLanguageRI/SPIRV.html:
1473         * WebGPUShadingLanguageRI/StandardLibrary.js:
1474         (operator.bool):
1475         (bool.operator):
1476         (uchar.operator):
1477         (ushort.operator):
1478         (char.operator):
1479         (short.operator):
1480         (uint.operator):
1481         (int.operator):
1482         (half.operator):
1483         (float.operator):
1484         (uchar2.operator):
1485         (uchar3.operator):
1486         (uchar4.operator):
1487         (ushort2.operator):
1488         (ushort3.operator):
1489         (ushort4.operator):
1490         (uint2.operator):
1491         (uint3.operator):
1492         (uint4.operator):
1493         (char2.operator):
1494         (char3.operator):
1495         (char4.operator):
1496         (short2.operator):
1497         (short3.operator):
1498         (short4.operator):
1499         (int2.operator):
1500         (int3.operator):
1501         (int4.operator):
1502         (half2.operator):
1503         (half3.operator):
1504         (half4.operator):
1505         (float2.operator):
1506         (float3.operator):
1507         (float4.operator):
1508         (half2x2.operator):
1509         (half2x3.operator):
1510         (half2x4.operator):
1511         (half3x2.operator):
1512         (half3x3.operator):
1513         (half3x4.operator):
1514         (half4x2.operator):
1515         (half4x3.operator):
1516         (half4x4.operator):
1517         (float2x2.operator):
1518         (float2x3.operator):
1519         (float2x4.operator):
1520         (float3x2.operator):
1521         (float3x3.operator):
1522         (float3x4.operator):
1523         (float4x2.operator):
1524         (float4x3.operator):
1525         (float4x4.operator):
1526         (operator.bool2):
1527         (operator.bool3):
1528         (operator.bool4):
1529         (uint.operator.length):
1530         (operator.uchar2):
1531         (operator.uchar3):
1532         (operator.uchar4):
1533         (operator.ushort2):
1534         (operator.ushort3):
1535         (operator.ushort4):
1536         (operator.uint2):
1537         (operator.uint3):
1538         (operator.uint4):
1539         (operator.char2):
1540         (operator.char3):
1541         (operator.char4):
1542         (operator.short2):
1543         (operator.short3):
1544         (operator.short4):
1545         (operator.int2):
1546         (operator.int3):
1547         (operator.int4):
1548         (operator.half2):
1549         (operator.half3):
1550         (operator.half4):
1551         (operator.float2):
1552         (operator.float3):
1553         (operator.float4):
1554         (bool2.operator):
1555         (bool3.operator):
1556         (bool4.operator):
1557         (allVectorTypeNames):
1558         * WebGPUShadingLanguageRI/SwizzleOp.js: Removed.
1559         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js:
1560         (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitMatrixType):
1561         (synthesizeDefaultConstructorOperator.FindAllTypes):
1562         (synthesizeDefaultConstructorOperator):
1563         * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Removed.
1564         * WebGPUShadingLanguageRI/Test.html:
1565         * WebGPUShadingLanguageRI/Test.js:
1566         (makeHalf):
1567         (checkHalf):
1568         * WebGPUShadingLanguageRI/Visitor.js:
1569         (Visitor.prototype.visitMatrixType):
1570         (Visitor):
1571         * WebGPUShadingLanguageRI/index.html:
1572
1573 2018-08-29  Simon Fraser  <simon.fraser@apple.com>
1574
1575         Teach webkitpy how to check leaks and treat leaks as test failures
1576         https://bugs.webkit.org/show_bug.cgi?id=189067
1577
1578         Reviewed by Darin Adler.
1579         
1580         Add a new "--world-leaks" argument to run-webkit-tests. When enabled, DRT/WTR are launched
1581         with a --world-leaks argument (which is renamed in this patch for consistency). This enables the
1582         behavior added in r235408, namely that they check for leaked documents after each test, and at
1583         the end of one (if --run-singly) or a set of tests run in a single DRT/WTR instance handle the
1584         "#CHECK FOR WORLD LEAKS" command to get still-live documents.
1585         
1586         LayoutTestRunner in webkitpy now has the notion of doing "post-tests work", called via _finished_test_group(),
1587         and here it sends the "#CHECK FOR WORLD LEAKS" command to the runner and parses the resulting output block.
1588         If this results block includes leaks, we convert an existing TestResult into a LEAK failure
1589         in TestRunResults.change_result_to_failure(). Leaks are then added to the ouput JSON for display in results.html
1590
1591         Unit tests are updated with some leak examples.
1592
1593         * DumpRenderTree/mac/DumpRenderTree.mm:
1594         (initializeGlobalsFromCommandLineOptions):
1595         * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
1596         (ParsedJSONResultsTest):
1597         * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
1598         (LayoutTestRunner._annotate_results_with_additional_failures):
1599         (LayoutTestRunner._handle_finished_test_group):
1600         (Worker.handle):
1601         (Worker._run_test):
1602         (Worker._do_post_tests_work):
1603         (Worker._finished_test_group):
1604         (Worker._run_test_in_another_thread):
1605         * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
1606         (JSONLayoutResultsGenerator):
1607         * Scripts/webkitpy/layout_tests/models/test_expectations.py:
1608         (TestExpectationParser):
1609         (TestExpectations):
1610         * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
1611         (Base.get_basic_tests):
1612         * Scripts/webkitpy/layout_tests/models/test_failures.py:
1613         (determine_result_type):
1614         (FailureLeak):
1615         (FailureLeak.__init__):
1616         (FailureLeak.message):
1617         (FailureDocumentLeak):
1618         (FailureDocumentLeak.__init__):
1619         (FailureDocumentLeak.message):
1620         * Scripts/webkitpy/layout_tests/models/test_results.py:
1621         (TestResult.convert_to_failure):
1622         * Scripts/webkitpy/layout_tests/models/test_run_results.py:
1623         (TestRunResults.change_result_to_failure):
1624         (_interpret_test_failures):
1625         (summarize_results):
1626         * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
1627         (get_result):
1628         (run_results):
1629         (summarized_results):
1630         * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
1631         (parse_args):
1632         * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
1633         (parse_args):
1634         (RunTest.test_check_for_world_leaks):
1635         * Scripts/webkitpy/port/driver.py:
1636         (DriverPostTestOutput):
1637         (DriverPostTestOutput.__init__):
1638         (Driver.do_post_tests_work):
1639         (Driver._parse_world_leaks_output):
1640         (Driver.cmd_line):
1641         (DriverProxy.do_post_tests_work):
1642         * Scripts/webkitpy/port/test.py:
1643         (unit_test_list):
1644         * WebKitTestRunner/Options.cpp:
1645         (WTR::OptionsHandler::OptionsHandler):
1646         * WebKitTestRunner/TestController.cpp:
1647         (WTR::TestController::checkForWorldLeaks):
1648
1649 2018-08-29  David Kilzer  <ddkilzer@apple.com>
1650
1651         Remove empty directories from from svn.webkit.org repository
1652         <https://webkit.org/b/189081>
1653
1654         * DumpRenderTree/TestNetscapePlugIn/unix: Removed.
1655         * WebKitTestRunner/UIScriptContext: Removed.
1656
1657 2018-08-29  Pablo Saavedra  <psaavedra@igalia.com>
1658
1659         [GTK][WPE] Add JSCOnly Release bot for Linux ARMv7 Thumb2 SoftFP
1660         https://bugs.webkit.org/show_bug.cgi?id=189077
1661
1662         Reviewed by Michael Catanzaro.
1663
1664         Deployed new bot for WPE Release in Linux ARMv7 Thumb2 SoftFP
1665         This bot (jsconly-linux-igalia-bot-5) will run the 'JSCOnly
1666         Linux ARMv7 Thumb2 SoftFP Release' buildjob.
1667
1668         * BuildSlaveSupport/build.webkit.org-config/config.json:
1669         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
1670
1671 2018-08-28  Daniel Bates  <dabates@apple.com>
1672
1673         lldb-webkit: KeyError thrown for OptionSet
1674         https://bugs.webkit.org/show_bug.cgi?id=189062
1675
1676         Reviewed by Simon Fraser.
1677
1678         For some reason lldb(1) may not retrieve the enumerator names for an enum value
1679         when it calls update() on the synthetic children provider. If this occurs then
1680         bail out as we cannot compute what enumerators are in the set.
1681
1682         * lldb/lldb_webkit.py:
1683         (WTFOptionSetProvider.update):
1684
1685 2018-08-28  Sihui Liu  <sihui_liu@apple.com>
1686
1687         Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback
1688         https://bugs.webkit.org/show_bug.cgi?id=189037
1689
1690         Reviewed by Chris Dumez.
1691
1692         * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
1693         (TEST):
1694
1695 2018-08-28  David Kilzer  <ddkilzer@apple.com>
1696
1697         Fix incorrect use of `sourceTree = "<group>";` for built products and frameworks in Xcode projects
1698
1699         Found by tidy-Xcode-project-file script (see Bug 188754).
1700
1701         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
1702         (IOKit.framework): Use `sourceTree = "<absolute>";` to match
1703         other frameworks in the project.
1704         * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
1705         (WebKit.framework): Use `sourceTree = BUILT_PRODUCTS_DIR;` for
1706         built product instead of relative build directory path.
1707         * jsc-cli/jsc-cli.xcodeproj/project.pbxproj:
1708         (JavaScriptCore.framework): Ditto.
1709         * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
1710         (libWTF.a): Use `sourceTree = BUILT_PRODUCTS_DIR;` for built
1711         product.
1712
1713 2018-08-28  Alex Christensen  <achristensen@webkit.org>
1714
1715         Fix 32-bit Mac build.
1716
1717         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
1718
1719 2018-08-28  Alex Christensen  <achristensen@webkit.org>
1720
1721         REGRESSION (r235391): [iOS] TestWebKitAPI.WebKit.RestoreSessionStateWithoutNavigation is timing out
1722         https://bugs.webkit.org/show_bug.cgi?id=189050
1723
1724         Reviewed by Tim Horton.
1725
1726         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
1727         This test wasn't run on iOS before.  Let's re-introduce the WK_HAVE_C_SPI guard.
1728
1729 2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1730
1731         [iOS] WKAttachmentTests.DropFolderAsAttachmentAndMoveByDragging encounters an exception on iOS simulator
1732         https://bugs.webkit.org/show_bug.cgi?id=189049
1733
1734         Reviewed by Tim Horton.
1735
1736         Wrap an NSURL in a RetainPtr to prevent it from being freed prematurely. It seems this broke when I changed the
1737         load handler from an Objective-C block that captured `folderURL` to a C++ lambda that didn't retain `folderURL`.
1738
1739         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1740         (simulateFolderDragWithURL):
1741
1742 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1743
1744         [Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends
1745         https://bugs.webkit.org/show_bug.cgi?id=189004
1746
1747         Reviewed by Dan Bernstein.
1748
1749         Move off of deprecated attachment insertion SPI.
1750
1751         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1752         (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
1753         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
1754         (-[_WKAttachment synchronouslySetDisplayOptions:error:]): Deleted.
1755
1756 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
1757
1758         Teach WebKitTestRunner and DumpRenderTree about detecting world leaks
1759         https://bugs.webkit.org/show_bug.cgi?id=188994
1760
1761         Reviewed by Tim Horton.
1762         
1763         This patch adds the notion of a "control command" in the protocol between webkitpy and 
1764         WebKitTestRunner/DumpRenderTree. A command is simply an input string starting with a #
1765         that is checked for before trying to parse the input as test URL. For now, just one
1766         commmand is supported, which is "#CHECK FOR WORLD LEAKS".
1767         
1768         In response to the command, the tool dumps an output block in the usual pseudo-MIME-style,
1769         with a trailing "#EOF". Future patches will add support to webkitpy to parse this output.
1770         
1771         DumpRenderTree stubs out the command, returning an empty block.
1772         
1773         WebKitTestRunner responds to the command by dumping the list of live documents, if it was
1774         run with the --check-for-world-leaks option.
1775         
1776         When run with --check-for-world-leaks, WebKitTestRunner gets the list of live documents via
1777         WKBundleGetLiveDocumentURLs() after every test (this allows it to detect the first test
1778         that leaked a document), and keeps them in a map of document identifier to test and live document URL.
1779         Then when it receives the "#CHECK FOR WORLD LEAKS" command, it calls into the bundle to
1780         clear the page and memory caches, runs a GC, then posts a task (in the Document::postTaks() sense)
1781         after which it requests the list of live documents for a final time, excluding any that are loaded
1782         in live Frames (thus omitting the about:blank that will be loaded at this point). Documents in this
1783         list are therefore leaked (or abandoned).
1784         
1785         Future patches will hook up webkitpy reporting for leaked documents.
1786
1787         * DumpRenderTree/mac/DumpRenderTree.mm:
1788         (initializeGlobalsFromCommandLineOptions):
1789         (handleControlCommand):
1790         (runTestingServerLoop):
1791         * DumpRenderTree/win/DumpRenderTree.cpp:
1792         (handleControlCommand):
1793         (main):
1794         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1795         (WTR::postGCTask):
1796         (WTR::InjectedBundle::reportLiveDocuments):
1797         (WTR::InjectedBundle::didReceiveMessageToPage):
1798         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
1799         * WebKitTestRunner/Options.cpp:
1800         (WTR::handleOptionCheckForWorldLeaks):
1801         (WTR::OptionsHandler::OptionsHandler):
1802         * WebKitTestRunner/Options.h:
1803         * WebKitTestRunner/TestController.cpp:
1804         (WTR::AsyncTask::run):
1805         (WTR::AsyncTask::currentTask):
1806         (WTR::TestController::initialize):
1807         (WTR::TestController::ensureViewSupportsOptionsForTest):
1808         (WTR::TestController::resetStateToConsistentValues):
1809         (WTR::TestController::updateLiveDocumentsAfterTest):
1810         (WTR::TestController::checkForWorldLeaks):
1811         (WTR::TestController::findAndDumpWorldLeaks):
1812         (WTR::TestController::willDestroyWebView):
1813         (WTR::parseInputLine):
1814         (WTR::TestController::waitForCompletion):
1815         (WTR::TestController::handleControlCommand):
1816         (WTR::TestController::runTestingServerLoop):
1817         (WTR::TestController::run):
1818         (WTR::TestController::didReceiveLiveDocumentsList):
1819         (WTR::TestController::didReceiveMessageFromInjectedBundle):
1820         * WebKitTestRunner/TestController.h:
1821         (WTR::AsyncTask::AsyncTask):
1822         (WTR::AsyncTask::taskComplete):
1823         (WTR::TestController::AbandonedDocumentInfo::AbandonedDocumentInfo):
1824         * WebKitTestRunner/TestInvocation.cpp:
1825         (WTR::TestInvocation::invoke):
1826         * WebKitTestRunner/TestOptions.h:
1827         (WTR::TestOptions::hasSameInitializationOptions const):
1828
1829 2018-08-27  Alex Christensen  <achristensen@webkit.org>
1830
1831         Fix API test after r235398
1832         https://bugs.webkit.org/show_bug.cgi?id=188997
1833
1834         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
1835         (TestWebKitAPI::setPageLoaderClient):
1836         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
1837         willGoToBackForwardListItem is unused and unsupported.  Removing its check.
1838
1839 2018-08-27  Daniel Bates  <dabates@apple.com>
1840
1841         Partial revert of r235376
1842         https://bugs.webkit.org/show_bug.cgi?id=189011
1843
1844         For now revert the unit tests added in r235376 as the following tests are failing on Apple Sierra
1845         Debug and Apple High Sierra Debug bots:
1846
1847             lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_simple
1848             lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple
1849
1850         Will investigate offline.
1851
1852         * lldb/lldbWebKitTester/main.cpp:
1853         (testSummaryProviders):
1854         * lldb/lldb_webkit_unittest.py:
1855         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
1856         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty): Deleted.
1857         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple): Deleted.
1858         (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Deleted.
1859         (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple): Deleted.
1860
1861 2018-08-27  Aditya Keerthi  <akeerthi@apple.com>
1862
1863         Consolidate ENABLE_INPUT_TYPE_COLOR and ENABLE_INPUT_TYPE_COLOR_POPOVER
1864         https://bugs.webkit.org/show_bug.cgi?id=188931
1865
1866         Reviewed by Wenson Hsieh.
1867
1868         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed ENABLE_INPUT_TYPE_COLOR_POPOVER.
1869
1870 2018-08-27  Justin Fan  <justin_fan@apple.com>
1871
1872         Add Justin Fan to list of WebKit contributors
1873         https://bugs.webkit.org/show_bug.cgi?id=184431
1874
1875         * Scripts/webkitpy/common/config/contributors.json:
1876
1877 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
1878
1879         Convert timeout values in WebKitTestRunner to WTF::Seconds
1880         https://bugs.webkit.org/show_bug.cgi?id=188987
1881
1882         Reviewed by Ryosuke Niwa.
1883         
1884         Replace various 'int' timeout values with WTF::Seconds. The timeout argument
1885         comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
1886         using integers, convert to and from milliseconds.
1887         
1888         Also do some #pragma once, and initializer cleanup.
1889
1890         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1891         (WTR::InjectedBundle::didReceiveMessageToPage):
1892         (WTR::InjectedBundle::beginTesting):
1893         (WTR::InjectedBundle::InjectedBundle): Deleted.
1894         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
1895         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1896         (WTR::TestRunner::timeout):
1897         (WTR::TestRunner::setCustomTimeout):
1898         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
1899         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
1900         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
1901         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
1902         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
1903         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
1904         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
1905         * WebKitTestRunner/TestController.cpp:
1906         (WTR::TestController::TestController):
1907         (WTR::parseInputLine):
1908         (WTR::TestController::runTest):
1909         (WTR::TestController::runUntil):
1910         (WTR::TestController::didReceiveMessageFromInjectedBundle):
1911         * WebKitTestRunner/TestController.h:
1912         * WebKitTestRunner/TestInvocation.cpp:
1913         (WTR::TestInvocation::shortTimeout const):
1914         (WTR::TestInvocation::createTestSettingsDictionary):
1915         * WebKitTestRunner/TestInvocation.h:
1916         * WebKitTestRunner/TestOptions.h:
1917         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
1918         (WTR::TestController::platformRunUntil):
1919         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
1920         (WTR::TestController::platformRunUntil):
1921         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
1922         (WTR::TestController::platformRunUntil):
1923
1924 2018-08-27  Simon Fraser  <simon.fraser@apple.com>
1925
1926         Convert timeout values in WebKitTestRunner to WTF::Seconds
1927         https://bugs.webkit.org/show_bug.cgi?id=188987
1928
1929         Reviewed by Ryosuke Niwa.
1930         
1931         Replace various 'int' timeout values with WTF::Seconds. The timeout argument
1932         comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
1933         using integers, convert to and from milliseconds.
1934         
1935         Also do some #pragma once, and initializer cleanup.
1936
1937         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1938         (WTR::InjectedBundle::didReceiveMessageToPage):
1939         (WTR::InjectedBundle::beginTesting):
1940         (WTR::InjectedBundle::InjectedBundle): Deleted.
1941         * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
1942         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1943         (WTR::TestRunner::timeout):
1944         (WTR::TestRunner::setCustomTimeout):
1945         * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
1946         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
1947         * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
1948         (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
1949         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
1950         * WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
1951         (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
1952         * WebKitTestRunner/TestController.cpp:
1953         (WTR::TestController::TestController):
1954         (WTR::parseInputLine):
1955         (WTR::TestController::runTest):
1956         (WTR::TestController::runUntil):
1957         (WTR::TestController::didReceiveMessageFromInjectedBundle):
1958         * WebKitTestRunner/TestController.h:
1959         * WebKitTestRunner/TestInvocation.cpp:
1960         (WTR::TestInvocation::shortTimeout const):
1961         (WTR::TestInvocation::createTestSettingsDictionary):
1962         * WebKitTestRunner/TestInvocation.h:
1963         * WebKitTestRunner/TestOptions.h:
1964         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
1965         (WTR::TestController::platformRunUntil):
1966         * WebKitTestRunner/gtk/TestControllerGtk.cpp:
1967         (WTR::TestController::platformRunUntil):
1968         * WebKitTestRunner/wpe/TestControllerWPE.cpp:
1969         (WTR::TestController::platformRunUntil):
1970
1971 2018-08-27  Alex Christensen  <achristensen@webkit.org>
1972
1973         REGRESSION(r234985/r234989) WKPageLoadHTMLString with a 16-bit String has the wrong encoding
1974         https://bugs.webkit.org/show_bug.cgi?id=189002
1975
1976         Reviewed by Tim Horton.
1977
1978         * TestWebKitAPI/Tests/WebKit/WillLoad.cpp:
1979         (TestWebKitAPI::TEST_F):
1980
1981 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1982
1983         [Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory
1984         https://bugs.webkit.org/show_bug.cgi?id=188903
1985         <rdar://problem/43702993>
1986
1987         Reviewed by Tim Horton.
1988
1989         Add two API tests and adjust existing WKAttachment API tests. The new tests exercise the following scenarios, in
1990         both iOS and macOS:
1991         •       Dropping a folder as an attachment element, and then moving that attachment element in the document by
1992                 dragging and dropping.
1993         •       Using WKWebView SPI to insert a folder and a file with an unknown extension, and then using more
1994                 _WKAttachment SPI to swap the attachments' backing file wrappers.
1995
1996         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
1997         (runTestWithTemporaryFolder):
1998
1999         Add a helper function to run a test with a new folder path, created in the temporary directory and populated
2000         with some sample content. This folder is deleted after running the test.
2001
2002         (simulateFolderDragWithURL):
2003
2004         Add a helper function to prepare a given DragAndDropSimulator for simulating a dragged folder from a source
2005         external to the web view.
2006
2007         (platformCopyRichTextWithMultipleAttachments):
2008         (platformCopyRichTextWithImage):
2009         (platformCopyPNG):
2010         (TestWebKitAPI::TEST):
2011
2012         Add new API tests, and adjust existing tests to reflect new -setFileWrapper:…: behavior. Specifically,
2013         ChangeAttachmentDataAndFileInformation previously required that changing a _WKAttachment's NSFileWrapper would
2014         preserve the previous NSFileWrapper's preferred name if the new file wrapper does not have a preferred name, but
2015         this quirk is no longer supported.
2016
2017         Also add a few bridging casts for the eventual transition of TestWebKitAPI to ARC.
2018
2019         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
2020
2021         Add a new hook to clear any external drag information on an existing DragAndDropSimulator. This is convenient
2022         when using the same DragAndDropSimulator to perform multiple drags in a single test.
2023
2024         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
2025         (-[DragAndDropSimulator clearExternalDragInformation]):
2026         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
2027         (-[DragAndDropSimulator clearExternalDragInformation]):
2028
2029 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2030
2031         Translate 4 tests using WKPageLoaderClient to ObjC
2032         https://bugs.webkit.org/show_bug.cgi?id=188827
2033
2034         Reviewed by Tim Horton.
2035
2036         They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
2037         Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
2038         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
2039         bundle functionality any more.
2040
2041         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2042         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
2043         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
2044         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
2045         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
2046         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
2047         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
2048         (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
2049         (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
2050         (TestWebKitAPI::TEST):
2051         (): Deleted.
2052         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2053         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
2054         (TestWebKitAPI::setPageLoaderClient): Deleted.
2055         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
2056         (-[ResponsivenessDelegate webView:didFinishNavigation:]):
2057         (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
2058         (TestWebKitAPI::TEST):
2059         (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
2060         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2061         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
2062         (TestWebKitAPI::setInjectedBundleClient): Deleted.
2063         (TestWebKitAPI::setPageLoaderClient): Deleted.
2064         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
2065         (-[SessionStateDelegate webView:didFinishNavigation:]):
2066         (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
2067         (TestWebKitAPI::createSessionStateData):
2068         (TestWebKitAPI::TEST):
2069         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2070         (TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
2071         (TestWebKitAPI::setPageLoaderClient): Deleted.
2072         * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
2073         (-[BackForwardClient webView:didFinishNavigation:]):
2074         (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
2075         (TestWebKitAPI::TEST):
2076         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2077         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
2078         (TestWebKitAPI::setPageLoaderClient): Deleted.
2079
2080 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2081
2082         [Cocoa] "video.html" appears at the top level of the TestWebKitAPI Xcode project
2083         https://bugs.webkit.org/show_bug.cgi?id=188989
2084
2085         Reviewed by Andy Estes.
2086
2087         Move this into the Tests/WebKit/Resources group in the project.
2088
2089         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2090
2091 2018-08-27  Thomas Denney  <tdenney@apple.com>
2092
2093         Avoid an exception in the interactive interpreter
2094         https://bugs.webkit.org/show_bug.cgi?id=188991
2095
2096         Reviewed by Myles C. Maxfield.
2097
2098         * WebGPUShadingLanguageRI/index.html: Corrects a typo in the name of a
2099         local variable
2100
2101 2018-08-27  Thomas Denney  <tdenney@apple.com>
2102
2103         Allow new vector types to work with the interactive interpreter
2104         https://bugs.webkit.org/show_bug.cgi?id=188988
2105
2106         Reviewed by Myles C. Maxfield.
2107
2108         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
2109         (FlattenedStructOffsetGatherer.prototype.visitTypeRef): Do not
2110         unncessarily visit the type arguments of a TypeRef, as by this point
2111         there are none that are relevant.
2112         * WebGPUShadingLanguageRI/Intrinsics.js:
2113         (Intrinsics): Treat VectorType as a primitive type.
2114
2115 2018-08-27  Keith Rollin  <krollin@apple.com>
2116
2117         Build system support for LTO
2118         https://bugs.webkit.org/show_bug.cgi?id=187785
2119         <rdar://problem/42353132>
2120
2121         Reviewed by Dan Bernstein.
2122
2123         Add tools/scripts support for controlling LTO builds.
2124
2125         * Scripts/build-webkit: Add --lto-mode={none,thin,full}.
2126         * Scripts/set-webkit-configuration: Add support for saving LTO
2127         configuration to WebKitBuild/LTO.
2128         * Scripts/webkitdirs.pm: Add support for reading configuration from
2129         WebKitBuild/LTO and providing it to xcodebuild.
2130         (determineLTOMode):
2131         (ltoMode):
2132         (XcodeOptions):
2133
2134 2018-08-27  Daniel Bates  <dabates@apple.com>
2135
2136         lldb-webkit: Pretty-print OptionSet
2137         https://bugs.webkit.org/show_bug.cgi?id=188936
2138
2139         Reviewed by Simon Fraser.
2140
2141         Add LLDB formatters to pretty-print an OptionSet.
2142
2143         * lldb/lldbWebKitTester/main.cpp:
2144         (testSummaryProviders):
2145         * lldb/lldb_webkit.py:
2146         (__lldb_init_module):
2147         (__lldb_init_module.lldb_webkit):
2148         (WTFOptionSet_SummaryProvider):
2149         (WTFOptionSetProvider):
2150         (WTFOptionSetProvider.__init__):
2151         (WTFOptionSetProvider.has_children):
2152         (WTFOptionSetProvider.num_children):
2153         (WTFOptionSetProvider.get_child_index):
2154         (WTFOptionSetProvider.get_child_at_index):
2155         (WTFOptionSetProvider.update):
2156         * lldb/lldb_webkit_unittest.py:
2157         (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
2158         (TestSummaryProviders):
2159         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty):
2160         (TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple):
2161         (TestSummaryProviders.serial_test_WTFOptionSetProvider_empty):
2162         (TestSummaryProviders.serial_test_WTFOptionSetProvider_simple):
2163
2164 2018-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2165
2166         [Attachment Support] [WK2] Images copied from Mail message view paste with the wrong file name in compose
2167         https://bugs.webkit.org/show_bug.cgi?id=188957
2168         <rdar://problem/43737715>
2169
2170         Reviewed by Darin Adler.
2171
2172         Add a new API test to verify that pasting a web archive containing several image elements with alt attributes
2173         generates _WKAttachments whose names reflect those alt attributes.
2174
2175         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2176         (testGIFFileURL):
2177         (testGIFData):
2178         (TestWebKitAPI::TEST):
2179
2180 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2181
2182         Unreviewed, rolling out r235367.
2183
2184         Broke iOS build.
2185
2186         Reverted changeset:
2187
2188         "Translate 4 tests using WKPageLoaderClient to ObjC"
2189         https://bugs.webkit.org/show_bug.cgi?id=188827
2190         https://trac.webkit.org/changeset/235367
2191
2192 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2193
2194         Fix GTK build.
2195
2196         * TestWebKitAPI/CMakeLists.txt:
2197
2198 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2199
2200         Fix iOS build.
2201
2202         * TestWebKitAPI/PlatformWebView.h:
2203
2204 2018-08-27  Alex Christensen  <achristensen@webkit.org>
2205
2206         Translate 4 tests using WKPageLoaderClient to ObjC
2207         https://bugs.webkit.org/show_bug.cgi?id=188827
2208
2209         Reviewed by Tim Horton.
2210
2211         They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
2212         Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
2213         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
2214         bundle functionality any more.
2215
2216         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2217         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
2218         * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
2219         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
2220         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
2221         * TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
2222         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
2223         (-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
2224         (-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
2225         (TestWebKitAPI::TEST):
2226         (): Deleted.
2227         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2228         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
2229         (TestWebKitAPI::setPageLoaderClient): Deleted.
2230         * TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
2231         (-[ResponsivenessDelegate webView:didFinishNavigation:]):
2232         (-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
2233         (TestWebKitAPI::TEST):
2234         (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
2235         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2236         (TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
2237         (TestWebKitAPI::setInjectedBundleClient): Deleted.
2238         (TestWebKitAPI::setPageLoaderClient): Deleted.
2239         * TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
2240         (-[SessionStateDelegate webView:didFinishNavigation:]):
2241         (-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
2242         (TestWebKitAPI::createSessionStateData):
2243         (TestWebKitAPI::TEST):
2244         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2245         (TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
2246         (TestWebKitAPI::setPageLoaderClient): Deleted.
2247         * TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
2248         (-[BackForwardClient webView:didFinishNavigation:]):
2249         (-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
2250         (TestWebKitAPI::TEST):
2251         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2252         (TestWebKitAPI::willGoToBackForwardListItem): Deleted.
2253         (TestWebKitAPI::setPageLoaderClient): Deleted.
2254
2255 2018-08-27  Keith Miller  <keith_miller@apple.com>
2256
2257         test262-runner -s --test-only should replace test results
2258         https://bugs.webkit.org/show_bug.cgi?id=188450
2259
2260         Reviewed by Michael Saboff.
2261
2262         * Scripts/test262/Runner.pm:
2263         (main):
2264         (SetFailureForTest):
2265         (UpdateResults):
2266
2267 2018-08-26  Sam Weinig  <sam@webkit.org>
2268
2269         Using _WKRemoteObjectInterface with a protocol that inherits from a non-NSObject protocol crashes
2270         https://bugs.webkit.org/show_bug.cgi?id=188958
2271
2272         Reviewed by Anders Carlsson.
2273
2274         * TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:
2275         Update test protocol to have inheritance.
2276
2277 2018-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
2278
2279         [Attachment Support] Dropping and pasting images should insert inline image elements with _WKAttachments
2280         https://bugs.webkit.org/show_bug.cgi?id=188933
2281         <rdar://problem/43699724>
2282
2283         Reviewed by Darin Adler.
2284
2285         Rebaseline existing API tests that involve dropping or pasting image files, and additionally write some new
2286         tests. These new tests exercise the following cases:
2287         •       Inserting and removing newlines before an inline image with an attachment element does not cause new
2288                 _WKAttachments to be created and destroyed.
2289         •       Pasting an image, cutting it, and then pasting it again propagates an attachment update to the UI
2290                 process with the original _WKAttachment.
2291         •       A pasted attachment in the document can be moved around by dragging, and doing so does not cause us to
2292                 lose a _WKAttachment.
2293
2294         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2295         (-[TestWKWebView expectElementCount:tagName:]):
2296         (TestWebKitAPI::TEST):
2297
2298         Add the new tests described above, and also adjust existing tests to check that images are dropped or pasted
2299         as image elements, but still have associated attachment elements whose attachment identifiers (observed via
2300         script) match that of the corresponding _WKAttachment's uniqueIdentifier in the UI process.
2301
2302         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
2303         (-[DragAndDropSimulator runFrom:to:]):
2304         (-[DragAndDropSimulator continueDragSession]):
2305         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
2306
2307         Teach DragAndDropSimulator on macOS to wait until the drop has been handled by the web process before returning
2308         execution to the caller. This ensures that tests which involve dropping promised files as attachments aren't
2309         flaky, due to how the promised data is retrieved asynchronously when performing the drop.
2310
2311         (-[DragAndDropSimulator _webView:didPerformDragOperation:]):
2312
2313 2018-08-26  Lucas Forschler  <lforschler@apple.com>
2314
2315         Open svn.webkit.org for commits.
2316
2317 2018-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
2318
2319         Unreviewed test fix after r235249
2320         https://bugs.webkit.org/show_bug.cgi?id=178981
2321
2322         * WebGPUShadingLanguageRI/Test.js:
2323
2324 2018-08-24  Alex Christensen  <achristensen@webkit.org>
2325
2326         Introduce _WKInspector
2327         https://bugs.webkit.org/show_bug.cgi?id=188923
2328         <rdar://problem/34657861>
2329
2330         Reviewed by Brian Burg.
2331
2332         * MiniBrowser/mac/WK2BrowserWindowController.m:
2333         (-[WK2BrowserWindowController validateMenuItem:]):
2334         (-[WK2BrowserWindowController showHideWebInspector:]):
2335
2336 2018-08-24  Jonathan Bedard  <jbedard@apple.com>
2337
2338         Fix handling of iOS minor versions in default_baseline_search_path
2339         https://bugs.webkit.org/show_bug.cgi?id=188902
2340
2341         Reviewed by Aakash Jain.
2342
2343         * Scripts/webkitpy/port/ios.py:
2344         (IOSPort.default_baseline_search_path): When the major version matches the major version of the CURRENT_VERSION, treat
2345         it as a the CURRENT_VERSION.
2346
2347 2018-08-24  Antti Koivisto  <antti@apple.com>
2348
2349         Allow creating WeakPtrs to const objects
2350         https://bugs.webkit.org/show_bug.cgi?id=188785
2351
2352         Reviewed by Geoff Garen.
2353
2354         * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
2355         (TestWebKitAPI::Base::weakPtrFactory const):
2356         (TestWebKitAPI::TEST):
2357         (TestWebKitAPI::Base::weakPtrFactory): Deleted.
2358
2359 2018-08-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2360
2361         [GTK][WPE] Add API to inject/register user content in isolated worlds
2362         https://bugs.webkit.org/show_bug.cgi?id=188883
2363
2364         Reviewed by Michael Catanzaro.
2365
2366         Add test cases for the new API.
2367
2368         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
2369         (isStyleSheetInjectedForURLAtPath):
2370         (isScriptInjectedForURLAtPath):
2371         (testUserContentManagerInjectedStyleSheet):
2372         (testUserContentManagerInjectedScript):
2373         (UserScriptMessageTest::registerHandler):
2374         (UserScriptMessageTest::unregisterHandler):
2375         (UserScriptMessageTest::postMessageAndWaitUntilReceived):
2376         (testUserContentManagerScriptMessageInWorldReceived):
2377         (beforeAll):
2378
2379 2018-08-23  Simon Fraser  <simon.fraser@apple.com>
2380
2381         Add support for dumping GC heap snapshots, and a viewer
2382         https://bugs.webkit.org/show_bug.cgi?id=186416
2383
2384         Reviewed by Joseph Pecoraro.
2385
2386         Add a viewer for GC heap snapshots. A snapshot JSON file can be dragged into this
2387         page for inspection (or set via the 'filename' URL parameter).
2388
2389         For now, this page shows all objects, all roots, and the shortest path from a root
2390         to all HTMLDocuments and Windows.
2391
2392         * GCHeapInspector/gc-heap-inspector.html: Added.
2393         * GCHeapInspector/heap-analysis/HeapSnapshot.js: Copied from Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js.
2394         * GCHeapInspector/script/interface.js: Added.
2395
2396 2018-08-23  Alex Christensen  <achristensen@webkit.org>
2397
2398         Add new _webViewRequestPointerLock SPI with a completionHandler
2399         https://bugs.webkit.org/show_bug.cgi?id=188907
2400         <rdar://problem/35871109>
2401
2402         Reviewed by Andy Estes.
2403
2404         * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
2405         (-[PointerLockDelegate _webViewRequestPointerLock:completionHandler:]):
2406         (-[PointerLockDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
2407         (TEST):
2408
2409 2018-08-23  David Fenton  <david_fenton@apple.com>
2410
2411         Unreviewed, rolling out r235129.
2412
2413         broke internal builds
2414
2415         Reverted changeset:
2416
2417         "Allow creating WeakPtrs to const objects"
2418         https://bugs.webkit.org/show_bug.cgi?id=188785
2419         https://trac.webkit.org/changeset/235129
2420
2421 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
2422
2423         API tests should output json results
2424         https://bugs.webkit.org/show_bug.cgi?id=188869
2425         <rdar://problem/43615652>
2426
2427         Reviewed by Aakash Jain.
2428
2429         JSON output for API tests is of the form:
2430             {
2431                 "Failed": [{"name": <test name>, "output": <test log>}],
2432                 "Timedout": [...],
2433                 "Skipped": [...],
2434                 "Crashed": [...]
2435             }
2436         Tests which are successful are not displayed in the json output.
2437
2438         * Scripts/webkitpy/api_tests/manager.py:
2439         (Manager.run): Print test results to provided file as a json dictionary.
2440         * Scripts/webkitpy/api_tests/run_api_tests.py:
2441         (run): Pass json option.
2442         (parse_args): Add --json-output flag.
2443
2444 2018-08-23  Andy Estes  <aestes@apple.com>
2445
2446         [Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave
2447         https://bugs.webkit.org/show_bug.cgi?id=188829
2448
2449         Reviewed by Tim Horton.
2450
2451         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2452
2453 2018-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
2454
2455         [WSL] Ternary expressions appear to be unimplemented
2456         https://bugs.webkit.org/show_bug.cgi?id=178981
2457
2458         Reviewed by Saam Barati.
2459
2460         Implement ternary statements. These can be both lvalues and rvalues. (a ? b : c ? d : e)
2461         is parsed as (a ? b : (c ? d : e)).
2462
2463         * WebGPUShadingLanguageRI/All.js:
2464         * WebGPUShadingLanguageRI/Checker.js:
2465         (Checker.prototype.visitTernaryExpression):
2466         * WebGPUShadingLanguageRI/Evaluator.js:
2467         (Evaluator.prototype.visitTernaryExpression):
2468         * WebGPUShadingLanguageRI/NormalUsePropertyResolver.js:
2469         (NormalUsePropertyResolver.prototype.visitTernaryExpression):
2470         (NormalUsePropertyResolver):
2471         * WebGPUShadingLanguageRI/Parse.js:
2472         (parsePossibleTernaryConditional):
2473         * WebGPUShadingLanguageRI/PropertyResolver.js:
2474         (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder.prototype.visitTernaryExpression):
2475         (PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder):
2476         (PropertyResolver.prototype._visitRValuesWithinLValue):
2477         * WebGPUShadingLanguageRI/Rewriter.js:
2478         (Rewriter.prototype.visitTernaryExpression):
2479         * WebGPUShadingLanguageRI/SPIRV.html:
2480         * WebGPUShadingLanguageRI/Test.html:
2481         * WebGPUShadingLanguageRI/Test.js:
2482         * WebGPUShadingLanguageRI/Visitor.js:
2483         (Visitor.prototype.visitProtocolDecl):
2484         * WebGPUShadingLanguageRI/index.html:
2485
2486 2018-08-22  Ryosuke Niwa  <rniwa@webkit.org>
2487
2488         Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated
2489         https://bugs.webkit.org/show_bug.cgi?id=188880
2490
2491         Reviewed by Saam Barati.
2492
2493         Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess
2494         were asynchronously terminating respective processes. Do so synchronously so that we can deterministically
2495         test WebKit's behavior in layout tests.
2496
2497         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2498         (WTR::TestRunner::terminateNetworkProcess):
2499         (WTR::TestRunner::terminateServiceWorkerProcess):
2500         (WTR::TestRunner::terminateStorageProcess):
2501         * WebKitTestRunner/TestInvocation.cpp:
2502         (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
2503         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2504
2505 2018-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
2506
2507         [WHLSL] Allow native types to have type arguments (like "vector<float, 4>")
2508         https://bugs.webkit.org/show_bug.cgi?id=188773
2509
2510         Reviewed by Filip Pizlo.
2511
2512         Before this patch, it was impossible to represent "native typedef vector<float, 4>" because NativeTypes couldn't have
2513         typeArguments.
2514
2515         Previously, the way to identify a type was strictly by name, which was represented by a string. Therefore, when something like
2516         "vector<int, 3>" was parsed, it would produce a TypeRef with the name "vector" and typeArguments [TypeRef, IntLiteral]. Then,
2517         there was a pass to convert the TypeRef to have the name "int3" and no typeArguments. After this transformation, each type could
2518         be uniquely identified by name. That name was then matched to the string-only NativeType name.
2519
2520         This is okay for vectors and matrices, but it is unfortunate for textures (e.g. Texture2D<float4>) because they don't have any
2521         natural string-only name. In addition, the canonicalization would have to be made aware of the fact that Texture2D<float4> is
2522         the same as Texture2D<vector<float, 4>>. Similarly, an author may wish to typedef float4 to a different name.
2523
2524         It would be possible to mangle the names of the texture types to something unique, but then we lose information about the inner
2525         type. For example, if we did this, Visitor wouldn't recurse into the float4 when encountering Texture2D<float4> because that
2526         information would be lost. This could potentially make operations like programWithUnnecessaryThingsRemoved() more difficult to
2527         implement in the future.
2528
2529         So, it would be better to have each type uniquely identified by (name, typeArguments). TypeRef will therefore also have
2530         typeArguments which are used to determine which type it is referencing. After this analysis is done to determine what each
2531         TypeRef is referencing, subsequent passes shouldn't care about the typeArguments and should only care about the .type field
2532         which had been set - this was true even before this patch.
2533
2534         This means that NameContext has to aggregate types that accept typeArguments into arrays, where each array holds all the Types
2535         that have the same name but different typeArguments. Then, when we need to match a TypeRef with a Type, we can ask the
2536         NameContext for the appropriate array. This is the same way that function resolution works.
2537
2538         We can use Node.unify() to determine whether a TypeRef matches a NativeType. Eventually, this will go away, but for now, this is
2539         an okay start. This works just about the same way that function overload resolution works. 
2540
2541         * WebGPUShadingLanguageRI/All.js:
2542         * WebGPUShadingLanguageRI/CallExpression.js:
2543         (CallExpression.prototype.resolve):
2544         * WebGPUShadingLanguageRI/CheckTypesWithArguments.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js. After types
2545         have been resolved, there should be no TypeRefs with name "vector" that don't have type arguments. This is just a sanity check.
2546         (checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
2547         (checkTypesWithArguments.TypeWithArgumentsChecker):
2548         (checkTypesWithArguments):
2549         * WebGPUShadingLanguageRI/Checker.js:
2550         (Checker.prototype.visitProgram): Program.types mirrors NameContext: it's a Map that maps strings to types. Because types with
2551         typeArguments share names, this has to be updated to map strings to arrays for these types.
2552         (Checker.prototype.visitTypeRef):
2553         * WebGPUShadingLanguageRI/InferTypesForCall.js:
2554         (inferTypesForCall): Don't know why this was here.
2555         (inferTypesForTypeArguments): Same as inferTypesForCall, but this one is for matching type arguments.
2556         * WebGPUShadingLanguageRI/Intrinsics.js: Adding the types. This patch also adds some scalar types like half, char, etc, but they
2557         don't have any functions which accept them. Those will be tested in my next patch which adds math functions for these types. This
2558         moves in the direction of matching the standard library in the spec.
2559         (Intrinsics.cast):
2560         (Intrinsics.bitwiseCast):
2561         (Intrinsics.castToHalf):
2562         (Intrinsics.):
2563         (Intrinsics):
2564         * WebGPUShadingLanguageRI/NameContext.js: Aggregate types with typeArguments into arrays.
2565         (NameContext.prototype.add):
2566         (NameContext.prototype.get let):
2567         (NameContext.underlyingThings.prototype.else):
2568         (NameContext.prototype.Symbol.iterator):
2569         (NameContext):
2570         * WebGPUShadingLanguageRI/NameResolver.js:
2571         (NameResolver.prototype.visitTypeRef): Call TypeRef.resolve().
2572         (NameResolver.prototype.visitCallExpression):
2573         (NameResolver):
2574         (NameResolver.prototype.visitVectorType): Deleted.
2575         * WebGPUShadingLanguageRI/NativeType.js: NativeTypes can have type arguments now.
2576         (NativeType):
2577         (NativeType.prototype.get typeArguments):
2578         (NativeType.prototype.toString):
2579         (NativeType.create):
2580         * WebGPUShadingLanguageRI/Prepare.js:
2581         (let.prepare):
2582         * WebGPUShadingLanguageRI/Program.js: Update to work with types aggregated into arrays.
2583         (Program.prototype.add):
2584         (Program.prototype.toString):
2585         (Program):
2586         * WebGPUShadingLanguageRI/RemoveTypeArguments.js: Removed.
2587         * WebGPUShadingLanguageRI/ResolveNames.js: Update to work with types aggregated into arrays.
2588         (resolveNamesInTypes):
2589         * WebGPUShadingLanguageRI/ResolveOverloadImpl.js: Resolve the type overload for types with typeArguments.
2590         * WebGPUShadingLanguageRI/ResolveTypeDefs.js: Update to work with types aggregated into arrays.
2591         (resolveTypeDefsInTypes):
2592         * WebGPUShadingLanguageRI/Rewriter.js: TypeRefs and Native/Vector types can have typeArguments.
2593         (Rewriter.prototype.visitTypeRef):
2594         (Rewriter.prototype.visitVectorType):
2595         (Rewriter):
2596         * WebGPUShadingLanguageRI/SPIRV.html:
2597         * WebGPUShadingLanguageRI/StandardLibrary.js: Matches Intrinsics.
2598         (bool.operator):
2599         * WebGPUShadingLanguageRI/StatementCloner.js: Native types can have typeArguments.
2600         (StatementCloner.prototype.visitNativeType):
2601         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Vector types need constructors too.
2602         (synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitVectorType):
2603         (synthesizeDefaultConstructorOperator.FindAllTypes):
2604         (synthesizeDefaultConstructorOperator):
2605         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: No reason to distinguish between wrapping and instantiating a TypeRef.
2606         (synthesizeStructAccessors.createTypeRef):
2607         * WebGPUShadingLanguageRI/Test.html:
2608         * WebGPUShadingLanguageRI/Test.js:
2609         * WebGPUShadingLanguageRI/TypeOverloadResolutionFailure.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js.
2610         (TypeOverloadResolutionFailure):
2611         (TypeOverloadResolutionFailure.prototype.get type):
2612         (TypeOverloadResolutionFailure.prototype.get reason):
2613         (TypeOverloadResolutionFailure.prototype.toString):
2614         * WebGPUShadingLanguageRI/TypeRef.js:
2615         (TypeRef.wrap):
2616         (TypeRef.prototype.resolve): Figure out which item in the possibleOverloads array matches this.
2617         (TypeRef.prototype.toString):
2618         (TypeRef):
2619         (TypeRef.instantiate): Deleted.
2620         * WebGPUShadingLanguageRI/UnificationContext.js: We need to give literals a chance to assume their preferred type. This
2621         adds this facility back into the compiler (it was previously deleted).
2622         (UnificationContext.prototype.verify):
2623         * WebGPUShadingLanguageRI/VectorType.js: Vector types have type arguments.
2624         (VectorType):
2625         (VectorType.prototype.get elementType):
2626         (VectorType.prototype.get numElements):
2627         (VectorType.prototype.get numElementsValue):
2628         (VectorType.prototype.toString):
2629         * WebGPUShadingLanguageRI/Visitor.js: Iterate over the typeArguments.
2630         (Visitor.prototype.visitTypeRef):
2631         (Visitor.prototype.visitNativeType):
2632         (Visitor.prototype.visitVectorType):
2633         (Visitor):
2634         * WebGPUShadingLanguageRI/index.html:
2635
2636 2018-08-23  Wenson Hsieh  <wenson_hsieh@apple.com>
2637
2638         [Attachment Support] Attachment elements don't appear in drag images on macOS
2639         https://bugs.webkit.org/show_bug.cgi?id=188823
2640         <rdar://problem/43616378>
2641
2642         Reviewed by Tim Horton.
2643
2644         Adjusts a couple of existing tests to additionally verify that the drag image generated when dragging an
2645         attachment element in macOS is not completely transparent.
2646
2647         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2648         (isCompletelyTransparent):
2649         (TestWebKitAPI::TEST):
2650
2651 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
2652
2653         Explain test name matching in run-api-tests help
2654         https://bugs.webkit.org/show_bug.cgi?id=188280
2655
2656         Reviewed by Ryosuke Niwa.
2657
2658         Improve the run-api-tests help message to explain how test
2659         name matching works.
2660
2661         * Scripts/webkitpy/api_tests/run_api_tests.py:
2662         (parse_args):
2663         * Scripts/webkitpy/port/base.py:
2664         (Port):
2665         (Port.path_to_api_test_binaries): Make binary names a globally accessible array.
2666         * Scripts/webkitpy/port/win.py:
2667         (WinPort):
2668         (WinPort.path_to_api_test_binaries): Ditto.
2669
2670 2018-08-23  Youenn Fablet  <youenn@apple.com>
2671
2672         Use "wpt serve" to launch WPT server
2673         https://bugs.webkit.org/show_bug.cgi?id=188848
2674
2675         Reviewed by Ryosuke Niwa.
2676
2677         Use "wpt serve" provided by WPT instead of using our custom launcher.
2678         This simplifies things and will avoid future breakage.
2679         Further simplify web_platform_test_server.py by removing no longer needed actions.
2680         - Do not copy files but use alias
2681         - Do not kill main pid, which leaves subprocesses alive, use interrupt instead.
2682         - Stop enumerating subprocess pids.
2683
2684         * Scripts/webkitpy/common/system/executive_mock.py:
2685         (MockExecutive.interrupt):
2686         * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py: Removed.
2687         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
2688         (WebPlatformTestServer.__init__):
2689         (WebPlatformTestServer.ports_to_forward):
2690         (WebPlatformTestServer._prepare_config):
2691         (WebPlatformTestServer._spawn_process):
2692         (WebPlatformTestServer._stop_running_server):
2693
2694 2018-08-23  Jonathan Bedard  <jbedard@apple.com>
2695
2696         run-api-tests: Add --webkit-only, --webcore-only and --webkit-legacy-only options to run WebKit, WebCore and WebKitLegacy tests 
2697         https://bugs.webkit.org/show_bug.cgi?id=188262
2698
2699         Reviewed by Ryosuke Niwa.
2700
2701         * Scripts/webkitpy/api_tests/run_api_tests.py:
2702         (parse_args):
2703
2704 2018-08-22  Wenson Hsieh  <wenson_hsieh@apple.com>
2705
2706         [Attachment Support] Support dragging attachment elements out as files on macOS
2707         https://bugs.webkit.org/show_bug.cgi?id=181294
2708         <rdar://problem/36298801>
2709
2710         Reviewed by Tim Horton.
2711
2712         Add DragAndDropSimulator support for intercepting calls to -beginDraggingSessionWithitems:event:source:. This
2713         enables us to write API tests for macOS that exercise the attachment SPI in combination with dragging attachment
2714         elements.
2715
2716         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2717         (-[TestWKWebView attachmentElementMidPoint]):
2718
2719         Add a helper method local to this test suite that grabs the midpoint (in client coordinates) or the first
2720         attachment element in the document.
2721
2722         (TestWebKitAPI::TEST):
2723
2724         Add a new API test to verify that dragging an attachment element on macOS produces file providers which may be
2725         used to write attachment data to a path on disk. Additionally, refactor an existing API test,
2726         MoveAttachmentElementAsIconByDragging, so that it runs on both iOS and macOS, to test the ability to move
2727         attachment elements around in a document by using drag and drop.
2728
2729         * TestWebKitAPI/cocoa/DragAndDropSimulator.h:
2730         * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
2731         (-[DragAndDropTestWKWebView beginDraggingSessionWithItems:event:source:]):
2732         (-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
2733         (-[DragAndDropSimulator dealloc]):
2734         (-[DragAndDropSimulator runFrom:to:]):
2735         (-[DragAndDropSimulator beginDraggingSessionInWebView:withItems:source:]):
2736
2737         Begin a drag session and kick off the -continueDragSession loop. Unlike -performDragInWebView:…, which spins
2738         the main runloop until dragging ends, this version returns execution to the web view and schedules dragging
2739         updates asynchronously. This matches AppKit behavior.
2740
2741         (-[DragAndDropSimulator continueDragSession]):
2742
2743         Increment the dragging progress amount, send a drag update to the web view, and continue scheduling calls to
2744         itself until the progress reaches 1.
2745
2746         (-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
2747         (-[DragAndDropSimulator initializeDraggingInfo:dragImage:source:]):
2748
2749         Pull out common logic for creating a new TestDraggingInfo after starting a drag.
2750
2751         (-[DragAndDropSimulator insertedAttachments]):
2752         (-[DragAndDropSimulator removedAttachments]):
2753         (-[DragAndDropSimulator draggingSession]):
2754         (-[DragAndDropSimulator receivePromisedFiles]):
2755
2756         Helper method to save promised files written to the pasteboard after a drag to the temporary directory. These
2757         files are tracked by DragAndDropSimulator and automatically cleaned up after the test finishes.
2758
2759         (-[DragAndDropSimulator endDataTransfer]):
2760
2761         Add a method stub on macOS, so that MoveAttachmentElementAsIconByDragging can be made cross-platform.
2762
2763         (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
2764         (-[DragAndDropSimulator _webView:didRemoveAttachment:]):
2765
2766         Implement method stubs to keep track of inserted or removed attachments while simulating a drag.
2767
2768 2018-08-22  Aditya Keerthi  <akeerthi@apple.com>
2769
2770         [iOS] Add support for the inputmode attribute
2771         https://bugs.webkit.org/show_bug.cgi?id=183621
2772
2773         Reviewed by Tim Horton.
2774
2775         Added an API test to verify that the correct UIKeyboardType is set depending on
2776         the type, inputmode, and pattern specified for an input field.
2777
2778         * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
2779         (TestWebKitAPI::TEST):
2780         * TestWebKitAPI/ios/UIKitSPI.h:
2781
2782 2018-08-22  Alex Christensen  <achristensen@webkit.org>
2783
2784         Fix API test on Sierra after r235139
2785         https://bugs.webkit.org/show_bug.cgi?id=188810
2786
2787         * TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
2788         (TEST):
2789
2790 2018-08-22  David Kilzer  <ddkilzer@apple.com>
2791
2792         Move files in WebCore project to match Xcode folder structure
2793         <https://webkit.org/b/188851>
2794
2795         Reviewed by Tim Horton.
2796
2797         * Scripts/extract-localizable-strings:
2798         * Scripts/update-webkit-localizable-strings:
2799         - Update to match new location of extract-localizable-strings.pl.
2800
2801 2018-08-21  Alex Christensen  <achristensen@webkit.org>
2802
2803         Roll out r235139 and r235146
2804         https://bugs.webkit.org/show_bug.cgi?id=188805
2805
2806         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2807         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
2808
2809 2018-08-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2810
2811         [Attachment Support] Remove _WKAttachments and notify the UI client upon mainframe navigation
2812         https://bugs.webkit.org/show_bug.cgi?id=188715
2813         <rdar://problem/43541790>
2814
2815         Reviewed by Tim Horton.
2816
2817         Adds API tests to exercises cases where (1) the UI client is notified of attachment removal upon mainframe
2818         navigation, and (2) the UI client is notified of attachment removal upon web content process termination.
2819
2820         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2821         (TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentUpdates):
2822         (TestWebKitAPI::TEST):
2823
2824 2018-08-21  Alex Christensen  <achristensen@webkit.org>
2825
2826         Transition ResizeReversePaginatedWebView API test from WKPageLoaderClient to WKPageNavigationClient
2827         https://bugs.webkit.org/show_bug.cgi?id=188821
2828
2829         Reviewed by Simon Fraser.
2830
2831         * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:
2832         (TestWebKitAPI::didLayout):
2833         (TestWebKitAPI::TEST):
2834
2835 2018-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
2836
2837         [WHLSL] Call expressions shouldn't have type arguments
2838         https://bugs.webkit.org/show_bug.cgi?id=188770
2839
2840         Reviewed by Filip Pizlo.
2841
2842         Call expressions only had type arguments for casts, becuase native types can have type arguments.
2843         However, instead of putting those type arguments on the CallExpression, we should parse the casted
2844         type as a real type and not as an identifier, which puts the type arguments in the TypeRef.
2845
2846         Test: casts
2847
2848         * WebGPUShadingLanguageRI/CallExpression.js:
2849         (CallExpression):
2850         (CallExpression.prototype.get name):
2851         (CallExpression.resolve):
2852         (CallExpression.prototype.get typeArguments): Deleted.
2853         (CallExpression.prototype.becomeCast): Deleted.
2854         * WebGPUShadingLanguageRI/NameResolver.js:
2855         (NameResolver.prototype.visitCallExpression):
2856         * WebGPUShadingLanguageRI/Parse.js:
2857         (parseConstexpr):
2858         (parseTypeDef):
2859         (parseLeftOperatorCall):
2860         (parseCallExpression.let.parseArguments):
2861         (parsePossiblePrefix):
2862         (parsePossibleRelationalEquality):
2863         (parseLeftLogicalExpression):
2864         (parseIfStatement):
2865         (parseWhile):
2866         (parseFor):
2867         (parseDo):
2868         * WebGPUShadingLanguageRI/RemoveTypeArguments.js:
2869         * WebGPUShadingLanguageRI/Rewriter.js:
2870         (Rewriter.prototype.visitCallExpression):
2871
2872 2018-08-21  Alex Christensen  <achristensen@webkit.org>
2873
2874         Translate WebKit.LimitTitleSize API test into ObjC
2875         https://bugs.webkit.org/show_bug.cgi?id=188810
2876
2877         Reviewed by Andy Estes.
2878
2879         It uses WKPageLoaderClient.didReceiveTitleForFrame which has been replaced by KVO.
2880         I'm translating the test into ObjC rather than introducing a new callback to WKPageNavigationClient.
2881
2882         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2883         * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp: Removed.
2884         * TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
2885         (TEST):
2886         (-[LimitTitleSizeTestObserver observeValueForKeyPath:ofObject:change:context:]):
2887         (TestWebKitAPI::TEST): Deleted.
2888
2889 2018-08-21  Alex Christensen  <achristensen@webkit.org>
2890
2891         Remove unused shouldKeepCurrentBackForwardListItemInList check
2892         https://bugs.webkit.org/show_bug.cgi?id=188805
2893
2894         Reviewed by Andy Estes.
2895
2896         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2897         * TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: Removed.
2898
2899 2018-08-21  Alex Christensen  <achristensen@webkit.org>
2900
2901         Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
2902         https://bugs.webkit.org/show_bug.cgi?id=188813
2903
2904         Reviewed by Andy Estes.
2905
2906         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp:
2907         (TestWebKitAPI::didLayout):
2908         (TestWebKitAPI::setPageLoaderClient):
2909         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
2910         (TestWebKitAPI::didFinishNavigation):
2911         (TestWebKitAPI::didLayout):
2912         (TestWebKitAPI::setPageLoaderClient):
2913         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
2914         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp:
2915         (TestWebKitAPI::didLayout):
2916         (TestWebKitAPI::setPageLoaderClient):
2917
2918 2018-08-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2919
2920         [Attachment Support] Augment _WKAttachment SPI to handle NSFileWrappers in addition to NSData
2921         https://bugs.webkit.org/show_bug.cgi?id=188496
2922         <rdar://problem/43216836>
2923
2924         Reviewed by Tim Horton.
2925
2926         Adjusts existing attachment API tests. See below for more detail.
2927
2928         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2929         (-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
2930         (-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
2931         (-[_WKAttachment synchronouslySetData:newContentType:newFilename:error:]):
2932         (-[_WKAttachment synchronouslySetFileWrapper:newContentType:error:]):
2933
2934         Move off of deprecated attachment SPI, and add new helper functions to synchronously insert a new attachment or
2935         update an existing attachment with a file wrapper.
2936
2937         (-[_WKAttachment expectRequestedDataToBe:]):
2938         (TestWebKitAPI::TEST):
2939
2940         Add a new test to verify that file-URL-backed NSFileWrappers can be used to insert and update attachment data.
2941         Also augment an existing test to check that an attachment element which has been copied and pasted within the
2942         same document has a different _WKAttachment wrapper object than its duplicate, but both _WKAttachments are
2943         backed by the same NSFileWrapper that was originally used to insert the attachment.
2944
2945         Additionally, add another macOS test to verify that dropping promised files in an attachment-element-enabled
2946         editable area inserts attachment elements into the document and notifies the UI client with the inserted
2947         attachment data.
2948
2949         (-[_WKAttachment synchronouslyRequestInfo:]): Deleted.
2950         (-[_WKAttachment synchronouslyRequestData:]): Deleted.
2951         * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
2952         (-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
2953
2954         Move off of -_webView:didInsertAttachment:.
2955
2956         (-[DragAndDropSimulator _webView:didInsertAttachment:]): Deleted.
2957
2958 2018-08-21  David Kilzer  <ddkilzer@apple.com>
2959
2960         sort-Xcode-project-file: top-level files and folders are sorted unintentionally when `mainGroup` has no name
2961         <https://webkit.org/b/188755>
2962
2963         Reviewed by Andy Estes.
2964
2965         * Scripts/sort-Xcode-project-file: Fix regular expression to
2966         make `mainGroup` name optional.
2967
2968 2018-08-21  Andy VanWagoner  <andy@vanwagoner.family>
2969
2970         Unreviewed, add myself to committers list.
2971
2972         * Scripts/webkitpy/common/config/contributors.json:
2973
2974 2018-08-21  Antti Koivisto  <antti@apple.com>
2975
2976         Allow creating WeakPtrs to const objects
2977         https://bugs.webkit.org/show_bug.cgi?id=188785
2978
2979         Reviewed by Geoffrey Garen.
2980
2981         * TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
2982         (TestWebKitAPI::Base::weakPtrFactory const):
2983         (TestWebKitAPI::TEST):
2984         (TestWebKitAPI::Base::weakPtrFactory): Deleted.
2985
2986 2018-08-21  Per Arne Vollan  <pvollan@apple.com>
2987
2988         [WebGL] Contexts are not updated when display configuration changed.
2989         https://bugs.webkit.org/show_bug.cgi?id=188750
2990
2991         Reviewed by Brent Fulgham.
2992
2993         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
2994         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2995         (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting):
2996         * WebKitTestRunner/InjectedBundle/TestRunner.h:
2997         * WebKitTestRunner/TestController.cpp:
2998         (WTR::TestController::sendDisplayConfigurationChangedMessageForTesting):
2999         * WebKitTestRunner/TestController.h:
3000         * WebKitTestRunner/TestInvocation.cpp:
3001         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
3002
3003 2018-08-21  John Wilander  <wilander@apple.com>
3004
3005         Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
3006         https://bugs.webkit.org/show_bug.cgi?id=188757
3007         <rdar://problem/38713390>
3008
3009         Reviewed by Alex Christensen.
3010
3011         These changes add the new WebKitTestRunner function
3012         isStatisticsRegisteredAsSubresourceUnder().
3013
3014         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
3015         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
3016         (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
3017         * WebKitTestRunner/InjectedBundle/TestRunner.h:
3018         * WebKitTestRunner/TestController.cpp:
3019         (WTR::TestController::isStatisticsRegisteredAsSubresourceUnder):
3020         * WebKitTestRunner/TestController.h:
3021         * WebKitTestRunner/TestInvocation.cpp:
3022         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
3023
3024 2018-08-21  Alex Christensen  <achristensen@webkit.org>
3025
3026         Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
3027         https://bugs.webkit.org/show_bug.cgi?id=188797
3028
3029         Reviewed by Tim Horton.
3030
3031         * TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp:
3032         (TestWebKitAPI::didFinishNavigation):
3033         (TestWebKitAPI::TEST):
3034         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3035         * TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp:
3036         (TestWebKitAPI::didSameDocumentNavigation):
3037         (TestWebKitAPI::TEST):
3038         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
3039         * TestWebKitAPI/Tests/WebKit/FailedLoad.cpp:
3040         (TestWebKitAPI::didFailProvisionalNavigation):
3041         (TestWebKitAPI::TEST):
3042         (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
3043         * TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp:
3044         (TestWebKitAPI::didStartProvisionalNavigation):
3045         (TestWebKitAPI::didCommitNavigation):
3046         (TestWebKitAPI::didFinishNavigation):
3047         (TestWebKitAPI::TEST):
3048         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
3049         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
3050         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3051         * TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp:
3052         (TestWebKitAPI::didStartProvisionalNavigation):
3053         (TestWebKitAPI::didCommitNavigation):
3054         (TestWebKitAPI::didFinishNavigation):
3055         (TestWebKitAPI::TEST):
3056         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
3057         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
3058         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3059         * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
3060         (TestWebKitAPI::renderingProgressDidChange):
3061         (TestWebKitAPI::TEST):
3062         (TestWebKitAPI::didLayout): Deleted.
3063         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp:
3064         (TestWebKitAPI::didFinishNavigation):
3065         (TestWebKitAPI::renderingProgressDidChange):
3066         (TestWebKitAPI::setPageLoaderClient):
3067         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3068         (TestWebKitAPI::didLayout): Deleted.
3069         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
3070         (TestWebKitAPI::State::State):
3071         (TestWebKitAPI::didStartProvisionalNavigation):
3072         (TestWebKitAPI::didCommitNavigation):
3073         (TestWebKitAPI::didFinishNavigation):
3074         (TestWebKitAPI::decidePolicyForNavigationAction):
3075         (TestWebKitAPI::decidePolicyForResponse):
3076         (TestWebKitAPI::TEST):
3077         (TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
3078         (TestWebKitAPI::didCommitLoadForFrame): Deleted.
3079         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3080         (TestWebKitAPI::decidePolicyForNewWindowAction): Deleted.
3081         * TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp:
3082         (TestWebKitAPI::didSameDocumentNavigation):
3083         (TestWebKitAPI::TEST):
3084         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3085         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
3086         * TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
3087         (TestWebKitAPI::TEST):
3088         (TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
3089         * TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:
3090         (TestWebKitAPI::didFinishLoad):
3091         (TestWebKitAPI::TEST):
3092         * TestWebKitAPI/Tests/WebKit/WKBundleFileHandle.cpp:
3093         (TestWebKitAPI::didFinishNavigation):
3094         (TestWebKitAPI::TEST):
3095         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3096         * TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm:
3097         (TestWebKitAPI::didFinishLoad):
3098         (TestWebKitAPI::TEST):
3099         * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
3100         (WebKit2_CommandBackForwardTestWKView::SetUp):
3101         (WebKit2_CommandBackForwardTestWKView::didFinishLoadForFrame): Deleted.
3102
3103 2018-08-20  Alex Christensen  <achristensen@webkit.org>
3104
3105         Replace WKPageLoaderClient with WKPageNavigationClient in many API tests
3106         https://bugs.webkit.org/show_bug.cgi?id=188771
3107
3108         Reviewed by Tim Horton.
3109
3110         * TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp:
3111         (TestWebKitAPI::didFinishNavigation):
3112         (TestWebKitAPI::TEST):
3113         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3114         * TestWebKitAPI/Tests/WebKit/CookieManager.cpp:
3115         (TestWebKitAPI::didFinishNavigation):
3116         (TestWebKitAPI::TEST):
3117         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3118         * TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm:
3119         (TestWebKitAPI::didFinishNavigation):
3120         (TestWebKitAPI::setPageLoaderClient):
3121         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3122         * TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp:
3123         (TestWebKitAPI::TEST):
3124         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3125         * TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp:
3126         (TestWebKitAPI::didFinishNavigation):
3127         (TestWebKitAPI::setPageLoaderClient):
3128         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3129         * TestWebKitAPI/Tests/WebKit/EventModifiers.cpp:
3130         (TestWebKitAPI::didFinishNavigation):
3131         (TestWebKitAPI::setClients):
3132         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3133         * TestWebKitAPI/Tests/WebKit/Find.cpp:
3134         (TestWebKitAPI::didFinishNavigation):
3135         (TestWebKitAPI::TEST):
3136         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3137         * TestWebKitAPI/Tests/WebKit/FindMatches.mm:
3138         (TestWebKitAPI::didFinishNavigation):
3139         (TestWebKitAPI::TEST):
3140         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3141         * TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp:
3142         (TestWebKitAPI::didFinishNavigation):
3143         (TestWebKitAPI::TEST):
3144         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3145         * TestWebKitAPI/Tests/WebKit/FrameHandle.cpp:
3146         (TestWebKitAPI::didFinishNavigation):
3147         (TestWebKitAPI::TEST):
3148         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3149         * TestWebKitAPI/Tests/WebKit/Geolocation.cpp:
3150         (TestWebKitAPI::didFinishNavigation):
3151         (TestWebKitAPI::TEST):
3152         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3153         * TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp:
3154         (TestWebKitAPI::didFinishNavigation):
3155         (TestWebKitAPI::setPageLoaderClient):
3156         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3157         * TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp:
3158         (TestWebKitAPI::didFinishNavigation):
3159         (TestWebKitAPI::TEST):
3160         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3161         * TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp:
3162         (TestWebKitAPI::didFinishLoadForFrame):
3163         * TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp:
3164         (TestWebKitAPI::didFinishNavigation):
3165         (TestWebKitAPI::loadAlternateHTMLString):
3166         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3167         * TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp:
3168         (TestWebKitAPI::didFinishNavigation):
3169         (TestWebKitAPI::TEST):
3170         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3171         * TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp:
3172         (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):
3173         (TestWebKitAPI::didFinishLoad):
3174         * TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp:
3175         (TestWebKitAPI::didFinishNavigation):
3176         (TestWebKitAPI::setPageLoaderClient):
3177         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3178         * TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp:
3179         (TestWebKitAPI::didFinishNavigation):
3180         (TestWebKitAPI::setPageLoaderClient):
3181         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3182         * TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
3183         (TestWebKitAPI::didFinishLoadForFrame):
3184         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
3185         (TestWebKitAPI::TEST):
3186         * TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp:
3187         (TestWebKitAPI::TEST):
3188         * TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp:
3189         (TestWebKitAPI::didFinishLoad):
3190         (TestWebKitAPI::TEST):
3191         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
3192         (TestWebKitAPI::didFinishNavigation):
3193         (TestWebKitAPI::setPageLoaderClient):
3194         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3195         * TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp:
3196         (TestWebKitAPI::didFinishNavigation):
3197         (TestWebKitAPI::setPageLoaderClient):
3198         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3199         * TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp:
3200         (TestWebKitAPI::didFinishNavigation):
3201         (TestWebKitAPI::TEST):
3202         (TestWebKitAPI::didFinishDocumentLoadForFrame): Deleted.
3203         * TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp:
3204         (TestWebKitAPI::didFinishNavigation):
3205         (TestWebKitAPI::TEST):
3206         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3207         * TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp:
3208         (TestWebKitAPI::didFailProvisionalNavigation):
3209         (TestWebKitAPI::TEST):
3210         (TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
3211         * TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp:
3212         (TestWebKitAPI::didFinishNavigation):
3213         (TestWebKitAPI::TEST):
3214         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3215         * TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp:
3216         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishNavigation):
3217         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::setPageLoaderClient):
3218         (TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishLoadForFrame): Deleted.
3219         * TestWebKitAPI/Tests/WebKit/UserMessage.cpp:
3220         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishNavigation):
3221         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::setPageLoaderClient):
3222         (TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishLoadForFrame): Deleted.
3223         * TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp:
3224         (TestWebKitAPI::didFinishNavigation):
3225         (TestWebKitAPI::setPageLoaderClient):
3226         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3227         * TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp:
3228         (TestWebKitAPI::didFinishNavigation):
3229         (TestWebKitAPI::setPageLoaderClient):
3230         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3231         * TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp:
3232         (TestWebKitAPI::didFinishNavigation):
3233         (TestWebKitAPI::setPageLoaderClient):
3234         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3235         * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp:
3236         (TestWebKitAPI::didFinishNavigation):
3237         (TestWebKitAPI::setUpClients):
3238         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3239         * TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:
3240         (TestWebKitAPI::didFinishNavigation):
3241         (TestWebKitAPI::setPageLoaderClient):
3242         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3243         * TestWebKitAPI/Tests/WebKit/WebArchive.cpp:
3244         (TestWebKitAPI::didFinishNavigation):
3245         (TestWebKitAPI::TEST):
3246         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3247         * TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm:
3248         (TestWebKitAPI::didFinishNavigation):
3249         (TestWebKitAPI::TEST):
3250         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3251         * TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm:
3252         (TestWebKitAPI::didFinishNavigation):
3253         (TestWebKitAPI::TEST):
3254         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3255         * TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm:
3256         (TestWebKitAPI::didFinishNavigation):
3257         (TestWebKitAPI::TEST):
3258         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3259         * TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm:
3260         (TestWebKitAPI::didFinishNavigation):
3261         (TestWebKitAPI::TEST):
3262         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3263         * TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp:
3264         (TestWebKitAPI::didFinishNavigation):
3265         (TestWebKitAPI::TEST):
3266         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3267         * TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp:
3268         (TestWebKitAPI::didFinishNavigation):
3269         (TestWebKitAPI::TEST):
3270         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3271         * TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
3272         (didFinishNavigation):
3273         (TestWebKitAPI::TEST):
3274         (didFinishLoadForFrame): Deleted.
3275         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
3276         (didFinishNavigation):
3277         (TestWebKitAPI::TEST):
3278         (didFinishLoadForFrame): Deleted.
3279         * TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm:
3280         (TestWebKitAPI::didFinishNavigation):
3281         (TestWebKitAPI::TEST):
3282         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3283         * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
3284         (TestWebKitAPI::didFinishNavigation):
3285         (TestWebKitAPI::setPageLoaderClient):
3286         (TestWebKitAPI::didFinishLoadForFrame): Deleted.
3287
3288 2018-08-21  Adrian Perez de Castro  <aperez@igalia.com>
3289
3290         [WPE] Update to use libwpe-1.0.0 and WPEBackend-fdo-1.0.0
3291         https://bugs.webkit.org/show_bug.cgi?id=188782
3292
3293         Reviewed by Michael Catanzaro.
3294
3295         Make the build depend on wpe-0.2, and change the Flatpak and JHBuild development
3296         environments to use version 1.0.0 of libwpe and WPEBackend-fdo.
3297
3298         * flatpak/org.webkit.WPE.yaml: Update to use libwpe and WPEBackend-fdo version 1.0.0 from
3299         release tarballs, and removed the (now unneeded) Lua and LuaJIT modules.
3300         * wpe/jhbuild.modules: Ditto.
3301
3302 2018-08-21  Michael Catanzaro  <mcatanzaro@igalia.com>
3303
3304         [Flatpak] Update to GNOME master runtime
3305         https://bugs.webkit.org/show_bug.cgi?id=188731
3306
3307         Reviewed by Philippe Normand.
3308
3309         The 3.28 runtime is pretty stale at this point. We could wait a couple weeks for the 3.30
3310         runtime, but I don't think there's any need to stick with the stable runtime when we have
3311         the ability to pin to a particular version of the master runtime. There are also several
3312         advantages to switching to the master runtime.
3313
3314         * flatpak/files/httpd-autogen.sh: Removed.
3315         * flatpak/flatpakutils.py:
3316         (WebkitFlatpak.clean_args):
3317         * flatpak/org.webkit.GTK.yaml:
3318         * flatpak/org.webkit.WebKit.yaml:
3319         * flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed.
3320         * flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed.
3321
3322 2018-08-20  Jonathan Bedard  <jbedard@apple.com>
3323
3324         WebKitTestRunner: Add watchOS entitlements
3325         https://bugs.webkit.org/show_bug.cgi?id=188758
3326
3327         Reviewed by Tim Horton.
3328
3329         watchOS needs an additional entitlement to open up a socket for on-device testing.
3330
3331         * WebKitTestRunner/Configurations/WebKitTestRunnerApp-watchOS.entitlements: Added.
3332         * WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
3333         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
3334
3335 2018-08-20  Thomas Denney  <tdenney@apple.com>
3336
3337         [WHLSL] Remove generics from the interpreter
3338         https://bugs.webkit.org/show_bug.cgi?id=187988
3339
3340         Reviewed by Myles C. Maxfield.
3341
3342         This patch completely removes generic and protocol support from WHLSL
3343         whilst adding back any features that were originally implemented with
3344         generics.
3345
3346         Many of the changes in this patch just remove occurrences of type
3347         arguments and type parameters --- although there are some cases where
3348         they have been deliberately left in --- as well as removing tests only
3349         relevant to those features. These changes are not listed below.
3350
3351         * WebGPUShadingLanguageRI/All.js: Add/remove JS dependencies
3352         * WebGPUShadingLanguageRI/AutoWrapper.js:
3353         (AutoWrapper.prototype.visitConstexprTypeParameter): Deleted.
3354         * WebGPUShadingLanguageRI/BuiltinVectorCasts.js: Added. The built-in
3355         vectors have many constructors for different scalar and vector types.
3356         These were originally implemented with generics.
3357         * WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Adds the
3358         equality operator for built-in vectors, again this was removed with
3359         generics.
3360         * WebGPUShadingLanguageRI/BuiltinVectorGetter.js: Added, as above.
3361         Built-in vectors only support the getter and setter, and not the ander.
3362         * WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js: Added.
3363         * WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js: Added.
3364         * WebGPUShadingLanguageRI/BuiltinVectorSetter.js: Added.
3365         * WebGPUShadingLanguageRI/CallExpression.js: Adds support for
3366         instantiating functions which cannot be discovered earlier in
3367         preparation because their types are absent (specifically support for the
3368         operator &[] for array references and the length operator for array
3369         references). Previously support for these was implemented with generics.
3370         (CallExpression.resolve):
3371         (CallExpression.prototype.resolve):
3372         (CallExpression.prototype._resolveByInstantiation):
3373         (CallExpression.prototype._resolveToOperatorAnderIndexer):
3374         (CallExpression.prototype._resolveToOperatorLength):
3375         (CallExpression.prototype.resolveToOverload):
3376         (CallExpression.prototype.becomeCast):
3377         (CallExpression.prototype.toString):
3378         (CallExpression):
3379         * WebGPUShadingLanguageRI/CallExpressionTypeArgumentResolver.js: Added.
3380         We support syntax like vector<int, 2>(a, b) for constructing vectors;
3381         this new preparation step resolves them to specific constructors.
3382         * WebGPUShadingLanguageRI/CallFunction.js:
3383         * WebGPUShadingLanguageRI/Checker.js:
3384         * WebGPUShadingLanguageRI/ConstexprFolder.js:
3385         * WebGPUShadingLanguageRI/CreateLiteralType.js:
3386         * WebGPUShadingLanguageRI/ExpressionFinder.js:
3387         * WebGPUShadingLanguageRI/FlattenProtocolExtends.js: Removed.
3388         * WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
3389         * WebGPUShadingLanguageRI/Func.js:
3390         * WebGPUShadingLanguageRI/FuncDef.js:
3391         * WebGPUShadingLanguageRI/FuncInstantiator.js: Deleted.
3392         * WebGPUShadingLanguageRI/InferTypesForCall.js: Removed usage of type arguments.
3393         * WebGPUShadingLanguageRI/Inline.js: Remove use of FuncInstantiator.
3394         * WebGPUShadingLanguageRI/Inliner.js: Ditto.
3395         * WebGPUShadingLanguageRI/Intrinsics.js:
3396         * WebGPUShadingLanguageRI/Lexer.js:
3397         * WebGPUShadingLanguageRI/LiteralTypeChecker.js:
3398         * WebGPUShadingLanguageRI/NameContext.js:
3399         (NameContext.prototype.add):
3400         (NameContext.prototype.get let):
3401         (NameContext.underlyingThings.prototype.else):
3402         (NameContext.prototype.resolveFuncOverload):
3403         * WebGPUShadingLanguageRI/NameFinder.js:
3404         * WebGPUShadingLanguageRI/NameResolver.js:
3405         (NameResolver.prototype.visitFunc):
3406         (NameResolver.prototype.visitFuncDef):
3407         (NameResolver.prototype.visitTypeDef):
3408         (NameResolver.prototype.visitStructType):
3409         (NameResolver.prototype.visitTypeRef):
3410         (NameResolver.prototype.visitCallExpression):
3411         (NameResolver.prototype.visitVectorType):
3412         (NameResolver):
3413         (NameResolver.prototype._visitTypeParametersAndBuildNameContext): Deleted.
3414         (NameResolver.prototype.visitProtocolDecl): Deleted.
3415         * WebGPUShadingLanguageRI/NativeFunc.js:
3416         (NativeFunc):
3417         * WebGPUShadingLanguageRI/NativeFuncInstance.js: Deleted.
3418         * WebGPUShadingLanguageRI/NativeType.js:
3419         (NativeType):
3420         (NativeType.prototype.get name):
3421         (NativeType.prototype.toString):
3422         (NativeType.prototype.get typeParameters): Deleted.
3423         (NativeType.prototype.instantiate): Deleted.
3424         * WebGPUShadingLanguageRI/Node.js:
3425         (Node.prototype.commit):
3426         (Node):
3427         (Node.prototype.substitute): Deleted.
3428         (Node.prototype.substituteToUnification): Deleted.
3429         * WebGPUShadingLanguageRI/OperatorAnderIndex.js: Added, previously
3430         implemented with generics.
3431         * WebGPUShadingLanguageRI/OperatorArrayRefLength.js: Ditto.
3432         * WebGPUShadingLanguageRI/OperatorBool.js: Ditto.
3433         * WebGPUShadingLanguageRI/Parse.js: Removed everything related to
3434         generics and protocols.
3435         * WebGPUShadingLanguageRI/Prepare.js: Added new stages.
3436         * WebGPUShadingLanguageRI/Program.js:
3437         (Program):
3438         (Program.prototype.get types):
3439         (Program.prototype.add):
3440         (Program.prototype.get protocols): Deleted.
3441         * WebGPUShadingLanguageRI/ProtocolDecl.js: Removed.
3442         * WebGPUShadingLanguageRI/ProtocolRef.js: Removed.
3443         * WebGPUShadingLanguageRI/RecursiveTypeChecker.js:
3444         * WebGPUShadingLanguageRI/ResolveCallExpressionsWithTypeArguments.js: Added.
3445         * WebGPUShadingLanguageRI/ResolveNames.js:
3446         * WebGPUShadingLanguageRI/ResolveOverloadImpl.js:
3447         * WebGPUShadingLanguageRI/ResolveTypeDefs.js:
3448         (resolveTypeDefsInProtocols): Deleted.
3449         * WebGPUShadingLanguageRI/Rewriter.js: Changes for new classes.
3450         * WebGPUShadingLanguageRI/SPIRV.html:
3451         * WebGPUShadingLanguageRI/SPIRVCodegen.js:
3452         * WebGPUShadingLanguageRI/StandardLibrary.js: Replace old generic features.
3453         * WebGPUShadingLanguageRI/StatementCloner.js: Changes for new classes.
3454         (StructLayoutBuilder):
3455         * WebGPUShadingLanguageRI/StructType.js:
3456         * WebGPUShadingLanguageRI/SwizzleOp.js:
3457         (SwizzleOp):
3458         (SwizzleOp.prototype.get baseTypeName):
3459         (SwizzleOp.prototype.toString):
3460         (SwizzleOp.functions.):
3461         (SwizzleOp.functions):
3462         (SwizzleOp.prototype.instantiateImplementation):
3463         (SwizzleOp.allSwizzleOperators.): Deleted.
3464         (SwizzleOp.allSwizzleOperators): Deleted.
3465         * WebGPUShadingLanguageRI/SynthesizeArrayOperatorLength.js: Added,
3466         previously implemented with generics.
3467         * WebGPUShadingLanguageRI/SynthesizeCopyConstructorOperator.js: Ditto.
3468         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Ditto.
3469         * WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js: Ditto.
3470         * WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Ditto.
3471         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js:
3472         (synthesizeStructAccessors.setupImplementationData):
3473         (synthesizeStructAccessors.createFieldType):
3474         (synthesizeStructAccessors.createTypeRef):
3475         (synthesizeStructAccessors.setupAnder):
3476         (synthesizeStructAccessors):
3477         (synthesizeStructAccessors.createTypeParameters): Deleted.
3478         (synthesizeStructAccessors.): Deleted.
3479         * WebGPUShadingLanguageRI/Test.html:
3480         * WebGPUShadingLanguageRI/Test.js: Removed redundant tests and added new
3481         tests for changed language features.
3482         * WebGPUShadingLanguageRI/Type.js:
3483         * WebGPUShadingLanguageRI/TypeDef.js:
3484         * WebGPUShadingLanguageRI/TypeDefResolver.js:
3485         * WebGPUShadingLanguageRI/TypeParameterRewriter.js: Removed.
3486         * WebGPUShadingLanguageRI/TypeRef.js:
3487         * WebGPUShadingLanguageRI/TypeVariable.js: Removed.
3488         * WebGPUShadingLanguageRI/UnificationContext.js:
3489         * WebGPUShadingLanguageRI/VectorType.js: Added.
3490         * WebGPUShadingLanguageRI/Visitor.js: Changes for new classes.
3491         * WebGPUShadingLanguageRI/WSL.md: Removed description of
3492         generics/protocols.
3493         * WebGPUShadingLanguageRI/WrapChecker.js:
3494         (WrapChecker):
3495         (WrapChecker.visitConstexprTypeParameter): Deleted.
3496         (WrapChecker.prototype.visitFuncParameter): Deleted.
3497         (WrapChecker.prototype.visitTypeVariable): Deleted.
3498         * WebGPUShadingLanguageRI/index.html:
3499
3500 2018-08-20  Thomas Denney  <tdenney@apple.com>
3501
3502         Added Thomas Denney to contributors.json.
3503         https://bugs.webkit.org/show_bug.cgi?id=188525
3504
3505         Reviewed by Myles C. Maxfield.
3506
3507         * Scripts/webkitpy/common/config/contributors.json:
3508
3509 2018-08-20  Bernhard M. Wiedemann  <bwiedemann@suse.de>
3510
3511         [GTK] Sort inspector GResource manifest to ensure reproducible builds
3512         https://bugs.webkit.org/show_bug.cgi?id=188738
3513
3514         Reviewed by Michael Catanzaro.
3515
3516         * glib/generate-inspector-gresource-manifest.py:
3517         (get_filenames): sort list of input files
3518
3519 2018-08-20  Wenson Hsieh  <wenson_hsieh@apple.com>
3520
3521         [iOS] Paste is missing from callout bar when pasteboard only contains custom data
3522         https://bugs.webkit.org/show_bug.cgi?id=184271
3523         <rdar://problem/39256708>
3524
3525         Reviewed by Andy Estes.
3526
3527         This API test is failing when run against older macOS builds, where custom pasteboard
3528         data is not enabled by default.
3529
3530         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
3531         (TestWebKitAPI::TEST):
3532
3533 2018-08-20  Claudio Saavedra  <csaavedra@igalia.com>
3534
3535         Add WPE Debug configuration to the flakiness dashboard
3536         https://bugs.webkit.org/show_bug.cgi?id=188743
3537
3538         Reviewed by Michael Catanzaro.
3539
3540         * TestResultServer/static-dashboards/builders.jsonp:
3541         * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
3542
3543 2018-08-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3544
3545         [GLIB] Add API to throw exceptions using printf formatted strings
3546         https://bugs.webkit.org/show_bug.cgi?id=188698
3547
3548         Reviewed by Michael Catanzaro.
3549
3550         Add cases to test the new API.
3551
3552         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
3553         (createFormattedError):
3554         (createCustomFormattedError):
3555         (testJSCExceptions):
3556
3557 2018-08-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3558
3559         [GLIB] Complete the JSCException API
3560         https://bugs.webkit.org/show_bug.cgi?id=188695
3561
3562         Reviewed by Michael Catanzaro.
3563
3564         Add cases to test the new API.
3565
3566         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
3567         (testJSCCheckSyntax):
3568         (createCustomError):