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