[WHLSL] Implement atomic operations and barriers
[WebKit-https.git] / Tools / ChangeLog
1 2018-09-22  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         [WHLSL] Implement atomic operations and barriers
4         https://bugs.webkit.org/show_bug.cgi?id=189025
5
6         Reviewed by Dean Jackson.
7
8         In the interpreter, atomic operations don't need to be atomic.
9
10         * WebGPUShadingLanguageRI/Intrinsics.js:
11         (Intrinsics.):
12         * WebGPUShadingLanguageRI/StandardLibrary.js:
13         (let.standardLibrary):
14         * WebGPUShadingLanguageRI/Test.js:
15         (tests.atomics):
16
17 2018-09-22  Thibault Saunier  <tsaunier@igalia.com>
18
19         [WPE] Be very permissive in the MiniBrowser.
20         https://bugs.webkit.org/show_bug.cgi?id=189800
21
22         This is just a test tool and we should make
23         it just work, security and privacy is not really
24         a primary focus here.
25
26         Reviewed by Žan Doberšek.
27
28         * MiniBrowser/wpe/main.cpp:
29         (decidePermissionRequest):
30         (main):
31
32 2018-09-21  Thomas Denney  <tdenney@apple.com>
33
34         [WHLSL] Local variables should be statically allocated
35         https://bugs.webkit.org/show_bug.cgi?id=188402
36
37         Reviewed by Myles C. Maxfield.
38
39         An additional preparation stage is now performed so that all local
40         variables and function parameters are allocated in a single struct at
41         entry points. A pointer to this struct is then passed for function
42         calls.
43
44         * WebGPUShadingLanguageRI/All.js: Update dependencies.
45         * WebGPUShadingLanguageRI/AllocateAtEntryPoints.js: Added new stage.
46         * WebGPUShadingLanguageRI/CallExpression.js:
47         (CallExpression.prototype.set argumentList): Add setter because
48         allocateAtEntryPoints needs to change this.
49         * WebGPUShadingLanguageRI/EBufferBuilder.js: Remove a redundant
50         constructor that wasn't used anywhere.
51         * WebGPUShadingLanguageRI/Func.js:
52         (Func.prototype.set parameters): Add setter.
53         * WebGPUShadingLanguageRI/FuncDef.js:
54         (FuncDef.prototype.set body): Ditto.
55         * WebGPUShadingLanguageRI/Prepare.js:
56         (let.prepare): Add call to allocateAtEntryPoints. This call cannot
57         happen any earlier because it depends on having types for call
58         arguments.
59         * WebGPUShadingLanguageRI/Rewriter.js:
60         (Rewriter.prototype.visitReturn): Resolve issue where the return
61         statement's function wasn't copied. A null check is required as the
62         Rewriter might be used before this property is set.
63         * WebGPUShadingLanguageRI/SPIRV.html: Update dependencies.
64         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: Abstracted logic
65         into a separate function so that allocateAtEntryPoints can create the
66         accessors for the struct type it introduces.
67         * WebGPUShadingLanguageRI/Test.html: Update dependencies.
68         * WebGPUShadingLanguageRI/Test.js: Add new tests to verify the static
69         allocation transform works safely.
70         * WebGPUShadingLanguageRI/index.html: Update dependencies.
71
72 2018-09-21  Jonathan Bedard  <jbedard@apple.com>
73
74         Bring up queues for iOS 12 (Build fix)
75         https://bugs.webkit.org/show_bug.cgi?id=189683
76
77         Unreviewed build fix.
78
79         We should not build ImageDiff as x86 by default since 32 bit projects are
80         deprecated in Xcode. ImageDiff should only be built once.
81
82         * Scripts/build-webkit:
83         * Scripts/webkitdirs.pm:
84         (argumentsForConfiguration):
85
86 2018-09-21  Adrian Perez de Castro  <aperez@igalia.com>
87
88         [WPE] Built RPM of WPE webkit fails to install with "nothing provides libWPEToolingBackends.so()"
89         https://bugs.webkit.org/show_bug.cgi?id=189797
90
91         Reviewed by Žan Doberšek.
92
93         * wpe/backends/CMakeLists.txt: Make libWPEToolingBackends a static library to avoid
94         the need for installing it. This works fine because the library only contains utility
95         code intended to be reused from other various components (MiniBrowser, WebKitTestRunner).
96
97 2018-09-20  Daniel Bates  <dabates@apple.com>
98
99         Move IOKitSPI.h from TestRunnerShared to PAL
100         https://bugs.webkit.org/show_bug.cgi?id=189804
101
102         Reviewed by Wenson Hsieh.
103
104         Towards fixing <https://bugs.webkit.org/show_bug.cgi?id=189604> move the IOKit SPI forward
105         declarations to PAL so that they can be shared by WebKit, DumpRenderTree and WebKitTestRunner.
106
107         No functionality changed. So, no new tests.
108
109         * TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
110         * TestRunnerShared/spi/UIKitTestSPI.h:
111         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
112         * WebKitTestRunner/ios/HIDEventGenerator.mm:
113
114 2018-09-20  Thomas Denney  <tdenney@apple.com>
115
116         [WHLSL] Metal code generation
117         https://bugs.webkit.org/show_bug.cgi?id=187735
118
119         Reviewed by Myles C. Maxfield.
120
121         Adds support for generating Metal Shading Language from WHLSL. Clients
122         should include the file MetalCodegenAll.js and then call whlslToMsl
123         with their program source code to compile to Metal.
124
125         * WebGPUShadingLanguageRI/ArrayType.js:
126         (ArrayType.prototype.get arrayRefType): Adds the arrayRefType method to
127         all types to find the type of that expression when it is used in a
128         MakeArrayRefExpression.
129         * WebGPUShadingLanguageRI/MakeArrayRefExpression.js:
130         (MakeArrayRefExpression):
131         (MakeArrayRefExpression.prototype.get type): Uses the new arrayRefType
132         getter on all types to find the type of the expression.
133         * WebGPUShadingLanguageRI/Metal/MSLBackend.js: Added.
134         * WebGPUShadingLanguageRI/Metal/MSLCodegenAll.js: Added.
135         * WebGPUShadingLanguageRI/Metal/MSLCompileResult.js: Added.
136         * WebGPUShadingLanguageRI/Metal/MSLConstexprEmitter.js: Added.
137         * WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js: Added.
138         * WebGPUShadingLanguageRI/Metal/MSLFunctionDefinition.js: Added.
139         * WebGPUShadingLanguageRI/Metal/MSLFunctionForwardDeclaration.js: Added.
140         * WebGPUShadingLanguageRI/Metal/MSLNameMangler.js: Added.
141         * WebGPUShadingLanguageRI/Metal/MSLNativeFunctionCall.js: Added.
142         * WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js: Added.
143         * WebGPUShadingLanguageRI/Metal/MSLTypeAttributes.js: Added.
144         * WebGPUShadingLanguageRI/Metal/MSLTypeAttributesMap.js: Added.
145         * WebGPUShadingLanguageRI/Metal/MSLTypeUnifier.js: Added.
146         * WebGPUShadingLanguageRI/Metal/TypeOf.js: Added.
147         * WebGPUShadingLanguageRI/Metal/WhlslToMsl.js: Added.
148         * WebGPUShadingLanguageRI/PropertyResolver.js:
149         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js:
150         * WebGPUShadingLanguageRI/Test.js: Added awkward tests for the compiler
151         to generate code for.
152         (tests.incrementAndDecrement):
153         (tests.returnIntLiteralUint):
154         (tests.returnIntLiteralFloat):
155         (tests.nestedSubscriptWithArraysInStructs):
156         (tests.nestedSubscript):
157         (tests.lotsOfLocalVariables):
158         * WebGPUShadingLanguageRI/Type.js:
159         (Type.prototype.get arrayRefType): See above.
160
161 2018-09-20  Ryan Haddad  <ryanhaddad@apple.com>
162
163         Bring up queues for iOS 12
164         https://bugs.webkit.org/show_bug.cgi?id=189683
165
166         Unreviewed infrastructure fix.
167
168         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS12@2x.png: Renamed from Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/iOS12@2x.png.
169         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
170         (BubbleQueueServer): Move EWS bubbles to the iOS 12 section of the dashboard.
171
172 2018-09-20  Ryan Haddad  <ryanhaddad@apple.com>
173
174         Bring up queues for iOS 12
175         https://bugs.webkit.org/show_bug.cgi?id=189683
176
177         Reviewed by Aakash Jain.
178
179         * BuildSlaveSupport/build.webkit.org-config/config.json:
180         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS12.png: Added.
181         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS12Simulator.png: Added.
182         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS12Simulator@2x.png: Added.
183         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/iOS12@2x.png: Added.
184         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
185         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
186         (WebKitBuildbot):
187         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
188         (table.queue-grid tr.platform.ios-simulator-12 img.logo):
189         (table.queue-grid tr.platform.ios-12 img.logo):
190         (table.queue-grid tr.platform.ios-simulator-11 img.logo): Deleted.
191         (table.queue-grid tr.platform.ios-11 img.logo): Deleted.
192         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
193         * BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
194         (_should_file_trigger_build):
195         * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
196         (ShouldBuildTest):
197         (ShouldBuildTest.test_should_build):
198
199 2018-09-20  Basuke Suzuki  <Basuke.Suzuki@sony.com>
200
201         [Win] TestRunner::queueLoad() fails to generate correct url for some urls.
202         https://bugs.webkit.org/show_bug.cgi?id=189679
203
204         Reviewed by Fujii Hironori.
205
206         Replace the implementation with correct API call.
207
208         * DumpRenderTree/win/TestRunnerWin.cpp:
209         (TestRunner::queueLoad): Call UrlCombineW.
210
211 2018-09-20  Michael Catanzaro  <mcatanzaro@igalia.com>
212
213         [WPE] fails to build on ARM arches complaining about undefined reference to `epoxy_eglMakeCurrent'
214         https://bugs.webkit.org/show_bug.cgi?id=189556
215
216         Reviewed by Konstantin Tokarev.
217
218         This is only a speculative build fix as I didn't attempt to reproduce. Explicitly link to
219         libepoxy.
220
221         * wpe/backends/CMakeLists.txt:
222
223 2018-09-20  Daniel Bates  <dabates@apple.com>
224
225         [iOS] Support testing more hardware special keys
226         https://bugs.webkit.org/show_bug.cgi?id=189793
227
228         Reviewed by Simon Fraser.
229
230         * TestRunnerShared/spi/IOKitSPI.h: Add more SPI constants.
231         * WebKitTestRunner/ios/HIDEventGenerator.mm:
232         (keyCodeForDOMFunctionKey): Extracted out logic from hidUsageCodeForCharacter() to return the
233         key code for the F1, F2, ..., F12 keys and extended the code to compute the key code for the
234         F13, F14, ..., F24 keys.
235         (hidUsageCodeForCharacter): Modified to call keyCodeForDOMFunctionKey().
236
237 2018-09-20  Michael Catanzaro  <mcatanzaro@igalia.com>
238
239         Unreviewed, remove accidentally-committed debugging changes from flatpakutils script
240
241         Aaaaaah maybe this is why changes are supposed to be reviewed.
242
243         * flatpak/flatpakutils.py:
244         (WebkitFlatpak.clean_args):
245
246 2018-09-20  Michael Catanzaro  <mcatanzaro@igalia.com>
247
248         Unreviewed, manually rollout our switch to master runtime
249
250         Phil wants html5-codecs, which aren't available yet here. Let's switch back to 3.28 in the
251         meantime, where we were already building GStreamer ourselves anyway. But use an updated
252         SDK revision.
253
254         * flatpak/files/httpd-autogen.sh: Added.
255         * flatpak/flatpakutils.py:
256         (WebkitFlatpak.clean_args):
257         * flatpak/org.webkit.GTK.yaml:
258         * flatpak/org.webkit.WebKit.yaml:
259         * flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Added.
260         * flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Added.
261
262 2018-09-20  Thibault Saunier  <tsaunier@igalia.com>
263
264         [WPE][GTK] webkit-flatpak intercepts --help for other commands
265         https://bugs.webkit.org/show_bug.cgi?id=189058
266
267         The approach of run_in_sandbox_if_available is that we basically have the
268         same set of arguments to setup the sandbox (ie. port name, build type, etc...)
269         and we can pass those args first to setup the flatpak launcher object
270         and then to the underlying script. That doesn't work well with the `--help` argument
271         as once processed it 1. prints the help (which make no sense to the user of the calling script)
272         2. exits the app - The solution is to just make sure that `--help` is not used when using
273         flatpakutils from any script that is not `webkit-flatpak` itself.
274
275         Reviewed by Michael Catanzaro.
276
277         * flatpak/flatpakutils.py:
278         (WebkitFlatpak.load_from_args):
279         (run_in_sandbox_if_available):
280
281 2018-09-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
282
283         Unreviewed. Add W3C imported tests to the MSEEME watchlist.
284
285         * Scripts/webkitpy/common/config/watchlist:
286
287 2018-09-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
288
289         Unreviewed. Fix the Streams API watchlist.
290
291         * Scripts/webkitpy/common/config/watchlist:
292
293 2018-09-19  Chris Dumez  <cdumez@apple.com>
294
295         Crash under WebProcessProxy::suspendedPageWasDestroyed(WebKit::SuspendedPageProxy&)
296         https://bugs.webkit.org/show_bug.cgi?id=189721
297         <rdar://problem/44359788>
298
299         Reviewed by Geoffrey Garen.
300
301         Add API test coverage.
302
303         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
304
305 2018-09-19  Thomas Denney  <tdenney@apple.com>
306
307         [WHLSL] Improve test suite type safety
308         https://bugs.webkit.org/show_bug.cgi?id=189502
309
310         Reviewed by Myles C. Maxfield.
311
312         Each of the 'makeT' functions now call the relevant cast function on the
313         value before hand. The checkNumber function has also been removed and
314         its uses have been replaced with functions that also check the type.
315         Some of the arithmetic checks have been updated to reflect that the
316         casts happen outside of WHLSL evaluation. Other tests have also been
317         updated to reflect that some values cannot be precisely expressed in
318         32-bit floating point.
319
320         * WebGPUShadingLanguageRI/Casts.js:
321         (castToBool): Added.
322         (castAndCheckValue): Added.
323         (isBitwiseEquivalent): Moved from Intrinsics.js.
324         * WebGPUShadingLanguageRI/Intrinsics.js: Ditto.
325         * WebGPUShadingLanguageRI/SPIRV.html: Update depdencies.
326         * WebGPUShadingLanguageRI/Test.html: Ditto.
327         * WebGPUShadingLanguageRI/Test.js: Update makeT functions to do a cast
328         and check the result. Some tests were also updated to reflect the change
329         in the behavior of these functions.
330         * WebGPUShadingLanguageRI/index.html: Update dependencies.
331
332 2018-09-19  John Wilander  <wilander@apple.com>
333
334         Resource Load Statistics: Add optional cap on partitioned cache max age
335         https://bugs.webkit.org/show_bug.cgi?id=189711
336         <rdar://problem/39246837>
337
338         Reviewed by Antti Koivisto and Chris Dumez.
339
340         This change adds infrastructure for layout tests of capped cache max age.
341
342         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
343         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
344         (WTR::TestRunner::setStatisticsCacheMaxAgeCap):
345         * WebKitTestRunner/InjectedBundle/TestRunner.h:
346         * WebKitTestRunner/TestController.cpp:
347         (WTR::TestController::setStatisticsCacheMaxAgeCap):
348         * WebKitTestRunner/TestController.h:
349         * WebKitTestRunner/TestInvocation.cpp:
350         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
351
352 2018-09-19  Dawei Fenton  <realdawei@apple.com>
353
354        Unreviewed. Update my email and alias in list of contributors.
355
356         * Scripts/webkitpy/common/config/contributors.json:
357
358 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
359
360         [WPE][GTK] Unreviewed, try #3 to fix a typo
361
362         I feel like Charlie Brown, how hard this has been for me....
363
364         * Scripts/run-minibrowser:
365         * Scripts/webkitdirs.pm:
366         (runInFlatpakIfAvailable):
367         (runInFlatpakIfAvailible): Deleted.
368
369 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
370
371         [WPE][GTK] Unreviewed, fix that typo in more places
372
373         It got copied into webkitdirs.pm!
374
375         * Scripts/webkitdirs.pm:
376         (runInFlatpakIfAvailible):
377         (runInFlatpakIfAvalaible): Deleted.
378
379 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
380
381         [WPE][GTK] Unreviewed, fix a pervasive typo in the webkit-flatpak script
382
383         * flatpak/flatpakutils.py:
384         (WebkitFlatpak.load_from_args):
385         (WebkitFlatpak.__init__):
386         (WebkitFlatpak.run):
387
388 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
389
390         [WPE][GTK] Unreviewed, update to latest GNOME SDK
391
392         * flatpak/org.webkit.WebKit.yaml:
393
394 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
395
396         Unreviewed, rolling out r235500.
397
398         Time to switch back to master runtime
399
400         Reverted changeset:
401
402         "Unreviewed, rolling out r235114."
403         https://bugs.webkit.org/show_bug.cgi?id=188731
404         https://trac.webkit.org/changeset/235500
405
406 2018-09-19  Adrian Perez de Castro  <aperez@igalia.com>
407
408         Unreviewed. Add Pablo Saavedra to the list of contributors.
409
410         * Scripts/webkitpy/common/config/contributors.json:
411
412 2018-09-19  Philippe Normand  <pnormand@igalia.com>
413
414         [GStreamer] Add support for AV1 decoding
415         https://bugs.webkit.org/show_bug.cgi?id=189647
416
417         Reviewed by Žan Doberšek.
418
419         Add patches required for AV1 decoding support. They're all
420         upstream already and will be shipped in GStreamer 1.16. The aom
421         GStreamer plugin depends on the aom library for which there's no
422         official release yet.
423
424         * gstreamer/jhbuild.modules:
425         * gstreamer/patches/gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch: Added.
426         * gstreamer/patches/gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch: Added.
427         * gstreamer/patches/gst-plugins-good-0001-qtdemux-Detect-and-expose-CEA-608-708-Closed-Caption.patch: Added. This one is unrelated but an implicit dependency of the next one.
428         * gstreamer/patches/gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch: Added.
429         * gstreamer/patches/gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch: Added.
430         * gstreamer/patches/gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch: Added.
431
432 2018-09-18  Jonathan Bedard  <jbedard@apple.com>
433
434         webkitpy: Clobbering and building occurs multiple times for iOS Simulator ports
435         https://bugs.webkit.org/show_bug.cgi?id=189702
436         <rdar://problem/44541704>
437
438         Reviewed by Aakash Jain.
439
440         * Scripts/webkitpy/layout_tests/controllers/manager.py:
441         (Manager._set_up_run): Move build check and clobbering to run, since set up is
442         run multiple times for iOS simulator.
443         (Manager.run):
444
445 2018-09-18  Chris Dumez  <cdumez@apple.com>
446
447         "DidFirstVisuallyNonEmptyLayout" callback does not get called when restoring a page from PageCache
448         https://bugs.webkit.org/show_bug.cgi?id=189681
449         <rdar://problem/44526171>
450
451         Reviewed by Alex Christensen and Zalan Bujtas.
452
453         Add API test coverage.
454
455         * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
456         (TestWebKitAPI::didFinishNavigation):
457         (TestWebKitAPI::TEST):
458
459 2018-09-18  Claudio Saavedra  <csaavedra@igalia.com>
460
461         [WPE] Implement mouse event modifiers
462         https://bugs.webkit.org/show_bug.cgi?id=189697
463
464         Reviewed by Carlos Garcia Campos.
465
466         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
467         (WTR::wkEventModifiersToWPE):
468         (WTR::EventSenderProxy::mouseDown):
469         (WTR::EventSenderProxy::mouseUp):
470
471 2018-09-17  Yusuke Suzuki  <utatane.tea@gmail.com>
472
473         [WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t
474         https://bugs.webkit.org/show_bug.cgi?id=185339
475
476         Reviewed by Mark Lam.
477
478         * TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:
479         (TestWebKitAPI::ToUpperConverter::stopProducing):
480         (TestWebKitAPI::ToUpperConverter::stopConsuming):
481
482 2018-09-17  Simon Fraser  <simon.fraser@apple.com>
483
484         Many modern media control tests leak documents in testing
485         https://bugs.webkit.org/show_bug.cgi?id=189437
486
487         Reviewed by Darin Adler.
488         
489         In order to accurately detect leaks in media controls tests which use lots of
490         SVGImages, we have to:
491         - Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer
492           to clear references to elements.
493         - Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources()
494           to drop the last handle to the CachedResource for an SVGImage.
495         - Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources()
496           to run again after that timer has fired.
497         
498         This should fix most of the spurious leak reports involving SVGImage documents.
499
500         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
501         (WTR::InjectedBundle::reportLiveDocuments):
502         (WTR::InjectedBundle::didReceiveMessageToPage):
503
504 2018-09-17  Chris Dumez  <cdumez@apple.com>
505
506         PSON: window.open() with 'noopener' should only process-swap cross-site, not cross-origin
507         https://bugs.webkit.org/show_bug.cgi?id=189602
508         <rdar://problem/44430549>
509
510         Reviewed by Geoff Garen.
511
512         Add API test coverage.
513
514         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
515
516 2018-09-17  Philippe Normand  <pnormand@igalia.com>
517
518         [JHBuild] Update to GStreamer 1.14.3
519         https://bugs.webkit.org/show_bug.cgi?id=189450
520
521         Reviewed by Xabier Rodriguez-Calvar.
522
523         * gstreamer/jhbuild.modules: Bump GStreamer modules from 1.14.1 to 1.14.3.
524
525 2018-09-17  Philippe Normand  <pnormand@igalia.com>
526
527         [JHBuild] Doesn't check sha256 sums
528         https://bugs.webkit.org/show_bug.cgi?id=189646
529
530         Reviewed by Michael Catanzaro.
531
532         * gstreamer/jhbuild.modules: Properly set the sha256: prefix on hashes.
533
534 2018-09-17  Sihui Liu  <sihui_liu@apple.com>
535
536         Move IndexedDB to Network Process
537         https://bugs.webkit.org/show_bug.cgi?id=189415
538         <rdar://problem/44396973>
539
540         Reviewed by Chris Dumez.
541
542         * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
543         (TEST):
544         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
545         (TEST):
546         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
547         (TEST):
548         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
549         (TEST):
550         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
551         (TEST):
552
553 2018-09-08  Darin Adler  <darin@apple.com>
554
555         Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext
556         https://bugs.webkit.org/show_bug.cgi?id=189455
557
558         Reviewed by Keith Miller.
559
560         There is a lot of copied and pasted code for WebKit vs. Legacy WebKit
561         testing and even for macOS vs. iOS vs. Windows platform-specific code.
562         For now, this patch just makes corresponding changes to the copied code.
563         Later we might get better results by merging more code instead of having
564         all these separate copies.
565
566         * DumpRenderTree/AccessibilityController.cpp:
567         (AccessibilityController::makeWindowObject): Use the adopt function
568         instead of the special Adopt constructor of JSRetainPtr.
569
570         * DumpRenderTree/AccessibilityTextMarker.cpp: Removed unneeded include.
571
572         * DumpRenderTree/AccessibilityUIElement.cpp: Ditto.
573         (allAttributesCallback): Don't adopt at this level; changed the
574         underlying function to return a JSRetainPtr so the adopt is right next
575         to the call to the create or copy function.
576         (attributesOfLinkedUIElementsCallback): Ditto.
577         (attributesOfDocumentLinksCallback): Ditto.
578         (attributesOfChildrenCallback): Ditto.
579         (parameterizedAttributeNamesCallback): Ditto.
580         (attributesOfColumnHeadersCallback): Ditto.
581         (attributesOfRowHeadersCallback): Ditto.
582         (attributesOfColumnsCallback): Ditto.
583         (attributesOfRowsCallback): Ditto.
584         (attributesOfVisibleCellsCallback): Ditto.
585         (attributesOfHeaderCallback): Ditto.
586         (rowIndexRangeCallback): Ditto.
587         (columnIndexRangeCallback): Ditto.
588         (rangeForLineCallback): Ditto.
589         (boundsForRangeCallback): Ditto.
590         (rangeForPositionCallback): Ditto.
591         (stringForRangeCallback): Ditto.
592         (attributedStringForRangeCallback): Ditto.
593         (uiElementCountForSearchPredicateCallback): Use the free adopt
594         function instead of the adopt member function.
595         (uiElementForSearchPredicateCallback): Ditto.
596         (selectTextWithCriteriaCallback): Don't adopt at this level.
597         (attributedStringForElementCallback): Ditto.
598         (setValueCallback): Use free adopt.
599         (stringAttributeValueCallback): Don't adopt at this level.
600         (uiElementArrayAttributeValueCallback): Ditto.
601         (uiElementAttributeValueCallback): Ditto.
602         (stringForTextMarkerRangeCallback): Ditto.
603         (attributedStringForTextMarkerRangeCallback): Ditto.
604         (attributedStringForTextMarkerRangeWithOptionsCallback): Ditto.
605         (getARIADropEffectsCallback): Ditto.
606         (getClassListCallback): Ditto.
607         (getRoleCallback): Ditto.
608         (getSubroleCallback): Ditto.
609         (getRoleDescriptionCallback): Ditto.
610         (getComputedRoleStringCallback): Ditto.
611         (getTitleCallback): Ditto.
612         (getDescriptionCallback): Ditto.
613         (getStringValueCallback): Ditto.
614         (getLanguageCallback): Ditto.
615         (getHelpTextCallback): Ditto.
616         (getOrientationCallback): Ditto.
617         (getPathDescriptionCallback): Ditto.
618         (getSelectedTextRangeCallback): Ditto.
619         (speakAsCallback): Ditto.
620         (getValueDescriptionCallback): Ditto.
621         (getAccessibilityValueCallback): Ditto.
622         (getDocumentEncodingCallback): Ditto.
623         (getDocumentURICallback): Ditto.
624         (getURLCallback): Ditto.
625         (characterAtOffsetCallback): Ditto.
626         (wordAtOffsetCallback): Ditto.
627         (lineAtOffsetCallback): Ditto.
628         (sentenceAtOffsetCallback): Ditto.
629         (stringForSelectionCallback): Ditto.
630         (getIdentifierCallback): Ditto.
631         (getTraitsCallback): Ditto.
632         (supportedActionsCallback): Ditto.
633         (mathPostscriptsDescriptionCallback): Ditto.
634         (mathPrescriptsDescriptionCallback): Ditto.
635         (AccessibilityUIElement::rangeForLine): Updated to return JSRetainPtr.
636         (AccessibilityUIElement::rangeForPosition): Ditto.
637         (AccessibilityUIElement::speakAs): Ditto.
638         (AccessibilityUIElement::pathDescription const): Ditto.
639         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
640         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
641         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
642
643         * DumpRenderTree/AccessibilityUIElement.h: Use JSRetainPtr instead of
644         raw pointers for the results of the functions that create strings.
645         The old way was difficult to get right; the functions didn't even follow
646         the create/copy naming rule.
647
648         * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
649         (_platformTypeConstructor): Use the adopt function instead of the
650         JSRetainPtr adopt constructor. Also nullptr instead of 0.
651
652         * DumpRenderTree/GCController.cpp:
653         (GCController::makeWindowObject): Use adopt function instead of constructor.
654
655         * DumpRenderTree/TestRunner.cpp:
656         (pathToLocalResourceCallback): Use adopt function instead of constructor.
657         (addDisallowedURLCallback): Ditto.
658         (addURLToRedirectCallback): Ditto.
659         (clearApplicationCacheForOriginCallback): Ditto.
660         (applicationCacheDiskUsageForOriginCallback): Ditto.
661         (decodeHostNameCallback): Don't adopt at this level.
662         (encodeHostNameCallback): Ditto.
663         (execCommandCallback): Use adopt instead of JSRetainPtr::adopt.
664         (findStringCallback): Use adopt function instead of constructor.
665         (isCommandEnabledCallback): Ditto.
666         (overridePreferenceCallback): Ditto.
667         (queueLoadCallback): Ditto.
668         (queueLoadHTMLStringCallback): Ditto.
669         (queueLoadingScriptCallback): Ditto.
670         (queueNonLoadingScriptCallback): Ditto.
671         (setAuthenticationPasswordCallback): Ditto.
672         (setAuthenticationUsernameCallback): Ditto.
673         (setDomainRelaxationForbiddenForURLSchemeCallback): Ditto.
674         (setMockGeolocationPositionUnavailableErrorCallback): Ditto.
675         (setPOSIXLocaleCallback): Ditto.
676         (setPersistentUserStyleSheetLocationCallback): Ditto.
677         (setUserStyleSheetLocationCallback): Ditto.
678         (setValueForUserCallback): Ditto.
679         (setWillSendRequestClearHeaderCallback): Ditto.
680         (setPageVisibilityCallback): Ditto.
681         (evaluateInWebInspectorCallback): Ditto.
682         (evaluateScriptInIsolatedWorldCallback): Ditto.
683         (evaluateScriptInIsolatedWorldAndReturnValueCallback): Ditto.
684         (addOriginAccessWhitelistEntryCallback): Ditto.
685         (removeOriginAccessWhitelistEntryCallback): Ditto.
686         (setScrollbarPolicyCallback): Ditto.
687         (addUserScriptCallback): Ditto.
688         (addUserStyleSheetCallback): Ditto.
689         (apiTestNewWindowDataLoadBaseURLCallback): Ditto.
690         (authenticateSessionCallback): Ditto.
691         (getTitleTextDirectionCallback): Ditto.
692         (getInspectorTestStubURLCallback): Ditto.
693         (simulateLegacyWebNotificationClickCallback): Ditto.
694         (setTextDirectionCallback): Ditto.
695         (grantWebNotificationPermissionCallback): Ditto.
696         (denyWebNotificationPermissionCallback): Ditto.
697         (accummulateLogsForChannel): Ditto.
698         (runUIScriptCallback): Ditto.
699         (TestRunner::makeWindowObject): Ditto.
700         (TestRunner::uiScriptDidComplete): Ditto.
701         (TestRunner::setOpenPanelFiles): Ditto.
702
703         * DumpRenderTree/TestRunner.h: Use JSRetainPtr instead of
704         raw pointers for the results of the functions that create strings.
705
706         * DumpRenderTree/ios/AccessibilityControllerIOS.mm:
707         (AccessibilityController::platformName const): Use the adopt
708         function instead of the adopt constructor.
709
710         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
711         (createEmptyJSString): Added. This helper function makes reduces the
712         repetitive code to create empty strings.
713         (concatenateAttributeAndValue): Changed to return a JSRetainPtr.
714         (AccessibilityUIElement::identifier): Ditto.
715         (AccessibilityUIElement::traits): Ditto.
716         (AccessibilityUIElement::url): Ditto.
717         (AccessibilityUIElement::speakAs): Ditto.
718         (AccessibilityUIElement::stringForSelection): Ditto.
719         (AccessibilityUIElement::stringForRange): Ditto.
720         (AccessibilityUIElement::attributedStringForRange): Ditto.
721         (AccessibilityUIElement::attributedStringForElement): Ditto.
722         (AccessibilityUIElement::pathDescription const): Ditto.
723         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
724         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
725         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
726         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
727         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
728         (AccessibilityUIElement::attributesOfChildren): Ditto.
729         (AccessibilityUIElement::allAttributes): Ditto.
730         (AccessibilityUIElement::stringAttributeValue): Ditto.
731         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
732         (AccessibilityUIElement::role): Ditto.
733         (AccessibilityUIElement::subrole): Ditto.
734         (AccessibilityUIElement::roleDescription): Ditto.
735         (AccessibilityUIElement::computedRoleString): Ditto.
736         (AccessibilityUIElement::title): Ditto.
737         (AccessibilityUIElement::description): Ditto.
738         (AccessibilityUIElement::orientation const): Ditto.
739         (AccessibilityUIElement::stringValue): Ditto.
740         (AccessibilityUIElement::language): Ditto.
741         (AccessibilityUIElement::helpText const): Ditto.
742         (AccessibilityUIElement::valueDescription): Ditto.
743         (AccessibilityUIElement::ariaDropEffects const): Ditto.
744         (AccessibilityUIElement::boundsForRange): Ditto.
745         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
746         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
747         (AccessibilityUIElement::attributesOfColumns): Ditto.
748         (AccessibilityUIElement::attributesOfRows): Ditto.
749         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
750         (AccessibilityUIElement::attributesOfHeader): Ditto.
751         (AccessibilityUIElement::rowIndexRange): Ditto.
752         (AccessibilityUIElement::columnIndexRange): Ditto.
753         (AccessibilityUIElement::selectedTextRange): Ditto.
754         (AccessibilityUIElement::accessibilityValue const): Ditto.
755         (AccessibilityUIElement::documentEncoding): Ditto.
756         (AccessibilityUIElement::documentURI): Ditto.
757         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
758         (AccessibilityUIElement::classList const): Ditto.
759
760         * DumpRenderTree/mac/AccessibilityCommonMac.h: Changed the
761         createJSStringRef method to return a JSRetainPtr.
762         * DumpRenderTree/mac/AccessibilityCommonMac.mm:
763         (-[NSString createJSStringRef]): Ditto.
764         (searchPredicateParameterizedAttributeForSearchCriteria): Use the
765         adopt function instead of the adopt constructor.
766         * DumpRenderTree/mac/AccessibilityControllerMac.mm:
767         (AccessibilityController::platformName const): Ditto.
768
769         * DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
770         (-[NSString createJSStringRef]): Return a JSRetainPtr.
771         (makeValueRefForValue): Updated for the above, no adopt needed here now.
772         (makeObjectRefForDictionary): Ditto.
773         (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.
774
775         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
776         (createEmptyJSString): Added. This helper function makes reduces the
777         repetitive code to create empty strings.
778         (concatenateAttributeAndValue): Changed to return a JSRetainPtr.
779         (descriptionOfElements): Ditto.
780         (selectTextParameterizedAttributeForCriteria): Ditto.
781         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
782         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
783         (AccessibilityUIElement::attributesOfChildren): Ditto.
784         (AccessibilityUIElement::allAttributes): Ditto.
785         (AccessibilityUIElement::stringAttributeValue): Ditto.
786         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
787         (AccessibilityUIElement::role): Ditto.
788         (AccessibilityUIElement::subrole): Ditto.
789         (AccessibilityUIElement::roleDescription): Ditto.
790         (AccessibilityUIElement::computedRoleString): Ditto.
791         (AccessibilityUIElement::title): Ditto.
792         (AccessibilityUIElement::description): Ditto.
793         (AccessibilityUIElement::orientation const): Ditto.
794         (AccessibilityUIElement::stringValue): Ditto.
795         (AccessibilityUIElement::language): Ditto.
796         (AccessibilityUIElement::helpText const): Ditto.
797         (AccessibilityUIElement::valueDescription): Ditto.
798         (AccessibilityUIElement::speakAs): Ditto.
799         (AccessibilityUIElement::classList const): Ditto.
800         (AccessibilityUIElement::ariaDropEffects const): Ditto.
801         (AccessibilityUIElement::rangeForLine): Ditto.
802         (AccessibilityUIElement::rangeForPosition): Ditto.
803         (AccessibilityUIElement::boundsForRange): Ditto.
804         (AccessibilityUIElement::stringForRange): Ditto.
805         (AccessibilityUIElement::attributedStringForRange): Ditto.
806         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
807         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
808         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
809         (AccessibilityUIElement::attributesOfColumns): Ditto.
810         (AccessibilityUIElement::attributesOfRows): Ditto.
811         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
812         (AccessibilityUIElement::attributesOfHeader): Ditto.
813         (AccessibilityUIElement::rowIndexRange): Ditto.
814         (AccessibilityUIElement::columnIndexRange): Ditto.
815         (AccessibilityUIElement::pathDescription const): Ditto.
816         (AccessibilityUIElement::selectedTextRange): Ditto.
817         (AccessibilityUIElement::accessibilityValue const): Ditto.
818         (AccessibilityUIElement::documentEncoding): Ditto.
819         (AccessibilityUIElement::documentURI): Ditto.
820         (AccessibilityUIElement::url): Ditto.
821         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
822         (createJSStringRef): Ditto.
823         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
824         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
825         (AccessibilityUIElement::supportedActions): Ditto.
826         (AccessibilityUIElement::mathPostscriptsDescription const): Ditto.
827         (AccessibilityUIElement::mathPrescriptsDescription const): Ditto.
828
829         * DumpRenderTree/mac/FrameLoadDelegate.mm:
830         (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]):
831         Use the adopt function instead of the adopt constructor.
832         * DumpRenderTree/mac/TestRunnerMac.mm:
833         (originsArrayToJS): Ditto.
834         (TestRunner::copyDecodedHostName): Return a JSRetainPtr.
835         (TestRunner::copyEncodedHostName): Ditto.
836         (TestRunner::pathToLocalResource): Ditto.
837         (TestRunner::queueLoad): Use adopt function instead of constructor.
838         (TestRunner::findString): Ditto.
839         (TestRunner::inspectorTestStubURL): Return a JSRetainPtr.
840
841         * DumpRenderTree/win/AccessibilityControllerWin.cpp:
842         (AccessibilityController::winNotificationReceived): Use adopt function
843         instead of adopt constructor.
844         (AccessibilityController::platformName const): Ditto.
845
846         * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
847         (createEmptyJSString): Added. This helper function makes reduces the
848         repetitive code to create empty strings.
849         (AccessibilityUIElement::allAttributes): Changed to return a JSRetainPtr.
850         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
851         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
852         (AccessibilityUIElement::attributesOfChildren): Ditto.
853         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
854         (AccessibilityUIElement::role): Ditto.
855         (AccessibilityUIElement::subrole): Ditto.
856         (AccessibilityUIElement::roleDescription): Ditto.
857         (AccessibilityUIElement::computedRoleString): Ditto.
858         (AccessibilityUIElement::title): Ditto.
859         (AccessibilityUIElement::description): Ditto.
860         (AccessibilityUIElement::stringValue): Ditto.
861         (AccessibilityUIElement::language): Ditto.
862         (AccessibilityUIElement::helpText const): Ditto.
863         (AccessibilityUIElement::valueDescription): Ditto.
864         (AccessibilityUIElement::ariaDropEffects const): Ditto.
865         (AccessibilityUIElement::orientation const): Ditto.
866         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
867         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
868         (AccessibilityUIElement::attributesOfColumns): Ditto.
869         (AccessibilityUIElement::attributesOfRows): Ditto.
870         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
871         (AccessibilityUIElement::attributesOfHeader): Ditto.
872         (AccessibilityUIElement::rowIndexRange): Ditto.
873         (AccessibilityUIElement::columnIndexRange): Ditto.
874         (AccessibilityUIElement::boundsForRange): Ditto.
875         (AccessibilityUIElement::stringForRange): Ditto.
876         (AccessibilityUIElement::attributedStringForRange): Ditto.
877         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
878         (AccessibilityUIElement::selectedTextRange): Ditto.
879         (AccessibilityUIElement::stringAttributeValue): Ditto.
880         (AccessibilityUIElement::accessibilityValue const): Ditto.
881         (AccessibilityUIElement::documentEncoding): Ditto.
882         (AccessibilityUIElement::documentURI): Ditto.
883         (AccessibilityUIElement::url): Ditto.
884         (AccessibilityUIElement::classList const): Ditto.
885
886         * DumpRenderTree/win/TestRunnerWin.cpp:
887         (TestRunner::copyDecodedHostName): Changed to return a JSRetainPtr.
888         (TestRunner::copyEncodedHostName): Ditto.
889         (TestRunner::pathToLocalResource): Ditto.
890         (TestRunner::queueLoad): Ditto.
891         (TestRunner::findString): Ditto.
892         (TestRunner::inspectorTestStubURL): Ditto.
893
894         * TestRunnerShared/Bindings/JSWrapper.h:
895         (WTR::setProperty): Use adopt function instead of constructor.
896         * TestRunnerShared/UIScriptContext/UIScriptContext.cpp:
897         (UIScriptContext::UIScriptContext): Ditto.
898         (UIScriptContext::runUIScript): Ditto.
899         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
900         (WTR::toDeviceOrientation): Ditto.
901
902         * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
903         (nsTextCheckingType): Changed this function to not take an rvalue
904         reference to a JSRetainPtr since it doesn't take ownership.
905         (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Updated
906         for the above change.
907
908         * TestWebKitAPI/JavaScriptTest.cpp:
909         (TestWebKitAPI::javaScriptCallback): Use adopt function instead of
910         adopt member function.
911
912         * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: Removed unneeded include.
913         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: Ditto.
914         * TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm: Use adopt function instead of
915         adopt constructor.
916         * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: Ditto.
917
918         * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
919         Removed unneeded includes.
920         * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto.
921         * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto.
922         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto.
923
924         * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
925         (_platformTypeConstructor): Use the adopt function instead of the
926         JSRetainPtr adopt constructor. Also nullptr instead of 0.
927
928         * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
929         (WTR::arrayLength): Use adopt function instead of constructor.
930         (WTR::parseModifierArray): Ditto.
931         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
932         (WTR::propertyValue): Ditto.
933         (WTR::dumpPath): Ditto.
934         (WTR::toJS): Ditto.
935         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
936         (WTR::TestRunner::findString): Ditto.
937         (WTR::TestRunner::statisticsDidRunTelemetryCallback): Ditto.
938         (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Ditto.
939         (WTR::TestRunner::setOpenPanelFiles): Ditto.
940         * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
941         (WTR::AccessibilityController::platformName): Ditto.
942
943         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
944         (-[NSString createJSStringRef]): Return a JSRetainPtr.
945         This fixes storage leaks in many functions below, which were using
946         the create function and putting the value right into a JSRetainPtr
947         without adoption.
948         (WTR::createEmptyJSString): Added. This helper function reduces the
949         repetitive code to create empty strings.
950         (WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
951         (WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
952         Use createEmptyJSString, fixing a storage leak due to missing adoption.
953         (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
954         (WTR::AccessibilityUIElement::attributesOfChildren): Ditto.
955         (WTR::AccessibilityUIElement::allAttributes): Ditto.
956         (WTR::AccessibilityUIElement::stringAttributeValue): Ditto.
957         (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto.
958         (WTR::AccessibilityUIElement::role): Ditto.
959         (WTR::AccessibilityUIElement::subrole): Ditto.
960         (WTR::AccessibilityUIElement::roleDescription): Ditto.
961         (WTR::AccessibilityUIElement::computedRoleString): Ditto.
962         (WTR::AccessibilityUIElement::title): Ditto.
963         (WTR::AccessibilityUIElement::orientation const): Ditto.
964         (WTR::AccessibilityUIElement::language): Ditto.
965         (WTR::AccessibilityUIElement::valueDescription): Ditto.
966         (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto.
967         (WTR::AccessibilityUIElement::boundsForRange): Ditto.
968         (WTR::AccessibilityUIElement::stringForRange): Removed unneeded null check.
969         (WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
970         (WTR::AccessibilityUIElement::attributesOfColumnHeaders):
971         Use createEmptyJSString, fixing a storage leak due to missing adoption.
972         (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
973         (WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
974         (WTR::AccessibilityUIElement::attributesOfRows): Ditto.
975         (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
976         (WTR::AccessibilityUIElement::attributesOfHeader): Ditto.
977         (WTR::AccessibilityUIElement::selectedTextRange): Ditto.
978         (WTR::AccessibilityUIElement::accessibilityValue const): Ditto.
979         (WTR::AccessibilityUIElement::documentEncoding): Ditto.
980         (WTR::AccessibilityUIElement::documentURI): Ditto.
981         (WTR::AccessibilityUIElement::stringForSelection): Removed unneeded
982         null check.
983         (WTR::AccessibilityUIElement::stringForTextMarkerRange):
984         Use createEmptyJSString, fixing a storage leak due to missing adoption.
985
986         * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
987         Use JSRetainPtr for the return value of createJSStringRef.
988         * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
989         (-[NSString createJSStringRef]): Ditto.
990         (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use the
991         adopt function instead of the adopt constructor.
992         * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
993         (WTR::AccessibilityController::platformName): Ditto
994
995         * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
996         (-[NSString createJSStringRef]): Return a JSRetainPtr.
997         (makeValueRefForValue): Updated for above by removing adopt.
998         (makeObjectRefForDictionary): Ditto.
999         (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.
1000
1001         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
1002         (WTR::createEmptyJSString): Added. This helper function makes reduces the
1003         repetitive code to create empty strings.
1004         (WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
1005         (WTR::descriptionOfElements): Ditto.
1006         (WTR::selectTextParameterizedAttributeForCriteria): Ditto.
1007         (WTR::AccessibilityUIElement::accessibilityValue const): Use createEmptyJSString,
1008         fixing a storage leak due to missing adoption.
1009         (WTR::AccessibilityUIElement::documentEncoding): Ditto.
1010         (WTR::AccessibilityUIElement::documentURI): Ditto.
1011         (WTR::createJSStringRef): Return a JSRetainPtr.
1012
1013         * WebKitTestRunner/StringFunctions.h:
1014         (WTR::toWK): Take a const& to eliminate a little bit of reference count churn.
1015         (WTR::toJS): Use the adopt function instead of the constructor.
1016
1017 2018-09-14  Dean Jackson  <dino@grorg.org>
1018
1019         Add Justin Michaud.
1020
1021         * Scripts/webkitpy/common/config/contributors.json:
1022
1023 2018-09-14  Ryan Haddad  <ryanhaddad@apple.com>
1024
1025         bots should pass --clobber-old-results to run-webkit-tests
1026         https://bugs.webkit.org/show_bug.cgi?id=189623
1027
1028         Reviewed by Aakash Jain.
1029
1030         In order to ensure that bots to not produce confusing results due to transient execptions,
1031         or run out of space if they continually hit an exception, old layout test results should be clobbered.
1032
1033         * BuildSlaveSupport/build.webkit.org-config/steps.py:
1034         (RunWebKitTests):
1035
1036 2018-09-13  Ryan Haddad  <ryanhaddad@apple.com>
1037
1038         Unreviewed, rolling out r235954.
1039
1040         Breaks the watchOS build.
1041
1042         Reverted changeset:
1043
1044         "Move IndexedDB to Network Process"
1045         https://bugs.webkit.org/show_bug.cgi?id=189415
1046         https://trac.webkit.org/changeset/235954
1047
1048 2018-09-13  Daniel Bates  <dabates@apple.com>
1049
1050         Add Copy WebKit Permalink plugin for Sublime Text
1051         https://bugs.webkit.org/show_bug.cgi?id=189589
1052
1053         Rubber-stamped by Joseph Pecoraro.
1054
1055         Port the Copy WebKit Permalink Automator service to a Sublime Text plugin. Once installed you can
1056         use the plugin to copy to the Clipboard a trac.webkit.org hyperlink to the selected line in the
1057         active document with or without blame annotations.
1058
1059         Once installed, you can Control-click (on Mac) or right-click (on Windows and Linux) on a line and
1060         choose Copy WebKit Permalink or Copy WebKit Permalink to Blame from the context menu to copy to the
1061         Clipboard a permanent hyperlink to the selected line without or with blame annotations, respectively.
1062         On Mac you can also invoke the same functionality using the keyboard shortcuts Command + Shift + Control + C
1063         and Command + Shift + Control + Option + C, respectively.
1064
1065         * CopyPermalink/Sublime Text/CopyWebKitPermalink/Context.sublime-menu: Added.
1066         * CopyPermalink/Sublime Text/CopyWebKitPermalink/CopyWebKitPermalink.py: Added.
1067         * CopyPermalink/Sublime Text/CopyWebKitPermalink/Default (OSX).sublime-keymap: Added.
1068         * CopyPermalink/Sublime Text/INSTALL: Added.
1069         * CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/Info.plist: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/Info.plist.
1070         * CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/document.wflow: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/document.wflow.
1071         * CopyPermalink/Xcode/INSTALL: Renamed from Tools/CopyPermalink/README.
1072
1073 2018-09-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1074
1075         Unreviewed. Fix WebDriver tests after r235225.
1076
1077         Use wpt serve command to run the http server.
1078
1079         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
1080         (WebDriverW3CWebServer.__init__):
1081         (WebDriverW3CWebServer.start):
1082         (WebDriverW3CWebServer.stop):
1083
1084 2018-09-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1085
1086         [GTK][WPE] Allow to run script dialogs asynchronously in the UI process
1087         https://bugs.webkit.org/show_bug.cgi?id=189544
1088
1089         Reviewed by Michael Catanzaro.
1090
1091         Add test cases for the new API.
1092
1093         * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
1094         (testWebViewJavaScriptDialogs):
1095
1096 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
1097
1098         [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
1099         https://bugs.webkit.org/show_bug.cgi?id=189496
1100         <rdar://problem/44370981>
1101
1102         Unreviewed warning fix.
1103
1104         r235929 has introduced a new compilation warning:
1105         > Tools/ImageDiff/cairo/PlatformImageCairo.cpp:34:70: warning: unused parameter ‘imageSize’ [-Wunused-parameter]
1106
1107         * ImageDiff/cairo/PlatformImageCairo.cpp:
1108         (ImageDiff::PlatformImage::createFromStdin): Removed the variable name.
1109
1110 2018-09-12  Dan Bernstein  <mitz@apple.com>
1111
1112         [Cocoa] Complete support for Paste as Quotation
1113         https://bugs.webkit.org/show_bug.cgi?id=189504
1114
1115         Reviewed by Wenson Hsieh.
1116
1117         * MiniBrowser/mac/MainMenu.xib: Added a Paste as Quotation command in the Edit menu.
1118
1119 2018-09-12  Sihui Liu  <sihui_liu@apple.com>
1120
1121         Move IndexedDB to Network Process
1122         https://bugs.webkit.org/show_bug.cgi?id=189415
1123
1124         Reviewed by Geoffrey Garen.
1125
1126         * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
1127         (TEST):
1128         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
1129         (TEST):
1130         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
1131         (TEST):
1132         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
1133         (TEST):
1134         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
1135         (TEST):
1136
1137 2018-09-12  Chris Dumez  <cdumez@apple.com>
1138
1139         PSON: No process swap on back navigation after URL bar navigation
1140         https://bugs.webkit.org/show_bug.cgi?id=189557
1141         <rdar://problem/44353108>
1142
1143         Reviewed by Alex Christensen.
1144
1145         Add API test coverage.
1146
1147         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1148
1149 2018-09-11  Dean Jackson  <dino@apple.com>
1150
1151         Header parsing for experimental and internal debug features
1152         https://bugs.webkit.org/show_bug.cgi?id=189486
1153         <rdar://problem/44320618>
1154
1155         Reviewed by Tim Horton.
1156
1157         Keep track of experimental and internal debug features in TestOptions, and
1158         allow webkit-test-runner headers to toggle them by name.
1159
1160         * DumpRenderTree/TestOptions.cpp:
1161         (TestOptions::TestOptions):
1162         * WebKitTestRunner/TestController.cpp:
1163         (WTR::TestController::resetPreferencesToConsistentValues):
1164         (WTR::updateTestOptionsFromTestHeader):
1165         * WebKitTestRunner/TestOptions.h:
1166         (WTR::TestOptions::hasSameInitializationOptions const):
1167
1168 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
1169
1170         [Win][Clang][DumpRenderTree] 0 and nullptr can't be implicitly converted to AccessibilityUIElement
1171         https://bugs.webkit.org/show_bug.cgi?id=189492
1172
1173         Reviewed by Alex Christensen.
1174
1175         0 and nullptr can't be implicitly converted to
1176         AccessibilityUIElement because only Windows port typedefs
1177         PlatformUIElement as COMPtr<IAccessible> not a pointer.
1178
1179         Replaced "return 0" and "return nullptr" with "return { nullptr }".
1180
1181         * DumpRenderTree/AccessibilityUIElement.cpp:
1182         (AccessibilityUIElement::horizontalScrollbar const):
1183         (AccessibilityUIElement::verticalScrollbar const):
1184         (AccessibilityUIElement::uiElementAttributeValue const):
1185         (AccessibilityUIElement::accessibilityElementForTextMarker):
1186         * DumpRenderTree/win/AccessibilityControllerWin.cpp:
1187         (AccessibilityController::elementAtPoint):
1188         (AccessibilityController::accessibleElementById):
1189         (AccessibilityController::focusedElement):
1190         (AccessibilityController::rootElement):
1191         * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
1192         (AccessibilityUIElement::elementAtPoint):
1193         (AccessibilityUIElement::linkedUIElementAtIndex):
1194         (AccessibilityUIElement::getChildAtIndex):
1195         (AccessibilityUIElement::titleUIElement):
1196         (AccessibilityUIElement::parentElement):
1197         (AccessibilityUIElement::uiElementForSearchPredicate):
1198         (AccessibilityUIElement::cellForColumnAndRow):
1199         (AccessibilityUIElement::disclosedRowAtIndex):
1200         (AccessibilityUIElement::ariaOwnsElementAtIndex):
1201         (AccessibilityUIElement::ariaFlowToElementAtIndex):
1202         (AccessibilityUIElement::ariaControlsElementAtIndex):
1203         (AccessibilityUIElement::selectedRowAtIndex):
1204         (AccessibilityUIElement::rowAtIndex):
1205         (AccessibilityUIElement::disclosedByRow):
1206         (AccessibilityUIElement::selectedChildAtIndex const):
1207
1208 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1209
1210         FontManagerTests.ChangeFontColorWithColorPanel fails on macOS Sierra
1211         https://bugs.webkit.org/show_bug.cgi?id=189382
1212
1213         Reviewed by Ryosuke Niwa.
1214
1215         Fix the test by specifying colors in RGB colorspace.
1216
1217         * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
1218         (TestWebKitAPI::TEST):
1219
1220 2018-09-11  Fujii Hironori  <Hironori.Fujii@sony.com>
1221
1222         [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
1223         https://bugs.webkit.org/show_bug.cgi?id=189496
1224
1225         Reviewed by Alex Christensen.
1226
1227         * ImageDiff/cairo/PlatformImageCairo.cpp:
1228         (ImageDiff::PlatformImage::createFromStdin): Removed unnecessary ReadContext struct.
1229         (ImageDiff::PlatformImage::writeAsPNGToStdout): Use '%lu' format type specifier for unsigned long.
1230
1231 2018-09-07  Dean Jackson  <dino@apple.com>
1232
1233         Add and expose Internal features from WebKit
1234         https://bugs.webkit.org/show_bug.cgi?id=189442
1235         <rdar://problem/44243404>
1236
1237         Reviewed by Simon Fraser.
1238
1239         Update MiniBrowser to expose an Internal feature menu.
1240
1241         * MiniBrowser/mac/AppDelegate.m:
1242         (defaultConfiguration):
1243         * MiniBrowser/mac/SettingsController.m:
1244         (-[SettingsController _populateMenu]):
1245         (-[SettingsController validateMenuItem:]):
1246         (-[SettingsController toggleExperimentalFeature:]):
1247         (-[SettingsController toggleInternalDebugFeature:]):
1248
1249 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1250
1251         [macOS] [WK2] Support changing foreground colors via color panel
1252         https://bugs.webkit.org/show_bug.cgi?id=189382
1253         <rdar://problem/44227311>
1254
1255         Reviewed by Ryosuke Niwa.
1256
1257         Add an API test that uses NSColorPanel to change the color of selected text, and also apply typing styles when
1258         the selection is collapsed. The test also exercises switching between opaque colors (alpha = 1) and transparent
1259         colors, as well as making different parts of a word different colors.
1260
1261         * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
1262         (-[TestWKWebView collapseToEnd]):
1263         (webViewForFontManagerTesting):
1264         (TestWebKitAPI::TEST):
1265         * TestWebKitAPI/cocoa/TestWKWebView.h:
1266
1267 == Rolled over to ChangeLog-2018-09-11 ==