[WHLSL] Allow uniform buffers to be used in the interpreter
[WebKit-https.git] / Tools / ChangeLog
1 2018-09-28  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         [WHLSL] Allow uniform buffers to be used in the interpreter
4         https://bugs.webkit.org/show_bug.cgi?id=189210
5
6         Reviewed by Filip Pizlo.
7
8         Every lvalue is associated with an address space, and the propagation of these address spaces
9         matches the propagation of lvalues. Luckily, there was already the infrastructure to do most
10         of this, so this patch just goes the last few yards. It also updates the standard library to
11         allow for writing into all writable address spaces for out-params.
12
13         * WebGPUShadingLanguageRI/Checker.js:
14         (Checker.prototype.visitAssignment):
15         (Checker.prototype._finishVisitingPropertyAccess):
16         * WebGPUShadingLanguageRI/Intrinsics.js:
17         (Intrinsics.):
18         (Intrinsics.checkFalse):
19         (Intrinsics):
20         * WebGPUShadingLanguageRI/StandardLibrary.js:
21         (let.standardLibrary):
22         * WebGPUShadingLanguageRI/Test.js:
23         (tests.threadArrayRefLoad):
24         (tests.threadArrayRefLoadIntLiteral):
25         (tests.deviceArrayRefLoad):
26         (tests.threadArrayRefStore):
27         (tests.deviceArrayRefStore):
28         (tests.deviceArrayRefStoreIntLiteral):
29         (tests.threadPointerLoad):
30         (tests.threadPointerStore):
31         (tests.devicePointerLoad):
32         (tests.devicePointerStore):
33         (tests.arrayLoad):
34         (tests.constantAddressSpace):
35         (tests.standardLibraryDevicePointers):
36         (tests.threadArrayLoad): Deleted.
37         (tests.threadArrayLoadIntLiteral): Deleted.
38         (tests.deviceArrayLoad): Deleted.
39         (tests.threadArrayStore): Deleted.
40         (tests.deviceArrayStore): Deleted.
41         (tests.deviceArrayStoreIntLiteral): Deleted.
42
43 2018-09-28  Wenson Hsieh  <wenson_hsieh@apple.com>
44
45         No DOM API to instantiate an attachment for an img element
46         https://bugs.webkit.org/show_bug.cgi?id=189934
47         <rdar://problem/44743222>
48
49         Reviewed by Ryosuke Niwa.
50
51         Adds 3 new API tests in WKAttachmentTests:
52
53         `AddAttachmentToConnectedImageElement` verifies that an image element that's already in the document can gain an
54         attachment element via `HTMLAttachmentElement.getAttachmentIdentifier`.
55
56         `ChangeFileWrapperForPastedImage` verifies that an image that has been pasted produces a _WKAttachment in the UI
57         process, and changing the file wrapper of that _WKAttachment changes the pasted image.
58
59         `ConnectImageWithAttachmentToDocument` verifies that script can create an image element, ensure that it has an
60         attachment, and set a file wrapper for the generated _WKAttachment. Connecting the image to the document should
61         then result in an image element with the contents of the _WKAttachment's file wrapper.
62
63         * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
64         (-[TestWKWebView imageElementSize]):
65         (-[TestWKWebView waitForImageElementSizeToBecome:]):
66         (TestWebKitAPI::TEST):
67         (-[TestWKWebView waitForAttachmentElementSizeToBecome:]): Deleted.
68
69 2018-09-28  Chris Dumez  <cdumez@apple.com>
70
71         Regression(r236512): http/tests/navigation/keyboard-events-during-provisional-navigation.html is flaky
72         https://bugs.webkit.org/show_bug.cgi?id=190052
73
74         Reviewed by Ryosuke Niwa.
75
76         The test relies on EventSender to send events to the page synchronously to the page and then uses console.log
77         to log those events. It also uses console.log() before sending those events to indicate what the test is about
78         to do. Note that console.log() normally causes the WebKitTestRunner to send an asynchronous IPC to the UIProcess
79         so that it can log the message.
80         The issue is that EventSender uses IPC::SendOption::UseFullySynchronousModeForTesting when sending the
81         sync IPC to the UIProcess. This option causes follow-up *asynchronous* IPC sent from the synchronous IPC reply
82         handler to be transformed into synchronous IPC.
83         As a result, some of the console.log IPC ended up being asynchronous and some other ended up being synchronous.
84         Because synchronous and asynchronous IPC is not necessarily processed in-order by the UIProcess, the logged
85         messages may end up being out of order, leading to flakiness.
86
87         To address the issue, we now make sure that InjectedBundle::outputText() uses a new IPC::SendOption indicating
88         that the IPC should always be sent asynchronously, even if the connection is in fully synchronous mode. As a
89         result, all text outputing IPC to the UIProcess will be asynchronous, and thus in order.
90
91         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
92         (WTR::InjectedBundle::outputText):
93
94 2018-09-28  Myles C. Maxfield  <mmaxfield@apple.com>
95
96         [WHLSL] Pointers should have automatically-generated equality checks
97         https://bugs.webkit.org/show_bug.cgi?id=189986
98
99         Reviewed by Filip Pizlo.
100
101         C allows for pointer equality, and we need it so people can do null checks.
102         This is generated the same way all our other NativeFuncs are generated - by Checker
103         creating NativeFuncs inside CallExpression.resolve().
104
105         This patch also does some general cleanup.
106
107         * WebGPUShadingLanguageRI/All.js: Everything the late checker does is no longer necessary.
108         The last thing it was doing was making sure that only primitive types are in resources, but
109         it's totally reasonable to put structs and arrays in resources, so I removed this pass. We
110         still have to add a check to make sure resources can't live within resources, but I expect
111         that will be done in the same place that semantics are checked.
112         * WebGPUShadingLanguageRI/AllocateAtEntryPoints.js:
113         (allocateAtEntryPoints.updateFunction.UpdateFunctions.prototype._addVariableDeclaration):
114         Name the global struct for debugging purposes.
115         * WebGPUShadingLanguageRI/CallExpression.js: 
116         (CallExpression.prototype._resolveByInstantiation): Cleanup
117         (CallExpression.prototype._resolveWithOperatorAnderIndexer): Ditto
118         (CallExpression.prototype._resolveWithOperatorLength): Ditto
119         (CallExpression.prototype._resolveWithReferenceComparator): Add support to automatically
120         generate pointer equality NativeFuncs.
121         * WebGPUShadingLanguageRI/EPtr.js: Implement pointer equality in the interpreter.
122         * WebGPUShadingLanguageRI/LateChecker.js: Removed.
123         * WebGPUShadingLanguageRI/LayoutBuffers.js: Renamed from Tools/WebGPUShadingLanguageRI/LateCheckAndLayoutBuffers.js.
124         (layoutBuffers):
125         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/WHLSL Tests.xcodeproj/project.pbxproj:
126         * WebGPUShadingLanguageRI/NativeFunc.js:
127         * WebGPUShadingLanguageRI/OperatorArrayRefLength.js:
128         (OperatorArrayRefLength.prototype.instantiateImplementation):
129         (OperatorArrayRefLength):
130         * WebGPUShadingLanguageRI/Prepare.js:
131         (let.prepare):
132         * WebGPUShadingLanguageRI/SPIRV.html:
133         * WebGPUShadingLanguageRI/Test.html:
134         * WebGPUShadingLanguageRI/Test.js:
135         (tests.ternaryExpression):
136         (tests.break): Speed up testing time
137         (tests.doWhile): Ditto
138         (tests.forLoop): Ditto
139         (tests.atomics): Ditto
140         (tests.atomicsNull): Ditto
141         (tests.pointerEquality): Test pointer equality
142         (tests.standardLibraryDevicePointers):
143         (tests.devicePtrPtr): Deleted.
144         (tests.threadgroupPtrPtr): Deleted.
145         (tests.constantPtrPtr): Deleted.
146         * WebGPUShadingLanguageRI/index.html:
147
148 2018-09-28  Jiewen Tan  <jiewen_tan@apple.com>
149
150         [WebAuthN] Polish WebAuthN auto-test environment
151         https://bugs.webkit.org/show_bug.cgi?id=189283
152         <rdar://problem/44117828>
153
154         Reviewed by Chris Dumez.
155
156         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
157         (WTR::TestRunner::setWebAuthenticationMockConfiguration):
158
159 2018-09-28  Chris Dumez  <cdumez@apple.com>
160
161         Drop support for cross-origin-window-policy header
162         https://bugs.webkit.org/show_bug.cgi?id=190081
163
164         Reviewed by Ryosuke Niwa.
165
166         190081_DropCrossOriginWindowPolicy
167
168         * DumpRenderTree/mac/DumpRenderTree.mm:
169         (enableExperimentalFeatures):
170         * DumpRenderTree/win/DumpRenderTree.cpp:
171         (enableExperimentalFeatures):
172         * WebKitTestRunner/TestController.cpp:
173         (WTR::TestController::resetPreferencesToConsistentValues):
174
175 2018-09-28  Koby Boyango  <koby.b@mce.systems>
176
177         [WTF] Add ExternalStringImpl, a StringImpl for user controlled buffers
178         https://bugs.webkit.org/show_bug.cgi?id=189991
179
180         Reviewed by Yusuke Suzuki.
181
182         * TestWebKitAPI/Tests/WTF/StringImpl.cpp:
183
184 2018-09-27  Ryan Haddad  <ryanhaddad@apple.com>
185
186         Update flakiness dashboard configuration for Mojave queues
187         https://bugs.webkit.org/show_bug.cgi?id=190068
188
189         Reviewed by Alexey Proskuryakov.
190
191         * TestResultServer/static-dashboards/builders.jsonp:
192
193 2018-09-27  Ryan Haddad  <ryanhaddad@apple.com>
194
195         Bring up queues for Mojave
196         https://bugs.webkit.org/show_bug.cgi?id=189935
197
198         Unreviewed infrastructure fix.
199
200         * BuildSlaveSupport/build.webkit.org-config/config.json: Remove trigger, update bot assignment.
201
202 2018-09-24  Ryan Haddad  <ryanhaddad@apple.com>
203
204         Bring up queues for Mojave
205         https://bugs.webkit.org/show_bug.cgi?id=189935
206
207         Reviewed by Alexey Proskuryakov.
208
209         * BuildSlaveSupport/build.webkit.org-config/config.json:
210         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
211         (WebKitBuildbot):
212         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
213
214 2018-09-27  Ryan Haddad  <ryanhaddad@apple.com>
215
216         Increase the timeout for iOS Simulator data migration
217         https://bugs.webkit.org/show_bug.cgi?id=190059
218
219         Reviewed by Aakash Jain.
220
221         3 minutes isn't always enough time for the data migrator to complete
222         when booting up multiple iOS Simulators. Change the timeout to 10 minutes.
223
224         * Scripts/webkitpy/xcode/simulated_device.py:
225         (SimulatedDeviceManager): Create a constant for the default timeout.
226         (SimulatedDeviceManager.initialize_devices): Use new constant.
227         (SimulatedDeviceManager.swap): Ditto.
228         (SimulatedDeviceManager.wait_until_data_migration_is_done): Ditto.
229
230 2018-09-27  Alex Christensen  <achristensen@webkit.org>
231
232         URLParser should use TextEncoding through an abstract class
233         https://bugs.webkit.org/show_bug.cgi?id=190027
234
235         Reviewed by Andy Estes.
236
237         * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
238         (TestWebKitAPI::checkURL):
239         (TestWebKitAPI::TEST_F):
240
241 2018-09-27  Ryan Haddad  <ryanhaddad@apple.com>
242
243         iOS Simulator bots should pass '--dedicated-simulators' to run-webkit-tests
244         https://bugs.webkit.org/show_bug.cgi?id=190042
245
246         Reviewed by Aakash Jain.
247
248         To make iOS Simulator bots resilient to issues that can arise from reusing
249         existing simulators, ensure that dedicated simulators are created for each test run.
250
251         * Scripts/webkitpy/common/config/ports.py:
252         (IOSSimulatorWK2Port.run_webkit_tests_command):
253
254 2018-09-27  Alex Christensen  <achristensen@webkit.org>
255
256         URLWithUserTypedString should return nil for URLs deemed to be invalid by WebCore::URL
257         https://bugs.webkit.org/show_bug.cgi?id=189979
258
259         Reviewed by Youenn Fablet.
260
261         * TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:
262         (TestWebKitAPI::originalDataAsString):
263         (TestWebKitAPI::TEST):
264
265 2018-09-27  Basuke Suzuki  <Basuke.Suzuki@sony.com>
266
267         [Win][WebKit] Implement authentication dialog on MiniBrowser.
268         https://bugs.webkit.org/show_bug.cgi?id=189846
269
270         Reviewed by Fujii Hironori.
271
272         It was implemented for WebKitLegacy, but not for WebKit.
273         Also added text field to display Realm information.
274
275         * MiniBrowser/win/Common.cpp:
276         (authDialogProc):
277         (askCredential):
278         (displayAuthDialog): Deleted.
279         * MiniBrowser/win/Common.h:
280         * MiniBrowser/win/MiniBrowserLib.rc:
281         * MiniBrowser/win/MiniBrowserLibResource.h:
282         * MiniBrowser/win/ResourceLoadDelegate.cpp:
283         (ResourceLoadDelegate::didReceiveAuthenticationChallenge):
284         * MiniBrowser/win/WebKitBrowserWindow.cpp:
285         (createString):
286         (createUTF8String):
287         (createWKString):
288         (createWKURL):
289         (WebKitBrowserWindow::WebKitBrowserWindow):
290         (WebKitBrowserWindow::didReceiveAuthenticationChallenge):
291         (toNullTerminatedUTF8): Deleted.
292         * MiniBrowser/win/WebKitBrowserWindow.h:
293
294 2018-09-27  Youenn Fablet  <youenn@apple.com>
295
296         Enable getUserMedia in mini browser
297         https://bugs.webkit.org/show_bug.cgi?id=190012
298
299         Reviewed by Eric Carlson.
300
301         Enable MediaDevices and mock capture devices.
302         Grant mock devices access to any getUserMedia call.
303         Covered by manual testing.
304
305         * MiniBrowser/mac/AppDelegate.m:
306         (defaultConfiguration):
307         * MiniBrowser/mac/WK2BrowserWindowController.m:
308         (-[WK2BrowserWindowController _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
309         (-[WK2BrowserWindowController _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
310
311 2018-09-27  Antoine Quint  <graouts@apple.com>
312
313         [Web Animations] Turn Web Animations with CSS integration on
314         https://bugs.webkit.org/show_bug.cgi?id=184819
315         <rdar://problem/39597337>
316
317         Reviewed by Dean Jackson.
318
319         * DumpRenderTree/TestOptions.h:
320
321 2018-09-26  Alex Christensen  <achristensen@webkit.org>
322
323         Unreviewed, rolling out r236524.
324
325         Broke API tests
326
327         Reverted changeset:
328
329         "URLWithUserTypedString should return nil for URLs deemed to
330         be invalid by WebCore::URL"
331         https://bugs.webkit.org/show_bug.cgi?id=189979
332         https://trac.webkit.org/changeset/236524
333
334 2018-09-26  James Savage  <james.savage@apple.com>
335
336         Allow override of viewport configuration.
337         https://bugs.webkit.org/show_bug.cgi?id=188772.
338         <rdar://problem/43538892>.
339
340         Reviewed by Simon Fraser.
341
342         * WebKitTestRunner/TestController.cpp:
343         (WTR::updateTestOptionsFromTestHeader): Parse new test option key from comments.
344         * WebKitTestRunner/TestOptions.h:
345         * WebKitTestRunner/ios/TestControllerIOS.mm:
346         (WTR::TestController::platformConfigureViewForTest): Handle new test option by
347         modifying the web view's preferences accordingly.
348
349 2018-09-26  Alex Christensen  <achristensen@webkit.org>
350
351         URLs with mismatched surrogate pairs in the host should fail to parse
352         https://bugs.webkit.org/show_bug.cgi?id=190005
353
354         Reviewed by Chris Dumez.
355
356         * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
357         (TestWebKitAPI::TEST_F):
358
359 2018-09-26  Alex Christensen  <achristensen@webkit.org>
360
361         URLWithUserTypedString should return nil for URLs deemed to be invalid by WebCore::URL
362         https://bugs.webkit.org/show_bug.cgi?id=189979
363         <rdar://problem/44119696>
364
365         Reviewed by Chris Dumez.
366
367         * TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:
368         (TestWebKitAPI::TEST):
369
370 2018-09-26  Ryosuke Niwa  <rniwa@webkit.org>
371
372         Selection should work across shadow boundary when initiated by a mouse drag
373         https://bugs.webkit.org/show_bug.cgi?id=151380
374         <rdar://problem/24363872>
375
376         Reviewed by Wenson Hsieh.
377
378         Added the support for internal:selectionAcrossShadowBoundariesEnabled test option.
379
380         * DumpRenderTree/TestOptions.cpp:
381         (TestOptions::TestOptions):
382         * DumpRenderTree/TestOptions.h:
383         * DumpRenderTree/mac/DumpRenderTree.mm:
384         (resetWebPreferencesToConsistentValues):
385         (setWebPreferencesForTestOptions):
386
387 2018-09-26  Ryosuke Niwa  <rniwa@webkit.org>
388
389         MiniBrowser doesn't respect default enabled-ness of experimental and internal debug features
390         https://bugs.webkit.org/show_bug.cgi?id=189989
391
392         Reviewed by Simon Fraser.
393
394         When the preference isn't found in user defaults, use the default value of each feature's enabledness.
395
396         * MiniBrowser/mac/AppDelegate.m:
397         (defaultConfiguration):
398
399 2018-09-26  Philippe Normand  <pnormand@igalia.com>
400
401         [Flatpak] Bump to apr 1.6.5
402
403         Version 1.6.3 is no longer available on Apache's website.
404
405         Rubber-stamped by Michael Catanzaro.
406
407         * flatpak/org.webkit.WebKit.yaml:
408
409 2018-09-25  Jiewen Tan  <jiewen_tan@apple.com>
410
411         [WebAuthN] Make AuthenticatorManager
412         https://bugs.webkit.org/show_bug.cgi?id=189279
413         <rdar://problem/44116792>
414
415         Reviewed by Chris Dumez.
416
417         Besides the functionality to set the WebAuthenticationMockConfiguration. Three operations are
418         added to manipulate Keychain: addTestKeyToKeychain, cleanUpKeychain and keyExistedInKeychain.
419
420         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
421         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm: Removed.
422         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
423         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
424         (WTR::TestRunner::setWebAuthenticationMockConfiguration):
425         (WTR::TestRunner::addTestKeyToKeychain):
426         (WTR::TestRunner::cleanUpKeychain):
427         (WTR::TestRunner::isKeyExisted):
428         * WebKitTestRunner/InjectedBundle/TestRunner.h:
429         * WebKitTestRunner/TestController.cpp:
430         (WTR::TestController::addTestKeyToKeychain):
431         (WTR::TestController::cleanUpKeychain):
432         (WTR::TestController::isKeyExisted):
433         (WTR::TestController::setWebAuthenticationMockConfiguration):
434         * WebKitTestRunner/TestController.h:
435         * WebKitTestRunner/TestInvocation.cpp:
436         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
437         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
438         * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
439         (WTR::TestController::addTestKeyToKeychain):
440         (WTR::TestController::cleanUpKeychain):
441         (WTR::TestController::keyExistedInKeychain):
442
443 2018-09-25  Sihui Liu  <sihui_liu@apple.com>
444
445         Move Service Worker Management from Storage Process to Network Process
446         https://bugs.webkit.org/show_bug.cgi?id=189422
447
448         Reviewed by Youenn Fablet.
449
450         Change a check in ServiceWorkers.HasServiceWorkerRegistrationBit as storage process is not
451         launched during service worker operations now.
452
453         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
454
455 2018-09-25  Eric Carlson  <eric.carlson@apple.com>
456
457         [MediaStream] Update constraints supported by getDisplayMedia
458         https://bugs.webkit.org/show_bug.cgi?id=189930
459         <rdar://problem/44740305>
460
461         Unreviewed, fix test broken by r236465.
462
463         * TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm:
464         (TestWebKitAPI::TEST_F):
465
466 2018-09-25  Myles C. Maxfield  <mmaxfield@apple.com>
467
468         [WHSL] Implement semantics
469         https://bugs.webkit.org/show_bug.cgi?id=189134
470
471         Reviewed by Filip Pizlo.
472
473         This patch adds parsing support and adds the checks required to support HLSL-style semantics.
474
475         There are 3 places where semantics are allowed:
476
477         1. In a field in a struct. E.g.
478
479         struct R {
480             float4 position : SV_Position;
481         }
482         vertex R foo() {
483             ...
484         }
485
486         2. In a parameter of a function. If the function is not an entry point, the semantic is ignored.
487
488         compute void foo(device float[] data : buffer(u0)) {
489             ...
490         }
491
492         3. On a function. This is so you don't have to create structs for the return types of simple vertex shaders.
493
494         vertex float4 foo() : SV_Position {
495             ...
496         }
497
498         The semantics are partitioned into 4 types:
499
500         1. Built-in variables. For example, : SV_Position.
501         2. Resources. For example, : register(u0).
502         3. Stage-in / stage-out variables. For example, : attribute(0).
503         4. Specialization constants. For example, : specialized.
504
505         The semantics are validated according to a collection of rules:
506
507         - The same entry point can't list the same semantic twice
508         - Each built-in type has an appropriate type that is listed in the spec. 
509         - Each built-in is appropriate as either an input or an output of a particular shader stage
510         - Resource semantics have to have the appropriate type (e.g. can't use register(s0) on a buffer)
511         - Resources can't be output from entry points
512         - The resource semantic mode must match the address space of the resource
513         - Stage-in and stage-out variables have to be POD
514         - Specialization constants can't be output from entry points, and have to be numbers
515
516         * WebGPUShadingLanguageRI/All.js:
517         * WebGPUShadingLanguageRI/BuiltInSemantic.js: Added.
518         (BuiltInSemantic):
519         (BuiltInSemantic.prototype.get name):
520         (BuiltInSemantic.prototype.get extraArguments):
521         (BuiltInSemantic.prototype.isAcceptableType):
522         (BuiltInSemantic.prototype.isAcceptableForShaderType):
523         (BuiltInSemantic.prototype.toString):
524         * WebGPUShadingLanguageRI/CallExpression.js:
525         (CallExpression.prototype._resolveWithOperatorAnderIndexer):
526         (CallExpression.prototype._resolveWithOperatorLength):
527         * WebGPUShadingLanguageRI/Checker.js:
528         (Checker):
529         (Checker.prototype.visitProgram):
530         (Checker.prototype._checkSemantics.Item):
531         (Checker.prototype._checkSemantics.Item.prototype.get type):
532         (Checker.prototype._checkSemantics.Item.prototype.get semantic):
533         (Checker.prototype._checkSemantics.Gatherer):
534         (Checker.prototype._checkSemantics.Gatherer.prototype.reset):
535         (Checker.prototype._checkSemantics.Gatherer.prototype.set currentSemantic):
536         (Checker.prototype._checkSemantics.Gatherer.prototype.get currentSemantic):
537         (Checker.prototype._checkSemantics.Gatherer.prototype.get result):
538         (Checker.prototype._checkSemantics.Gatherer.prototype.visitEnumType):
539         (Checker.prototype._checkSemantics.Gatherer.prototype.visitVectorType):
540         (Checker.prototype._checkSemantics.Gatherer.prototype.visitMatrixType):
541         (Checker.prototype._checkSemantics.Gatherer.prototype.visitNativeType):
542         (Checker.prototype._checkSemantics.Gatherer.prototype.visitStructType):
543         (Checker.prototype._checkSemantics.Gatherer.prototype.visitTypeRef):
544         (Checker.prototype._checkSemantics.Gatherer.prototype.visitPtrType):
545         (Checker.prototype._checkSemantics.Gatherer.prototype.visitArrayRefType):
546         (Checker.prototype._checkSemantics.Gatherer.prototype.visitArrayType):
547         (Checker.prototype._checkSemantics.Gatherer.prototype.visitFuncParameter):
548         (Checker.prototype._checkSemantics.checkDuplicateSemantics):
549         (Checker.prototype._checkSemantics.checkSemanticTypes):
550         (Checker.prototype._checkSemantics.checkSemanticForShaderType):
551         (Checker.prototype._checkSemantics.PODChecker.prototype.visitEnumType):
552         (Checker.prototype._checkSemantics.PODChecker.prototype.visitArrayType):
553         (Checker.prototype._checkSemantics.PODChecker.prototype.visitVectorType):
554         (Checker.prototype._checkSemantics.PODChecker.prototype.visitMatrixType):
555         (Checker.prototype._checkSemantics.PODChecker.prototype.visitNativeType):
556         (Checker.prototype._checkSemantics.PODChecker.prototype.visitPtrType):
557         (Checker.prototype._checkSemantics.PODChecker.prototype.visitArrayRefType):
558         (Checker.prototype._checkSemantics.PODChecker.prototype.visitStructType):
559         (Checker.prototype._checkSemantics.PODChecker.prototype.visitTypeRef):
560         (Checker.prototype._checkSemantics.PODChecker):
561         (Checker.prototype._checkSemantics.checkPODData):
562         (Checker.prototype._checkSemantics):
563         (Checker.prototype._checkShaderType):
564         (Checker.prototype._checkOperatorOverload):
565         (Checker.prototype.visitFuncDef):
566         (Checker.prototype.visitEnumType):
567         (Checker.prototype.visitArrayType):
568         (Checker.prototype.visitMakePtrExpression):
569         (Checker.prototype.visitMakeArrayRefExpression):
570         (Checker.prototype._finishVisitingPropertyAccess):
571         (Checker.prototype.visitIndexExpression):
572         (Checker.prototype.visitReturn):
573         (Checker.prototype.visitSwitchStatement):
574         (Checker.prototype.visitTernaryExpression):
575         (Checker.prototype.visitCallExpression):
576         * WebGPUShadingLanguageRI/Field.js:
577         (Field):
578         (Field.prototype.get semantic):
579         (Field.prototype.toString):
580         * WebGPUShadingLanguageRI/Func.js:
581         (Func):
582         (Func.prototype.get semantic):
583         (Func.prototype.toDeclString):
584         * WebGPUShadingLanguageRI/FuncDef.js:
585         (FuncDef):
586         * WebGPUShadingLanguageRI/FuncParameter.js:
587         (FuncParameter):
588         (FuncParameter.prototype.get semantic):
589         (FuncParameter.prototype.toString):
590         * WebGPUShadingLanguageRI/Intrinsics.js:
591         * WebGPUShadingLanguageRI/LateChecker.js:
592         (LateChecker.prototype.visitReferenceType):
593         (LateChecker):
594         (LateChecker.prototype._checkShaderType): Deleted.
595         (LateChecker.prototype.visitFuncDef): Deleted.
596         * WebGPUShadingLanguageRI/NativeFunc.js:
597         (NativeFunc):
598         * WebGPUShadingLanguageRI/Parse.js:
599         (parseParameter):
600         (parseFuncDecl):
601         (parseFuncDef):
602         (parseStageInOutSemantic):
603         (parseResourceSemantic):
604         (parseSpecializationConstantSemantic):
605         (parseBuiltInSemantic):
606         (parseField):
607         (parseNativeFunc):
608         * WebGPUShadingLanguageRI/ProgramWithUnnecessaryThingsRemoved.js:
609         (programWithUnnecessaryThingsRemoved):
610         * WebGPUShadingLanguageRI/ResourceSemantic.js: Added.
611         (ResourceSemantic):
612         (ResourceSemantic.prototype.get resourceMode):
613         (ResourceSemantic.prototype.get index):
614         (ResourceSemantic.prototype.get space):
615         (ResourceSemantic.prototype.isAcceptableType):
616         (ResourceSemantic.prototype.isAcceptableForShaderType):
617         (ResourceSemantic.prototype.toString):
618         * WebGPUShadingLanguageRI/Rewriter.js:
619         (Rewriter.prototype.visitFuncParameter):
620         (Rewriter.prototype.visitField):
621         (Rewriter.prototype.visitBuiltInSemantic):
622         (Rewriter.prototype.visitResourceSemantic):
623         (Rewriter.prototype.visitStageInOutSemantic):
624         (Rewriter.prototype.visitSpecializationConstantSemantic):
625         (Rewriter):
626         * WebGPUShadingLanguageRI/SPIRV.html:
627         * WebGPUShadingLanguageRI/Semantic.js: Added.
628         (Semantic):
629         (Semantic.prototype.get origin):
630         (Semantic.prototype.equalToOtherSemantic.Comparer.prototype.visitBuiltInSemantic):
631         (Semantic.prototype.equalToOtherSemantic.Comparer.prototype.visitResourceSemantic):
632         (Semantic.prototype.equalToOtherSemantic.Comparer.prototype.visitStageInOutSemantic):
633         (Semantic.prototype.equalToOtherSemantic.Comparer.prototype.visitSpecializationConstantSemantic):
634         (Semantic.prototype.equalToOtherSemantic.Comparer):
635         (Semantic.prototype.equalToOtherSemantic):
636         * WebGPUShadingLanguageRI/SpecializationConstantSemantic.js: Copied from Tools/WebGPUShadingLanguageRI/Field.js.
637         (SpecializationConstantSemantic):
638         (SpecializationConstantSemantic.prototype.isAcceptableType):
639         (SpecializationConstantSemantic.prototype.isAcceptableForShaderType):
640         (SpecializationConstantSemantic.prototype.toString):
641         * WebGPUShadingLanguageRI/StageInOutSemantic.js: Copied from Tools/WebGPUShadingLanguageRI/FuncDef.js.
642         (StageInOutSemantic):
643         (StageInOutSemantic.prototype.get index):
644         (StageInOutSemantic.prototype.isAcceptableType):
645         (StageInOutSemantic.prototype.isAcceptableForShaderType):
646         (StageInOutSemantic.prototype.toString):
647         * WebGPUShadingLanguageRI/StatementCloner.js:
648         (StatementCloner.prototype.visitNativeFunc):
649         * WebGPUShadingLanguageRI/SynthesizeArrayOperatorLength.js:
650         (synthesizeArrayOperatorLength):
651         * WebGPUShadingLanguageRI/SynthesizeCopyConstructorOperator.js:
652         (synthesizeCopyConstructorOperator):
653         * WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js:
654         (synthesizeDefaultConstructorOperator):
655         * WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js:
656         (synthesizeEnumFunctions):
657         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js:
658         (setupAnder):
659         (synthesizeStructAccessorsForStructType):
660         * WebGPUShadingLanguageRI/Test.html:
661         * WebGPUShadingLanguageRI/Test.js:
662         (tests.shaderTypes):
663         * WebGPUShadingLanguageRI/Visitor.js:
664         (Visitor.prototype.visitFunc):
665         (Visitor.prototype.visitFuncParameter):
666         (Visitor.prototype.visitField):
667         (Visitor.prototype.visitBuiltInSemantic):
668         (Visitor.prototype.visitResourceSemantic):
669         (Visitor.prototype.visitStageInOutSemantic):
670         (Visitor.prototype.visitSpecializationConstantSemantic):
671         (Visitor):
672         * WebGPUShadingLanguageRI/index.html:
673
674 2018-09-25  Thomas Denney  <tdenney@apple.com>
675
676         [WHLSL] Test suite for Metal code generation
677         https://bugs.webkit.org/show_bug.cgi?id=187738
678
679         Reviewed by Myles C. Maxfield.
680
681         This patch adds an Xcode project that contains a Cocoa app that can be
682         used for running WHLSL shaders on the GPU. It also contains an Xcode
683         test suite that runs all of the tests in Test.js on the GPU.
684
685         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/.gitignore: Added.
686         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/AppDelegate.h: Added.
687         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/AppDelegate.m: Added.
688         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Assets.xcassets/AppIcon.appiconset/Contents.json: Added.
689         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Assets.xcassets/Contents.json: Added.
690         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Base.lproj/Main.storyboard: Added.
691         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/CompileResult.h: Added.
692         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/CompileResult.m: Added.
693         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Compiler.h: Added.
694         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Compiler.m: Added.
695         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/CustomMetalView.h: Added.
696         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/CustomMetalView.m: Added.
697         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Demo shaders/Default.whlsl: Added.
698         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Demo shaders/Julia.whlsl: Added.
699         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Demo shaders/Mandelbrot.whlsl: Added.
700         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Info.plist: Added.
701         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Renderer/OffscreenRenderer.h: Added.
702         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Renderer/OffscreenRenderer.m: Added.
703         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Renderer/OnscreenRenderer.h: Added.
704         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Renderer/OnscreenRenderer.m: Added.
705         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Renderer/Renderer.h: Added.
706         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/Renderer/Renderer.m: Added.
707         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/TestCallArgument.h: Added.
708         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/TestCallArgument.m: Added.
709         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/TestDescription.h: Added.
710         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/TestDescription.m: Added.
711         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/TestFamily.h: Added.
712         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/TestFamily.m: Added.
713         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/TestFamilyRunner.h: Added.
714         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/TestFamilyRunner.m: Added.
715         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/ViewController.h: Added.
716         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/ViewController.m: Added.
717         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/WHLSL.entitlements: Added.
718         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/_SharedMetal.txt: Added.
719         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/Core/main.m: Added.
720         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/WHLSL Tests.xcodeproj/project.pbxproj: Added.
721         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/WHLSL ToyTests/Info.plist: Added.
722         * WebGPUShadingLanguageRI/Metal/WHLSL Tests/WHLSL ToyTests/WHLSL_ToyTests.m: Added.
723         * WebGPUShadingLanguageRI/Test.js:
724         (tests.lotsOfLocalVariables):
725
726 2018-09-25  Myles C. Maxfield  <mmaxfield@apple.com>
727
728         Unreviewed build fix after r236455
729         https://bugs.webkit.org/show_bug.cgi?id=189121
730
731         * WebGPUShadingLanguageRI/Test.js:
732         (tests.shaderStages):
733
734 2018-09-24  Myles C. Maxfield  <mmaxfield@apple.com>
735
736         [WHLSL] Not all functions should be able to run in all shader stages
737         https://bugs.webkit.org/show_bug.cgi?id=189121
738
739         Reviewed by Filip Pizlo.
740
741         ddx() and ddy() can only run in fragment shaders, and the barrier functions can only run in compute shaders.
742         ddx_coarse() & friends are currently implemented as just calling ddx(), so we only need to modify those functions
743         if/when we make them native.
744
745         The texture sampling functions that use implicit derivatives can run in any shader stage - they just use a LOD of
746         0. Therefore, those functions are unchanged.
747
748         * WebGPUShadingLanguageRI/All.js:
749         * WebGPUShadingLanguageRI/Intrinsics.js:
750         * WebGPUShadingLanguageRI/LateChecker.js:
751         (LateChecker.prototype._checkShaderType):
752         * WebGPUShadingLanguageRI/NativeFunc.js:
753         (NativeFunc):
754         (NativeFunc.prototype.get stage):
755         (NativeFunc.prototype.toDeclString):
756         * WebGPUShadingLanguageRI/Parse.js:
757         (parseFuncDecl):
758         (parseNativeFunc):
759         (parseNative):
760         * WebGPUShadingLanguageRI/Prepare.js:
761         (let.prepare):
762         * WebGPUShadingLanguageRI/SPIRV.html:
763         * WebGPUShadingLanguageRI/StandardLibrary.js:
764         (let.standardLibrary):
765         * WebGPUShadingLanguageRI/StatementCloner.js:
766         (StatementCloner.prototype.visitNativeFunc):
767         * WebGPUShadingLanguageRI/Test.html:
768         * WebGPUShadingLanguageRI/Test.js:
769         (tests.shaderStages):
770         * WebGPUShadingLanguageRI/WSyntaxError.js:
771         (WSyntaxError.prototype.toString):
772         (WSyntaxError):
773         * WebGPUShadingLanguageRI/index.html:
774
775 2018-09-24  Thomas Denney  <tdenney@apple.com>
776
777         [WHLSL] Implement trap statements in Metal code generation
778         https://bugs.webkit.org/show_bug.cgi?id=189615
779
780         Reviewed by Myles C. Maxfield.
781
782         Each function called by an entry point now receives an additional
783         boolean pointer parameter, which is set to false if the function traps.
784         After each function call (to a non-native function) this trap parameter
785         is checked. The behavior of the interpreter has also been updated so
786         that a function entry point catches the trap and instead returns zero,
787         matching the behavior of compiled code.
788
789         * WebGPUShadingLanguageRI/Evaluator.js: Adds a new flag to allow the
790         test suite to check for traps and also returns zero from entry points
791         whose invocation trapped.
792         * WebGPUShadingLanguageRI/Metal/MSLBackend.js: Pass program to function
793         declarations.
794         * WebGPUShadingLanguageRI/Metal/MSLCodegenAll.js: Update dependencies.
795         * WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js: Add program
796         property.
797         * WebGPUShadingLanguageRI/Metal/MSLFunctionDefinition.js: Ditto.
798         * WebGPUShadingLanguageRI/Metal/MSLInsertTrapParameter.js: Added.
799         * WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js: Conforms to the
800         new trapping behavior.
801         * WebGPUShadingLanguageRI/Test.js: Update tests that trap.
802
803 2018-09-24  Thomas Denney  <tdenney@apple.com>
804
805         [WHLSL] It shouldn’t be possible to use ternary expressions as l-values
806         https://bugs.webkit.org/show_bug.cgi?id=189290
807
808         Reviewed by Myles C. Maxfield.
809
810         It is no longer possible for a ternary expression to be treated as an
811         l-value. This patch adds several test cases to verify that this is the
812         case.
813
814         * WebGPUShadingLanguageRI/Checker.js:
815         (Checker.prototype.visitTernaryExpression): No longer check isLValue.
816         * WebGPUShadingLanguageRI/NormalUsePropertyResolver:
817         (NormalUsePropertyResolver.visitTernaryExpression): Deleted.
818         * WebGPUShadingLanguageRI/Rewriter.js:
819         (Rewriter.prototype.visitTernaryExpression): No longer copy isLValue.
820         * WebGPUShadingLanguageRI/TernaryExpression.js:
821         (TernaryExpression):
822         (TernaryExpression.prototype.get elseExpression):
823         (TernaryExpression.prototype.get isLValue): Deleted.
824         (TernaryExpression.prototype.set isLValue): Deleted.
825         * WebGPUShadingLanguageRI/Test.js:
826         (tests.ternaryExpression): Add checks for failure if a failure is used
827         as an l-value.
828         (ternaryExpressionIsLValue.node.TernaryExpressionVisitor.prototype.visitTernaryExpression): Deleted.
829         (ternaryExpressionIsLValue.node.TernaryExpressionVisitor): Deleted.
830         (tests.ternaryExpressionIsLValue): Deleted.
831
832 2018-09-24  Jer Noble  <jer.noble@apple.com>
833
834         SharedBuffer should have an equality test
835         https://bugs.webkit.org/show_bug.cgi?id=189919
836
837         Reviewed by Alex Christensen.
838
839         * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
840         (TestWebKitAPI::TEST_F):
841
842 2018-09-24  Alex Christensen  <achristensen@webkit.org>
843
844         Prepare to replace WKBundleFileHandleCreateWithPath with a version that takes a WKBundlePageRef
845         https://bugs.webkit.org/show_bug.cgi?id=189929
846
847         Reviewed by Andy Estes.
848
849         * TestWebKitAPI/Tests/WebKit/WKBundleFileHandle_Bundle.cpp:
850
851 2018-09-24  Thomas Denney  <tdenney@apple.com>
852
853         [WHLSL] Casting user-created types to themselves should always work
854         https://bugs.webkit.org/show_bug.cgi?id=189113
855
856         Reviewed by Myles C. Maxfield.
857
858         Casting user-defined types to themselves worked already, but we didn't
859         test it anywhere.
860
861         * WebGPUShadingLanguageRI/Test.js:
862         (tests.selfCasts):
863
864 2018-09-24  Zan Dobersek  <zdobersek@igalia.com>
865
866         Unreviewed build fix for Jhbuild-using ports.
867
868         * gstreamer/patches/gst-plugins-good-0010-matroskademux-Emit-no-more-pads-after-parsing-Tracks.patch:
869         Adjust the patch so it applies cleanly on the 1.14.3 version of the
870         gst-plugins-good package.
871
872 2018-09-24  Ryan Haddad  <ryanhaddad@apple.com>
873
874         Update flakiness dashboard configuration for iOS 12 queues
875         https://bugs.webkit.org/show_bug.cgi?id=189688
876
877         Reviewed by Alexey Proskuryakov.
878
879         * TestResultServer/static-dashboards/builders.jsonp:
880
881 2018-09-24  Alicia Boya García  <aboya@igalia.com>
882
883         [GStreamer] Unreviewed build fix.
884
885         A GStreamer patch was not applying cleanly on 1.14.3.
886
887         * gstreamer/patches/gst-plugins-good-0008-matroskademux-Refactor-track-parsing-out-from-adding.patch:
888
889 2018-09-24  Alicia Boya García  <aboya@igalia.com>
890
891         [MSE][GStreamer] Use no-more-pads event for noticing initialization segments
892         https://bugs.webkit.org/show_bug.cgi?id=189868
893
894         Reviewed by Xabier Rodriguez-Calvar.
895
896         Added patch from https://bugzilla.gnome.org/show_bug.cgi?id=797187
897
898         * gstreamer/jhbuild.modules:
899         * gstreamer/patches/gst-plugins-good-0010-matroskademux-Emit-no-more-pads-after-parsing-Tracks.patch: Added.
900
901 2018-09-24  Alicia Boya García  <aboya@igalia.com>
902         [MSE][GStreamer] Add patch to jhbuild: matroskademux: Allow Matroska headers to be read more than once
903         https://bugs.webkit.org/show_bug.cgi?id=185731
904
905         Reviewed by Xabier Rodriguez-Calvar.
906
907         Upstream bug in GStreamer: https://bugzilla.gnome.org/show_bug.cgi?id=793333
908
909         This fixes YTTV 35. AppendMultipleInitOpusAudio (and any other use
910         case where two WebM initialization segments are appended on a row).
911
912         * gstreamer/jhbuild.modules:
913         * gstreamer/patches/gst-plugins-good-0007-matroskademux-Allow-Matroska-headers-to-be-read-more.patch: Added.
914         * gstreamer/patches/gst-plugins-good-0008-matroskademux-Refactor-track-parsing-out-from-adding.patch: Added.
915         * gstreamer/patches/gst-plugins-good-0009-matroskademux-Parse-successive-Tracks-elements.patch: Added.
916
917 2018-09-22  Myles C. Maxfield  <mmaxfield@apple.com>
918
919         [WHSL] Need grammar to specify kernel group size
920         https://bugs.webkit.org/show_bug.cgi?id=189108
921
922         Reviewed by Dean Jackson.
923
924         In HLSL, compute functions are annotated with their workgroup size.
925         For example,
926
927         [numthreads(3, 4, 5)] compute void foo(...) { ... }
928
929         * WebGPUShadingLanguageRI/All.js:
930         * WebGPUShadingLanguageRI/Func.js:
931         (Func):
932         (Func.prototype.get attributeBlock):
933         * WebGPUShadingLanguageRI/FuncAttribute.js: Copied from Tools/WebGPUShadingLanguageRI/FuncDef.js.
934         (FuncAttribute):
935         * WebGPUShadingLanguageRI/FuncDef.js:
936         (FuncDef):
937         * WebGPUShadingLanguageRI/FuncNumThreadsAttribute.js: Copied from Tools/WebGPUShadingLanguageRI/FuncDef.js.
938         (FuncNumThreadsAttribute):
939         (FuncNumThreadsAttribute.prototype.get x):
940         (FuncNumThreadsAttribute.prototype.get y):
941         (FuncNumThreadsAttribute.prototype.get z):
942         * WebGPUShadingLanguageRI/LateChecker.js:
943         (LateChecker.prototype._checkShaderType):
944         * WebGPUShadingLanguageRI/Parse.js:
945         (parseAttributeBlock):
946         (parseFuncDecl):
947         (parseFuncDef):
948         (parseNativeFunc):
949         * WebGPUShadingLanguageRI/SPIRV.html:
950         * WebGPUShadingLanguageRI/StatementCloner.js:
951         (StatementCloner.prototype.visitFuncDef):
952         (StatementCloner.prototype.visitFuncNumThreadsAttribute):
953         (StatementCloner):
954         * WebGPUShadingLanguageRI/Test.html:
955         * WebGPUShadingLanguageRI/Test.js:
956         (tests.numThreads):
957         * WebGPUShadingLanguageRI/Visitor.js:
958         (Visitor.prototype.visitFunc):
959         (Visitor.prototype.visitFuncNumThreadsAttribute):
960         (Visitor):
961         * WebGPUShadingLanguageRI/index.html:
962
963 2018-09-22  Myles C. Maxfield  <mmaxfield@apple.com>
964
965         Native functions which accept pointers need to do null checks
966         https://bugs.webkit.org/show_bug.cgi?id=189883
967
968         Reviewed by Dean Jackson.
969
970         Simply guard all the places where we write through an author-provided pointer.
971
972         * WebGPUShadingLanguageRI/Intrinsics.js:
973         (Intrinsics.):
974         * WebGPUShadingLanguageRI/Test.js:
975         (tests.textureDimensionsNull):
976
977 2018-09-22  Myles C. Maxfield  <mmaxfield@apple.com>
978
979         [WHLSL] Implement atomic operations and barriers
980         https://bugs.webkit.org/show_bug.cgi?id=189025
981
982         Reviewed by Dean Jackson.
983
984         In the interpreter, atomic operations don't need to be atomic.
985
986         * WebGPUShadingLanguageRI/Intrinsics.js:
987         (Intrinsics.):
988         * WebGPUShadingLanguageRI/StandardLibrary.js:
989         (let.standardLibrary):
990         * WebGPUShadingLanguageRI/Test.js:
991         (tests.atomics):
992
993 2018-09-22  Thibault Saunier  <tsaunier@igalia.com>
994
995         [WPE] Be very permissive in the MiniBrowser.
996         https://bugs.webkit.org/show_bug.cgi?id=189800
997
998         This is just a test tool and we should make
999         it just work, security and privacy is not really
1000         a primary focus here.
1001
1002         Reviewed by Žan Doberšek.
1003
1004         * MiniBrowser/wpe/main.cpp:
1005         (decidePermissionRequest):
1006         (main):
1007
1008 2018-09-21  Thomas Denney  <tdenney@apple.com>
1009
1010         [WHLSL] Local variables should be statically allocated
1011         https://bugs.webkit.org/show_bug.cgi?id=188402
1012
1013         Reviewed by Myles C. Maxfield.
1014
1015         An additional preparation stage is now performed so that all local
1016         variables and function parameters are allocated in a single struct at
1017         entry points. A pointer to this struct is then passed for function
1018         calls.
1019
1020         * WebGPUShadingLanguageRI/All.js: Update dependencies.
1021         * WebGPUShadingLanguageRI/AllocateAtEntryPoints.js: Added new stage.
1022         * WebGPUShadingLanguageRI/CallExpression.js:
1023         (CallExpression.prototype.set argumentList): Add setter because
1024         allocateAtEntryPoints needs to change this.
1025         * WebGPUShadingLanguageRI/EBufferBuilder.js: Remove a redundant
1026         constructor that wasn't used anywhere.
1027         * WebGPUShadingLanguageRI/Func.js:
1028         (Func.prototype.set parameters): Add setter.
1029         * WebGPUShadingLanguageRI/FuncDef.js:
1030         (FuncDef.prototype.set body): Ditto.
1031         * WebGPUShadingLanguageRI/Prepare.js:
1032         (let.prepare): Add call to allocateAtEntryPoints. This call cannot
1033         happen any earlier because it depends on having types for call
1034         arguments.
1035         * WebGPUShadingLanguageRI/Rewriter.js:
1036         (Rewriter.prototype.visitReturn): Resolve issue where the return
1037         statement's function wasn't copied. A null check is required as the
1038         Rewriter might be used before this property is set.
1039         * WebGPUShadingLanguageRI/SPIRV.html: Update dependencies.
1040         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: Abstracted logic
1041         into a separate function so that allocateAtEntryPoints can create the
1042         accessors for the struct type it introduces.
1043         * WebGPUShadingLanguageRI/Test.html: Update dependencies.
1044         * WebGPUShadingLanguageRI/Test.js: Add new tests to verify the static
1045         allocation transform works safely.
1046         * WebGPUShadingLanguageRI/index.html: Update dependencies.
1047
1048 2018-09-21  Jonathan Bedard  <jbedard@apple.com>
1049
1050         Bring up queues for iOS 12 (Build fix)
1051         https://bugs.webkit.org/show_bug.cgi?id=189683
1052
1053         Unreviewed build fix.
1054
1055         We should not build ImageDiff as x86 by default since 32 bit projects are
1056         deprecated in Xcode. ImageDiff should only be built once.
1057
1058         * Scripts/build-webkit:
1059         * Scripts/webkitdirs.pm:
1060         (argumentsForConfiguration):
1061
1062 2018-09-21  Adrian Perez de Castro  <aperez@igalia.com>
1063
1064         [WPE] Built RPM of WPE webkit fails to install with "nothing provides libWPEToolingBackends.so()"
1065         https://bugs.webkit.org/show_bug.cgi?id=189797
1066
1067         Reviewed by Žan Doberšek.
1068
1069         * wpe/backends/CMakeLists.txt: Make libWPEToolingBackends a static library to avoid
1070         the need for installing it. This works fine because the library only contains utility
1071         code intended to be reused from other various components (MiniBrowser, WebKitTestRunner).
1072
1073 2018-09-20  Daniel Bates  <dabates@apple.com>
1074
1075         Move IOKitSPI.h from TestRunnerShared to PAL
1076         https://bugs.webkit.org/show_bug.cgi?id=189804
1077
1078         Reviewed by Wenson Hsieh.
1079
1080         Towards fixing <https://bugs.webkit.org/show_bug.cgi?id=189604> move the IOKit SPI forward
1081         declarations to PAL so that they can be shared by WebKit, DumpRenderTree and WebKitTestRunner.
1082
1083         No functionality changed. So, no new tests.
1084
1085         * TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
1086         * TestRunnerShared/spi/UIKitTestSPI.h:
1087         * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
1088         * WebKitTestRunner/ios/HIDEventGenerator.mm:
1089
1090 2018-09-20  Thomas Denney  <tdenney@apple.com>
1091
1092         [WHLSL] Metal code generation
1093         https://bugs.webkit.org/show_bug.cgi?id=187735
1094
1095         Reviewed by Myles C. Maxfield.
1096
1097         Adds support for generating Metal Shading Language from WHLSL. Clients
1098         should include the file MetalCodegenAll.js and then call whlslToMsl
1099         with their program source code to compile to Metal.
1100
1101         * WebGPUShadingLanguageRI/ArrayType.js:
1102         (ArrayType.prototype.get arrayRefType): Adds the arrayRefType method to
1103         all types to find the type of that expression when it is used in a
1104         MakeArrayRefExpression.
1105         * WebGPUShadingLanguageRI/MakeArrayRefExpression.js:
1106         (MakeArrayRefExpression):
1107         (MakeArrayRefExpression.prototype.get type): Uses the new arrayRefType
1108         getter on all types to find the type of the expression.
1109         * WebGPUShadingLanguageRI/Metal/MSLBackend.js: Added.
1110         * WebGPUShadingLanguageRI/Metal/MSLCodegenAll.js: Added.
1111         * WebGPUShadingLanguageRI/Metal/MSLCompileResult.js: Added.
1112         * WebGPUShadingLanguageRI/Metal/MSLConstexprEmitter.js: Added.
1113         * WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js: Added.
1114         * WebGPUShadingLanguageRI/Metal/MSLFunctionDefinition.js: Added.
1115         * WebGPUShadingLanguageRI/Metal/MSLFunctionForwardDeclaration.js: Added.
1116         * WebGPUShadingLanguageRI/Metal/MSLNameMangler.js: Added.
1117         * WebGPUShadingLanguageRI/Metal/MSLNativeFunctionCall.js: Added.
1118         * WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js: Added.
1119         * WebGPUShadingLanguageRI/Metal/MSLTypeAttributes.js: Added.
1120         * WebGPUShadingLanguageRI/Metal/MSLTypeAttributesMap.js: Added.
1121         * WebGPUShadingLanguageRI/Metal/MSLTypeUnifier.js: Added.
1122         * WebGPUShadingLanguageRI/Metal/TypeOf.js: Added.
1123         * WebGPUShadingLanguageRI/Metal/WhlslToMsl.js: Added.
1124         * WebGPUShadingLanguageRI/PropertyResolver.js:
1125         * WebGPUShadingLanguageRI/SynthesizeStructAccessors.js:
1126         * WebGPUShadingLanguageRI/Test.js: Added awkward tests for the compiler
1127         to generate code for.
1128         (tests.incrementAndDecrement):
1129         (tests.returnIntLiteralUint):
1130         (tests.returnIntLiteralFloat):
1131         (tests.nestedSubscriptWithArraysInStructs):
1132         (tests.nestedSubscript):
1133         (tests.lotsOfLocalVariables):
1134         * WebGPUShadingLanguageRI/Type.js:
1135         (Type.prototype.get arrayRefType): See above.
1136
1137 2018-09-20  Ryan Haddad  <ryanhaddad@apple.com>
1138
1139         Bring up queues for iOS 12
1140         https://bugs.webkit.org/show_bug.cgi?id=189683
1141
1142         Unreviewed infrastructure fix.
1143
1144         * 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.
1145         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
1146         (BubbleQueueServer): Move EWS bubbles to the iOS 12 section of the dashboard.
1147
1148 2018-09-20  Ryan Haddad  <ryanhaddad@apple.com>
1149
1150         Bring up queues for iOS 12
1151         https://bugs.webkit.org/show_bug.cgi?id=189683
1152
1153         Reviewed by Aakash Jain.
1154
1155         * BuildSlaveSupport/build.webkit.org-config/config.json:
1156         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS12.png: Added.
1157         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS12Simulator.png: Added.
1158         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/IOS12Simulator@2x.png: Added.
1159         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/iOS12@2x.png: Added.
1160         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
1161         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
1162         (WebKitBuildbot):
1163         * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
1164         (table.queue-grid tr.platform.ios-simulator-12 img.logo):
1165         (table.queue-grid tr.platform.ios-12 img.logo):
1166         (table.queue-grid tr.platform.ios-simulator-11 img.logo): Deleted.
1167         (table.queue-grid tr.platform.ios-11 img.logo): Deleted.
1168         * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
1169         * BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
1170         (_should_file_trigger_build):
1171         * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
1172         (ShouldBuildTest):
1173         (ShouldBuildTest.test_should_build):
1174
1175 2018-09-20  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1176
1177         [Win] TestRunner::queueLoad() fails to generate correct url for some urls.
1178         https://bugs.webkit.org/show_bug.cgi?id=189679
1179
1180         Reviewed by Fujii Hironori.
1181
1182         Replace the implementation with correct API call.
1183
1184         * DumpRenderTree/win/TestRunnerWin.cpp:
1185         (TestRunner::queueLoad): Call UrlCombineW.
1186
1187 2018-09-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1188
1189         [WPE] fails to build on ARM arches complaining about undefined reference to `epoxy_eglMakeCurrent'
1190         https://bugs.webkit.org/show_bug.cgi?id=189556
1191
1192         Reviewed by Konstantin Tokarev.
1193
1194         This is only a speculative build fix as I didn't attempt to reproduce. Explicitly link to
1195         libepoxy.
1196
1197         * wpe/backends/CMakeLists.txt:
1198
1199 2018-09-20  Daniel Bates  <dabates@apple.com>
1200
1201         [iOS] Support testing more hardware special keys
1202         https://bugs.webkit.org/show_bug.cgi?id=189793
1203
1204         Reviewed by Simon Fraser.
1205
1206         * TestRunnerShared/spi/IOKitSPI.h: Add more SPI constants.
1207         * WebKitTestRunner/ios/HIDEventGenerator.mm:
1208         (keyCodeForDOMFunctionKey): Extracted out logic from hidUsageCodeForCharacter() to return the
1209         key code for the F1, F2, ..., F12 keys and extended the code to compute the key code for the
1210         F13, F14, ..., F24 keys.
1211         (hidUsageCodeForCharacter): Modified to call keyCodeForDOMFunctionKey().
1212
1213 2018-09-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1214
1215         Unreviewed, remove accidentally-committed debugging changes from flatpakutils script
1216
1217         Aaaaaah maybe this is why changes are supposed to be reviewed.
1218
1219         * flatpak/flatpakutils.py:
1220         (WebkitFlatpak.clean_args):
1221
1222 2018-09-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1223
1224         Unreviewed, manually rollout our switch to master runtime
1225
1226         Phil wants html5-codecs, which aren't available yet here. Let's switch back to 3.28 in the
1227         meantime, where we were already building GStreamer ourselves anyway. But use an updated
1228         SDK revision.
1229
1230         * flatpak/files/httpd-autogen.sh: Added.
1231         * flatpak/flatpakutils.py:
1232         (WebkitFlatpak.clean_args):
1233         * flatpak/org.webkit.GTK.yaml:
1234         * flatpak/org.webkit.WebKit.yaml:
1235         * flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Added.
1236         * flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Added.
1237
1238 2018-09-20  Thibault Saunier  <tsaunier@igalia.com>
1239
1240         [WPE][GTK] webkit-flatpak intercepts --help for other commands
1241         https://bugs.webkit.org/show_bug.cgi?id=189058
1242
1243         The approach of run_in_sandbox_if_available is that we basically have the
1244         same set of arguments to setup the sandbox (ie. port name, build type, etc...)
1245         and we can pass those args first to setup the flatpak launcher object
1246         and then to the underlying script. That doesn't work well with the `--help` argument
1247         as once processed it 1. prints the help (which make no sense to the user of the calling script)
1248         2. exits the app - The solution is to just make sure that `--help` is not used when using
1249         flatpakutils from any script that is not `webkit-flatpak` itself.
1250
1251         Reviewed by Michael Catanzaro.
1252
1253         * flatpak/flatpakutils.py:
1254         (WebkitFlatpak.load_from_args):
1255         (run_in_sandbox_if_available):
1256
1257 2018-09-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1258
1259         Unreviewed. Add W3C imported tests to the MSEEME watchlist.
1260
1261         * Scripts/webkitpy/common/config/watchlist:
1262
1263 2018-09-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1264
1265         Unreviewed. Fix the Streams API watchlist.
1266
1267         * Scripts/webkitpy/common/config/watchlist:
1268
1269 2018-09-19  Chris Dumez  <cdumez@apple.com>
1270
1271         Crash under WebProcessProxy::suspendedPageWasDestroyed(WebKit::SuspendedPageProxy&)
1272         https://bugs.webkit.org/show_bug.cgi?id=189721
1273         <rdar://problem/44359788>
1274
1275         Reviewed by Geoffrey Garen.
1276
1277         Add API test coverage.
1278
1279         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1280
1281 2018-09-19  Thomas Denney  <tdenney@apple.com>
1282
1283         [WHLSL] Improve test suite type safety
1284         https://bugs.webkit.org/show_bug.cgi?id=189502
1285
1286         Reviewed by Myles C. Maxfield.
1287
1288         Each of the 'makeT' functions now call the relevant cast function on the
1289         value before hand. The checkNumber function has also been removed and
1290         its uses have been replaced with functions that also check the type.
1291         Some of the arithmetic checks have been updated to reflect that the
1292         casts happen outside of WHLSL evaluation. Other tests have also been
1293         updated to reflect that some values cannot be precisely expressed in
1294         32-bit floating point.
1295
1296         * WebGPUShadingLanguageRI/Casts.js:
1297         (castToBool): Added.
1298         (castAndCheckValue): Added.
1299         (isBitwiseEquivalent): Moved from Intrinsics.js.
1300         * WebGPUShadingLanguageRI/Intrinsics.js: Ditto.
1301         * WebGPUShadingLanguageRI/SPIRV.html: Update depdencies.
1302         * WebGPUShadingLanguageRI/Test.html: Ditto.
1303         * WebGPUShadingLanguageRI/Test.js: Update makeT functions to do a cast
1304         and check the result. Some tests were also updated to reflect the change
1305         in the behavior of these functions.
1306         * WebGPUShadingLanguageRI/index.html: Update dependencies.
1307
1308 2018-09-19  John Wilander  <wilander@apple.com>
1309
1310         Resource Load Statistics: Add optional cap on partitioned cache max age
1311         https://bugs.webkit.org/show_bug.cgi?id=189711
1312         <rdar://problem/39246837>
1313
1314         Reviewed by Antti Koivisto and Chris Dumez.
1315
1316         This change adds infrastructure for layout tests of capped cache max age.
1317
1318         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1319         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1320         (WTR::TestRunner::setStatisticsCacheMaxAgeCap):
1321         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1322         * WebKitTestRunner/TestController.cpp:
1323         (WTR::TestController::setStatisticsCacheMaxAgeCap):
1324         * WebKitTestRunner/TestController.h:
1325         * WebKitTestRunner/TestInvocation.cpp:
1326         (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
1327
1328 2018-09-19  Dawei Fenton  <realdawei@apple.com>
1329
1330        Unreviewed. Update my email and alias in list of contributors.
1331
1332         * Scripts/webkitpy/common/config/contributors.json:
1333
1334 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1335
1336         [WPE][GTK] Unreviewed, try #3 to fix a typo
1337
1338         I feel like Charlie Brown, how hard this has been for me....
1339
1340         * Scripts/run-minibrowser:
1341         * Scripts/webkitdirs.pm:
1342         (runInFlatpakIfAvailable):
1343         (runInFlatpakIfAvailible): Deleted.
1344
1345 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1346
1347         [WPE][GTK] Unreviewed, fix that typo in more places
1348
1349         It got copied into webkitdirs.pm!
1350
1351         * Scripts/webkitdirs.pm:
1352         (runInFlatpakIfAvailible):
1353         (runInFlatpakIfAvalaible): Deleted.
1354
1355 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1356
1357         [WPE][GTK] Unreviewed, fix a pervasive typo in the webkit-flatpak script
1358
1359         * flatpak/flatpakutils.py:
1360         (WebkitFlatpak.load_from_args):
1361         (WebkitFlatpak.__init__):
1362         (WebkitFlatpak.run):
1363
1364 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1365
1366         [WPE][GTK] Unreviewed, update to latest GNOME SDK
1367
1368         * flatpak/org.webkit.WebKit.yaml:
1369
1370 2018-09-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1371
1372         Unreviewed, rolling out r235500.
1373
1374         Time to switch back to master runtime
1375
1376         Reverted changeset:
1377
1378         "Unreviewed, rolling out r235114."
1379         https://bugs.webkit.org/show_bug.cgi?id=188731
1380         https://trac.webkit.org/changeset/235500
1381
1382 2018-09-19  Adrian Perez de Castro  <aperez@igalia.com>
1383
1384         Unreviewed. Add Pablo Saavedra to the list of contributors.
1385
1386         * Scripts/webkitpy/common/config/contributors.json:
1387
1388 2018-09-19  Philippe Normand  <pnormand@igalia.com>
1389
1390         [GStreamer] Add support for AV1 decoding
1391         https://bugs.webkit.org/show_bug.cgi?id=189647
1392
1393         Reviewed by Žan Doberšek.
1394
1395         Add patches required for AV1 decoding support. They're all
1396         upstream already and will be shipped in GStreamer 1.16. The aom
1397         GStreamer plugin depends on the aom library for which there's no
1398         official release yet.
1399
1400         * gstreamer/jhbuild.modules:
1401         * gstreamer/patches/gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch: Added.
1402         * gstreamer/patches/gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch: Added.
1403         * 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.
1404         * gstreamer/patches/gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch: Added.
1405         * gstreamer/patches/gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch: Added.
1406         * gstreamer/patches/gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch: Added.
1407
1408 2018-09-18  Jonathan Bedard  <jbedard@apple.com>
1409
1410         webkitpy: Clobbering and building occurs multiple times for iOS Simulator ports
1411         https://bugs.webkit.org/show_bug.cgi?id=189702
1412         <rdar://problem/44541704>
1413
1414         Reviewed by Aakash Jain.
1415
1416         * Scripts/webkitpy/layout_tests/controllers/manager.py:
1417         (Manager._set_up_run): Move build check and clobbering to run, since set up is
1418         run multiple times for iOS simulator.
1419         (Manager.run):
1420
1421 2018-09-18  Chris Dumez  <cdumez@apple.com>
1422
1423         "DidFirstVisuallyNonEmptyLayout" callback does not get called when restoring a page from PageCache
1424         https://bugs.webkit.org/show_bug.cgi?id=189681
1425         <rdar://problem/44526171>
1426
1427         Reviewed by Alex Christensen and Zalan Bujtas.
1428
1429         Add API test coverage.
1430
1431         * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
1432         (TestWebKitAPI::didFinishNavigation):
1433         (TestWebKitAPI::TEST):
1434
1435 2018-09-18  Claudio Saavedra  <csaavedra@igalia.com>
1436
1437         [WPE] Implement mouse event modifiers
1438         https://bugs.webkit.org/show_bug.cgi?id=189697
1439
1440         Reviewed by Carlos Garcia Campos.
1441
1442         * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
1443         (WTR::wkEventModifiersToWPE):
1444         (WTR::EventSenderProxy::mouseDown):
1445         (WTR::EventSenderProxy::mouseUp):
1446
1447 2018-09-17  Yusuke Suzuki  <utatane.tea@gmail.com>
1448
1449         [WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t
1450         https://bugs.webkit.org/show_bug.cgi?id=185339
1451
1452         Reviewed by Mark Lam.
1453
1454         * TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:
1455         (TestWebKitAPI::ToUpperConverter::stopProducing):
1456         (TestWebKitAPI::ToUpperConverter::stopConsuming):
1457
1458 2018-09-17  Simon Fraser  <simon.fraser@apple.com>
1459
1460         Many modern media control tests leak documents in testing
1461         https://bugs.webkit.org/show_bug.cgi?id=189437
1462
1463         Reviewed by Darin Adler.
1464         
1465         In order to accurately detect leaks in media controls tests which use lots of
1466         SVGImages, we have to:
1467         - Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer
1468           to clear references to elements.
1469         - Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources()
1470           to drop the last handle to the CachedResource for an SVGImage.
1471         - Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources()
1472           to run again after that timer has fired.
1473         
1474         This should fix most of the spurious leak reports involving SVGImage documents.
1475
1476         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1477         (WTR::InjectedBundle::reportLiveDocuments):
1478         (WTR::InjectedBundle::didReceiveMessageToPage):
1479
1480 2018-09-17  Chris Dumez  <cdumez@apple.com>
1481
1482         PSON: window.open() with 'noopener' should only process-swap cross-site, not cross-origin
1483         https://bugs.webkit.org/show_bug.cgi?id=189602
1484         <rdar://problem/44430549>
1485
1486         Reviewed by Geoff Garen.
1487
1488         Add API test coverage.
1489
1490         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1491
1492 2018-09-17  Philippe Normand  <pnormand@igalia.com>
1493
1494         [JHBuild] Update to GStreamer 1.14.3
1495         https://bugs.webkit.org/show_bug.cgi?id=189450
1496
1497         Reviewed by Xabier Rodriguez-Calvar.
1498
1499         * gstreamer/jhbuild.modules: Bump GStreamer modules from 1.14.1 to 1.14.3.
1500
1501 2018-09-17  Philippe Normand  <pnormand@igalia.com>
1502
1503         [JHBuild] Doesn't check sha256 sums
1504         https://bugs.webkit.org/show_bug.cgi?id=189646
1505
1506         Reviewed by Michael Catanzaro.
1507
1508         * gstreamer/jhbuild.modules: Properly set the sha256: prefix on hashes.
1509
1510 2018-09-17  Sihui Liu  <sihui_liu@apple.com>
1511
1512         Move IndexedDB to Network Process
1513         https://bugs.webkit.org/show_bug.cgi?id=189415
1514         <rdar://problem/44396973>
1515
1516         Reviewed by Chris Dumez.
1517
1518         * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
1519         (TEST):
1520         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
1521         (TEST):
1522         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
1523         (TEST):
1524         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
1525         (TEST):
1526         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
1527         (TEST):
1528
1529 2018-09-08  Darin Adler  <darin@apple.com>
1530
1531         Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext
1532         https://bugs.webkit.org/show_bug.cgi?id=189455
1533
1534         Reviewed by Keith Miller.
1535
1536         There is a lot of copied and pasted code for WebKit vs. Legacy WebKit
1537         testing and even for macOS vs. iOS vs. Windows platform-specific code.
1538         For now, this patch just makes corresponding changes to the copied code.
1539         Later we might get better results by merging more code instead of having
1540         all these separate copies.
1541
1542         * DumpRenderTree/AccessibilityController.cpp:
1543         (AccessibilityController::makeWindowObject): Use the adopt function
1544         instead of the special Adopt constructor of JSRetainPtr.
1545
1546         * DumpRenderTree/AccessibilityTextMarker.cpp: Removed unneeded include.
1547
1548         * DumpRenderTree/AccessibilityUIElement.cpp: Ditto.
1549         (allAttributesCallback): Don't adopt at this level; changed the
1550         underlying function to return a JSRetainPtr so the adopt is right next
1551         to the call to the create or copy function.
1552         (attributesOfLinkedUIElementsCallback): Ditto.
1553         (attributesOfDocumentLinksCallback): Ditto.
1554         (attributesOfChildrenCallback): Ditto.
1555         (parameterizedAttributeNamesCallback): Ditto.
1556         (attributesOfColumnHeadersCallback): Ditto.
1557         (attributesOfRowHeadersCallback): Ditto.
1558         (attributesOfColumnsCallback): Ditto.
1559         (attributesOfRowsCallback): Ditto.
1560         (attributesOfVisibleCellsCallback): Ditto.
1561         (attributesOfHeaderCallback): Ditto.
1562         (rowIndexRangeCallback): Ditto.
1563         (columnIndexRangeCallback): Ditto.
1564         (rangeForLineCallback): Ditto.
1565         (boundsForRangeCallback): Ditto.
1566         (rangeForPositionCallback): Ditto.
1567         (stringForRangeCallback): Ditto.
1568         (attributedStringForRangeCallback): Ditto.
1569         (uiElementCountForSearchPredicateCallback): Use the free adopt
1570         function instead of the adopt member function.
1571         (uiElementForSearchPredicateCallback): Ditto.
1572         (selectTextWithCriteriaCallback): Don't adopt at this level.
1573         (attributedStringForElementCallback): Ditto.
1574         (setValueCallback): Use free adopt.
1575         (stringAttributeValueCallback): Don't adopt at this level.
1576         (uiElementArrayAttributeValueCallback): Ditto.
1577         (uiElementAttributeValueCallback): Ditto.
1578         (stringForTextMarkerRangeCallback): Ditto.
1579         (attributedStringForTextMarkerRangeCallback): Ditto.
1580         (attributedStringForTextMarkerRangeWithOptionsCallback): Ditto.
1581         (getARIADropEffectsCallback): Ditto.
1582         (getClassListCallback): Ditto.
1583         (getRoleCallback): Ditto.
1584         (getSubroleCallback): Ditto.
1585         (getRoleDescriptionCallback): Ditto.
1586         (getComputedRoleStringCallback): Ditto.
1587         (getTitleCallback): Ditto.
1588         (getDescriptionCallback): Ditto.
1589         (getStringValueCallback): Ditto.
1590         (getLanguageCallback): Ditto.
1591         (getHelpTextCallback): Ditto.
1592         (getOrientationCallback): Ditto.
1593         (getPathDescriptionCallback): Ditto.
1594         (getSelectedTextRangeCallback): Ditto.
1595         (speakAsCallback): Ditto.
1596         (getValueDescriptionCallback): Ditto.
1597         (getAccessibilityValueCallback): Ditto.
1598         (getDocumentEncodingCallback): Ditto.
1599         (getDocumentURICallback): Ditto.
1600         (getURLCallback): Ditto.
1601         (characterAtOffsetCallback): Ditto.
1602         (wordAtOffsetCallback): Ditto.
1603         (lineAtOffsetCallback): Ditto.
1604         (sentenceAtOffsetCallback): Ditto.
1605         (stringForSelectionCallback): Ditto.
1606         (getIdentifierCallback): Ditto.
1607         (getTraitsCallback): Ditto.
1608         (supportedActionsCallback): Ditto.
1609         (mathPostscriptsDescriptionCallback): Ditto.
1610         (mathPrescriptsDescriptionCallback): Ditto.
1611         (AccessibilityUIElement::rangeForLine): Updated to return JSRetainPtr.
1612         (AccessibilityUIElement::rangeForPosition): Ditto.
1613         (AccessibilityUIElement::speakAs): Ditto.
1614         (AccessibilityUIElement::pathDescription const): Ditto.
1615         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
1616         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
1617         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
1618
1619         * DumpRenderTree/AccessibilityUIElement.h: Use JSRetainPtr instead of
1620         raw pointers for the results of the functions that create strings.
1621         The old way was difficult to get right; the functions didn't even follow
1622         the create/copy naming rule.
1623
1624         * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
1625         (_platformTypeConstructor): Use the adopt function instead of the
1626         JSRetainPtr adopt constructor. Also nullptr instead of 0.
1627
1628         * DumpRenderTree/GCController.cpp:
1629         (GCController::makeWindowObject): Use adopt function instead of constructor.
1630
1631         * DumpRenderTree/TestRunner.cpp:
1632         (pathToLocalResourceCallback): Use adopt function instead of constructor.
1633         (addDisallowedURLCallback): Ditto.
1634         (addURLToRedirectCallback): Ditto.
1635         (clearApplicationCacheForOriginCallback): Ditto.
1636         (applicationCacheDiskUsageForOriginCallback): Ditto.
1637         (decodeHostNameCallback): Don't adopt at this level.
1638         (encodeHostNameCallback): Ditto.
1639         (execCommandCallback): Use adopt instead of JSRetainPtr::adopt.
1640         (findStringCallback): Use adopt function instead of constructor.
1641         (isCommandEnabledCallback): Ditto.
1642         (overridePreferenceCallback): Ditto.
1643         (queueLoadCallback): Ditto.
1644         (queueLoadHTMLStringCallback): Ditto.
1645         (queueLoadingScriptCallback): Ditto.
1646         (queueNonLoadingScriptCallback): Ditto.
1647         (setAuthenticationPasswordCallback): Ditto.
1648         (setAuthenticationUsernameCallback): Ditto.
1649         (setDomainRelaxationForbiddenForURLSchemeCallback): Ditto.
1650         (setMockGeolocationPositionUnavailableErrorCallback): Ditto.
1651         (setPOSIXLocaleCallback): Ditto.
1652         (setPersistentUserStyleSheetLocationCallback): Ditto.
1653         (setUserStyleSheetLocationCallback): Ditto.
1654         (setValueForUserCallback): Ditto.
1655         (setWillSendRequestClearHeaderCallback): Ditto.
1656         (setPageVisibilityCallback): Ditto.
1657         (evaluateInWebInspectorCallback): Ditto.
1658         (evaluateScriptInIsolatedWorldCallback): Ditto.
1659         (evaluateScriptInIsolatedWorldAndReturnValueCallback): Ditto.
1660         (addOriginAccessWhitelistEntryCallback): Ditto.
1661         (removeOriginAccessWhitelistEntryCallback): Ditto.
1662         (setScrollbarPolicyCallback): Ditto.
1663         (addUserScriptCallback): Ditto.
1664         (addUserStyleSheetCallback): Ditto.
1665         (apiTestNewWindowDataLoadBaseURLCallback): Ditto.
1666         (authenticateSessionCallback): Ditto.
1667         (getTitleTextDirectionCallback): Ditto.
1668         (getInspectorTestStubURLCallback): Ditto.
1669         (simulateLegacyWebNotificationClickCallback): Ditto.
1670         (setTextDirectionCallback): Ditto.
1671         (grantWebNotificationPermissionCallback): Ditto.
1672         (denyWebNotificationPermissionCallback): Ditto.
1673         (accummulateLogsForChannel): Ditto.
1674         (runUIScriptCallback): Ditto.
1675         (TestRunner::makeWindowObject): Ditto.
1676         (TestRunner::uiScriptDidComplete): Ditto.
1677         (TestRunner::setOpenPanelFiles): Ditto.
1678
1679         * DumpRenderTree/TestRunner.h: Use JSRetainPtr instead of
1680         raw pointers for the results of the functions that create strings.
1681
1682         * DumpRenderTree/ios/AccessibilityControllerIOS.mm:
1683         (AccessibilityController::platformName const): Use the adopt
1684         function instead of the adopt constructor.
1685
1686         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
1687         (createEmptyJSString): Added. This helper function makes reduces the
1688         repetitive code to create empty strings.
1689         (concatenateAttributeAndValue): Changed to return a JSRetainPtr.
1690         (AccessibilityUIElement::identifier): Ditto.
1691         (AccessibilityUIElement::traits): Ditto.
1692         (AccessibilityUIElement::url): Ditto.
1693         (AccessibilityUIElement::speakAs): Ditto.
1694         (AccessibilityUIElement::stringForSelection): Ditto.
1695         (AccessibilityUIElement::stringForRange): Ditto.
1696         (AccessibilityUIElement::attributedStringForRange): Ditto.
1697         (AccessibilityUIElement::attributedStringForElement): Ditto.
1698         (AccessibilityUIElement::pathDescription const): Ditto.
1699         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
1700         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
1701         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
1702         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
1703         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
1704         (AccessibilityUIElement::attributesOfChildren): Ditto.
1705         (AccessibilityUIElement::allAttributes): Ditto.
1706         (AccessibilityUIElement::stringAttributeValue): Ditto.
1707         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
1708         (AccessibilityUIElement::role): Ditto.
1709         (AccessibilityUIElement::subrole): Ditto.
1710         (AccessibilityUIElement::roleDescription): Ditto.
1711         (AccessibilityUIElement::computedRoleString): Ditto.
1712         (AccessibilityUIElement::title): Ditto.
1713         (AccessibilityUIElement::description): Ditto.
1714         (AccessibilityUIElement::orientation const): Ditto.
1715         (AccessibilityUIElement::stringValue): Ditto.
1716         (AccessibilityUIElement::language): Ditto.
1717         (AccessibilityUIElement::helpText const): Ditto.
1718         (AccessibilityUIElement::valueDescription): Ditto.
1719         (AccessibilityUIElement::ariaDropEffects const): Ditto.
1720         (AccessibilityUIElement::boundsForRange): Ditto.
1721         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
1722         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
1723         (AccessibilityUIElement::attributesOfColumns): Ditto.
1724         (AccessibilityUIElement::attributesOfRows): Ditto.
1725         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
1726         (AccessibilityUIElement::attributesOfHeader): Ditto.
1727         (AccessibilityUIElement::rowIndexRange): Ditto.
1728         (AccessibilityUIElement::columnIndexRange): Ditto.
1729         (AccessibilityUIElement::selectedTextRange): Ditto.
1730         (AccessibilityUIElement::accessibilityValue const): Ditto.
1731         (AccessibilityUIElement::documentEncoding): Ditto.
1732         (AccessibilityUIElement::documentURI): Ditto.
1733         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
1734         (AccessibilityUIElement::classList const): Ditto.
1735
1736         * DumpRenderTree/mac/AccessibilityCommonMac.h: Changed the
1737         createJSStringRef method to return a JSRetainPtr.
1738         * DumpRenderTree/mac/AccessibilityCommonMac.mm:
1739         (-[NSString createJSStringRef]): Ditto.
1740         (searchPredicateParameterizedAttributeForSearchCriteria): Use the
1741         adopt function instead of the adopt constructor.
1742         * DumpRenderTree/mac/AccessibilityControllerMac.mm:
1743         (AccessibilityController::platformName const): Ditto.
1744
1745         * DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
1746         (-[NSString createJSStringRef]): Return a JSRetainPtr.
1747         (makeValueRefForValue): Updated for the above, no adopt needed here now.
1748         (makeObjectRefForDictionary): Ditto.
1749         (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.
1750
1751         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
1752         (createEmptyJSString): Added. This helper function makes reduces the
1753         repetitive code to create empty strings.
1754         (concatenateAttributeAndValue): Changed to return a JSRetainPtr.
1755         (descriptionOfElements): Ditto.
1756         (selectTextParameterizedAttributeForCriteria): Ditto.
1757         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
1758         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
1759         (AccessibilityUIElement::attributesOfChildren): Ditto.
1760         (AccessibilityUIElement::allAttributes): Ditto.
1761         (AccessibilityUIElement::stringAttributeValue): Ditto.
1762         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
1763         (AccessibilityUIElement::role): Ditto.
1764         (AccessibilityUIElement::subrole): Ditto.
1765         (AccessibilityUIElement::roleDescription): Ditto.
1766         (AccessibilityUIElement::computedRoleString): Ditto.
1767         (AccessibilityUIElement::title): Ditto.
1768         (AccessibilityUIElement::description): Ditto.
1769         (AccessibilityUIElement::orientation const): Ditto.
1770         (AccessibilityUIElement::stringValue): Ditto.
1771         (AccessibilityUIElement::language): Ditto.
1772         (AccessibilityUIElement::helpText const): Ditto.
1773         (AccessibilityUIElement::valueDescription): Ditto.
1774         (AccessibilityUIElement::speakAs): Ditto.
1775         (AccessibilityUIElement::classList const): Ditto.
1776         (AccessibilityUIElement::ariaDropEffects const): Ditto.
1777         (AccessibilityUIElement::rangeForLine): Ditto.
1778         (AccessibilityUIElement::rangeForPosition): Ditto.
1779         (AccessibilityUIElement::boundsForRange): Ditto.
1780         (AccessibilityUIElement::stringForRange): Ditto.
1781         (AccessibilityUIElement::attributedStringForRange): Ditto.
1782         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
1783         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
1784         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
1785         (AccessibilityUIElement::attributesOfColumns): Ditto.
1786         (AccessibilityUIElement::attributesOfRows): Ditto.
1787         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
1788         (AccessibilityUIElement::attributesOfHeader): Ditto.
1789         (AccessibilityUIElement::rowIndexRange): Ditto.
1790         (AccessibilityUIElement::columnIndexRange): Ditto.
1791         (AccessibilityUIElement::pathDescription const): Ditto.
1792         (AccessibilityUIElement::selectedTextRange): Ditto.
1793         (AccessibilityUIElement::accessibilityValue const): Ditto.
1794         (AccessibilityUIElement::documentEncoding): Ditto.
1795         (AccessibilityUIElement::documentURI): Ditto.
1796         (AccessibilityUIElement::url): Ditto.
1797         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
1798         (createJSStringRef): Ditto.
1799         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
1800         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
1801         (AccessibilityUIElement::supportedActions): Ditto.
1802         (AccessibilityUIElement::mathPostscriptsDescription const): Ditto.
1803         (AccessibilityUIElement::mathPrescriptsDescription const): Ditto.
1804
1805         * DumpRenderTree/mac/FrameLoadDelegate.mm:
1806         (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]):
1807         Use the adopt function instead of the adopt constructor.
1808         * DumpRenderTree/mac/TestRunnerMac.mm:
1809         (originsArrayToJS): Ditto.
1810         (TestRunner::copyDecodedHostName): Return a JSRetainPtr.
1811         (TestRunner::copyEncodedHostName): Ditto.
1812         (TestRunner::pathToLocalResource): Ditto.
1813         (TestRunner::queueLoad): Use adopt function instead of constructor.
1814         (TestRunner::findString): Ditto.
1815         (TestRunner::inspectorTestStubURL): Return a JSRetainPtr.
1816
1817         * DumpRenderTree/win/AccessibilityControllerWin.cpp:
1818         (AccessibilityController::winNotificationReceived): Use adopt function
1819         instead of adopt constructor.
1820         (AccessibilityController::platformName const): Ditto.
1821
1822         * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
1823         (createEmptyJSString): Added. This helper function makes reduces the
1824         repetitive code to create empty strings.
1825         (AccessibilityUIElement::allAttributes): Changed to return a JSRetainPtr.
1826         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
1827         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
1828         (AccessibilityUIElement::attributesOfChildren): Ditto.
1829         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
1830         (AccessibilityUIElement::role): Ditto.
1831         (AccessibilityUIElement::subrole): Ditto.
1832         (AccessibilityUIElement::roleDescription): Ditto.
1833         (AccessibilityUIElement::computedRoleString): Ditto.
1834         (AccessibilityUIElement::title): Ditto.
1835         (AccessibilityUIElement::description): Ditto.
1836         (AccessibilityUIElement::stringValue): Ditto.
1837         (AccessibilityUIElement::language): Ditto.
1838         (AccessibilityUIElement::helpText const): Ditto.
1839         (AccessibilityUIElement::valueDescription): Ditto.
1840         (AccessibilityUIElement::ariaDropEffects const): Ditto.
1841         (AccessibilityUIElement::orientation const): Ditto.
1842         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
1843         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
1844         (AccessibilityUIElement::attributesOfColumns): Ditto.
1845         (AccessibilityUIElement::attributesOfRows): Ditto.
1846         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
1847         (AccessibilityUIElement::attributesOfHeader): Ditto.
1848         (AccessibilityUIElement::rowIndexRange): Ditto.
1849         (AccessibilityUIElement::columnIndexRange): Ditto.
1850         (AccessibilityUIElement::boundsForRange): Ditto.
1851         (AccessibilityUIElement::stringForRange): Ditto.
1852         (AccessibilityUIElement::attributedStringForRange): Ditto.
1853         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
1854         (AccessibilityUIElement::selectedTextRange): Ditto.
1855         (AccessibilityUIElement::stringAttributeValue): Ditto.
1856         (AccessibilityUIElement::accessibilityValue const): Ditto.
1857         (AccessibilityUIElement::documentEncoding): Ditto.
1858         (AccessibilityUIElement::documentURI): Ditto.
1859         (AccessibilityUIElement::url): Ditto.
1860         (AccessibilityUIElement::classList const): Ditto.
1861
1862         * DumpRenderTree/win/TestRunnerWin.cpp:
1863         (TestRunner::copyDecodedHostName): Changed to return a JSRetainPtr.
1864         (TestRunner::copyEncodedHostName): Ditto.
1865         (TestRunner::pathToLocalResource): Ditto.
1866         (TestRunner::queueLoad): Ditto.
1867         (TestRunner::findString): Ditto.
1868         (TestRunner::inspectorTestStubURL): Ditto.
1869
1870         * TestRunnerShared/Bindings/JSWrapper.h:
1871         (WTR::setProperty): Use adopt function instead of constructor.
1872         * TestRunnerShared/UIScriptContext/UIScriptContext.cpp:
1873         (UIScriptContext::UIScriptContext): Ditto.
1874         (UIScriptContext::runUIScript): Ditto.
1875         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
1876         (WTR::toDeviceOrientation): Ditto.
1877
1878         * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
1879         (nsTextCheckingType): Changed this function to not take an rvalue
1880         reference to a JSRetainPtr since it doesn't take ownership.
1881         (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Updated
1882         for the above change.
1883
1884         * TestWebKitAPI/JavaScriptTest.cpp:
1885         (TestWebKitAPI::javaScriptCallback): Use adopt function instead of
1886         adopt member function.
1887
1888         * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: Removed unneeded include.
1889         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: Ditto.
1890         * TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm: Use adopt function instead of
1891         adopt constructor.
1892         * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: Ditto.
1893
1894         * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
1895         Removed unneeded includes.
1896         * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto.
1897         * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto.
1898         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto.
1899
1900         * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
1901         (_platformTypeConstructor): Use the adopt function instead of the
1902         JSRetainPtr adopt constructor. Also nullptr instead of 0.
1903
1904         * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
1905         (WTR::arrayLength): Use adopt function instead of constructor.
1906         (WTR::parseModifierArray): Ditto.
1907         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
1908         (WTR::propertyValue): Ditto.
1909         (WTR::dumpPath): Ditto.
1910         (WTR::toJS): Ditto.
1911         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1912         (WTR::TestRunner::findString): Ditto.
1913         (WTR::TestRunner::statisticsDidRunTelemetryCallback): Ditto.
1914         (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Ditto.
1915         (WTR::TestRunner::setOpenPanelFiles): Ditto.
1916         * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
1917         (WTR::AccessibilityController::platformName): Ditto.
1918
1919         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
1920         (-[NSString createJSStringRef]): Return a JSRetainPtr.
1921         This fixes storage leaks in many functions below, which were using
1922         the create function and putting the value right into a JSRetainPtr
1923         without adoption.
1924         (WTR::createEmptyJSString): Added. This helper function reduces the
1925         repetitive code to create empty strings.
1926         (WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
1927         (WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
1928         Use createEmptyJSString, fixing a storage leak due to missing adoption.
1929         (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
1930         (WTR::AccessibilityUIElement::attributesOfChildren): Ditto.
1931         (WTR::AccessibilityUIElement::allAttributes): Ditto.
1932         (WTR::AccessibilityUIElement::stringAttributeValue): Ditto.
1933         (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto.
1934         (WTR::AccessibilityUIElement::role): Ditto.
1935         (WTR::AccessibilityUIElement::subrole): Ditto.
1936         (WTR::AccessibilityUIElement::roleDescription): Ditto.
1937         (WTR::AccessibilityUIElement::computedRoleString): Ditto.
1938         (WTR::AccessibilityUIElement::title): Ditto.
1939         (WTR::AccessibilityUIElement::orientation const): Ditto.
1940         (WTR::AccessibilityUIElement::language): Ditto.
1941         (WTR::AccessibilityUIElement::valueDescription): Ditto.
1942         (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto.
1943         (WTR::AccessibilityUIElement::boundsForRange): Ditto.
1944         (WTR::AccessibilityUIElement::stringForRange): Removed unneeded null check.
1945         (WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
1946         (WTR::AccessibilityUIElement::attributesOfColumnHeaders):
1947         Use createEmptyJSString, fixing a storage leak due to missing adoption.
1948         (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
1949         (WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
1950         (WTR::AccessibilityUIElement::attributesOfRows): Ditto.
1951         (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
1952         (WTR::AccessibilityUIElement::attributesOfHeader): Ditto.
1953         (WTR::AccessibilityUIElement::selectedTextRange): Ditto.
1954         (WTR::AccessibilityUIElement::accessibilityValue const): Ditto.
1955         (WTR::AccessibilityUIElement::documentEncoding): Ditto.
1956         (WTR::AccessibilityUIElement::documentURI): Ditto.
1957         (WTR::AccessibilityUIElement::stringForSelection): Removed unneeded
1958         null check.
1959         (WTR::AccessibilityUIElement::stringForTextMarkerRange):
1960         Use createEmptyJSString, fixing a storage leak due to missing adoption.
1961
1962         * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
1963         Use JSRetainPtr for the return value of createJSStringRef.
1964         * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
1965         (-[NSString createJSStringRef]): Ditto.
1966         (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use the
1967         adopt function instead of the adopt constructor.
1968         * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
1969         (WTR::AccessibilityController::platformName): Ditto
1970
1971         * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
1972         (-[NSString createJSStringRef]): Return a JSRetainPtr.
1973         (makeValueRefForValue): Updated for above by removing adopt.
1974         (makeObjectRefForDictionary): Ditto.
1975         (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.
1976
1977         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
1978         (WTR::createEmptyJSString): Added. This helper function makes reduces the
1979         repetitive code to create empty strings.
1980         (WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
1981         (WTR::descriptionOfElements): Ditto.
1982         (WTR::selectTextParameterizedAttributeForCriteria): Ditto.
1983         (WTR::AccessibilityUIElement::accessibilityValue const): Use createEmptyJSString,
1984         fixing a storage leak due to missing adoption.
1985         (WTR::AccessibilityUIElement::documentEncoding): Ditto.
1986         (WTR::AccessibilityUIElement::documentURI): Ditto.
1987         (WTR::createJSStringRef): Return a JSRetainPtr.
1988
1989         * WebKitTestRunner/StringFunctions.h:
1990         (WTR::toWK): Take a const& to eliminate a little bit of reference count churn.
1991         (WTR::toJS): Use the adopt function instead of the constructor.
1992
1993 2018-09-14  Dean Jackson  <dino@grorg.org>
1994
1995         Add Justin Michaud.
1996
1997         * Scripts/webkitpy/common/config/contributors.json:
1998
1999 2018-09-14  Ryan Haddad  <ryanhaddad@apple.com>
2000
2001         bots should pass --clobber-old-results to run-webkit-tests
2002         https://bugs.webkit.org/show_bug.cgi?id=189623
2003
2004         Reviewed by Aakash Jain.
2005
2006         In order to ensure that bots to not produce confusing results due to transient execptions,
2007         or run out of space if they continually hit an exception, old layout test results should be clobbered.
2008
2009         * BuildSlaveSupport/build.webkit.org-config/steps.py:
2010         (RunWebKitTests):
2011
2012 2018-09-13  Ryan Haddad  <ryanhaddad@apple.com>
2013
2014         Unreviewed, rolling out r235954.
2015
2016         Breaks the watchOS build.
2017
2018         Reverted changeset:
2019
2020         "Move IndexedDB to Network Process"
2021         https://bugs.webkit.org/show_bug.cgi?id=189415
2022         https://trac.webkit.org/changeset/235954
2023
2024 2018-09-13  Daniel Bates  <dabates@apple.com>
2025
2026         Add Copy WebKit Permalink plugin for Sublime Text
2027         https://bugs.webkit.org/show_bug.cgi?id=189589
2028
2029         Rubber-stamped by Joseph Pecoraro.
2030
2031         Port the Copy WebKit Permalink Automator service to a Sublime Text plugin. Once installed you can
2032         use the plugin to copy to the Clipboard a trac.webkit.org hyperlink to the selected line in the
2033         active document with or without blame annotations.
2034
2035         Once installed, you can Control-click (on Mac) or right-click (on Windows and Linux) on a line and
2036         choose Copy WebKit Permalink or Copy WebKit Permalink to Blame from the context menu to copy to the
2037         Clipboard a permanent hyperlink to the selected line without or with blame annotations, respectively.
2038         On Mac you can also invoke the same functionality using the keyboard shortcuts Command + Shift + Control + C
2039         and Command + Shift + Control + Option + C, respectively.
2040
2041         * CopyPermalink/Sublime Text/CopyWebKitPermalink/Context.sublime-menu: Added.
2042         * CopyPermalink/Sublime Text/CopyWebKitPermalink/CopyWebKitPermalink.py: Added.
2043         * CopyPermalink/Sublime Text/CopyWebKitPermalink/Default (OSX).sublime-keymap: Added.
2044         * CopyPermalink/Sublime Text/INSTALL: Added.
2045         * CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/Info.plist: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/Info.plist.
2046         * CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/document.wflow: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/document.wflow.
2047         * CopyPermalink/Xcode/INSTALL: Renamed from Tools/CopyPermalink/README.
2048
2049 2018-09-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2050
2051         Unreviewed. Fix WebDriver tests after r235225.
2052
2053         Use wpt serve command to run the http server.
2054
2055         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
2056         (WebDriverW3CWebServer.__init__):
2057         (WebDriverW3CWebServer.start):
2058         (WebDriverW3CWebServer.stop):
2059
2060 2018-09-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2061
2062         [GTK][WPE] Allow to run script dialogs asynchronously in the UI process
2063         https://bugs.webkit.org/show_bug.cgi?id=189544
2064
2065         Reviewed by Michael Catanzaro.
2066
2067         Add test cases for the new API.
2068
2069         * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
2070         (testWebViewJavaScriptDialogs):
2071
2072 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
2073
2074         [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
2075         https://bugs.webkit.org/show_bug.cgi?id=189496
2076         <rdar://problem/44370981>
2077
2078         Unreviewed warning fix.
2079
2080         r235929 has introduced a new compilation warning:
2081         > Tools/ImageDiff/cairo/PlatformImageCairo.cpp:34:70: warning: unused parameter ‘imageSize’ [-Wunused-parameter]
2082
2083         * ImageDiff/cairo/PlatformImageCairo.cpp:
2084         (ImageDiff::PlatformImage::createFromStdin): Removed the variable name.
2085
2086 2018-09-12  Dan Bernstein  <mitz@apple.com>
2087
2088         [Cocoa] Complete support for Paste as Quotation
2089         https://bugs.webkit.org/show_bug.cgi?id=189504
2090
2091         Reviewed by Wenson Hsieh.
2092
2093         * MiniBrowser/mac/MainMenu.xib: Added a Paste as Quotation command in the Edit menu.
2094
2095 2018-09-12  Sihui Liu  <sihui_liu@apple.com>
2096
2097         Move IndexedDB to Network Process
2098         https://bugs.webkit.org/show_bug.cgi?id=189415
2099
2100         Reviewed by Geoffrey Garen.
2101
2102         * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
2103         (TEST):
2104         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
2105         (TEST):
2106         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
2107         (TEST):
2108         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
2109         (TEST):
2110         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
2111         (TEST):
2112
2113 2018-09-12  Chris Dumez  <cdumez@apple.com>
2114
2115         PSON: No process swap on back navigation after URL bar navigation
2116         https://bugs.webkit.org/show_bug.cgi?id=189557
2117         <rdar://problem/44353108>
2118
2119         Reviewed by Alex Christensen.
2120
2121         Add API test coverage.
2122
2123         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2124
2125 2018-09-11  Dean Jackson  <dino@apple.com>
2126
2127         Header parsing for experimental and internal debug features
2128         https://bugs.webkit.org/show_bug.cgi?id=189486
2129         <rdar://problem/44320618>
2130
2131         Reviewed by Tim Horton.
2132
2133         Keep track of experimental and internal debug features in TestOptions, and
2134         allow webkit-test-runner headers to toggle them by name.
2135
2136         * DumpRenderTree/TestOptions.cpp:
2137         (TestOptions::TestOptions):
2138         * WebKitTestRunner/TestController.cpp:
2139         (WTR::TestController::resetPreferencesToConsistentValues):
2140         (WTR::updateTestOptionsFromTestHeader):
2141         * WebKitTestRunner/TestOptions.h:
2142         (WTR::TestOptions::hasSameInitializationOptions const):
2143
2144 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
2145
2146         [Win][Clang][DumpRenderTree] 0 and nullptr can't be implicitly converted to AccessibilityUIElement
2147         https://bugs.webkit.org/show_bug.cgi?id=189492
2148
2149         Reviewed by Alex Christensen.
2150
2151         0 and nullptr can't be implicitly converted to
2152         AccessibilityUIElement because only Windows port typedefs
2153         PlatformUIElement as COMPtr<IAccessible> not a pointer.
2154
2155         Replaced "return 0" and "return nullptr" with "return { nullptr }".
2156
2157         * DumpRenderTree/AccessibilityUIElement.cpp:
2158         (AccessibilityUIElement::horizontalScrollbar const):
2159         (AccessibilityUIElement::verticalScrollbar const):
2160         (AccessibilityUIElement::uiElementAttributeValue const):
2161         (AccessibilityUIElement::accessibilityElementForTextMarker):
2162         * DumpRenderTree/win/AccessibilityControllerWin.cpp:
2163         (AccessibilityController::elementAtPoint):
2164         (AccessibilityController::accessibleElementById):
2165         (AccessibilityController::focusedElement):
2166         (AccessibilityController::rootElement):
2167         * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
2168         (AccessibilityUIElement::elementAtPoint):
2169         (AccessibilityUIElement::linkedUIElementAtIndex):
2170         (AccessibilityUIElement::getChildAtIndex):
2171         (AccessibilityUIElement::titleUIElement):
2172         (AccessibilityUIElement::parentElement):
2173         (AccessibilityUIElement::uiElementForSearchPredicate):
2174         (AccessibilityUIElement::cellForColumnAndRow):
2175         (AccessibilityUIElement::disclosedRowAtIndex):
2176         (AccessibilityUIElement::ariaOwnsElementAtIndex):
2177         (AccessibilityUIElement::ariaFlowToElementAtIndex):
2178         (AccessibilityUIElement::ariaControlsElementAtIndex):
2179         (AccessibilityUIElement::selectedRowAtIndex):
2180         (AccessibilityUIElement::rowAtIndex):
2181         (AccessibilityUIElement::disclosedByRow):
2182         (AccessibilityUIElement::selectedChildAtIndex const):
2183
2184 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
2185
2186         FontManagerTests.ChangeFontColorWithColorPanel fails on macOS Sierra
2187         https://bugs.webkit.org/show_bug.cgi?id=189382
2188
2189         Reviewed by Ryosuke Niwa.
2190
2191         Fix the test by specifying colors in RGB colorspace.
2192
2193         * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
2194         (TestWebKitAPI::TEST):
2195
2196 2018-09-11  Fujii Hironori  <Hironori.Fujii@sony.com>
2197
2198         [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
2199         https://bugs.webkit.org/show_bug.cgi?id=189496
2200
2201         Reviewed by Alex Christensen.
2202
2203         * ImageDiff/cairo/PlatformImageCairo.cpp:
2204         (ImageDiff::PlatformImage::createFromStdin): Removed unnecessary ReadContext struct.
2205         (ImageDiff::PlatformImage::writeAsPNGToStdout): Use '%lu' format type specifier for unsigned long.
2206
2207 2018-09-07  Dean Jackson  <dino@apple.com>
2208
2209         Add and expose Internal features from WebKit
2210         https://bugs.webkit.org/show_bug.cgi?id=189442
2211         <rdar://problem/44243404>
2212
2213         Reviewed by Simon Fraser.
2214
2215         Update MiniBrowser to expose an Internal feature menu.
2216
2217         * MiniBrowser/mac/AppDelegate.m:
2218         (defaultConfiguration):
2219         * MiniBrowser/mac/SettingsController.m:
2220         (-[SettingsController _populateMenu]):
2221         (-[SettingsController validateMenuItem:]):
2222         (-[SettingsController toggleExperimentalFeature:]):
2223         (-[SettingsController toggleInternalDebugFeature:]):
2224
2225 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
2226
2227         [macOS] [WK2] Support changing foreground colors via color panel
2228         https://bugs.webkit.org/show_bug.cgi?id=189382
2229         <rdar://problem/44227311>
2230
2231         Reviewed by Ryosuke Niwa.
2232
2233         Add an API test that uses NSColorPanel to change the color of selected text, and also apply typing styles when
2234         the selection is collapsed. The test also exercises switching between opaque colors (alpha = 1) and transparent
2235         colors, as well as making different parts of a word different colors.
2236
2237         * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
2238         (-[TestWKWebView collapseToEnd]):
2239         (webViewForFontManagerTesting):
2240         (TestWebKitAPI::TEST):
2241         * TestWebKitAPI/cocoa/TestWKWebView.h:
2242
2243 == Rolled over to ChangeLog-2018-09-11 ==