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