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