[WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t
[WebKit-https.git] / Tools / ChangeLog
1 2018-09-17  Yusuke Suzuki  <utatane.tea@gmail.com>
2
3         [WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t
4         https://bugs.webkit.org/show_bug.cgi?id=185339
5
6         Reviewed by Mark Lam.
7
8         * TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:
9         (TestWebKitAPI::ToUpperConverter::stopProducing):
10         (TestWebKitAPI::ToUpperConverter::stopConsuming):
11
12 2018-09-17  Simon Fraser  <simon.fraser@apple.com>
13
14         Many modern media control tests leak documents in testing
15         https://bugs.webkit.org/show_bug.cgi?id=189437
16
17         Reviewed by Darin Adler.
18         
19         In order to accurately detect leaks in media controls tests which use lots of
20         SVGImages, we have to:
21         - Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer
22           to clear references to elements.
23         - Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources()
24           to drop the last handle to the CachedResource for an SVGImage.
25         - Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources()
26           to run again after that timer has fired.
27         
28         This should fix most of the spurious leak reports involving SVGImage documents.
29
30         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
31         (WTR::InjectedBundle::reportLiveDocuments):
32         (WTR::InjectedBundle::didReceiveMessageToPage):
33
34 2018-09-17  Chris Dumez  <cdumez@apple.com>
35
36         PSON: window.open() with 'noopener' should only process-swap cross-site, not cross-origin
37         https://bugs.webkit.org/show_bug.cgi?id=189602
38         <rdar://problem/44430549>
39
40         Reviewed by Geoff Garen.
41
42         Add API test coverage.
43
44         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
45
46 2018-09-17  Philippe Normand  <pnormand@igalia.com>
47
48         [JHBuild] Update to GStreamer 1.14.3
49         https://bugs.webkit.org/show_bug.cgi?id=189450
50
51         Reviewed by Xabier Rodriguez-Calvar.
52
53         * gstreamer/jhbuild.modules: Bump GStreamer modules from 1.14.1 to 1.14.3.
54
55 2018-09-17  Philippe Normand  <pnormand@igalia.com>
56
57         [JHBuild] Doesn't check sha256 sums
58         https://bugs.webkit.org/show_bug.cgi?id=189646
59
60         Reviewed by Michael Catanzaro.
61
62         * gstreamer/jhbuild.modules: Properly set the sha256: prefix on hashes.
63
64 2018-09-17  Sihui Liu  <sihui_liu@apple.com>
65
66         Move IndexedDB to Network Process
67         https://bugs.webkit.org/show_bug.cgi?id=189415
68         <rdar://problem/44396973>
69
70         Reviewed by Chris Dumez.
71
72         * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
73         (TEST):
74         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
75         (TEST):
76         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
77         (TEST):
78         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
79         (TEST):
80         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
81         (TEST):
82
83 2018-09-08  Darin Adler  <darin@apple.com>
84
85         Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext
86         https://bugs.webkit.org/show_bug.cgi?id=189455
87
88         Reviewed by Keith Miller.
89
90         There is a lot of copied and pasted code for WebKit vs. Legacy WebKit
91         testing and even for macOS vs. iOS vs. Windows platform-specific code.
92         For now, this patch just makes corresponding changes to the copied code.
93         Later we might get better results by merging more code instead of having
94         all these separate copies.
95
96         * DumpRenderTree/AccessibilityController.cpp:
97         (AccessibilityController::makeWindowObject): Use the adopt function
98         instead of the special Adopt constructor of JSRetainPtr.
99
100         * DumpRenderTree/AccessibilityTextMarker.cpp: Removed unneeded include.
101
102         * DumpRenderTree/AccessibilityUIElement.cpp: Ditto.
103         (allAttributesCallback): Don't adopt at this level; changed the
104         underlying function to return a JSRetainPtr so the adopt is right next
105         to the call to the create or copy function.
106         (attributesOfLinkedUIElementsCallback): Ditto.
107         (attributesOfDocumentLinksCallback): Ditto.
108         (attributesOfChildrenCallback): Ditto.
109         (parameterizedAttributeNamesCallback): Ditto.
110         (attributesOfColumnHeadersCallback): Ditto.
111         (attributesOfRowHeadersCallback): Ditto.
112         (attributesOfColumnsCallback): Ditto.
113         (attributesOfRowsCallback): Ditto.
114         (attributesOfVisibleCellsCallback): Ditto.
115         (attributesOfHeaderCallback): Ditto.
116         (rowIndexRangeCallback): Ditto.
117         (columnIndexRangeCallback): Ditto.
118         (rangeForLineCallback): Ditto.
119         (boundsForRangeCallback): Ditto.
120         (rangeForPositionCallback): Ditto.
121         (stringForRangeCallback): Ditto.
122         (attributedStringForRangeCallback): Ditto.
123         (uiElementCountForSearchPredicateCallback): Use the free adopt
124         function instead of the adopt member function.
125         (uiElementForSearchPredicateCallback): Ditto.
126         (selectTextWithCriteriaCallback): Don't adopt at this level.
127         (attributedStringForElementCallback): Ditto.
128         (setValueCallback): Use free adopt.
129         (stringAttributeValueCallback): Don't adopt at this level.
130         (uiElementArrayAttributeValueCallback): Ditto.
131         (uiElementAttributeValueCallback): Ditto.
132         (stringForTextMarkerRangeCallback): Ditto.
133         (attributedStringForTextMarkerRangeCallback): Ditto.
134         (attributedStringForTextMarkerRangeWithOptionsCallback): Ditto.
135         (getARIADropEffectsCallback): Ditto.
136         (getClassListCallback): Ditto.
137         (getRoleCallback): Ditto.
138         (getSubroleCallback): Ditto.
139         (getRoleDescriptionCallback): Ditto.
140         (getComputedRoleStringCallback): Ditto.
141         (getTitleCallback): Ditto.
142         (getDescriptionCallback): Ditto.
143         (getStringValueCallback): Ditto.
144         (getLanguageCallback): Ditto.
145         (getHelpTextCallback): Ditto.
146         (getOrientationCallback): Ditto.
147         (getPathDescriptionCallback): Ditto.
148         (getSelectedTextRangeCallback): Ditto.
149         (speakAsCallback): Ditto.
150         (getValueDescriptionCallback): Ditto.
151         (getAccessibilityValueCallback): Ditto.
152         (getDocumentEncodingCallback): Ditto.
153         (getDocumentURICallback): Ditto.
154         (getURLCallback): Ditto.
155         (characterAtOffsetCallback): Ditto.
156         (wordAtOffsetCallback): Ditto.
157         (lineAtOffsetCallback): Ditto.
158         (sentenceAtOffsetCallback): Ditto.
159         (stringForSelectionCallback): Ditto.
160         (getIdentifierCallback): Ditto.
161         (getTraitsCallback): Ditto.
162         (supportedActionsCallback): Ditto.
163         (mathPostscriptsDescriptionCallback): Ditto.
164         (mathPrescriptsDescriptionCallback): Ditto.
165         (AccessibilityUIElement::rangeForLine): Updated to return JSRetainPtr.
166         (AccessibilityUIElement::rangeForPosition): Ditto.
167         (AccessibilityUIElement::speakAs): Ditto.
168         (AccessibilityUIElement::pathDescription const): Ditto.
169         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
170         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
171         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
172
173         * DumpRenderTree/AccessibilityUIElement.h: Use JSRetainPtr instead of
174         raw pointers for the results of the functions that create strings.
175         The old way was difficult to get right; the functions didn't even follow
176         the create/copy naming rule.
177
178         * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
179         (_platformTypeConstructor): Use the adopt function instead of the
180         JSRetainPtr adopt constructor. Also nullptr instead of 0.
181
182         * DumpRenderTree/GCController.cpp:
183         (GCController::makeWindowObject): Use adopt function instead of constructor.
184
185         * DumpRenderTree/TestRunner.cpp:
186         (pathToLocalResourceCallback): Use adopt function instead of constructor.
187         (addDisallowedURLCallback): Ditto.
188         (addURLToRedirectCallback): Ditto.
189         (clearApplicationCacheForOriginCallback): Ditto.
190         (applicationCacheDiskUsageForOriginCallback): Ditto.
191         (decodeHostNameCallback): Don't adopt at this level.
192         (encodeHostNameCallback): Ditto.
193         (execCommandCallback): Use adopt instead of JSRetainPtr::adopt.
194         (findStringCallback): Use adopt function instead of constructor.
195         (isCommandEnabledCallback): Ditto.
196         (overridePreferenceCallback): Ditto.
197         (queueLoadCallback): Ditto.
198         (queueLoadHTMLStringCallback): Ditto.
199         (queueLoadingScriptCallback): Ditto.
200         (queueNonLoadingScriptCallback): Ditto.
201         (setAuthenticationPasswordCallback): Ditto.
202         (setAuthenticationUsernameCallback): Ditto.
203         (setDomainRelaxationForbiddenForURLSchemeCallback): Ditto.
204         (setMockGeolocationPositionUnavailableErrorCallback): Ditto.
205         (setPOSIXLocaleCallback): Ditto.
206         (setPersistentUserStyleSheetLocationCallback): Ditto.
207         (setUserStyleSheetLocationCallback): Ditto.
208         (setValueForUserCallback): Ditto.
209         (setWillSendRequestClearHeaderCallback): Ditto.
210         (setPageVisibilityCallback): Ditto.
211         (evaluateInWebInspectorCallback): Ditto.
212         (evaluateScriptInIsolatedWorldCallback): Ditto.
213         (evaluateScriptInIsolatedWorldAndReturnValueCallback): Ditto.
214         (addOriginAccessWhitelistEntryCallback): Ditto.
215         (removeOriginAccessWhitelistEntryCallback): Ditto.
216         (setScrollbarPolicyCallback): Ditto.
217         (addUserScriptCallback): Ditto.
218         (addUserStyleSheetCallback): Ditto.
219         (apiTestNewWindowDataLoadBaseURLCallback): Ditto.
220         (authenticateSessionCallback): Ditto.
221         (getTitleTextDirectionCallback): Ditto.
222         (getInspectorTestStubURLCallback): Ditto.
223         (simulateLegacyWebNotificationClickCallback): Ditto.
224         (setTextDirectionCallback): Ditto.
225         (grantWebNotificationPermissionCallback): Ditto.
226         (denyWebNotificationPermissionCallback): Ditto.
227         (accummulateLogsForChannel): Ditto.
228         (runUIScriptCallback): Ditto.
229         (TestRunner::makeWindowObject): Ditto.
230         (TestRunner::uiScriptDidComplete): Ditto.
231         (TestRunner::setOpenPanelFiles): Ditto.
232
233         * DumpRenderTree/TestRunner.h: Use JSRetainPtr instead of
234         raw pointers for the results of the functions that create strings.
235
236         * DumpRenderTree/ios/AccessibilityControllerIOS.mm:
237         (AccessibilityController::platformName const): Use the adopt
238         function instead of the adopt constructor.
239
240         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
241         (createEmptyJSString): Added. This helper function makes reduces the
242         repetitive code to create empty strings.
243         (concatenateAttributeAndValue): Changed to return a JSRetainPtr.
244         (AccessibilityUIElement::identifier): Ditto.
245         (AccessibilityUIElement::traits): Ditto.
246         (AccessibilityUIElement::url): Ditto.
247         (AccessibilityUIElement::speakAs): Ditto.
248         (AccessibilityUIElement::stringForSelection): Ditto.
249         (AccessibilityUIElement::stringForRange): Ditto.
250         (AccessibilityUIElement::attributedStringForRange): Ditto.
251         (AccessibilityUIElement::attributedStringForElement): Ditto.
252         (AccessibilityUIElement::pathDescription const): Ditto.
253         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
254         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
255         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
256         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
257         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
258         (AccessibilityUIElement::attributesOfChildren): Ditto.
259         (AccessibilityUIElement::allAttributes): Ditto.
260         (AccessibilityUIElement::stringAttributeValue): Ditto.
261         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
262         (AccessibilityUIElement::role): Ditto.
263         (AccessibilityUIElement::subrole): Ditto.
264         (AccessibilityUIElement::roleDescription): Ditto.
265         (AccessibilityUIElement::computedRoleString): Ditto.
266         (AccessibilityUIElement::title): Ditto.
267         (AccessibilityUIElement::description): Ditto.
268         (AccessibilityUIElement::orientation const): Ditto.
269         (AccessibilityUIElement::stringValue): Ditto.
270         (AccessibilityUIElement::language): Ditto.
271         (AccessibilityUIElement::helpText const): Ditto.
272         (AccessibilityUIElement::valueDescription): Ditto.
273         (AccessibilityUIElement::ariaDropEffects const): Ditto.
274         (AccessibilityUIElement::boundsForRange): Ditto.
275         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
276         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
277         (AccessibilityUIElement::attributesOfColumns): Ditto.
278         (AccessibilityUIElement::attributesOfRows): Ditto.
279         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
280         (AccessibilityUIElement::attributesOfHeader): Ditto.
281         (AccessibilityUIElement::rowIndexRange): Ditto.
282         (AccessibilityUIElement::columnIndexRange): Ditto.
283         (AccessibilityUIElement::selectedTextRange): Ditto.
284         (AccessibilityUIElement::accessibilityValue const): Ditto.
285         (AccessibilityUIElement::documentEncoding): Ditto.
286         (AccessibilityUIElement::documentURI): Ditto.
287         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
288         (AccessibilityUIElement::classList const): Ditto.
289
290         * DumpRenderTree/mac/AccessibilityCommonMac.h: Changed the
291         createJSStringRef method to return a JSRetainPtr.
292         * DumpRenderTree/mac/AccessibilityCommonMac.mm:
293         (-[NSString createJSStringRef]): Ditto.
294         (searchPredicateParameterizedAttributeForSearchCriteria): Use the
295         adopt function instead of the adopt constructor.
296         * DumpRenderTree/mac/AccessibilityControllerMac.mm:
297         (AccessibilityController::platformName const): Ditto.
298
299         * DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
300         (-[NSString createJSStringRef]): Return a JSRetainPtr.
301         (makeValueRefForValue): Updated for the above, no adopt needed here now.
302         (makeObjectRefForDictionary): Ditto.
303         (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.
304
305         * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
306         (createEmptyJSString): Added. This helper function makes reduces the
307         repetitive code to create empty strings.
308         (concatenateAttributeAndValue): Changed to return a JSRetainPtr.
309         (descriptionOfElements): Ditto.
310         (selectTextParameterizedAttributeForCriteria): Ditto.
311         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
312         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
313         (AccessibilityUIElement::attributesOfChildren): Ditto.
314         (AccessibilityUIElement::allAttributes): Ditto.
315         (AccessibilityUIElement::stringAttributeValue): Ditto.
316         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
317         (AccessibilityUIElement::role): Ditto.
318         (AccessibilityUIElement::subrole): Ditto.
319         (AccessibilityUIElement::roleDescription): Ditto.
320         (AccessibilityUIElement::computedRoleString): Ditto.
321         (AccessibilityUIElement::title): Ditto.
322         (AccessibilityUIElement::description): Ditto.
323         (AccessibilityUIElement::orientation const): Ditto.
324         (AccessibilityUIElement::stringValue): Ditto.
325         (AccessibilityUIElement::language): Ditto.
326         (AccessibilityUIElement::helpText const): Ditto.
327         (AccessibilityUIElement::valueDescription): Ditto.
328         (AccessibilityUIElement::speakAs): Ditto.
329         (AccessibilityUIElement::classList const): Ditto.
330         (AccessibilityUIElement::ariaDropEffects const): Ditto.
331         (AccessibilityUIElement::rangeForLine): Ditto.
332         (AccessibilityUIElement::rangeForPosition): Ditto.
333         (AccessibilityUIElement::boundsForRange): Ditto.
334         (AccessibilityUIElement::stringForRange): Ditto.
335         (AccessibilityUIElement::attributedStringForRange): Ditto.
336         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
337         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
338         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
339         (AccessibilityUIElement::attributesOfColumns): Ditto.
340         (AccessibilityUIElement::attributesOfRows): Ditto.
341         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
342         (AccessibilityUIElement::attributesOfHeader): Ditto.
343         (AccessibilityUIElement::rowIndexRange): Ditto.
344         (AccessibilityUIElement::columnIndexRange): Ditto.
345         (AccessibilityUIElement::pathDescription const): Ditto.
346         (AccessibilityUIElement::selectedTextRange): Ditto.
347         (AccessibilityUIElement::accessibilityValue const): Ditto.
348         (AccessibilityUIElement::documentEncoding): Ditto.
349         (AccessibilityUIElement::documentURI): Ditto.
350         (AccessibilityUIElement::url): Ditto.
351         (AccessibilityUIElement::stringForTextMarkerRange): Ditto.
352         (createJSStringRef): Ditto.
353         (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
354         (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
355         (AccessibilityUIElement::supportedActions): Ditto.
356         (AccessibilityUIElement::mathPostscriptsDescription const): Ditto.
357         (AccessibilityUIElement::mathPrescriptsDescription const): Ditto.
358
359         * DumpRenderTree/mac/FrameLoadDelegate.mm:
360         (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]):
361         Use the adopt function instead of the adopt constructor.
362         * DumpRenderTree/mac/TestRunnerMac.mm:
363         (originsArrayToJS): Ditto.
364         (TestRunner::copyDecodedHostName): Return a JSRetainPtr.
365         (TestRunner::copyEncodedHostName): Ditto.
366         (TestRunner::pathToLocalResource): Ditto.
367         (TestRunner::queueLoad): Use adopt function instead of constructor.
368         (TestRunner::findString): Ditto.
369         (TestRunner::inspectorTestStubURL): Return a JSRetainPtr.
370
371         * DumpRenderTree/win/AccessibilityControllerWin.cpp:
372         (AccessibilityController::winNotificationReceived): Use adopt function
373         instead of adopt constructor.
374         (AccessibilityController::platformName const): Ditto.
375
376         * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
377         (createEmptyJSString): Added. This helper function makes reduces the
378         repetitive code to create empty strings.
379         (AccessibilityUIElement::allAttributes): Changed to return a JSRetainPtr.
380         (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
381         (AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
382         (AccessibilityUIElement::attributesOfChildren): Ditto.
383         (AccessibilityUIElement::parameterizedAttributeNames): Ditto.
384         (AccessibilityUIElement::role): Ditto.
385         (AccessibilityUIElement::subrole): Ditto.
386         (AccessibilityUIElement::roleDescription): Ditto.
387         (AccessibilityUIElement::computedRoleString): Ditto.
388         (AccessibilityUIElement::title): Ditto.
389         (AccessibilityUIElement::description): Ditto.
390         (AccessibilityUIElement::stringValue): Ditto.
391         (AccessibilityUIElement::language): Ditto.
392         (AccessibilityUIElement::helpText const): Ditto.
393         (AccessibilityUIElement::valueDescription): Ditto.
394         (AccessibilityUIElement::ariaDropEffects const): Ditto.
395         (AccessibilityUIElement::orientation const): Ditto.
396         (AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
397         (AccessibilityUIElement::attributesOfRowHeaders): Ditto.
398         (AccessibilityUIElement::attributesOfColumns): Ditto.
399         (AccessibilityUIElement::attributesOfRows): Ditto.
400         (AccessibilityUIElement::attributesOfVisibleCells): Ditto.
401         (AccessibilityUIElement::attributesOfHeader): Ditto.
402         (AccessibilityUIElement::rowIndexRange): Ditto.
403         (AccessibilityUIElement::columnIndexRange): Ditto.
404         (AccessibilityUIElement::boundsForRange): Ditto.
405         (AccessibilityUIElement::stringForRange): Ditto.
406         (AccessibilityUIElement::attributedStringForRange): Ditto.
407         (AccessibilityUIElement::selectTextWithCriteria): Ditto.
408         (AccessibilityUIElement::selectedTextRange): Ditto.
409         (AccessibilityUIElement::stringAttributeValue): Ditto.
410         (AccessibilityUIElement::accessibilityValue const): Ditto.
411         (AccessibilityUIElement::documentEncoding): Ditto.
412         (AccessibilityUIElement::documentURI): Ditto.
413         (AccessibilityUIElement::url): Ditto.
414         (AccessibilityUIElement::classList const): Ditto.
415
416         * DumpRenderTree/win/TestRunnerWin.cpp:
417         (TestRunner::copyDecodedHostName): Changed to return a JSRetainPtr.
418         (TestRunner::copyEncodedHostName): Ditto.
419         (TestRunner::pathToLocalResource): Ditto.
420         (TestRunner::queueLoad): Ditto.
421         (TestRunner::findString): Ditto.
422         (TestRunner::inspectorTestStubURL): Ditto.
423
424         * TestRunnerShared/Bindings/JSWrapper.h:
425         (WTR::setProperty): Use adopt function instead of constructor.
426         * TestRunnerShared/UIScriptContext/UIScriptContext.cpp:
427         (UIScriptContext::UIScriptContext): Ditto.
428         (UIScriptContext::runUIScript): Ditto.
429         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
430         (WTR::toDeviceOrientation): Ditto.
431
432         * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
433         (nsTextCheckingType): Changed this function to not take an rvalue
434         reference to a JSRetainPtr since it doesn't take ownership.
435         (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Updated
436         for the above change.
437
438         * TestWebKitAPI/JavaScriptTest.cpp:
439         (TestWebKitAPI::javaScriptCallback): Use adopt function instead of
440         adopt member function.
441
442         * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: Removed unneeded include.
443         * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: Ditto.
444         * TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm: Use adopt function instead of
445         adopt constructor.
446         * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: Ditto.
447
448         * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
449         Removed unneeded includes.
450         * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto.
451         * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto.
452         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto.
453
454         * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
455         (_platformTypeConstructor): Use the adopt function instead of the
456         JSRetainPtr adopt constructor. Also nullptr instead of 0.
457
458         * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
459         (WTR::arrayLength): Use adopt function instead of constructor.
460         (WTR::parseModifierArray): Ditto.
461         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
462         (WTR::propertyValue): Ditto.
463         (WTR::dumpPath): Ditto.
464         (WTR::toJS): Ditto.
465         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
466         (WTR::TestRunner::findString): Ditto.
467         (WTR::TestRunner::statisticsDidRunTelemetryCallback): Ditto.
468         (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Ditto.
469         (WTR::TestRunner::setOpenPanelFiles): Ditto.
470         * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
471         (WTR::AccessibilityController::platformName): Ditto.
472
473         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
474         (-[NSString createJSStringRef]): Return a JSRetainPtr.
475         This fixes storage leaks in many functions below, which were using
476         the create function and putting the value right into a JSRetainPtr
477         without adoption.
478         (WTR::createEmptyJSString): Added. This helper function reduces the
479         repetitive code to create empty strings.
480         (WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
481         (WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
482         Use createEmptyJSString, fixing a storage leak due to missing adoption.
483         (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
484         (WTR::AccessibilityUIElement::attributesOfChildren): Ditto.
485         (WTR::AccessibilityUIElement::allAttributes): Ditto.
486         (WTR::AccessibilityUIElement::stringAttributeValue): Ditto.
487         (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto.
488         (WTR::AccessibilityUIElement::role): Ditto.
489         (WTR::AccessibilityUIElement::subrole): Ditto.
490         (WTR::AccessibilityUIElement::roleDescription): Ditto.
491         (WTR::AccessibilityUIElement::computedRoleString): Ditto.
492         (WTR::AccessibilityUIElement::title): Ditto.
493         (WTR::AccessibilityUIElement::orientation const): Ditto.
494         (WTR::AccessibilityUIElement::language): Ditto.
495         (WTR::AccessibilityUIElement::valueDescription): Ditto.
496         (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto.
497         (WTR::AccessibilityUIElement::boundsForRange): Ditto.
498         (WTR::AccessibilityUIElement::stringForRange): Removed unneeded null check.
499         (WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
500         (WTR::AccessibilityUIElement::attributesOfColumnHeaders):
501         Use createEmptyJSString, fixing a storage leak due to missing adoption.
502         (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
503         (WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
504         (WTR::AccessibilityUIElement::attributesOfRows): Ditto.
505         (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
506         (WTR::AccessibilityUIElement::attributesOfHeader): Ditto.
507         (WTR::AccessibilityUIElement::selectedTextRange): Ditto.
508         (WTR::AccessibilityUIElement::accessibilityValue const): Ditto.
509         (WTR::AccessibilityUIElement::documentEncoding): Ditto.
510         (WTR::AccessibilityUIElement::documentURI): Ditto.
511         (WTR::AccessibilityUIElement::stringForSelection): Removed unneeded
512         null check.
513         (WTR::AccessibilityUIElement::stringForTextMarkerRange):
514         Use createEmptyJSString, fixing a storage leak due to missing adoption.
515
516         * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
517         Use JSRetainPtr for the return value of createJSStringRef.
518         * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
519         (-[NSString createJSStringRef]): Ditto.
520         (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use the
521         adopt function instead of the adopt constructor.
522         * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
523         (WTR::AccessibilityController::platformName): Ditto
524
525         * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
526         (-[NSString createJSStringRef]): Return a JSRetainPtr.
527         (makeValueRefForValue): Updated for above by removing adopt.
528         (makeObjectRefForDictionary): Ditto.
529         (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.
530
531         * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
532         (WTR::createEmptyJSString): Added. This helper function makes reduces the
533         repetitive code to create empty strings.
534         (WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
535         (WTR::descriptionOfElements): Ditto.
536         (WTR::selectTextParameterizedAttributeForCriteria): Ditto.
537         (WTR::AccessibilityUIElement::accessibilityValue const): Use createEmptyJSString,
538         fixing a storage leak due to missing adoption.
539         (WTR::AccessibilityUIElement::documentEncoding): Ditto.
540         (WTR::AccessibilityUIElement::documentURI): Ditto.
541         (WTR::createJSStringRef): Return a JSRetainPtr.
542
543         * WebKitTestRunner/StringFunctions.h:
544         (WTR::toWK): Take a const& to eliminate a little bit of reference count churn.
545         (WTR::toJS): Use the adopt function instead of the constructor.
546
547 2018-09-14  Dean Jackson  <dino@grorg.org>
548
549         Add Justin Michaud.
550
551         * Scripts/webkitpy/common/config/contributors.json:
552
553 2018-09-14  Ryan Haddad  <ryanhaddad@apple.com>
554
555         bots should pass --clobber-old-results to run-webkit-tests
556         https://bugs.webkit.org/show_bug.cgi?id=189623
557
558         Reviewed by Aakash Jain.
559
560         In order to ensure that bots to not produce confusing results due to transient execptions,
561         or run out of space if they continually hit an exception, old layout test results should be clobbered.
562
563         * BuildSlaveSupport/build.webkit.org-config/steps.py:
564         (RunWebKitTests):
565
566 2018-09-13  Ryan Haddad  <ryanhaddad@apple.com>
567
568         Unreviewed, rolling out r235954.
569
570         Breaks the watchOS build.
571
572         Reverted changeset:
573
574         "Move IndexedDB to Network Process"
575         https://bugs.webkit.org/show_bug.cgi?id=189415
576         https://trac.webkit.org/changeset/235954
577
578 2018-09-13  Daniel Bates  <dabates@apple.com>
579
580         Add Copy WebKit Permalink plugin for Sublime Text
581         https://bugs.webkit.org/show_bug.cgi?id=189589
582
583         Rubber-stamped by Joseph Pecoraro.
584
585         Port the Copy WebKit Permalink Automator service to a Sublime Text plugin. Once installed you can
586         use the plugin to copy to the Clipboard a trac.webkit.org hyperlink to the selected line in the
587         active document with or without blame annotations.
588
589         Once installed, you can Control-click (on Mac) or right-click (on Windows and Linux) on a line and
590         choose Copy WebKit Permalink or Copy WebKit Permalink to Blame from the context menu to copy to the
591         Clipboard a permanent hyperlink to the selected line without or with blame annotations, respectively.
592         On Mac you can also invoke the same functionality using the keyboard shortcuts Command + Shift + Control + C
593         and Command + Shift + Control + Option + C, respectively.
594
595         * CopyPermalink/Sublime Text/CopyWebKitPermalink/Context.sublime-menu: Added.
596         * CopyPermalink/Sublime Text/CopyWebKitPermalink/CopyWebKitPermalink.py: Added.
597         * CopyPermalink/Sublime Text/CopyWebKitPermalink/Default (OSX).sublime-keymap: Added.
598         * CopyPermalink/Sublime Text/INSTALL: Added.
599         * CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/Info.plist: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/Info.plist.
600         * CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/document.wflow: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/document.wflow.
601         * CopyPermalink/Xcode/INSTALL: Renamed from Tools/CopyPermalink/README.
602
603 2018-09-13  Carlos Garcia Campos  <cgarcia@igalia.com>
604
605         Unreviewed. Fix WebDriver tests after r235225.
606
607         Use wpt serve command to run the http server.
608
609         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
610         (WebDriverW3CWebServer.__init__):
611         (WebDriverW3CWebServer.start):
612         (WebDriverW3CWebServer.stop):
613
614 2018-09-13  Carlos Garcia Campos  <cgarcia@igalia.com>
615
616         [GTK][WPE] Allow to run script dialogs asynchronously in the UI process
617         https://bugs.webkit.org/show_bug.cgi?id=189544
618
619         Reviewed by Michael Catanzaro.
620
621         Add test cases for the new API.
622
623         * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
624         (testWebViewJavaScriptDialogs):
625
626 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
627
628         [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
629         https://bugs.webkit.org/show_bug.cgi?id=189496
630         <rdar://problem/44370981>
631
632         Unreviewed warning fix.
633
634         r235929 has introduced a new compilation warning:
635         > Tools/ImageDiff/cairo/PlatformImageCairo.cpp:34:70: warning: unused parameter ‘imageSize’ [-Wunused-parameter]
636
637         * ImageDiff/cairo/PlatformImageCairo.cpp:
638         (ImageDiff::PlatformImage::createFromStdin): Removed the variable name.
639
640 2018-09-12  Dan Bernstein  <mitz@apple.com>
641
642         [Cocoa] Complete support for Paste as Quotation
643         https://bugs.webkit.org/show_bug.cgi?id=189504
644
645         Reviewed by Wenson Hsieh.
646
647         * MiniBrowser/mac/MainMenu.xib: Added a Paste as Quotation command in the Edit menu.
648
649 2018-09-12  Sihui Liu  <sihui_liu@apple.com>
650
651         Move IndexedDB to Network Process
652         https://bugs.webkit.org/show_bug.cgi?id=189415
653
654         Reviewed by Geoffrey Garen.
655
656         * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
657         (TEST):
658         * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
659         (TEST):
660         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
661         (TEST):
662         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
663         (TEST):
664         * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
665         (TEST):
666
667 2018-09-12  Chris Dumez  <cdumez@apple.com>
668
669         PSON: No process swap on back navigation after URL bar navigation
670         https://bugs.webkit.org/show_bug.cgi?id=189557
671         <rdar://problem/44353108>
672
673         Reviewed by Alex Christensen.
674
675         Add API test coverage.
676
677         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
678
679 2018-09-11  Dean Jackson  <dino@apple.com>
680
681         Header parsing for experimental and internal debug features
682         https://bugs.webkit.org/show_bug.cgi?id=189486
683         <rdar://problem/44320618>
684
685         Reviewed by Tim Horton.
686
687         Keep track of experimental and internal debug features in TestOptions, and
688         allow webkit-test-runner headers to toggle them by name.
689
690         * DumpRenderTree/TestOptions.cpp:
691         (TestOptions::TestOptions):
692         * WebKitTestRunner/TestController.cpp:
693         (WTR::TestController::resetPreferencesToConsistentValues):
694         (WTR::updateTestOptionsFromTestHeader):
695         * WebKitTestRunner/TestOptions.h:
696         (WTR::TestOptions::hasSameInitializationOptions const):
697
698 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
699
700         [Win][Clang][DumpRenderTree] 0 and nullptr can't be implicitly converted to AccessibilityUIElement
701         https://bugs.webkit.org/show_bug.cgi?id=189492
702
703         Reviewed by Alex Christensen.
704
705         0 and nullptr can't be implicitly converted to
706         AccessibilityUIElement because only Windows port typedefs
707         PlatformUIElement as COMPtr<IAccessible> not a pointer.
708
709         Replaced "return 0" and "return nullptr" with "return { nullptr }".
710
711         * DumpRenderTree/AccessibilityUIElement.cpp:
712         (AccessibilityUIElement::horizontalScrollbar const):
713         (AccessibilityUIElement::verticalScrollbar const):
714         (AccessibilityUIElement::uiElementAttributeValue const):
715         (AccessibilityUIElement::accessibilityElementForTextMarker):
716         * DumpRenderTree/win/AccessibilityControllerWin.cpp:
717         (AccessibilityController::elementAtPoint):
718         (AccessibilityController::accessibleElementById):
719         (AccessibilityController::focusedElement):
720         (AccessibilityController::rootElement):
721         * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
722         (AccessibilityUIElement::elementAtPoint):
723         (AccessibilityUIElement::linkedUIElementAtIndex):
724         (AccessibilityUIElement::getChildAtIndex):
725         (AccessibilityUIElement::titleUIElement):
726         (AccessibilityUIElement::parentElement):
727         (AccessibilityUIElement::uiElementForSearchPredicate):
728         (AccessibilityUIElement::cellForColumnAndRow):
729         (AccessibilityUIElement::disclosedRowAtIndex):
730         (AccessibilityUIElement::ariaOwnsElementAtIndex):
731         (AccessibilityUIElement::ariaFlowToElementAtIndex):
732         (AccessibilityUIElement::ariaControlsElementAtIndex):
733         (AccessibilityUIElement::selectedRowAtIndex):
734         (AccessibilityUIElement::rowAtIndex):
735         (AccessibilityUIElement::disclosedByRow):
736         (AccessibilityUIElement::selectedChildAtIndex const):
737
738 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
739
740         FontManagerTests.ChangeFontColorWithColorPanel fails on macOS Sierra
741         https://bugs.webkit.org/show_bug.cgi?id=189382
742
743         Reviewed by Ryosuke Niwa.
744
745         Fix the test by specifying colors in RGB colorspace.
746
747         * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
748         (TestWebKitAPI::TEST):
749
750 2018-09-11  Fujii Hironori  <Hironori.Fujii@sony.com>
751
752         [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
753         https://bugs.webkit.org/show_bug.cgi?id=189496
754
755         Reviewed by Alex Christensen.
756
757         * ImageDiff/cairo/PlatformImageCairo.cpp:
758         (ImageDiff::PlatformImage::createFromStdin): Removed unnecessary ReadContext struct.
759         (ImageDiff::PlatformImage::writeAsPNGToStdout): Use '%lu' format type specifier for unsigned long.
760
761 2018-09-07  Dean Jackson  <dino@apple.com>
762
763         Add and expose Internal features from WebKit
764         https://bugs.webkit.org/show_bug.cgi?id=189442
765         <rdar://problem/44243404>
766
767         Reviewed by Simon Fraser.
768
769         Update MiniBrowser to expose an Internal feature menu.
770
771         * MiniBrowser/mac/AppDelegate.m:
772         (defaultConfiguration):
773         * MiniBrowser/mac/SettingsController.m:
774         (-[SettingsController _populateMenu]):
775         (-[SettingsController validateMenuItem:]):
776         (-[SettingsController toggleExperimentalFeature:]):
777         (-[SettingsController toggleInternalDebugFeature:]):
778
779 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
780
781         [macOS] [WK2] Support changing foreground colors via color panel
782         https://bugs.webkit.org/show_bug.cgi?id=189382
783         <rdar://problem/44227311>
784
785         Reviewed by Ryosuke Niwa.
786
787         Add an API test that uses NSColorPanel to change the color of selected text, and also apply typing styles when
788         the selection is collapsed. The test also exercises switching between opaque colors (alpha = 1) and transparent
789         colors, as well as making different parts of a word different colors.
790
791         * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
792         (-[TestWKWebView collapseToEnd]):
793         (webViewForFontManagerTesting):
794         (TestWebKitAPI::TEST):
795         * TestWebKitAPI/cocoa/TestWKWebView.h:
796
797 == Rolled over to ChangeLog-2018-09-11 ==