1 2018-09-17 Simon Fraser <simon.fraser@apple.com>
3 Many modern media control tests leak documents in testing
4 https://bugs.webkit.org/show_bug.cgi?id=189437
6 Reviewed by Darin Adler.
8 In order to accurately detect leaks in media controls tests which use lots of
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.
17 This should fix most of the spurious leak reports involving SVGImage documents.
19 * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
20 (WTR::InjectedBundle::reportLiveDocuments):
21 (WTR::InjectedBundle::didReceiveMessageToPage):
23 2018-09-17 Chris Dumez <cdumez@apple.com>
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>
29 Reviewed by Geoff Garen.
31 Add API test coverage.
33 * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
35 2018-09-17 Philippe Normand <pnormand@igalia.com>
37 [JHBuild] Update to GStreamer 1.14.3
38 https://bugs.webkit.org/show_bug.cgi?id=189450
40 Reviewed by Xabier Rodriguez-Calvar.
42 * gstreamer/jhbuild.modules: Bump GStreamer modules from 1.14.1 to 1.14.3.
44 2018-09-17 Philippe Normand <pnormand@igalia.com>
46 [JHBuild] Doesn't check sha256 sums
47 https://bugs.webkit.org/show_bug.cgi?id=189646
49 Reviewed by Michael Catanzaro.
51 * gstreamer/jhbuild.modules: Properly set the sha256: prefix on hashes.
53 2018-09-17 Sihui Liu <sihui_liu@apple.com>
55 Move IndexedDB to Network Process
56 https://bugs.webkit.org/show_bug.cgi?id=189415
57 <rdar://problem/44396973>
59 Reviewed by Chris Dumez.
61 * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
63 * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
65 * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
67 * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
69 * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
72 2018-09-08 Darin Adler <darin@apple.com>
74 Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext
75 https://bugs.webkit.org/show_bug.cgi?id=189455
77 Reviewed by Keith Miller.
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.
85 * DumpRenderTree/AccessibilityController.cpp:
86 (AccessibilityController::makeWindowObject): Use the adopt function
87 instead of the special Adopt constructor of JSRetainPtr.
89 * DumpRenderTree/AccessibilityTextMarker.cpp: Removed unneeded include.
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.
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.
167 * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
168 (_platformTypeConstructor): Use the adopt function instead of the
169 JSRetainPtr adopt constructor. Also nullptr instead of 0.
171 * DumpRenderTree/GCController.cpp:
172 (GCController::makeWindowObject): Use adopt function instead of constructor.
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.
222 * DumpRenderTree/TestRunner.h: Use JSRetainPtr instead of
223 raw pointers for the results of the functions that create strings.
225 * DumpRenderTree/ios/AccessibilityControllerIOS.mm:
226 (AccessibilityController::platformName const): Use the adopt
227 function instead of the adopt constructor.
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.
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.
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.
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.
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.
360 * DumpRenderTree/win/AccessibilityControllerWin.cpp:
361 (AccessibilityController::winNotificationReceived): Use adopt function
362 instead of adopt constructor.
363 (AccessibilityController::platformName const): Ditto.
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.
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.
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.
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.
427 * TestWebKitAPI/JavaScriptTest.cpp:
428 (TestWebKitAPI::javaScriptCallback): Use adopt function instead of
429 adopt member function.
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
435 * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: Ditto.
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.
443 * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
444 (_platformTypeConstructor): Use the adopt function instead of the
445 JSRetainPtr adopt constructor. Also nullptr instead of 0.
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.
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.
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
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
502 (WTR::AccessibilityUIElement::stringForTextMarkerRange):
503 Use createEmptyJSString, fixing a storage leak due to missing adoption.
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
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.
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.
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.
536 2018-09-14 Dean Jackson <dino@grorg.org>
540 * Scripts/webkitpy/common/config/contributors.json:
542 2018-09-14 Ryan Haddad <ryanhaddad@apple.com>
544 bots should pass --clobber-old-results to run-webkit-tests
545 https://bugs.webkit.org/show_bug.cgi?id=189623
547 Reviewed by Aakash Jain.
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.
552 * BuildSlaveSupport/build.webkit.org-config/steps.py:
555 2018-09-13 Ryan Haddad <ryanhaddad@apple.com>
557 Unreviewed, rolling out r235954.
559 Breaks the watchOS build.
563 "Move IndexedDB to Network Process"
564 https://bugs.webkit.org/show_bug.cgi?id=189415
565 https://trac.webkit.org/changeset/235954
567 2018-09-13 Daniel Bates <dabates@apple.com>
569 Add Copy WebKit Permalink plugin for Sublime Text
570 https://bugs.webkit.org/show_bug.cgi?id=189589
572 Rubber-stamped by Joseph Pecoraro.
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.
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.
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.
592 2018-09-13 Carlos Garcia Campos <cgarcia@igalia.com>
594 Unreviewed. Fix WebDriver tests after r235225.
596 Use wpt serve command to run the http server.
598 * Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
599 (WebDriverW3CWebServer.__init__):
600 (WebDriverW3CWebServer.start):
601 (WebDriverW3CWebServer.stop):
603 2018-09-13 Carlos Garcia Campos <cgarcia@igalia.com>
605 [GTK][WPE] Allow to run script dialogs asynchronously in the UI process
606 https://bugs.webkit.org/show_bug.cgi?id=189544
608 Reviewed by Michael Catanzaro.
610 Add test cases for the new API.
612 * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
613 (testWebViewJavaScriptDialogs):
615 2018-09-12 Fujii Hironori <Hironori.Fujii@sony.com>
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>
621 Unreviewed warning fix.
623 r235929 has introduced a new compilation warning:
624 > Tools/ImageDiff/cairo/PlatformImageCairo.cpp:34:70: warning: unused parameter ‘imageSize’ [-Wunused-parameter]
626 * ImageDiff/cairo/PlatformImageCairo.cpp:
627 (ImageDiff::PlatformImage::createFromStdin): Removed the variable name.
629 2018-09-12 Dan Bernstein <mitz@apple.com>
631 [Cocoa] Complete support for Paste as Quotation
632 https://bugs.webkit.org/show_bug.cgi?id=189504
634 Reviewed by Wenson Hsieh.
636 * MiniBrowser/mac/MainMenu.xib: Added a Paste as Quotation command in the Edit menu.
638 2018-09-12 Sihui Liu <sihui_liu@apple.com>
640 Move IndexedDB to Network Process
641 https://bugs.webkit.org/show_bug.cgi?id=189415
643 Reviewed by Geoffrey Garen.
645 * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:
647 * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:
649 * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:
651 * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:
653 * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
656 2018-09-12 Chris Dumez <cdumez@apple.com>
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>
662 Reviewed by Alex Christensen.
664 Add API test coverage.
666 * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
668 2018-09-11 Dean Jackson <dino@apple.com>
670 Header parsing for experimental and internal debug features
671 https://bugs.webkit.org/show_bug.cgi?id=189486
672 <rdar://problem/44320618>
674 Reviewed by Tim Horton.
676 Keep track of experimental and internal debug features in TestOptions, and
677 allow webkit-test-runner headers to toggle them by name.
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):
687 2018-09-12 Fujii Hironori <Hironori.Fujii@sony.com>
689 [Win][Clang][DumpRenderTree] 0 and nullptr can't be implicitly converted to AccessibilityUIElement
690 https://bugs.webkit.org/show_bug.cgi?id=189492
692 Reviewed by Alex Christensen.
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.
698 Replaced "return 0" and "return nullptr" with "return { nullptr }".
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):
727 2018-09-11 Wenson Hsieh <wenson_hsieh@apple.com>
729 FontManagerTests.ChangeFontColorWithColorPanel fails on macOS Sierra
730 https://bugs.webkit.org/show_bug.cgi?id=189382
732 Reviewed by Ryosuke Niwa.
734 Fix the test by specifying colors in RGB colorspace.
736 * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
737 (TestWebKitAPI::TEST):
739 2018-09-11 Fujii Hironori <Hironori.Fujii@sony.com>
741 [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
742 https://bugs.webkit.org/show_bug.cgi?id=189496
744 Reviewed by Alex Christensen.
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.
750 2018-09-07 Dean Jackson <dino@apple.com>
752 Add and expose Internal features from WebKit
753 https://bugs.webkit.org/show_bug.cgi?id=189442
754 <rdar://problem/44243404>
756 Reviewed by Simon Fraser.
758 Update MiniBrowser to expose an Internal feature menu.
760 * MiniBrowser/mac/AppDelegate.m:
761 (defaultConfiguration):
762 * MiniBrowser/mac/SettingsController.m:
763 (-[SettingsController _populateMenu]):
764 (-[SettingsController validateMenuItem:]):
765 (-[SettingsController toggleExperimentalFeature:]):
766 (-[SettingsController toggleInternalDebugFeature:]):
768 2018-09-11 Wenson Hsieh <wenson_hsieh@apple.com>
770 [macOS] [WK2] Support changing foreground colors via color panel
771 https://bugs.webkit.org/show_bug.cgi?id=189382
772 <rdar://problem/44227311>
774 Reviewed by Ryosuke Niwa.
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.
780 * TestWebKitAPI/Tests/mac/FontManagerTests.mm:
781 (-[TestWKWebView collapseToEnd]):
782 (webViewForFontManagerTesting):
783 (TestWebKitAPI::TEST):
784 * TestWebKitAPI/cocoa/TestWKWebView.h:
786 == Rolled over to ChangeLog-2018-09-11 ==