haikuwebkit/Tools/WebKitTestRunner/StringFunctions.h

161 lines
4.8 KiB
C
Raw Permalink Normal View History

/*
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
* Copyright (C) 2010-2020 Apple Inc. All rights reserved.
* Copyright (C) 2010 University of Szeged. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
#pragma once
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
#include "JSBasics.h"
[WK2] Change the remaining framework includes from WebKit2 to WebKit https://bugs.webkit.org/show_bug.cgi?id=132956 Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-16 Reviewed by Sam Weinig. Source/WebKit2: * NetworkProcess/unix/NetworkProcessMainUnix.cpp: * NetworkProcess/unix/NetworkProcessMainUnix.h: * PluginProcess/unix/PluginProcessMainUnix.h: * Shared/API/c/cairo/WKImageCairo.h: * Shared/API/c/cf/WKURLRequestCF.h: * Shared/API/c/cf/WKURLResponseCF.h: * Shared/API/c/efl/WKArrayEfl.cpp: * Shared/API/c/efl/WKArrayEfl.h: * UIProcess/API/C/CoordinatedGraphics/WKView.h: * UIProcess/API/C/WKBatteryManager.h: * UIProcess/API/C/WKBatteryStatus.h: * UIProcess/API/C/WKGrammarDetail.h: * UIProcess/API/C/WKTextChecker.h: * UIProcess/API/C/WKVibration.h: * UIProcess/API/C/WKViewportAttributes.h: * UIProcess/API/C/cairo/WKIconDatabaseCairo.h: * UIProcess/API/C/efl/WKAPICastEfl.h: * UIProcess/API/C/efl/WKColorPickerResultListener.h: * UIProcess/API/C/efl/WKEventEfl.h: * UIProcess/API/C/efl/WKPageEfl.h: * UIProcess/API/C/efl/WKPopupItem.h: * UIProcess/API/C/efl/WKPopupMenuListener.h: * UIProcess/API/C/efl/WKViewEfl.cpp: * UIProcess/API/C/efl/WKViewEfl.h: * UIProcess/API/C/gtk/WKFullScreenClientGtk.h: * UIProcess/API/C/gtk/WKInspectorClientGtk.h: * UIProcess/API/C/gtk/WKView.h: * UIProcess/API/C/gtk/WKViewPrivate.h: * UIProcess/API/C/soup/WKContextSoup.h: * UIProcess/API/C/soup/WKCookieManagerSoup.h: * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: * UIProcess/API/C/soup/WKSoupRequestManager.h: * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h: * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h: * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: * UIProcess/API/cpp/efl/WKEinaSharedString.h: * UIProcess/API/efl/EwkView.cpp: * UIProcess/API/efl/EwkView.h: * UIProcess/API/efl/EwkViewCallbacks.h: * UIProcess/API/efl/GestureRecognizer.h: * UIProcess/API/efl/ewk_application_cache_manager_private.h: * UIProcess/API/efl/ewk_auth_request_private.h: * UIProcess/API/efl/ewk_back_forward_list_item_private.h: * UIProcess/API/efl/ewk_back_forward_list_private.h: * UIProcess/API/efl/ewk_context_menu_item.cpp: * UIProcess/API/efl/ewk_context_private.h: * UIProcess/API/efl/ewk_cookie_manager_private.h: * UIProcess/API/efl/ewk_database_manager_private.h: * UIProcess/API/efl/ewk_error_private.h: * UIProcess/API/efl/ewk_favicon_database_private.h: * UIProcess/API/efl/ewk_file_chooser_request_private.h: * UIProcess/API/efl/ewk_page_group_private.h: * UIProcess/API/efl/ewk_popup_menu_item_private.h: * UIProcess/API/efl/ewk_popup_menu_private.h: * UIProcess/API/efl/ewk_security_origin_private.h: * UIProcess/API/efl/ewk_settings_private.h: * UIProcess/API/efl/ewk_storage_manager_private.h: * UIProcess/API/efl/ewk_view.cpp: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_window_features_private.h: * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: * UIProcess/API/gtk/WebKitDownloadClient.cpp: * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h: * UIProcess/efl/BatteryProvider.h: * UIProcess/efl/ContextHistoryClientEfl.h: * UIProcess/efl/DownloadManagerEfl.h: * UIProcess/efl/FindClientEfl.h: * UIProcess/efl/FormClientEfl.h: * UIProcess/efl/PageLoadClientEfl.h: * UIProcess/efl/PagePolicyClientEfl.h: * UIProcess/efl/PageUIClientEfl.h: * UIProcess/efl/RequestManagerClientEfl.h: * UIProcess/efl/TextCheckerClientEfl.h: * UIProcess/efl/VibrationClientEfl.h: * UIProcess/efl/ViewClientEfl.cpp: * UIProcess/efl/ViewClientEfl.h: * UIProcess/efl/WebInspectorProxyEfl.cpp: * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: * WebProcess/efl/SeccompFiltersWebProcessEfl.h: * WebProcess/efl/WebProcessMainEfl.cpp: * WebProcess/efl/WebProcessMainEfl.h: * WebProcess/gtk/WebGtkInjectedBundleMain.cpp: * WebProcess/gtk/WebProcessMainGtk.cpp: * WebProcess/gtk/WebProcessMainGtk.h: * mac/WKPreferences.h: Tools: * MiniBrowser/MiniBrowserWebProcessPlugIn.h: * MiniBrowser/mac/AppDelegate.m: * MiniBrowser/mac/WK2BrowserWindowController.m: * TestWebKitAPI/InjectedBundleController.h: * TestWebKitAPI/InjectedBundleMain.cpp: * TestWebKitAPI/JavaScriptTest.cpp: * TestWebKitAPI/PlatformUtilities.h: * TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm: * TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp: * TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/CookieManager.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewRestoreZoomAndScrollBackForward.cpp: * TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DidNotHandleKeyDown.cpp: * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp: * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp: * TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp: * TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp: * TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp: * TestWebKitAPI/Tests/WebKit2/Find.cpp: * TestWebKitAPI/Tests/WebKit2/FindMatches.mm: * TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp: * TestWebKitAPI/Tests/WebKit2/FrameMIMETypeHTML.cpp: * TestWebKitAPI/Tests/WebKit2/FrameMIMETypePNG.cpp: * TestWebKitAPI/Tests/WebKit2/Geolocation.cpp: * TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback.cpp: * TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle.cpp: * TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins.cpp: * TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/LayoutMilestonesWithAllContentInFrame.cpp: * TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp: * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp: * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp: * TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp: * TestWebKitAPI/Tests/WebKit2/ParentFrame.cpp: * TestWebKitAPI/Tests/WebKit2/ParentFrame_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PasteboardNotifications.mm: * TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp: * TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp: * TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp: * TestWebKitAPI/Tests/WebKit2/ResizeReversePaginatedWebView.cpp: * TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp: * TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp: * TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp: * TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp: * TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp: * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp: * TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp: * TestWebKitAPI/Tests/WebKit2/WebArchive.cpp: * TestWebKitAPI/Tests/WebKit2/WebArchive_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp: * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2/mac/EditorCommands.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor_Bundle.mm: * TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp: * TestWebKitAPI/Tests/WebKit2/mac/WeakObjCPtr.mm: * TestWebKitAPI/Tests/WebKit2/win/AltKeyGeneratesWMSysCommand.cpp: * TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp: * TestWebKitAPI/Tests/WebKit2/win/ResizeViewWhileHidden.cpp: * TestWebKitAPI/Tests/WebKit2/win/TranslateMessageGeneratesWMChar.cpp: * TestWebKitAPI/Tests/WebKit2/win/WMCloseCallsUIClientClose.cpp: * TestWebKitAPI/Tests/WebKit2/win/WMPrint.cpp: * TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm: * TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp: * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextGroupTest.mm: * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextLoadDelegateTest.mm: * TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm: * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: * TestWebKitAPI/config.h: * TestWebKitAPI/efl/PlatformWebView.cpp: * TestWebKitAPI/mac/JavaScriptTestMac.mm: * TestWebKitAPI/mac/PlatformUtilitiesMac.mm: * TestWebKitAPI/mac/PlatformWebViewMac.mm: * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h: * TestWebKitAPI/mac/WebKitAgnosticTest.mm: * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/GeolocationProviderMock.cpp: * WebKitTestRunner/GeolocationProviderMock.h: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: * WebKitTestRunner/InjectedBundle/EventSendingController.h: * WebKitTestRunner/InjectedBundle/GCController.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/InjectedBundle/TextInputController.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: * WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm: * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/StringFunctions.h: * WebKitTestRunner/TestController.cpp: * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: * WebKitTestRunner/TestInvocation.h: * WebKitTestRunner/WebKitTestRunnerPrefix.h: * WebKitTestRunner/WebNotificationProvider.cpp: * WebKitTestRunner/WebNotificationProvider.h: * WebKitTestRunner/WorkQueueManager.cpp: * WebKitTestRunner/cairo/TestInvocationCairo.cpp: * WebKitTestRunner/cg/TestInvocationCG.cpp: * WebKitTestRunner/cocoa/CrashReporterInfo.mm: * WebKitTestRunner/config.h: * WebKitTestRunner/efl/PlatformWebViewEfl.cpp: * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: * WebKitTestRunner/ios/PlatformWebViewIOS.mm: * WebKitTestRunner/ios/TestControllerIOS.mm: * WebKitTestRunner/mac/EventSenderProxy.mm: * WebKitTestRunner/mac/PlatformWebViewMac.mm: * WebKitTestRunner/mac/TestControllerMac.mm: Canonical link: https://commits.webkit.org/151031@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-05-16 08:53:19 +00:00
#include <WebKit/WKRetainPtr.h>
#include <WebKit/WKString.h>
#include <WebKit/WKStringPrivate.h>
#include <sstream>
#include <string>
Refactor TestOptions code in WebKitTestRunner to make it easier to rationalize and extend https://bugs.webkit.org/show_bug.cgi?id=217390 Reviewed by Darin Adler. Refactors TestOptions code in WebKitTestRunner to make it clear how options coming in at different levels are treated and what precedence each has. The order is (from least to most): - Global features passed to WebKitTestRunner via the command line (e.g. --show-touches) - Hardcoded features based on the path of the test being run (hopefully we can remove all soon) - Hardcoded platform specific defaults (currently only used by macOS for useThreadedScrolling). - Features from the test headers within the test itself. - Finally, a second chance for more platform specific defaults (currenly only used the Cocoa ports for setting enableProcessSwapOnNavigation and enableProcessSwapOnWindowOpen based on NSUserDefaults.) To make this change work, and pave the way for future autogeneration of some of these test options, the TestOptions struct (now class) was overhauled. Instead of storing the state itself, TestOptions is now an immutable owner of a TestFeatures object. TestFeatures is a simple struct that contains maps of option keys to values and can be merged with other TestFeatures objects. TestOptions takes a TestFeatures at construction, and exposes getters for all keys, as well as defaults for when they are not in the maps. In future changes, I would like to remove many of these (the ones that correspond with WebKit preferences anyway) and have the keys and values automatically dealt with by WKPreferences. * WebKitTestRunner/Options.cpp: * WebKitTestRunner/Options.h: Switch to std::unordered_map for consistency and ease of conversion. * WebKitTestRunner/PlatformWebView.h: (WTR::PlatformWebView::viewSupportsOptions const): Update to call new TestOptions functions. * WebKitTestRunner/StringFunctions.h: (WTR::toWK): (WTR::toWTFString): Add conversions for std::string. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Replace some bools with a new global TestFeatures instance that forms the base of all TestFeatures merges. (WTR::TestController::generateContextConfiguration const): (WTR::TestController::generatePageConfiguration): (WTR::TestController::createWebViewWithOptions): (WTR::TestController::ensureViewSupportsOptionsForTest): (WTR::TestController::resetPreferencesToConsistentValues): (WTR::TestController::resetStateToConsistentValues): Update to call new TestOptions functions. (WTR::TestController::createTestURL): Expose as a static member function on TestController for use in other files. (WTR::TestController::testOptionsForTest const): Rework to be a sequence of TestFeatures merges. (WTR::TestController::updateWebViewSizeForTest): (WTR::TestController::updateWindowScaleForTest): Update to call new TestOptions functions. (WTR::createTestURL): Deleted. (WTR::parseBooleanTestHeaderValue): Deleted. (WTR::parseStringTestHeaderValueAsRelativePath): Deleted. (WTR::parseStringTestHeaderValueAsURL): Deleted. (WTR::updateTestOptionsFromTestHeader): Deleted. (WTR::TestController::platformAddTestOptions const): Deleted. Moved TestOptions parsing to TestOptions.cpp * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::createTestSettingsDictionary): Update to call new TestOptions functions. * WebKitTestRunner/TestOptions.h: Reworks TestOptions to be an immutable owner of a TestFeatures struct, which is a set of maps that map feature string keys, to values of type bool, double, string or string vector. * WebKitTestRunner/TestOptions.cpp: (WTR::merge): Merges two TestFeatures objects. If both contain the same key, the 'additional' TestFeatures overrides the 'base' TestFeatures. (WTR::dumpFeatures): Helper to dump features to stderr, useful for debugging. (WTR::keyType): Helper for parser to know which value parser to use. (WTR::parseBooleanTestHeaderValue): (WTR::parseStringTestHeaderValueAsRelativePath): (WTR::parseStringTestHeaderValueAsURL): Value parsers moved from TestController.cpp (WTR::parseTestHeader): Header parser moved from TestController.cpp. Update to now return a TestFeatures object and use keyType to pick value parser rather than inlining the if statements. (WTR::hardcodedFeaturesBasedOnPathForTest): Moved from the TestOptions contructor and reworked to return a TestFeatures object to be merged by the caller. (WTR::featureDefaultsFromTestHeaderForTest): Creates a TestFeatures for the test headers of the current test. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformSpecificFeatureOverridesDefaultsForTest const): Reworked to now return a TestFeatures object that will be merged, rather than updating a TestOptions. Moves enableInAppBrowserPrivacy work to TestController::platformWillRunTest where it is more appropriate. (WTR::TestController::platformInitializeDataStore): (WTR::TestController::platformCreateWebView): (WTR::TestController::finishCreatingPlatformWebView): (WTR::TestController::setApplicationBundleIdentifier): (WTR::TestController::cocoaResetStateToConsistentValues): (WTR::contentMode): Update to call new TestOptions functions. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::platformConfigureViewForTest): Update to call new TestOptions functions. (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Moved GeneratedTouchesDebugWindow work to TestController::platformConfigureViewForTest where it is more appropriate and removed shouldShowTouches setting as that is done globally now. * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::PlatformWebView): Update to call new TestOptions functions. * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Remove shouldUseRemoteLayerTree and shouldShowWebView, as those are now done globally, and re-implemented useThreadedScrolling to use boolFeatures. * WebKitTestRunner/win/TestControllerWin.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. * WebKitTestRunner/gtk/TestControllerGTK.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. Canonical link: https://commits.webkit.org/230271@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 00:45:29 +00:00
#include <vector>
#include <wtf/Platform.h>
#include <wtf/StdLibExtras.h>
[WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part https://bugs.webkit.org/show_bug.cgi?id=200620 Source/JavaScriptCore: Reviewed by Geoff Garen. * API/JSCallbackObject.h: (JSC::JSCallbackObjectData::setPrivateProperty): * API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject<Parent>::JSCallbackObject): * API/JSClassRef.cpp: (OpaqueJSClassContextData::OpaqueJSClassContextData): (OpaqueJSClass::contextData): * API/JSMarkingConstraintPrivate.cpp: (JSContextGroupAddMarkingConstraint): * API/JSWrapperMap.mm: (-[JSWrapperMap initWithGlobalContextRef:]): * API/ObjCCallbackFunction.mm: (ArgumentTypeDelegate::typeInteger): (ArgumentTypeDelegate::typeDouble): (ArgumentTypeDelegate::typeBool): (ArgumentTypeDelegate::typeId): (ArgumentTypeDelegate::typeOfClass): (ArgumentTypeDelegate::typeStruct): (ResultTypeDelegate::typeInteger): (ResultTypeDelegate::typeDouble): (ResultTypeDelegate::typeBool): (ResultTypeDelegate::typeVoid): (ResultTypeDelegate::typeId): (ResultTypeDelegate::typeOfClass): (ResultTypeDelegate::typeBlock): (ResultTypeDelegate::typeStruct): (objCCallbackFunctionForInvocation): * API/glib/JSCContext.cpp: (jscContextSetVirtualMachine): * API/glib/JSCWrapperMap.cpp: (JSC::WrapperMap::WrapperMap): * assembler/ProbeStack.cpp: (JSC::Probe::Stack::ensurePageFor): * b3/B3LowerToAir.cpp: * b3/B3Procedure.cpp: (JSC::B3::Procedure::Procedure): (JSC::B3::Procedure::dominators): (JSC::B3::Procedure::naturalLoops): (JSC::B3::Procedure::backwardsCFG): (JSC::B3::Procedure::backwardsDominators): (JSC::B3::Procedure::addDataSection): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::cCallSpecial): * b3/air/AirGenerate.cpp: (JSC::B3::Air::prepareForGeneration): * b3/air/testair.cpp: * b3/testb3.h: (compileProc): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/AccessCaseSnippetParams.cpp: * bytecode/BytecodeBasicBlock.cpp: (JSC::BytecodeBasicBlock::computeImpl): * bytecode/CallLinkInfo.cpp: (JSC::CallLinkInfo::setFrameShuffleData): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::ensureJITDataSlow): (JSC::CodeBlock::setCalleeSaveRegisters): (JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow): * bytecode/CodeBlock.h: (JSC::CodeBlock::createRareDataIfNecessary): * bytecode/DFGExitProfile.cpp: (JSC::DFG::ExitProfile::add): * bytecode/DeferredCompilationCallback.cpp: (JSC::DeferredCompilationCallback::ensureDeferredSourceDump): * bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback): * bytecode/GetByIdVariant.cpp: (JSC::GetByIdVariant::operator=): * bytecode/LazyOperandValueProfile.cpp: (JSC::CompressedLazyOperandValueProfileHolder::add): * bytecode/PolyProtoAccessChain.h: (JSC::PolyProtoAccessChain::clone): * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerate): * bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeForStubInfo): * bytecode/PutByIdVariant.cpp: (JSC::PutByIdVariant::operator=): * bytecode/RecordedStatuses.cpp: (JSC::RecordedStatuses::addCallLinkStatus): (JSC::RecordedStatuses::addGetByIdStatus): (JSC::RecordedStatuses::addPutByIdStatus): (JSC::RecordedStatuses::addInByIdStatus): * bytecode/StructureStubClearingWatchpoint.cpp: (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::livenessAnalysisSlow): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedCodeBlock::createRareDataIfNecessary): * bytecode/UnlinkedFunctionExecutable.cpp: (JSC::UnlinkedFunctionExecutable::ensureRareDataSlow): * bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::generate): * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::AbstractInterpreter): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::Graph): (JSC::DFG::Graph::livenessFor): (JSC::DFG::Graph::killsFor): (JSC::DFG::Graph::ensureCPSCFG): (JSC::DFG::Graph::ensureCPSDominators): (JSC::DFG::Graph::ensureSSADominators): (JSC::DFG::Graph::ensureCPSNaturalLoops): (JSC::DFG::Graph::ensureSSANaturalLoops): (JSC::DFG::Graph::ensureBackwardsCFG): (JSC::DFG::Graph::ensureBackwardsDominators): (JSC::DFG::Graph::ensureControlEquivalenceAnalysis): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::JITCompiler): (JSC::DFG::JITCompiler::link): (JSC::DFG::JITCompiler::compile): (JSC::DFG::JITCompiler::compileFunction): (JSC::DFG::JITCompiler::addressOfDoubleConstant): * dfg/DFGLivenessAnalysisPhase.cpp: * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGSSAConversionPhase.cpp: (JSC::DFG::SSAConversionPhase::run): * dfg/DFGSlowPathGenerator.h: (JSC::DFG::slowPathCall): (JSC::DFG::slowPathMove): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::arrayify): (JSC::DFG::SpeculativeJIT::compileGetByValOnString): (JSC::DFG::SpeculativeJIT::compileCreateDirectArguments): (JSC::DFG::SpeculativeJIT::compileArraySlice): (JSC::DFG::SpeculativeJIT::emitStructureCheck): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::createNewThread): * disassembler/Disassembler.cpp: (JSC::disassembleAsynchronously): * ftl/FTLAbstractHeap.cpp: (JSC::FTL::IndexedAbstractHeap::atSlow): * ftl/FTLCompile.cpp: (JSC::FTL::compile): * ftl/FTLFail.cpp: (JSC::FTL::fail): * ftl/FTLLink.cpp: (JSC::FTL::link): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::lazySlowPath): * ftl/FTLState.cpp: (JSC::FTL::State::State): * heap/CompleteSubspace.cpp: (JSC::CompleteSubspace::allocatorForSlow): * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::protectedObjectTypeCounts): (JSC::Heap::objectTypeCounts): (JSC::Heap::addCoreConstraints): * heap/HeapInlines.h: * heap/HeapSnapshotBuilder.cpp: (JSC::HeapSnapshotBuilder::buildSnapshot): * heap/IsoCellSet.cpp: (JSC::IsoCellSet::addSlow): * heap/IsoSubspace.cpp: (JSC::IsoSubspace::IsoSubspace): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * inspector/JSGlobalObjectConsoleClient.cpp: (Inspector::JSGlobalObjectConsoleClient::messageWithTypeAndLevel): (Inspector::JSGlobalObjectConsoleClient::profile): (Inspector::JSGlobalObjectConsoleClient::profileEnd): (Inspector::JSGlobalObjectConsoleClient::warnUnimplemented): * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController): (Inspector::JSGlobalObjectInspectorController::reportAPIException): (Inspector::JSGlobalObjectInspectorController::ensureInspectorAgent): (Inspector::JSGlobalObjectInspectorController::ensureDebuggerAgent): (Inspector::JSGlobalObjectInspectorController::createLazyAgents): * inspector/agents/InspectorAgent.cpp: (Inspector::InspectorAgent::InspectorAgent): * inspector/agents/InspectorConsoleAgent.cpp: (Inspector::InspectorConsoleAgent::InspectorConsoleAgent): (Inspector::InspectorConsoleAgent::startTiming): (Inspector::InspectorConsoleAgent::logTiming): (Inspector::InspectorConsoleAgent::stopTiming): (Inspector::InspectorConsoleAgent::count): (Inspector::InspectorConsoleAgent::countReset): * inspector/agents/InspectorDebuggerAgent.cpp: (Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent): * inspector/agents/InspectorHeapAgent.cpp: (Inspector::InspectorHeapAgent::InspectorHeapAgent): * inspector/agents/InspectorScriptProfilerAgent.cpp: (Inspector::InspectorScriptProfilerAgent::InspectorScriptProfilerAgent): * inspector/agents/InspectorTargetAgent.cpp: (Inspector::InspectorTargetAgent::InspectorTargetAgent): * inspector/agents/JSGlobalObjectDebuggerAgent.cpp: (Inspector::JSGlobalObjectDebuggerAgent::breakpointActionLog): * inspector/agents/JSGlobalObjectRuntimeAgent.cpp: (Inspector::JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent): * inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp: (Inspector::RemoteInspectorSocketEndpoint::createClient): * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * inspector/scripts/codegen/objc_generator_templates.py: * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result: * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result: * inspector/scripts/tests/generic/expected/domain-availability.json-result: * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result: * inspector/scripts/tests/generic/expected/enum-values.json-result: * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result: * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result: * jit/JIT.cpp: (JSC::JIT::compileWithoutLinking): (JSC::JIT::link): * jit/JITThunks.cpp: (JSC::JITThunks::JITThunks): * jit/Repatch.cpp: (JSC::linkPolymorphicCall): * jsc.cpp: (runJSC): * parser/Parser.cpp: (JSC::Parser<LexerType>::Parser): * parser/Parser.h: (JSC::Scope::pushLabel): (JSC::Parser<LexerType>::parse): * parser/ParserArena.h: (JSC::ParserArena::identifierArena): * profiler/ProfilerCompilation.cpp: (JSC::Profiler::Compilation::executionCounterFor): * runtime/Error.cpp: (JSC::getStackTrace): * runtime/FunctionExecutable.cpp: (JSC::FunctionExecutable::ensureRareDataSlow): * runtime/FunctionRareData.h: (JSC::FunctionRareData::createAllocationProfileClearingWatchpoint): * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): (JSC::JSGlobalObject::tryInstallArraySpeciesWatchpoint): * runtime/JSGlobalObject.h: (JSC::JSGlobalObject::createRareDataIfNeeded): * runtime/JSRunLoopTimer.cpp: (JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData): (JSC::JSRunLoopTimer::Manager::registerVM): * runtime/PropertyMapHashTable.h: (JSC::PropertyTable::addDeletedOffset): * runtime/PropertyTable.cpp: (JSC::PropertyTable::PropertyTable): * runtime/RegExp.cpp: (JSC::RegExp::finishCreation): * runtime/RegExp.h: * runtime/ScriptExecutable.cpp: (JSC::ScriptExecutable::ensureTemplateObjectMapImpl): * runtime/Structure.cpp: (JSC::Structure::ensurePropertyReplacementWatchpointSet): * runtime/StructureRareData.cpp: (JSC::StructureRareData::setObjectToStringValue): * runtime/SymbolTable.cpp: (JSC::SymbolTable::localToEntry): (JSC::SymbolTable::cloneScopePart): (JSC::SymbolTable::prepareForTypeProfiling): (JSC::SymbolTable::setRareDataCodeBlock): * runtime/TypeSet.cpp: (JSC::StructureShape::propertyHash): * runtime/VM.cpp: (JSC::VM::VM): (JSC::VM::ensureHeapProfiler): (JSC::VM::enableTypeProfiler): (JSC::VM::enableControlFlowProfiler): (JSC::VM::queueMicrotask): (JSC::VM::ensureShadowChicken): * wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::AirIRGenerator::emitPatchpoint): (JSC::Wasm::AirIRGenerator::emitCheck): (JSC::Wasm::parseAndCompileAir): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::complete): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::work): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::Worklist): * wasm/js/JSToWasm.cpp: (JSC::Wasm::createJSToWasmWrapper): * yarr/YarrInterpreter.cpp: (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): (JSC::Yarr::ByteCompiler::regexBegin): * yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::compile): * yarr/YarrPattern.cpp: (JSC::Yarr::CharacterClassConstructor::charClass): (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor): (JSC::Yarr::YarrPatternConstructor::resetForReparsing): (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin): (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin): (JSC::Yarr::YarrPatternConstructor::copyDisjunction): (JSC::Yarr::anycharCreate): * yarr/YarrPattern.h: (JSC::Yarr::PatternDisjunction::addNewAlternative): * yarr/create_regex_tables: * yarr/generateYarrUnicodePropertyTables.py: Source/WebCore: Reviewed by Geoff Garen. * Modules/applicationmanifest/ApplicationManifestParser.cpp: (WebCore::ApplicationManifestParser::logDeveloperWarning): * Modules/beacon/NavigatorBeacon.cpp: (WebCore::NavigatorBeacon::from): * Modules/cache/DOMWindowCaches.cpp: (WebCore::DOMWindowCaches::from): * Modules/cache/WorkerGlobalScopeCaches.cpp: (WebCore::WorkerGlobalScopeCaches::from): * Modules/credentialmanagement/NavigatorCredentials.cpp: (WebCore::NavigatorCredentials::from): * Modules/encryptedmedia/InitDataRegistry.cpp: (WebCore::InitDataRegistry::extractPsshBoxesFromCenc): * Modules/encryptedmedia/legacy/LegacyCDM.cpp: (WebCore::LegacyCDM::create): * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp: (WebCore::LegacyCDMPrivateClearKey::createSession): * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::loadBlob): * Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::fetch): (WebCore::FetchResponse::BodyLoader::start): * Modules/gamepad/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::from): * Modules/geolocation/GeolocationController.cpp: (WebCore::provideGeolocationTo): * Modules/geolocation/NavigatorGeolocation.cpp: (WebCore::NavigatorGeolocation::from): * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: (WebCore::DOMWindowIndexedDatabase::from): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::index): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::createObjectStore): (WebCore::IDBTransaction::createIndex): * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: (WebCore::WorkerGlobalScopeIndexedDatabase::from): * Modules/indexeddb/client/IDBConnectionToServer.cpp: (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer): * Modules/indexeddb/client/TransactionOperation.cpp: (WebCore::IDBClient::TransactionOperation::TransactionOperation): * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase): (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::ensureQuotaUser): * Modules/indexeddb/server/IndexValueStore.cpp: (WebCore::IDBServer::IndexValueStore::addRecord): * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp: (WebCore::IDBServer::MemoryBackingStoreTransaction::create): (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction): (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged): * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: (WebCore::IDBServer::MemoryIDBBackingStore::create): (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo): * Modules/indexeddb/server/MemoryIndex.cpp: (WebCore::IDBServer::MemoryIndex::putIndexKey): (WebCore::IDBServer::MemoryIndex::maybeOpenCursor): * Modules/indexeddb/server/MemoryObjectStore.cpp: (WebCore::IDBServer::MemoryObjectStore::addRecord): (WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor): * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement): * Modules/indexeddb/server/SQLiteIDBCursor.cpp: (WebCore::IDBServer::SQLiteIDBCursor::maybeCreate): (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor): (WebCore::IDBServer::SQLiteIDBCursor::createSQLiteStatement): (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord): * Modules/indexeddb/server/SQLiteIDBTransaction.cpp: (WebCore::IDBServer::SQLiteIDBTransaction::begin): * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp: (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction): * Modules/indexeddb/shared/IDBRequestData.cpp: (WebCore::IDBRequestData::IDBRequestData): (WebCore::IDBRequestData::isolatedCopy): * Modules/indexeddb/shared/IDBRequestData.h: (WebCore::IDBRequestData::decode): * Modules/indexeddb/shared/IDBResultData.cpp: (WebCore::IDBResultData::IDBResultData): (WebCore::IDBResultData::isolatedCopy): (WebCore::IDBResultData::openDatabaseSuccess): (WebCore::IDBResultData::openDatabaseUpgradeNeeded): (WebCore::IDBResultData::deleteDatabaseSuccess): (WebCore::IDBResultData::putOrAddSuccess): (WebCore::IDBResultData::getRecordSuccess): (WebCore::IDBResultData::getAllRecordsSuccess): (WebCore::IDBResultData::openCursorSuccess): (WebCore::IDBResultData::iterateCursorSuccess): * Modules/indexeddb/shared/IDBResultData.h: (WebCore::IDBResultData::decode): * Modules/indexeddb/shared/IDBTransactionInfo.cpp: (WebCore::IDBTransactionInfo::versionChange): (WebCore::IDBTransactionInfo::IDBTransactionInfo): (WebCore::IDBTransactionInfo::isolatedCopy): * Modules/indexeddb/shared/IDBTransactionInfo.h: (WebCore::IDBTransactionInfo::decode): * Modules/indexeddb/shared/InProcessIDBServer.cpp: (WebCore::InProcessIDBServer::quotaManager): * Modules/mediacapabilities/NavigatorMediaCapabilities.cpp: (WebCore::NavigatorMediaCapabilities::from): * Modules/mediasession/WebMediaSessionManager.cpp: (WebCore::WebMediaSessionManager::mockPicker): (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::buffered const): (WebCore::MediaSource::setLiveSeekableRange): * Modules/mediastream/NavigatorMediaDevices.cpp: (WebCore::NavigatorMediaDevices::from): * Modules/mediastream/UserMediaController.cpp: (WebCore::provideUserMediaTo): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: (WebCore::LibWebRTCDataChannelHandler::channelEvent): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): (WebCore::LibWebRTCMediaEndpoint::collectTransceivers): (WebCore::LibWebRTCMediaEndpoint::newTransceiver): (WebCore::LibWebRTCMediaEndpoint::createTransceiverBackends): (WebCore::LibWebRTCMediaEndpoint::transceiverBackendFromSender): (WebCore::LibWebRTCMediaEndpoint::createDataChannel): * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::createLibWebRTCPeerConnectionBackend): (WebCore::LibWebRTCPeerConnectionBackend::videoReceiver): (WebCore::LibWebRTCPeerConnectionBackend::audioReceiver): (WebCore::LibWebRTCPeerConnectionBackend::addTrack): (WebCore::LibWebRTCPeerConnectionBackend::addTransceiver): * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp: (WebCore::LibWebRTCRtpSenderBackend::createDTMFBackend): * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: (WebCore::LibWebRTCRtpTransceiverBackend::createReceiverBackend): (WebCore::LibWebRTCRtpTransceiverBackend::createSenderBackend): * Modules/notifications/Notification.cpp: (WebCore::Notification::Notification): * Modules/notifications/NotificationController.cpp: (WebCore::provideNotification): * Modules/quota/DOMWindowQuota.cpp: (WebCore::DOMWindowQuota::from): * Modules/quota/NavigatorStorageQuota.cpp: (WebCore::NavigatorStorageQuota::from): * Modules/quota/WorkerNavigatorStorageQuota.cpp: (WebCore::WorkerNavigatorStorageQuota::from): * Modules/speech/DOMWindowSpeechSynthesis.cpp: (WebCore::DOMWindowSpeechSynthesis::from): * Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::ensurePlatformSpeechSynthesizer): * Modules/webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::decodeAsync): * Modules/webaudio/AudioBasicInspectorNode.cpp: (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode): * Modules/webaudio/AudioBasicProcessorNode.cpp: (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode): * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::decodeAudioData): * Modules/webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): * Modules/webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): * Modules/webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::createKernel): (WebCore::BiquadProcessor::getFrequencyResponse): * Modules/webaudio/ChannelMergerNode.cpp: (WebCore::ChannelMergerNode::ChannelMergerNode): * Modules/webaudio/ChannelSplitterNode.cpp: (WebCore::ChannelSplitterNode::ChannelSplitterNode): * Modules/webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::ConvolverNode): (WebCore::ConvolverNode::setBuffer): * Modules/webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): * Modules/webaudio/DelayProcessor.cpp: (WebCore::DelayProcessor::createKernel): * Modules/webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): (WebCore::DynamicsCompressorNode::initialize): * Modules/webaudio/GainNode.cpp: (WebCore::GainNode::GainNode): * Modules/webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::setFormat): * Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): (WebCore::MediaStreamAudioSourceNode::setFormat): * Modules/webaudio/OscillatorNode.cpp: (WebCore::OscillatorNode::OscillatorNode): * Modules/webaudio/PannerNode.cpp: (WebCore::PannerNode::PannerNode): * Modules/webaudio/PeriodicWave.cpp: (WebCore::PeriodicWave::createBandLimitedTables): * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::RealtimeAnalyser): (WebCore::RealtimeAnalyser::setFftSize): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::ScriptProcessorNode): * Modules/webaudio/WaveShaperDSPKernel.cpp: (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling): * Modules/webaudio/WaveShaperNode.cpp: (WebCore::WaveShaperNode::WaveShaperNode): * Modules/webaudio/WaveShaperProcessor.cpp: (WebCore::WaveShaperProcessor::createKernel): * Modules/webauthn/fido/FidoHidMessage.cpp: (fido::FidoHidMessage::FidoHidMessage): * Modules/webauthn/fido/FidoHidPacket.cpp: (fido::FidoHidInitPacket::createFromSerializedData): (fido::FidoHidContinuationPacket::createFromSerializedData): * Modules/webdatabase/Database.cpp: (WebCore::Database::openAndVerifyVersion): (WebCore::Database::close): (WebCore::Database::scheduleTransaction): (WebCore::Database::scheduleTransactionStep): (WebCore::Database::tableNames): * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::DatabaseTracker::recordCreatingDatabase): (WebCore::DatabaseTracker::recordDeletingDatabase): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::executeSql): (WebCore::SQLTransaction::openTransactionAndPreflight): * Modules/webdriver/NavigatorWebDriver.cpp: (WebCore::NavigatorWebDriver::from): * Modules/webgpu/NavigatorGPU.cpp: (WebCore::NavigatorGPU::from): * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h: * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h: * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding): (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding): * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::TypeNamer::createNameNode): * Modules/webgpu/WHLSL/WHLSLChecker.cpp: (WebCore::WHLSL::Checker::assignConcreteType): (WebCore::WHLSL::Checker::assignType): (WebCore::WHLSL::Checker::forwardType): * Modules/webgpu/WHLSL/WHLSLParser.cpp: (WebCore::WHLSL::Parser::parseSemantic): * Modules/webgpu/WorkerNavigatorGPU.cpp: (WebCore::WorkerNavigatorGPU::from): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake): (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpgradeURL): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): * Modules/websockets/WebSocketDeflateFramer.cpp: (WebCore::WebSocketDeflateFramer::createExtensionProcessor): (WebCore::WebSocketDeflateFramer::enableDeflate): (WebCore::WebSocketDeflateFramer::deflate): (WebCore::WebSocketDeflateFramer::inflate): * Modules/websockets/WebSocketDeflater.cpp: (WebCore::WebSocketDeflater::WebSocketDeflater): (WebCore::WebSocketInflater::WebSocketInflater): * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): * Modules/webvr/NavigatorWebVR.cpp: (WebCore::NavigatorWebVR::from): * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates): * animation/WebAnimation.cpp: (WebCore::WebAnimation::updateFinishedState): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::queueTaskToEventLoop): * bindings/js/JSEventTargetCustom.cpp: (WebCore::jsEventTargetCast): * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop): * bindings/js/SerializedScriptValue.cpp: (WebCore::transferArrayBuffers): (WebCore::SerializedScriptValue::create): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::decode): * bindings/js/WebCoreJSClientData.cpp: (WebCore::JSVMClientData::initNormalWorld): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodNamed const): (JSC::Bindings::CClass::fieldNamed const): * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::methodNamed const): (JSC::Bindings::ObjcClass::fieldNamed const): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::CombinedURLFilters::CombinedURLFilters): (WebCore::ContentExtensions::CombinedURLFilters::addPattern): * crypto/SubtleCrypto.cpp: (WebCore::normalizeCryptoAlgorithmParameters): (WebCore::crossThreadCopyImportParams): * css/CSSCalculationValue.cpp: (WebCore::determineCategory): * css/CSSDefaultStyleSheets.cpp: (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle): (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle): * css/CSSFontFace.cpp: (WebCore::CSSFontFace::appendSources): * css/CSSFontFaceSet.cpp: (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered): * css/CSSGroupingRule.cpp: (WebCore::CSSGroupingRule::cssRules const): * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): * css/CSSKeyframesRule.cpp: (WebCore::CSSKeyframesRule::cssRules): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::cssRules): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::from): * css/DOMCSSRegisterCustomProperty.cpp: (WebCore::DOMCSSRegisterCustomProperty::from): * css/DocumentRuleSets.cpp: (WebCore::DocumentRuleSets::DocumentRuleSets): (WebCore::DocumentRuleSets::updateUserAgentMediaQueryStyleIfNeeded const): (WebCore::DocumentRuleSets::initializeUserStyle): (WebCore::makeRuleSet): (WebCore::DocumentRuleSets::resetAuthorStyle): (WebCore::ensureInvalidationRuleSets): * css/ElementRuleCollector.cpp: (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot): * css/FontFace.cpp: (WebCore::populateFontFaceWithArrayBuffer): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM): * css/RuleFeature.cpp: (WebCore::RuleFeatureSet::collectFeatures): (WebCore::RuleFeatureSet::add): * css/RuleSet.cpp: (WebCore::RuleSet::addToRuleSet): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertTo100PercentMinusLength): * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue): (WebCore::StyleBuilderCustom::applyInheritTextShadow): (WebCore::StyleBuilderCustom::applyInheritBoxShadow): (WebCore::StyleBuilderCustom::applyValueContent): * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::ensureCSSStyleDeclaration): (WebCore::MutableStyleProperties::ensureInlineCSSStyleDeclaration): * css/StyleResolver.cpp: (WebCore::StyleResolver::cascadedPropertiesForRollback): * css/makeprop.pl: (generateFillLayerPropertyInheritValueSetter): (generateFillLayerPropertyValueSetter): * css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::CSSParserImpl): (WebCore::CSSParserImpl::parsePageSelector): (WebCore::CSSParserImpl::consumeMediaRule): (WebCore::CSSParserImpl::consumeSupportsRule): (WebCore::CSSParserImpl::consumeKeyframesRule): * css/parser/CSSParserSelector.cpp: (WebCore::CSSParserSelector::parsePagePseudoSelector): (WebCore::CSSParserSelector::parsePseudoElementSelector): (WebCore::CSSParserSelector::parsePseudoClassSelector): (WebCore::CSSParserSelector::CSSParserSelector): (WebCore::CSSParserSelector::adoptSelectorVector): (WebCore::CSSParserSelector::prependTagSelector): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBasicShapePath): * css/parser/CSSSelectorParser.cpp: (WebCore::CSSSelectorParser::consumePseudo): * dom/CustomElementReactionQueue.cpp: (WebCore::CustomElementReactionQueue::ensureBackupQueue): * dom/DataTransfer.cpp: (WebCore::DataTransfer::items): (WebCore::DataTransfer::createForInputEvent): (WebCore::DataTransfer::createForDragStartEvent): (WebCore::DataTransfer::setDragImage): * dom/DeviceOrientationController.cpp: (WebCore::provideDeviceOrientationTo): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::buildAccessKeyCache): (WebCore::Document::implementation): (WebCore::Document::formController): (WebCore::Document::updateTextRenderer): (WebCore::Document::userAgentShadowTreeStyleResolver): (WebCore::Document::axObjectCache const): (WebCore::Document::setParsing): (WebCore::Document::accessSVGExtensions): (WebCore::Document::initSecurityContext): (WebCore::Document::textAutoSizing): (WebCore::Document::didAddWheelEventHandler): (WebCore::Document::didAddTouchEventHandler): (WebCore::Document::didLogMessage): (WebCore::Document::registerCSSProperty): (WebCore::Document::deviceOrientationAndMotionAccessController): (WebCore::Document::contentChangeObserver): (WebCore::Document::domTimerHoldingTank): * dom/Document.h: (WebCore::Document::createParserYieldToken): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): * dom/DocumentStorageAccess.cpp: (WebCore::DocumentStorageAccess::from): (WebCore::DocumentStorageAccess::requestStorageAccess): (WebCore::DocumentStorageAccess::enableTemporaryTimeUserGesture): * dom/Element.cpp: (WebCore::Element::attributes const): (WebCore::Element::setIsDefinedCustomElement): (WebCore::Element::enqueueToUpgrade): (WebCore::Element::classList): (WebCore::Element::dataset): (WebCore::Element::ensureIntersectionObserverData): (WebCore::Element::ensureResizeObserverData): * dom/EventListenerMap.cpp: (WebCore::EventListenerMap::add): * dom/EventNames.h: * dom/EventPath.cpp: (WebCore::EventPath::buildPath): (WebCore::EventPath::EventPath): * dom/IdTargetObserverRegistry.cpp: (WebCore::IdTargetObserverRegistry::addObserver): * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::KeyboardEvent): * dom/MutationObserver.cpp: (WebCore::queueMutationObserverCompoundMicrotask): * dom/MutationObserverInterestGroup.cpp: (WebCore::MutationObserverInterestGroup::createIfNeeded): * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): * dom/Node.cpp: (WebCore::Node::materializeRareData): (WebCore::Node::ensureEventTargetData): (WebCore::Node::registerMutationObserver): * dom/NodeRareData.h: (WebCore::NodeRareData::ensureNodeLists): (WebCore::NodeRareData::ensureMutationObserverData): * dom/RadioButtonGroups.cpp: (WebCore::RadioButtonGroups::addButton): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::reportException): (WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection): (WebCore::ScriptExecutionContext::ensureRejectedPromiseTrackerSlow): * dom/SelectorQuery.cpp: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): (WebCore::ShadowRoot::moveShadowRootToNewDocument): (WebCore::ShadowRoot::addSlotElementByName): * dom/SlotAssignment.cpp: (WebCore::SlotAssignment::addSlotElementByName): (WebCore::SlotAssignment::assignToSlot): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::addElementById): (WebCore::TreeScope::addElementByName): (WebCore::TreeScope::addImageMap): (WebCore::TreeScope::addImageElementByUsemap): (WebCore::TreeScope::labelElementForId): * editing/Editor.cpp: (WebCore::createDataTransferForClipboardEvent): (WebCore::Editor::Editor): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::ensureReplacementFragment): * editing/SelectionRectGatherer.cpp: (WebCore::SelectionRectGatherer::clearAndCreateNotifier): * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): * editing/cocoa/HTMLConverter.mm: (HTMLConverter::HTMLConverter): (HTMLConverterCaches::computedStylePropertyForElement): * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): * fileapi/AsyncFileStream.cpp: (WebCore::callOnFileThread): (WebCore::AsyncFileStream::AsyncFileStream): * fileapi/FileReader.cpp: (WebCore::FileReader::readInternal): * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): * history/PageCache.cpp: (WebCore::PageCache::addIfCacheable): * html/FileInputType.cpp: (WebCore::FileInputType::requestIcon): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): * html/FormController.cpp: (WebCore::SavedFormState::deserialize): (WebCore::FormController::createSavedFormStateMap): (WebCore::FormController::takeStateForFormElement): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::relList const): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::mapMouseEvent): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::setImageBuffer const): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::updateNamedElementCache const): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::create): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::updateVisibleValidationMessage): * html/HTMLFormControlsCollection.cpp: (WebCore::HTMLFormControlsCollection::updateNamedElementCache const): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::addToPastNamesMap): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::sandbox): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::ensureImageLoader): (WebCore::HTMLInputElement::resetListAttributeTargetObserver): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::sizes): (WebCore::HTMLLinkElement::relList): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::finishInitialization): (WebCore::HTMLMediaElement::seekWithTolerance): * html/HTMLOutputElement.cpp: (WebCore::HTMLOutputElement::htmlFor): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::didAttachRenderers): (WebCore::HTMLVideoElement::parseAttribute): * html/PublicURLManager.cpp: (WebCore::PublicURLManager::create): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessage): (WebCore::ValidationMessage::setMessageDOMAndStartTimer): (WebCore::ValidationMessage::requestToHideMessage): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::DisplayListDrawingContext::DisplayListDrawingContext): (WebCore::CanvasRenderingContext2DBase::drawingContext const): * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getExtension): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::initializeNewContext): (WebCore::WebGLRenderingContextBase::compileShader): (WebCore::WebGLRenderingContextBase::printToConsole): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::emitRule): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::insert): * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::insertAbove): (WebCore::HTMLElementStack::pushCommon): * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): * html/parser/HTMLToken.h: (WebCore::HTMLToken::beginDOCTYPE): * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::filterToken): (WebCore::XSSAuditor::decodedHTTPBodySuffixTree): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerTextElement::resolveCustomStyle): * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::parser): * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::parser): * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::loadTimerFired): * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::CommandLineAPIHost): (WebCore::CommandLineAPIHost::clearAllWrappers): * inspector/DOMEditor.cpp: (WebCore::DOMEditor::insertBefore): (WebCore::DOMEditor::removeChild): (WebCore::DOMEditor::setAttribute): (WebCore::DOMEditor::removeAttribute): (WebCore::DOMEditor::setOuterHTML): (WebCore::DOMEditor::insertAdjacentHTML): (WebCore::DOMEditor::replaceWholeText): (WebCore::DOMEditor::replaceChild): (WebCore::DOMEditor::setNodeValue): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::createLazyAgents): (WebCore::InspectorController::ensureInspectorAgent): (WebCore::InspectorController::ensureDOMAgent): (WebCore::InspectorController::ensurePageAgent): * inspector/InspectorHistory.cpp: (WebCore::InspectorHistory::markUndoableState): * inspector/InspectorStyleSheet.cpp: (ParsedStyleSheet::setSourceData): (WebCore::InspectorStyleSheet::ensureSourceData): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::resourceCreated): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): (WebCore::WorkerInspectorController::createLazyAgents): * inspector/agents/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): * inspector/agents/InspectorCPUProfilerAgent.cpp: (WebCore::InspectorCPUProfilerAgent::InspectorCPUProfilerAgent): * inspector/agents/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setStyleText): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): * inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): (WebCore::InspectorCanvasAgent::recordCanvasAction): * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMAgent::pushNodePathToFrontend): (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightQuad): (WebCore::InspectorDOMAgent::innerHighlightQuad): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::setInspectedNode): (WebCore::InspectorDOMAgent::didInvalidateStyleAttr): * inspector/agents/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): * inspector/agents/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent): * inspector/agents/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent): * inspector/agents/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::InspectorNetworkAgent): * inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): * inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::internalStart): (WebCore::InspectorTimelineAgent::startFromConsole): (WebCore::InspectorTimelineAgent::stopFromConsole): * inspector/agents/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::didReceiveResponse): (WebCore::WebConsoleAgent::didFailLoading): * inspector/agents/WebHeapAgent.cpp: (WebCore::WebHeapAgent::WebHeapAgent): * inspector/agents/page/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::PageRuntimeAgent): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::breakpointActionLog): * layout/LayoutState.cpp: (WebCore::Layout::LayoutState::displayBoxForLayoutBox const): (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded): (WebCore::Layout::LayoutState::createFormattingContext): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::collectInlineContent const): * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const): * layout/inlineformatting/InlineLine.cpp: (WebCore::Layout::Line::Line): (WebCore::Layout::Line::appendNonBreakableSpace): (WebCore::Layout::Line::appendTextContent): (WebCore::Layout::Line::appendNonReplacedInlineBox): (WebCore::Layout::Line::appendHardLineBreak): * layout/inlineformatting/InlineTextItem.cpp: (WebCore::Layout::InlineTextItem::createAndAppendTextItems): (WebCore::Layout::InlineTextItem::split const): * layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::Box): (WebCore::Layout::Box::ensureRareData): * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutBox): (WebCore::Layout::TreeBuilder::createTableStructure): (WebCore::Layout::printLayoutTreeForLiveDocuments): * layout/tableformatting/TableGrid.cpp: (WebCore::Layout::TableGrid::appendCell): * loader/ContentFilter.cpp: (WebCore::ContentFilter::create): * loader/CrossOriginAccessControl.cpp: (WebCore::validatePreflightResponse): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::loadApplicationManifest): (WebCore::DocumentLoader::addAllArchiveResources): (WebCore::DocumentLoader::addArchiveResource): (WebCore::DocumentLoader::loadMainResource): (WebCore::DocumentLoader::didGetLoadDecisionForIcon): * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::init): (WebCore::FrameLoader::initForSynthesizedDocument): (WebCore::FrameLoader::detachChildren): * loader/LinkLoader.cpp: (WebCore::createLinkPreloadResourceClient): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::scheduleRedirect): (WebCore::NavigationScheduler::scheduleLocationChange): (WebCore::NavigationScheduler::scheduleFormSubmission): (WebCore::NavigationScheduler::scheduleRefresh): (WebCore::NavigationScheduler::scheduleHistoryNavigation): (WebCore::NavigationScheduler::schedulePageBlock): * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::incrementProgress): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::checkForHeadCharset): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::setBodyDataFrom): (WebCore::CachedImage::createImage): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::redirectReceived): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::addClientToSet): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::preload): (WebCore::CachedResourceLoader::clearPreloads): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::ensureSessionResourceMap): (WebCore::MemoryCache::addImageToCache): (WebCore::MemoryCache::lruListFor): * loader/ios/PreviewLoader.mm: (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]): (-[WebPreviewLoader connection:didFailWithError:]): (WebCore::PreviewLoader::create): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::maybeCreateContextMenu): * page/DebugPageOverlays.cpp: (WebCore::MouseWheelRegionOverlay::updateRegion): * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): * page/FrameView.cpp: (WebCore::FrameView::addEmbeddedObjectToUpdate): (WebCore::FrameView::addSlowRepaintObject): (WebCore::FrameView::addViewportConstrainedObject): (WebCore::FrameView::addScrollableArea): * page/FrameViewLayoutContext.cpp: (WebCore::FrameViewLayoutContext::pushLayoutState): (WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded): * page/NavigatorBase.cpp: (WebCore::NavigatorBase::serviceWorker): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::initGroup): (WebCore::Page::setResourceUsageOverlayVisible): * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::addMessage): (WebCore::PageConsoleClient::messageWithTypeAndLevel): (WebCore::PageConsoleClient::screenshot): * page/PageGroup.cpp: (WebCore::PageGroup::captionPreferences): * page/Performance.cpp: (WebCore::Performance::mark): (WebCore::Performance::clearMarks): (WebCore::Performance::measure): (WebCore::Performance::clearMeasures): * page/PrintContext.cpp: (WebCore::PrintContext::outputLinkedDestinations): * page/RenderingUpdateScheduler.cpp: (WebCore::RenderingUpdateScheduler::startTimer): * page/RenderingUpdateScheduler.h: (WebCore::RenderingUpdateScheduler::create): * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): * page/SettingsBase.cpp: (WebCore::SettingsBase::SettingsBase): * page/UserContentController.cpp: (WebCore::UserContentController::addUserScript): (WebCore::UserContentController::addUserStyleSheet): * page/WheelEventDeltaFilter.cpp: (WebCore::WheelEventDeltaFilter::create): * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationController::CSSAnimationController): * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::updateSourceSelf): * page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::create): (WebCore::ContentSecurityPolicyDirectiveList::setCSPDirective): * page/linux/ResourceUsageOverlayLinux.cpp: (WebCore::ResourceUsageOverlay::platformInitialize): * page/mac/PageMac.mm: (WebCore::Page::addSchedulePair): * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator): * page/scrolling/ScrollingMomentumCalculator.cpp: (WebCore::ScrollingMomentumCalculator::create): * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::appendChild): (WebCore::ScrollingStateNode::insertChild): * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::commit): * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::appendChild): * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm: (WebCore::ScrollingMomentumCalculator::create): * platform/Length.cpp: (WebCore::convertTo100PercentMinusLength): (WebCore::blendMixedTypes): * platform/RemoteCommandListener.cpp: (WebCore::RemoteCommandListener::create): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::create): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollAnimator const): (WebCore::ScrollableArea::ensureSnapOffsetsInfo): * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): * platform/audio/AudioBus.cpp: (WebCore::AudioBus::AudioBus): (WebCore::AudioBus::copyWithGainFrom): * platform/audio/AudioChannel.h: * platform/audio/AudioResampler.cpp: (WebCore::AudioResampler::AudioResampler): (WebCore::AudioResampler::configureChannels): * platform/audio/DynamicsCompressor.cpp: (WebCore::DynamicsCompressor::setNumberOfChannels): * platform/audio/DynamicsCompressorKernel.cpp: (WebCore::DynamicsCompressorKernel::setNumberOfChannels): * platform/audio/FFTFrame.cpp: (WebCore::FFTFrame::createInterpolatedFrame): * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::load): * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::createForSubject): (WebCore::HRTFElevation::createByInterpolatingSlices): * platform/audio/HRTFKernel.cpp: (WebCore::HRTFKernel::HRTFKernel): (WebCore::HRTFKernel::createImpulseResponse): * platform/audio/MultiChannelResampler.cpp: (WebCore::MultiChannelResampler::MultiChannelResampler): * platform/audio/Panner.cpp: (WebCore::Panner::create): * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::create): * platform/audio/Reverb.cpp: (WebCore::Reverb::initialize): * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::ReverbConvolver): * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::ReverbConvolverStage): * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (WebCore::AudioDestination::create): * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestination::create): * platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::AudioSession): * platform/audio/mac/AudioDestinationMac.cpp: (WebCore::AudioDestination::create): * platform/audio/mac/AudioSampleDataSource.mm: (WebCore::AudioSampleDataSource::setInputFormat): (WebCore::AudioSampleDataSource::setOutputFormat): * platform/audio/mac/AudioSessionMac.cpp: (WebCore::AudioSession::AudioSession): * platform/cf/KeyedDecoderCF.cpp: (WebCore::KeyedDecoder::decoder): * platform/cf/KeyedEncoderCF.cpp: (WebCore::KeyedEncoder::encoder): * platform/cf/MainThreadSharedTimerCF.cpp: (WebCore::setupPowerObserver): * platform/cocoa/NetworkExtensionContentFilter.mm: (WebCore::NetworkExtensionContentFilter::create): * platform/cocoa/ParentalControlsContentFilter.mm: (WebCore::ParentalControlsContentFilter::create): * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::updateScrollSnapPoints): * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::CDMFactoryClearKey::createCDM): * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: (WebCore::GameControllerGamepadProvider::controllerDidConnect): * platform/gamepad/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::deviceAdded): * platform/generic/KeyedDecoderGeneric.cpp: (WebCore::KeyedDecoderGeneric::Dictionary::add): (WebCore::KeyedDecoder::decoder): (WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric): * platform/generic/KeyedEncoderGeneric.cpp: (WebCore::KeyedEncoder::encoder): * platform/generic/ScrollAnimatorGeneric.cpp: (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric): (WebCore::ScrollAnimatorGeneric::ensureSmoothScrollingAnimation): * platform/glib/KeyedDecoderGlib.cpp: (WebCore::KeyedDecoder::decoder): * platform/glib/KeyedEncoderGlib.cpp: (WebCore::KeyedEncoder::encoder): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startTimer): (WebCore::BitmapImage::decode): * platform/graphics/ComplexTextController.cpp: (WebCore::TextLayout::TextLayout): * platform/graphics/Font.cpp: (WebCore::Font::ensureDerivedFontData const): * platform/graphics/Font.h: (WebCore::Font::boundsForGlyph const): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getCachedFontPlatformData): * platform/graphics/FontCascade.cpp: (WebCore::retrieveOrAddCachedFonts): (WebCore::FontCascade::displayListForTextRun const): * platform/graphics/FontCascadeFonts.cpp: (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setGlyphDataForCharacter): * platform/graphics/GlyphMetricsMap.h: (WebCore::GlyphMetricsMap<T>::locatePageSlowCase): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::setTransform): (WebCore::GraphicsLayer::setChildrenTransform): * platform/graphics/GraphicsLayer.h: * platform/graphics/Image.cpp: (WebCore::Image::startAnimationAsynchronously): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::MediaPlayer): (WebCore::MediaPlayer::loadWithNextMediaEngine): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekable const): * platform/graphics/PathUtilities.cpp: (WebCore::FloatPointGraph::findOrCreateNode): * platform/graphics/Region.cpp: (WebCore::Region::setShape): * platform/graphics/Region.h: (WebCore::Region::copyShape const): (WebCore::Region::decode): * platform/graphics/TextTrackRepresentation.cpp: (WebCore::TextTrackRepresentation::create): * platform/graphics/angle/GraphicsContext3DANGLE.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::prepare): * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: (WebCore::CDMFactoryFairPlayStreaming::createCDM): * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::buffered const): * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp: (WebCore::WebMediaSessionManagerMac::platformPicker): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges const): (WebCore::MediaPlayerPrivateAVFoundationCF::createSession): (WebCore::AVFWrapper::notificationCallback): (WebCore::AVFWrapper::legibleOutputCallback): (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource): (WebCore::AVFWrapper::platformLayer): * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): (WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): (WebCore::AudioTrackPrivateAVFObjC::setAssetTrack): (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC): (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack): * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::readTrackMetadata): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRotationSession): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateAVFoundationObjC::createSession): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastImage): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage): * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): (WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack): (WebCore::VideoTrackPrivateAVFObjC::setAssetTrack): (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm: (WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC): (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): (WebCore::GraphicsLayerCA::ensureLayerAnimations): (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): * platform/graphics/ca/TileController.cpp: (WebCore::TileController::TileController): (WebCore::TileController::setContentsScale): (WebCore::TileController::adjustTileCoverageRectForScrolling): (WebCore::TileController::tiledScrollingIndicatorLayer): * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::commonInit): (WebCore::PlatformCALayerCocoa::setShapeRoundedRect): * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: (-[WebTiledBackingLayer createTileController:]): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::PlatformCALayerWin): * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: (WebTiledBackingLayerWin::createTileController): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::createFactory): (WebCore::m_private): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBufferData::swapBuffersIfNeeded): (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: (WebCore::FontFamilySpecificationCoreText::fontRanges const): * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::ensureGraphicsContext): * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: (TextTrackRepresentation::create): * platform/graphics/cv/TextureCacheCV.mm: (WebCore::TextureCacheCV::create): * platform/graphics/displaylists/DisplayListReplayer.cpp: (WebCore::DisplayList::Replayer::replay): * platform/graphics/filters/FilterOperation.cpp: (WebCore::ReferenceFilterOperation::loadExternalDocumentIfNeeded): * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/gpu/Texture.cpp: (WebCore::Texture::create): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): (WebCore::MediaPlayerPrivateGStreamer::buffered const): (WebCore::MediaPlayerPrivateGStreamer::ensureAudioSourceProvider): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor): (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime): (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcMakeRequest): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine): (WebCore::MediaPlayerPrivateGStreamerMSE::buffered const): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp: (WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: * platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp: (WebCore::ISOProtectionSchemeInfoBox::parse): * platform/graphics/iso/ISOSchemeInformationBox.cpp: (WebCore::ISOSchemeInformationBox::parse): * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/nicosia/NicosiaSceneIntegration.cpp: (Nicosia::SceneIntegration::createUpdateScope): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::createCommand): * platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp: (Nicosia::PaintingContextCairo::ForPainting::ForPainting): (Nicosia::PaintingContextCairo::ForRecording::ForRecording): * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp: (Nicosia::BackingStoreTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp: (Nicosia::CompositionLayerTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp: (Nicosia::ContentLayerTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: (Nicosia::GC3DLayer::swapBuffersIfNeeded): * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.cpp: (Nicosia::ImageBackingTextureMapperImpl::createFactory): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::mappedSymbolName): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: (WebCore::TextureMapperGC3DPlatformLayer::swapBuffersIfNeeded): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): (WebCore::TextureMapper::platformCreateAccelerated): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::clone): * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: (WebCore::TiledBackingStore::createTiles): * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): (WebCore::TransformState::applyTransform): (WebCore::TransformState::setLastPlanarSecondaryQuad): * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::setSecondaryQuad): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/win/FontCustomPlatformDataCairo.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/win/FullScreenController.cpp: (WebCore::FullScreenController::FullScreenController): (WebCore::FullScreenController::enterFullScreen): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::platformInit): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): * platform/graphics/win/GraphicsContextImplDirect2D.cpp: (WebCore::GraphicsContextImplDirect2D::createFactory): (WebCore::m_private): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::createWindowsBitmap): * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaFoundation::buffered const): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CustomVideoPresenter): * platform/graphics/win/WKCAImageQueue.cpp: (WebCore::WKCAImageQueue::WKCAImageQueue): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForGlobalSelection): (WebCore::Pasteboard::createForDragAndDrop): * platform/gtk/PasteboardHelper.cpp: (WebCore::PasteboardHelper::writeClipboardContents): * platform/gtk/RenderThemeGadget.cpp: (WebCore::RenderThemeGadget::create): * platform/gtk/RenderThemeWidget.cpp: (WebCore::RenderThemeWidget::getOrCreate): (WebCore::RenderThemeScrollbar::RenderThemeScrollbar): (WebCore::RenderThemeComboBox::RenderThemeComboBox): * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::decodeHelper): * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::decode): * platform/image-decoders/gif/GIFImageReader.cpp: (GIFFrameContext::decode): (GIFImageReader::addFrameIfNecessary): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::decodeAtIndex): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::decode): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::decode): * platform/ios/LegacyTileCache.mm: (WebCore::LegacyTileCache::LegacyTileCache): (WebCore::LegacyTileCache::commitScaleChange): * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::createForCopyAndPaste): * platform/ios/QuickLook.mm: (WebCore::registerQLPreviewConverterIfNeeded): * platform/ios/RemoteCommandListenerIOS.mm: (WebCore::RemoteCommandListener::create): * platform/ios/ScrollAnimatorIOS.mm: (WebCore::ScrollAnimator::create): * platform/libwpe/PasteboardLibWPE.cpp: (WebCore::Pasteboard::createForCopyAndPaste): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): * platform/mac/RemoteCommandListenerMac.mm: (WebCore::RemoteCommandListener::create): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimator::create): * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: (WebCore::MediaRecorderPrivateAVFImpl::create): * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp: (WebCore::m_capturer): (WebCore::GStreamerAudioCaptureSource::GStreamerAudioCaptureSource): * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: (WebCore::webkit_media_stream_src_init): * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp: (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource): (WebCore::m_capturer): * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: (WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::BasicPacketSocketFactory::BasicPacketSocketFactory): (WebCore::initializePeerConnectionFactoryAndThreads): (WebCore::LibWebRTCProvider::createPeerConnection): (WebCore::LibWebRTCProvider::certificateGenerator): * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp: (WebCore::LibWebRTCProviderGStreamer::createDecoderFactory): (WebCore::LibWebRTCProviderGStreamer::createEncoderFactory): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable): * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm: (WebCore::MockRealtimeAudioSourceMac::reconfigure): * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm: (WebCore::RealtimeOutgoingVideoSourceCocoa::convertToYUV): (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer): * platform/mock/RTCNotifiersMock.cpp: (WebCore::RemoteDataChannelNotifier::fire): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::registerMediaEngine): (WebCore::MockMediaPlayerMediaSource::buffered const): * platform/network/BlobResourceHandle.cpp: * platform/network/DataURLDecoder.cpp: (WebCore::DataURLDecoder::createDecodeTask): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): * platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSessionDataTask _restart]): * platform/network/curl/CookieJarDB.cpp: (WebCore::CookieJarDB::searchCookies): (WebCore::CookieJarDB::createPrepareStatement): * platform/network/curl/CurlCacheManager.cpp: (WebCore::CurlCacheManager::loadIndex): (WebCore::CurlCacheManager::didReceiveResponse): * platform/network/curl/CurlContext.cpp: (WebCore::CurlContext::CurlContext): (WebCore::CurlHandle::willSetupSslCtx): * platform/network/curl/CurlFormDataStream.cpp: (WebCore::CurlFormDataStream::getPostData): * platform/network/curl/CurlMultipartHandle.cpp: (WebCore::CurlMultipartHandle::createIfNeeded): * platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::runOnMainThread): (WebCore::CurlRequest::setupTransfer): * platform/network/curl/CurlRequestScheduler.cpp: (WebCore::CurlRequestScheduler::workerThread): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::delegate): * platform/network/curl/SocketStreamHandleImplCurl.cpp: (WebCore::SocketStreamHandleImpl::callOnWorkerThread): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]): * platform/network/soup/DNSResolveQueueSoup.cpp: (WebCore::DNSResolveQueueSoup::resolve): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage): * platform/text/BidiResolver.h: (WebCore::DerivedClass>::appendRunInternal): * platform/text/LocaleICU.cpp: (WebCore::Locale::create): (WebCore::LocaleICU::createLabelVector): (WebCore::createFallbackMonthLabels): (WebCore::createFallbackAMPMLabels): * platform/text/LocaleNone.cpp: (WebCore::Locale::create): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerCodecs): * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::registerCodecs): * platform/text/TextCodecReplacement.cpp: (WebCore::TextCodecReplacement::registerCodecs): * platform/text/TextCodecUTF16.cpp: (WebCore::TextCodecUTF16::registerCodecs): * platform/text/TextCodecUTF8.cpp: (WebCore::TextCodecUTF8::registerCodecs): * platform/text/TextCodecUserDefined.cpp: (WebCore::TextCodecUserDefined::registerCodecs): * platform/text/mac/LocaleMac.mm: (WebCore::Locale::create): * platform/text/win/LocaleWin.cpp: (WebCore::Locale::create): * platform/text/win/TextCodecWin.cpp: (WebCore::newTextCodecWin): * platform/vr/openvr/VRPlatformManagerOpenVR.cpp: (WebCore::VRPlatformManagerOpenVR::create): (WebCore::VRPlatformManagerOpenVR::getVRDisplays): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): * platform/win/SearchPopupMenuDB.cpp: (WebCore::SearchPopupMenuDB::createPreparedStatement): * platform/win/WCDataObject.cpp: (WebCore::WCDataObject::SetData): * rendering/CSSFilter.cpp: (WebCore::CSSFilter::buildReferenceFilter): * rendering/ComplexLineLayout.cpp: (WebCore::createRun): (WebCore::ComplexLineLayout::createRootInlineBox): (WebCore::ComplexLineLayout::handleTrailingSpaces): (WebCore::ComplexLineLayout::linkToEndLineIfNeeded): * rendering/FloatingObjects.cpp: (WebCore::FloatingObject::create): (WebCore::FloatingObject::copyToNewContainer const): (WebCore::FloatingObject::cloneForNewParent const): (WebCore::FloatingObjects::computePlacedFloatsTree): * rendering/Grid.cpp: (WebCore::GridIterator::nextEmptyGridArea): * rendering/GridBaselineAlignment.cpp: (WebCore::GridBaselineAlignment::updateBaselineAlignmentContext): * rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::computeFlexFactorUnitSize const): (WebCore::GridTrackSizingAlgorithm::setup): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): (WebCore::HitTestResult::listBasedTestResult const): (WebCore::HitTestResult::mutableListBasedTestResult): * rendering/InlineIterator.h: (WebCore::addPlaceholderRunForIsolatedInline): * rendering/LayerOverlapMap.cpp: (WebCore::LayerOverlapMap::pushCompositingContainer): * rendering/RenderBlock.cpp: (WebCore::insertIntoTrackedRendererMaps): (WebCore::PositionedDescendantsMap::addDescendant): (WebCore::RenderBlock::beginUpdateScrollInfoAfterLayoutTransaction): (WebCore::ensureBlockRareData): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutInlineChildren): (WebCore::RenderBlockFlow::layoutLineGridBox): (WebCore::RenderBlockFlow::createFloatingObjects): (WebCore::RenderBlockFlow::ensureLineBoxes): (WebCore::RenderBlockFlow::materializeRareBlockFlowData): * rendering/RenderBox.cpp: (WebCore::controlStatesForRenderer): (WebCore::RenderBox::createInlineBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::ensureContinuationChainNode): * rendering/RenderCounter.cpp: (WebCore::makeCounterNode): * rendering/RenderFragmentContainer.cpp: (WebCore::RenderFragmentContainer::setRenderBoxFragmentInfo): * rendering/RenderFragmentedFlow.cpp: (WebCore::RenderFragmentedFlow::containingFragmentMap): * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::push): (WebCore::RenderGeometryMap::pushView): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const): (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const): * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): * rendering/RenderInline.cpp: (WebCore::RenderInline::createInlineFlowBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateNormalFlowList): (WebCore::RenderLayer::collectLayers): (WebCore::RenderLayer::updateTransform): (WebCore::RenderLayer::updateClipRects): (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateAncestorClippingStack): (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers): * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::createLayer): * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::createInlineBox): * rendering/RenderMultiColumnFlow.cpp: (WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow): * rendering/RenderObject.cpp: (WebCore::RenderObject::ensureRareData): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderText.cpp: (WebCore::RenderText::createTextBox): (WebCore::RenderText::momentarilyRevealLastTypedCharacter): * rendering/RenderView.cpp: (WebCore::RenderView::repaintViewRectangle const): (WebCore::RenderView::compositor): (WebCore::RenderView::imageQualityController): (WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::appendFloat): * rendering/SelectionRangeData.cpp: (WebCore::collect): (WebCore::SelectionRangeData::collectBounds const): (WebCore::SelectionRangeData::apply): * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::Layout::runResolver const): * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::paintFlow): (WebCore::SimpleLineLayout::generateLineBoxTree): * rendering/TextAutoSizing.cpp: (WebCore::TextAutoSizing::addTextNode): * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::skipLeadingWhitespace): * rendering/shapes/RasterShape.cpp: (WebCore::RasterShapeIntervals::computeShapeMarginIntervals const): * rendering/shapes/Shape.cpp: (WebCore::createInsetShape): (WebCore::createCircleShape): (WebCore::createEllipseShape): (WebCore::createPolygonShape): (WebCore::Shape::createShape): (WebCore::Shape::createRasterShape): (WebCore::Shape::createBoxShape): * rendering/shapes/ShapeOutsideInfo.h: * rendering/style/BasicShapes.cpp: (WebCore::BasicShapePath::blend const): * rendering/style/ContentData.h: * rendering/style/FillLayer.cpp: (WebCore::FillLayer::FillLayer): (WebCore::FillLayer::operator=): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::clonePtr): (WebCore::RenderStyle::addCachedPseudoStyle): (WebCore::RenderStyle::addCustomPaintWatchProperty): (WebCore::RenderStyle::setContent): (WebCore::RenderStyle::accessCounterDirectives): (WebCore::RenderStyle::ensureAnimations): (WebCore::RenderStyle::ensureTransitions): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleShadowSVGData::StyleShadowSVGData): * rendering/style/ShadowData.cpp: (WebCore::ShadowData::ShadowData): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::RenderSVGImage): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineFlowBox): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives const): (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::updateShapeFromElement): * rendering/svg/SVGResources.cpp: (WebCore::SVGResources::setClipper): (WebCore::SVGResources::setFilter): (WebCore::SVGResources::setMarkerStart): (WebCore::SVGResources::setMarkerMid): (WebCore::SVGResources::setMarkerEnd): (WebCore::SVGResources::setMasker): (WebCore::SVGResources::setFill): (WebCore::SVGResources::setStroke): * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::addResourcesFromRenderer): * rendering/svg/SVGTextMetricsBuilder.cpp: (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): * rendering/updating/RenderTreeBuilder.cpp: (WebCore::RenderTreeBuilder::RenderTreeBuilder): * rendering/updating/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::RenderTreeUpdater): * style/StyleInvalidator.cpp: (WebCore::Style::Invalidator::Invalidator): * style/StyleRelations.cpp: (WebCore::Style::commitRelationsToRenderStyle): * style/StyleScope.cpp: (WebCore::Style::Scope::resolver): (WebCore::Style::Scope::activeStyleSheetsContains const): * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolve): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::SVGDocumentExtensions): (WebCore::SVGDocumentExtensions::addPendingResource): (WebCore::SVGDocumentExtensions::addElementReferencingTarget): * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::ensureSVGRareData): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::supplementalTransform): * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::copy const): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::schedule): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): * svg/properties/SVGAnimatedDecoratedProperty.h: (WebCore::SVGAnimatedDecoratedProperty::create): * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: * svg/properties/SVGDecoratedEnumeration.h: (WebCore::SVGDecoratedEnumeration::create): * svg/properties/SVGPrimitivePropertyAnimator.h: (WebCore::SVGPrimitivePropertyAnimator::create): * svg/properties/SVGValuePropertyAnimatorImpl.h: * svg/properties/SVGValuePropertyListAnimatorImpl.h: * testing/InternalSettings.cpp: (WebCore::InternalSettings::from): * testing/Internals.cpp: (WebCore::InspectorStubFrontend::InspectorStubFrontend): (WebCore::Internals::Internals): (WebCore::Internals::enableMockSpeechSynthesizer): (WebCore::Internals::openDummyInspectorFrontend): (WebCore::Internals::setPrinting): (WebCore::Internals::initializeMockCDM): (WebCore::Internals::queueMicroTask): * testing/LegacyMockCDM.cpp: (WebCore::LegacyMockCDM::createSession): * testing/MockCDMFactory.cpp: (WebCore::MockCDMFactory::createCDM): * testing/MockContentFilter.cpp: (WebCore::MockContentFilter::create): * testing/MockGamepadProvider.cpp: (WebCore::MockGamepadProvider::setMockGamepadDetails): * workers/WorkerConsoleClient.cpp: (WebCore::WorkerConsoleClient::messageWithTypeAndLevel): * workers/WorkerEventQueue.cpp: (WebCore::WorkerEventQueue::enqueueEvent): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): (WebCore::WorkerGlobalScope::addMessage): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope): * workers/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::WorkerRunLoop): (WebCore::WorkerRunLoop::postTaskAndTerminate): (WebCore::WorkerRunLoop::postTaskForMode): * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::loadAsynchronously): (WebCore::WorkerScriptLoader::createResourceRequest): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::ready): (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::removeRegistration): (WebCore::ServiceWorkerContainer::updateRegistration): (WebCore::ServiceWorkerContainer::getRegistration): (WebCore::ServiceWorkerContainer::getRegistrations): * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::terminateWorker): * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): (WebCore::ServiceWorkerThreadProxy::createBlobLoader): * workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): * workers/service/server/SWServer.cpp: (WebCore::SWServer::addRegistrationFromStore): (WebCore::SWServer::SWServer): (WebCore::SWServer::scheduleJob): (WebCore::SWServer::unregisterServiceWorkerClient): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::runRegisterJob): * worklets/PaintWorkletGlobalScope.cpp: (WebCore::PaintWorkletGlobalScope::registerPaint): * worklets/WorkletConsoleClient.cpp: (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::addConsoleMessage): * worklets/WorkletScriptController.cpp: (WebCore::WorkletScriptController::initScriptWithSubclass): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::upload): * xml/XPathFunctions.cpp: * xml/XPathPredicate.cpp: (WebCore::XPath::evaluatePredicate): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::loadChildSheet): * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::handleError): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendStartElementNSCallback): (WebCore::PendingCallbacks::appendEndElementNSCallback): (WebCore::PendingCallbacks::appendCharactersCallback): (WebCore::PendingCallbacks::appendProcessingInstructionCallback): (WebCore::PendingCallbacks::appendCDATABlockCallback): (WebCore::PendingCallbacks::appendCommentCallback): (WebCore::PendingCallbacks::appendInternalSubsetCallback): (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::doEnd): Source/WebCore/PAL: Reviewed by Geoffrey Garen. * pal/crypto/openssl/CryptoDigestOpenSSL.cpp: (PAL::CryptoDigestContextImpl::create): * pal/system/ClockGeneric.cpp: (PAL::Clock::create): * pal/system/mac/ClockCM.mm: (Clock::create): Source/WebDriver: Reviewed by Geoffrey Garen. * WebDriverService.cpp: (WebDriver::WebDriverService::connectToBrowser): * glib/SessionHostGlib.cpp: (WebDriver::SessionHost::launchBrowser): (WebDriver::SessionHost::sendMessageToBackend): Source/WebKit: Reviewed by Geoffrey Garen. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: (WebKit::ResourceLoadStatisticsPersistentStorage::startMonitoringDisk): (WebKit::ResourceLoadStatisticsPersistentStorage::monitorDirectoryForNewStatistics): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::startDownload): (WebKit::DownloadManager::convertNetworkLoadToDownload): (WebKit::DownloadManager::resumeDownload): * NetworkProcess/Downloads/DownloadMap.cpp: (WebKit::DownloadMap::add): * NetworkProcess/Downloads/PendingDownload.cpp: (WebKit::PendingDownload::PendingDownload): * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::establishSWServerConnection): * NetworkProcess/NetworkContentRuleListManager.cpp: (WebKit::NetworkContentRuleListManager::addContentRuleLists): * NetworkProcess/NetworkDataTaskBlob.cpp: (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob): (WebKit::NetworkDataTaskBlob::download): * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp: (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker): * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::didReceiveResponse): * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight): (WebKit::NetworkLoadChecker::contentSecurityPolicy): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::switchToNewTestingSession): (WebKit::NetworkProcess::ensureSession): (WebKit::NetworkProcess::swServerForSession): (WebKit::NetworkProcess::initializeQuotaUsers): (WebKit::NetworkProcess::storageQuotaManager): * NetworkProcess/NetworkProcess.h: (WebKit::NetworkProcess::addSupplement): * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::m_shouldCaptureExtraNetworkLoadMetrics): (WebKit::NetworkResourceLoader::startNetworkLoad): * NetworkProcess/NetworkSocketChannel.cpp: (WebKit::NetworkSocketChannel::create): * NetworkProcess/PreconnectTask.cpp: * NetworkProcess/WebStorage/LocalStorageDatabase.cpp: (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate): * NetworkProcess/WebStorage/LocalStorageNamespace.cpp: (WebKit::LocalStorageNamespace::getOrCreateStorageArea): * NetworkProcess/WebStorage/SessionStorageNamespace.cpp: (WebKit::SessionStorageNamespace::getOrCreateStorageArea): * NetworkProcess/WebStorage/StorageArea.cpp: (WebKit::StorageArea::clone const): * NetworkProcess/WebStorage/StorageManager.cpp: (WebKit::StorageManager::createSessionStorageNamespace): (WebKit::StorageManager::getOrCreateLocalStorageNamespace): (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace): (WebKit::StorageManager::getOrCreateSessionStorageNamespace): * NetworkProcess/WebStorage/StorageManagerSet.cpp: (WebKit::StorageManagerSet::add): * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp: (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea): * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::Cache): (WebKit::NetworkCache::Cache::makeEntry): (WebKit::NetworkCache::Cache::makeRedirectEntry): (WebKit::NetworkCache::Cache::update): * NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::decodeStorageRecord): * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresourceLoad): (WebKit::NetworkCache::SpeculativeLoadManager::retrieve): (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry): (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests): (WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource): (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation): * NetworkProcess/cache/NetworkCacheStorage.cpp: (WebKit::NetworkCache::Storage::synchronize): (WebKit::NetworkCache::Storage::readRecord): (WebKit::NetworkCache::retrieveFromMemory): (WebKit::NetworkCache::Storage::retrieve): (WebKit::NetworkCache::Storage::store): (WebKit::NetworkCache::Storage::traverse): * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp: (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord): * NetworkProcess/cache/PrefetchCache.cpp: (WebKit::PrefetchCache::store): (WebKit::PrefetchCache::storeRedirect): * NetworkProcess/cocoa/NetworkProcessCocoa.mm: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): (WebKit::NetworkProcess::networkHTTPSUpgradeChecker): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): (WebKit::NetworkSessionCocoa::create): (WebKit::NetworkSessionCocoa::createWebSocketTask): * NetworkProcess/curl/NetworkProcessCurl.cpp: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): * NetworkProcess/curl/NetworkSessionCurl.h: * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm: (WebKit::NetworkConnectionToWebProcess::paymentCoordinator): (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAuthorizationPresenter): * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::download): * NetworkProcess/soup/NetworkProcessSoup.cpp: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): * NetworkProcess/soup/NetworkSessionSoup.cpp: (WebKit::NetworkSessionSoup::NetworkSessionSoup): (WebKit::NetworkSessionSoup::createWebSocketTask): * NetworkProcess/soup/NetworkSessionSoup.h: * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp: (webkitSoupRequestInputStreamReadAsync): * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: (WebKit::NetworkMDNSRegister::registerMDNSName): * NetworkProcess/webrtc/NetworkRTCMonitor.cpp: (WebKit::NetworkRTCMonitor::startUpdating): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): (WebKit::NetworkRTCProvider::createSocket): (WebKit::NetworkRTCProvider::wrapNewTCPConnection): * Platform/IPC/Connection.cpp: (IPC::Connection::dispatchWorkQueueMessageReceiverMessage): (IPC::Connection::createSyncMessageEncoder): (IPC::Connection::enableIncomingMessagesThrottling): (IPC::Connection::dispatchSyncMessage): * Platform/IPC/Connection.h: (IPC::Connection::send): (IPC::Connection::sendWithAsyncReply): * Platform/IPC/Decoder.cpp: (IPC::Decoder::unwrapForTesting): * Platform/IPC/HandleMessage.h: (IPC::handleMessageAsync): * Platform/IPC/MessageSender.h: * Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): (IPC::Connection::open): (IPC::createMessageDecoder): (IPC::Connection::receiveSourceEventHandler): * Platform/IPC/unix/ConnectionUnix.cpp: (IPC::Connection::processMessage): (IPC::Connection::sendOutputMessage): * Platform/IPC/win/ConnectionWin.cpp: (IPC::Connection::readEventHandler): * Platform/mac/LayerHostingContext.mm: (WebKit::LayerHostingContext::createForPort): (WebKit::LayerHostingContext::createForExternalHostingProcess): (WebKit::LayerHostingContext::createForExternalPluginHostingProcess): * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPluginInternal): * Shared/API/APIURL.h: (API::URL::create): (API::URL::parseURLIfNecessary const): * Shared/API/Cocoa/RemoteObjectInvocation.mm: (WebKit::RemoteObjectInvocation::decode): * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: (-[_WKRemoteObjectRegistry _initWithWebPage:]): (-[_WKRemoteObjectRegistry _initWithWebPageProxy:]): (-[_WKRemoteObjectRegistry _sendInvocation:interface:]): * Shared/API/glib/WebKitContextMenuItem.cpp: (webkitContextMenuItemCreate): (webkit_context_menu_item_new): (webkit_context_menu_item_new_from_gaction): (webkit_context_menu_item_new_from_stock_action): (webkit_context_menu_item_new_from_stock_action_with_label): (webkit_context_menu_item_new_with_submenu): (webkit_context_menu_item_new_separator): * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): * Shared/Cocoa/SandboxExtensionCocoa.mm: (WebKit::SandboxExtension::Handle::decode): * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::texmapLayer): (WebKit::CoordinatedGraphicsScene::ensureRootLayer): * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::ThreadedCompositor::ThreadedCompositor): * Shared/Plugins/NPRemoteObjectMap.cpp: (WebKit::NPRemoteObjectMap::registerNPObject): * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: (WebKit::RemoteScrollingCoordinatorTransaction::decode): * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/win/ShareableBitmapDirect2D.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::registerObserver): * UIProcess/API/C/WKContext.cpp: (WKContextSetInjectedBundleClient): (WKContextSetHistoryClient): (WKContextSetDownloadClient): * UIProcess/API/C/WKGeolocationManager.cpp: (WKGeolocationManagerSetProvider): * UIProcess/API/C/WKNotificationManager.cpp: (WKNotificationManagerSetProvider): * UIProcess/API/C/WKPage.cpp: (WKPageSetPageContextMenuClient): (WKPageSetPageDiagnosticLoggingClient): (WKPageSetPageFindClient): (WKPageSetPageFindMatchesClient): (WKPageSetPageFormClient): (WKPageSetPageLoaderClient): (WKPageSetPagePolicyClient): (WKPageSetPageUIClient): (WKPageSetPageStateClient): * UIProcess/API/C/mac/WKPagePrivateMac.mm: (-[WKObservablePageState initWithPage:]): * UIProcess/API/C/wpe/WKView.cpp: (WKViewSetViewClient): * UIProcess/API/Cocoa/WKBrowsingContextController.mm: (-[WKBrowsingContextController _initWithPageRef:]): * UIProcess/API/Cocoa/WKHTTPCookieStore.mm: (-[WKHTTPCookieStore addObserver:]): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _setDownloadDelegate:]): (-[WKProcessPool _setAutomationDelegate:]): * UIProcess/API/Cocoa/WKUserContentController.mm: (-[WKUserContentController addScriptMessageHandler:name:]): (-[WKUserContentController _addScriptMessageHandler:name:userContentWorld:]): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): (-[WKWebView setAllowsBackForwardNavigationGestures:]): (-[WKWebView _setInputDelegate:]): * UIProcess/API/Cocoa/_WKAutomationSession.mm: (-[_WKAutomationSession setDelegate:]): * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController init]): * UIProcess/API/glib/IconDatabase.cpp: (WebKit::readySQLiteStatement): * UIProcess/API/glib/WebKitAutomationSession.cpp: (webkitAutomationSessionConstructed): * UIProcess/API/glib/WebKitContextMenuClient.cpp: (attachContextMenuClientToView): * UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp: (attachCustomProtocolManagerClientToContext): * UIProcess/API/glib/WebKitDownloadClient.cpp: (attachDownloadClientToContext): * UIProcess/API/glib/WebKitFaviconDatabase.cpp: (webkitFaviconDatabaseOpen): * UIProcess/API/glib/WebKitFindController.cpp: (webkitFindControllerConstructed): * UIProcess/API/glib/WebKitFormClient.cpp: (attachFormClientToView): * UIProcess/API/glib/WebKitGeolocationManager.cpp: (webkitGeolocationManagerCreate): * UIProcess/API/glib/WebKitIconLoadingClient.cpp: (attachIconLoadingClientToView): * UIProcess/API/glib/WebKitInjectedBundleClient.cpp: (attachInjectedBundleClientToContext): * UIProcess/API/glib/WebKitNotificationProvider.cpp: (WebKitNotificationProvider::WebKitNotificationProvider): * UIProcess/API/glib/WebKitUIClient.cpp: (attachUIClientToView): * UIProcess/API/glib/WebKitUserContentManager.cpp: (webkit_user_content_manager_register_script_message_handler): (webkit_user_content_manager_register_script_message_handler_in_world): * UIProcess/API/glib/WebKitWebContext.cpp: (webkitWebContextConstructed): (webkit_web_context_set_automation_allowed): * UIProcess/API/glib/WebKitWebView.cpp: (webkitWebViewConstructed): * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/API/gtk/WebKitEmojiChooser.cpp: (webkitEmojiChooserSetupEmojiSections): * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: (WebKit::RemoteInspectorProtocolHandler::handleRequest): * UIProcess/API/gtk/WebKitWebInspector.cpp: (webkitWebInspectorCreate): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseConstructed): (webkitWebViewBaseGestureController): (webkitWebViewBaseDragAndDropHandler): (webkitWebViewBaseDidRelaunchWebProcess): * UIProcess/API/mac/WKView.mm: (-[WKView maybeInstallIconLoadingClient]): (-[WKView initWithFrame:processPool:configuration:]): * UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::PageClientImpl): (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/API/wpe/WPEView.cpp: (WKWPE::View::View): (WKWPE::View::setClient): * UIProcess/API/wpe/qt/WPEQtView.cpp: (WPEQtView::notifyLoadChangedCallback): (WPEQtView::notifyLoadFailedCallback): (WPEQtView::runJavaScript): * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp: (WPEQtViewBackend::create): * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::WebAutomationSession): * UIProcess/AuxiliaryProcessProxy.h: (WebKit::AuxiliaryProcessProxy::send): * UIProcess/Cocoa/IconLoadingDelegate.mm: (WebKit::IconLoadingDelegate::createIconLoadingClient): * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::createContextMenuClient): (WebKit::UIDelegate::createUIClient): * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitialize): (WebKit::WebProcessPool::startDisplayLink): * UIProcess/Cocoa/WebProcessProxyCocoa.mm: (WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended): * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::createDrawingAreaProxy): (WebKit::WebViewImpl::setTextIndicator): (WebKit::WebViewImpl::ensureGestureController): * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp: (WebKit::DrawingAreaProxyCoordinatedGraphics::incorporateUpdate): (WebKit::DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing): * UIProcess/DeviceIdHashSaltStorage.cpp: (WebKit::DeviceIdHashSaltStorage::getDataFromDecoder const): (WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::createDownloadProxy): * UIProcess/Gamepad/UIGamepadProvider.cpp: (WebKit::UIGamepadProvider::setInitialConnectedGamepads): (WebKit::UIGamepadProvider::platformGamepadConnected): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::createDownloadProxy): (WebKit::NetworkProcessProxy::takeUploadAssertion): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): (WebKit::WebNotificationManagerProxy::setProvider): * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::pluginRequiresGtk2): * UIProcess/ProcessThrottler.cpp: (WebKit::ProcessThrottler::didConnectToProcess): * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator): * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: (WebKit::RemoteLayerTreeHost::makeNode): * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm: (WebKit::RemoteLayerTreeNode::createWithPlainLayer): * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm: (WebKit::RemoteLayerTreeHost::makeNode): * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren): * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS): * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::ScrollingTreeFrameScrollingNodeRemoteMac): * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp: (WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::ScrollingTreeOverflowScrollingNodeRemoteMac): * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::deviceAdded): * UIProcess/WebGeolocationManagerProxy.cpp: (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy): (WebKit::WebGeolocationManagerProxy::setProvider): * UIProcess/WebMediaSessionFocusManager.cpp: (WebKit::WebMediaSessionFocusManager::setFocusedMediaElement): * UIProcess/WebPageInspectorController.cpp: (WebKit::WebPageInspectorController::WebPageInspectorController): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::m_resetRecentCrashCountTimer): (WebKit::WebPageProxy::setFormClient): (WebKit::WebPageProxy::setUIClient): (WebKit::WebPageProxy::setIconLoadingClient): (WebKit::WebPageProxy::setFindClient): (WebKit::WebPageProxy::setFindMatchesClient): (WebKit::WebPageProxy::setContextMenuClient): (WebKit::WebPageProxy::setInjectedBundleClient): (WebKit::WebPageProxy::suspendCurrentPageIfPossible): (WebKit::WebPageProxy::didAttachToRunningProcess): (WebKit::WebPageProxy::setDrawingArea): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::loadData): (WebKit::WebPageProxy::handleWheelEvent): (WebKit::WebPageProxy::processNextQueuedWheelEvent): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::setFullscreenClient): (WebKit::WebPageProxy::userMediaPermissionRequestManager): (WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled): (WebKit::WebPageProxy::speechSynthesisData): * UIProcess/WebProcessCache.cpp: (WebKit::WebProcessCache::addProcessIfPossible): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::WebProcessPool): (WebKit::WebProcessPool::setInjectedBundleClient): (WebKit::WebProcessPool::setHistoryClient): (WebKit::WebProcessPool::setDownloadClient): (WebKit::WebProcessPool::setAutomationClient): (WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient): (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::didCollectPrewarmInformation): (WebKit::WebProcessPool::setWebProcessHasUploads): (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia): * UIProcess/WebProcessProxy.cpp: * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::createBackend): * UIProcess/glib/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::inspect): * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: (WebKit::AcceleratedBackingStoreWayland::checkRequirements): * UIProcess/gtk/DragAndDropHandler.cpp: (WebKit::DragAndDropHandler::dragDataSelection): * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::initializeEGL): * UIProcess/ios/EditableImageController.mm: (WebKit::EditableImageController::ensureEditableImage): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView didMoveToWindow]): * UIProcess/ios/WKContentView.mm: (-[WKContentView _commonInitializationWithProcessPool:configuration:]): (-[WKContentView initWithFrame:processPool:configuration:webView:]): (-[WKContentView _createDrawingAreaProxy:]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView becomeFirstResponderForWebView]): (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::elementDidFocus): (WebKit::WebPageProxy::paymentCoordinatorAuthorizationPresenter): * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::PageClientImpl): * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController initWithWindow:webView:page:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:usePlatformFindUI:]): * UIProcess/socket/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::inspect): * UIProcess/socket/RemoteInspectorProtocolHandler.cpp: (WebKit::RemoteInspectorProtocolHandler::platformStartTask): * UIProcess/win/BackingStoreDirect2D.cpp: (WebKit::BackingStore::createBackend): * UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): * WebProcess/Gamepad/WebGamepadProvider.cpp: (WebKit::WebGamepadProvider::setInitialGamepads): (WebKit::WebGamepadProvider::gamepadConnected): * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetClient): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetContextMenuClient): (WKBundlePageSetEditorClient): (WKBundlePageSetFormClient): (WKBundlePageSetPageLoaderClient): (WKBundlePageSetResourceLoadClient): (WKBundlePageSetUIClient): * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (WKBundlePageOverlayCreate): * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: (WKBundlePageBannerCreateBannerWithCALayer): * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp: (WebKit::getOrCreateDOMObjectCacheFrameObserver): (WebKit::DOMObjectCache::put): * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp: (WebKit::WebKitExtensionManager::initialize): * WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp: (webkitWebEditorCreate): * WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp: (webkitWebExtensionCreate): * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: (webkitFrameGetOrCreate): (webkitWebPageCreate): * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm: (-[WKDOMTextIterator initWithRange:]): * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::InjectedBundle): (WebKit::InjectedBundle::setClient): * WebProcess/Network/WebSocketChannel.cpp: (WebKit::PendingMessage::PendingMessage): (WebKit::WebSocketChannel::send): * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::LibWebRTCProvider::createPeerConnection): (WebKit::LibWebRTCProvider::createSocketFactory): * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: (WebKit::LibWebRTCSocketFactory::createServerTcpSocket): (WebKit::LibWebRTCSocketFactory::createUdpSocket): (WebKit::LibWebRTCSocketFactory::createClientTcpSocket): (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket): (WebKit::LibWebRTCSocketFactory::createAsyncResolver): * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::PluginDestructionProtector::PluginDestructionProtector): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::scheduleTimer): * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::deliverData): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePluginX11::create): * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::initialize): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::createWebEvent const): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::installServiceWorker): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createColorChooser): (WebKit::WebChromeClient::createDataListSuggestionPicker): * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::showPaintRect): * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: (WebKit::WebPasteboardOverrides::addOverride): * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::create): * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::ensureBackingStore): (WebKit::PlatformCALayerRemote::setTransform): (WebKit::PlatformCALayerRemote::setSublayerTransform): (WebKit::PlatformCALayerRemote::setFilters): (WebKit::PlatformCALayerRemote::setShapeRoundedRect): * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp: (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking): * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): (WebKit::RemoteLayerTreeDrawingArea::flushLayers): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSubframe): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_textAutoSizingAdjustmentTimer): (WebKit::WebPage::setInjectedBundleContextMenuClient): (WebKit::WebPage::setInjectedBundleEditorClient): (WebKit::WebPage::setInjectedBundleFormClient): (WebKit::WebPage::setInjectedBundlePageLoaderClient): (WebKit::WebPage::setInjectedBundleResourceLoadClient): (WebKit::WebPage::setInjectedBundleUIClient): (WebKit::WebPage::close): (WebKit::WebPage::beginPrinting): * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::print): * WebProcess/WebPage/ios/FindControllerIOS.mm: (WebKit::FindController::updateFindIndicator): * WebProcess/WebPage/mac/DrawingAreaMac.cpp: (WebKit::DisplayRefreshMonitorMac::requestRefreshCallback): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::markAllLayersVolatile): (WebKit::WebProcess::ensureAutomationSessionProxy): (WebKit::WebProcess::libWebRTCNetwork): (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::addSupplement): * WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::Source::Source): * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::processTaskStateDidChange): (WebKit::WebProcess::updateCPUMonitorState): Source/WebKitLegacy: Reviewed by Geoffrey Garen. * Storage/StorageSyncManager.cpp: (WebCore::StorageSyncManager::StorageSyncManager): * Storage/StorageThread.cpp: (WebCore::StorageThread::dispatch): (WebCore::StorageThread::terminate): * Storage/StorageTracker.cpp: (WebKit::StorageTracker::StorageTracker): * WebCoreSupport/NetworkStorageSessionMap.cpp: (NetworkStorageSessionMap::defaultStorageSession): (NetworkStorageSessionMap::switchToNewTestingSession): (NetworkStorageSessionMap::ensureSession): Source/WebKitLegacy/cf: Reviewed by Geoffrey Garen. * WebCoreSupport/WebInspectorClientCF.cpp: (WebInspectorClient::createFrontendSettings): Source/WebKitLegacy/ios: Reviewed by Geoffrey Garen. * WebCoreSupport/WebFixedPositionContent.mm: (-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]): Source/WebKitLegacy/mac: Reviewed by Geoffrey Garen. * History/WebHistory.mm: (-[WebHistoryPrivate init]): * History/WebHistoryItem.mm: (-[WebHistoryItem initFromDictionaryRepresentation:]): * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCGetScriptableNPObjectReply): (WKPCBooleanReply): (WKPCBooleanAndDataReply): (WKPCInstantiatePluginReply): * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::methodNamed): (WebKit::ProxyInstance::fieldNamed): * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView createPlugin]): * Plugins/WebNetscapePluginEventHandler.mm: (WebNetscapePluginEventHandler::create): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): * Storage/WebDatabaseManagerClient.mm: (DidModifyOriginData::dispatchToMainThread): * WebCoreSupport/WebFrameLoaderClient.mm: (addRedirectURL): (WebFrameLoaderClient::savePlatformDataToCachedFrame): * WebCoreSupport/WebInspectorClient.mm: (WebInspectorClient::openLocalFrontend): * WebView/WebDeviceOrientationProviderMock.mm: * WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]): * WebView/WebMediaPlaybackTargetPicker.mm: (WebMediaPlaybackTargetPicker::create): * WebView/WebTextIterator.mm: (-[WebTextIterator initWithRange:]): * WebView/WebView.mm: (-[WebView _injectOutlookQuirksScript]): (-[WebView _commonInitializationWithFrameName:groupName:]): (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]): (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]): (-[WebView _selectionServiceController]): (-[WebView _setTextIndicator:withLifetime:]): * WebView/WebViewData.mm: (WebViewLayerFlushScheduler::WebViewLayerFlushScheduler): (-[WebViewPrivate init]): Source/WebKitLegacy/win: Reviewed by Geoffrey Garen. * FullscreenVideoController.cpp: (FullscreenVideoController::FullscreenVideoController): * Plugins/PluginStream.cpp: (WebCore::PluginStream::didReceiveData): * Plugins/PluginView.cpp: (WebCore::PluginView::load): * Plugins/PluginViewWin.cpp: (WebCore::PluginView::wndProc): * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::WebChromeClient): * WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::WebFrameLoaderClient): (WebFrameLoaderClient::savePlatformDataToCachedFrame): * WebCoreSupport/WebInspectorClient.cpp: (WebInspectorClient::openLocalFrontend): (WebInspectorClient::highlight): * WebElementPropertyBag.cpp: (WebElementPropertyBag::WebElementPropertyBag): * WebHistoryItem.cpp: (WebHistoryItem::initFromDictionaryRepresentation): * WebKitQuartzCoreAdditions/CAD3DRenderer.cpp: (WKQCA::CAD3DRenderer::createD3DPostProcessingContext): * WebNotificationCenter.cpp: (WebNotificationCenter::WebNotificationCenter): * WebView.cpp: (WebView::handleMouseEvent): (WebView::registerEmbeddedViewMIMEType): (WebView::enterVideoFullscreenForVideoElement): (WebView::addUserScriptToGroup): (WebView::addUserStyleSheetToGroup): (WebView::setAcceleratedCompositing): Source/WTF: Reviewed by Geoff Garen. This patch is second part of bug 200620 patch. I split I split it into three pieces to make roll-out easy. his part, we convert std::make_unique to WTF::makeUnique or WTF::makeUniqueWithoutFastMallocCheck. In the third patch, we will add a static_assert to makeUnique, which ensures the given class T is FastMalloced or IsoHeaped. This patch adds `WTF::makeUnique<T>` and `WTF::makeUniqueWithoutFastMallocCheck<T>` as drop-in replacement for `std::make_unique<T>`. `WTF::makeUnique<T>` has one additional `static_assert` check which ensures `T` FastMalloc / IsoHeap annotated. If it is not, the compile error happens. In this patch, I tried using this everywhere in WebKit as much as possible. And we found that surprisingly many classes are missing FastMalloc annotation and allocated from system-malloc. Using WTF::makeUnique enforces classes / structs to use FastMalloc. WTF::makeUniqueWithoutFastMallocCheck is offered for the corner cases. This is identical to std::make_unique. We use this for classes that are offered by non-WebKit code base, like, zlib. This clear name can make us easily find this allocation is intentionally done by system-malloc. We do not take the following direction, `WTF::makeUnique` automatically allocates FastMalloc even if FastMalloc annotation is not attached. Since default deleter is performing `delete` and this is not what we want for FastMalloced ones, we need to return std::unique_ptr<T, FastFreeDeleter> for T if T does not have FastMalloc-annotation. Automatically doing this sounds a bit dangerous. auto pointer = WTF::makeUnique<T>(); // Super dangerous, but sometimes it is required... auto* rawPointer = pointer.release(); // Passing rawPointer to somewhere, and delete rawPointer; The above one becomes invalid because pointer may start requiring non `delete` destroying function. In the above case, the correct way becomes the following. rawPointer->~T(); fastFree(rawPointer); This looks non-intuitive. And having two ways to destroying objects (`delete` or the above one) can be error-prone. If we have WTF_MAKE_FAST_ALLOCATED for T, we do not need to care about this. "new" and "delete" operators are defined, and C++ way works. The simple invariant, "makeUnique just does `new` internally. And `delete` operator does `delete`. default deleter is just doing `delete`", is kept. While we need to annotate many classes with WTF_MAKE_FAST_ALLOCATED, it is one time cost when we add a class. And, by introducing `WTF::makeUnique<>`, we no longer forget adding this. makeUnique(...) static_assert(T is FastMalloced or IsoHeaped); return make_unique<T>(...) * benchmarks/LockFairnessTest.cpp: * benchmarks/LockSpeedTest.cpp: * wtf/ConcurrentVector.h: * wtf/CrossThreadTaskHandler.cpp: (WTF::CrossThreadTaskHandler::taskRunLoop): * wtf/FilePrintStream.cpp: (WTF::FilePrintStream::open): * wtf/Function.h: (WTF::Function<Out): * wtf/HashTable.h: (WTF::KeyTraits>::HashTable): * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor): * wtf/StdLibExtras.h: (WTF::makeUnique): (WTF::makeUniqueWithoutFastMallocCheck): * wtf/StreamBuffer.h: (WTF::StreamBuffer::append): * wtf/UniqueRef.h: (WTF::makeUniqueRefWithoutFastMallocCheck): (WTF::makeUniqueRef): * wtf/glib/RunLoopGLib.cpp: (WTF::RunLoop::dispatchAfter): * wtf/text/StringView.cpp: (WTF::StringView::GraphemeClusters::Iterator::Iterator): Tools: Reviewed by Geoffrey Garen. * DumpRenderTree/TestRunner.cpp: (addURLToRedirectCallback): (setWillSendRequestClearHeaderCallback): (TestRunner::setAccummulateLogsForChannel): (TestRunner::runUIScript): (TestRunner::setOpenPanelFiles): * DumpRenderTree/mac/DumpRenderTree.mm: (dumpFramesAsText): * DumpRenderTree/mac/EventSendingController.mm: (eventPressedMouseButtonsSwizzlerForViewAndEvent): * DumpRenderTree/win/DRTDataObject.cpp: (DRTDataObject::SetData): * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::FrameLoadDelegate): * DumpRenderTree/win/UIDelegate.cpp: (DRTUndoManager::DRTUndoManager): (UIDelegate::UIDelegate): (UIDelegate::resetUndoManager): * TestWebKitAPI/JavaScriptTest.cpp: (TestWebKitAPI::runJSTest): * TestWebKitAPI/PlatformUtilities.cpp: (TestWebKitAPI::Util::toSTD): * TestWebKitAPI/Tests/WTF/Expected.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): (TestWebKitAPI::testMovingUsingEnsure): (TestWebKitAPI::testMovingUsingAdd): * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/ListHashSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Lock.cpp: (TestWebKitAPI::runLockTest): * TestWebKitAPI/Tests/WTF/ParkingLot.cpp: * TestWebKitAPI/Tests/WTF/RefCounter.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Variant.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/CARingBuffer.cpp: (TestWebKitAPI::CARingBufferTest::SetUp): * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: (TestWebKitAPI::createTestValue): * TestWebKitAPI/Tests/WebCore/FidoHidMessageTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp: * TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp: (TestWebKitAPI::createNewPage): * TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp: (TestWebKitAPI::createNewPage): * TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp: * TestWebKitAPI/Tests/WebKit/UserMessage.cpp: (TestWebKitAPI::WebKit2UserMessageRoundTripTest::SetUp): * TestWebKitAPI/Tests/WebKit/WillLoad.cpp: (TestWebKitAPI::WebKit2WillLoadTest::SetUp): * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm: (TestWebKitAPI::ForceLightAppearanceInBundleTest::didReceiveMessage): * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: (serverCallback): (testWebViewAuthenticationProxyHTTPS): * TestWebKitAPI/Tests/WebKitGtk/DOMDOMWindowTest.cpp: (WebKitDOMDOMWindowTest::create): * TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm: (TestWebKitAPI::Util::toSTD): * TestWebKitAPI/cocoa/TestWKWebView.mm: (applyWorkaroundToAllowWritingAttributedStringsToItemProviders): (-[TestWKWebView initWithFrame:configuration:addToWindow:]): * TestWebKitAPI/mac/TestFontOptions.mm: (-[TestFontOptions initWithFontOptions:]): * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::callAfterScrollingCompletes): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setOpenPanelFiles): * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: * WebKitTestRunner/StringFunctions.h: (WTR::toSTD): (WTR::toWTFString): * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): (WTR::TestController::generatePageConfiguration): (WTR::TestController::resetStateToConsistentValues): (WTR::createTestURL): (WTR::TestController::runTest): (WTR::TestController::platformCreateWebView): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::runUISideScript): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): (WTR::TestController::setDefaultCalendarType): * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::getGDKKeySymForKeyRef): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::setKeyboardInputModeIdentifier): * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::wpeKeySymForKeyRef): Canonical link: https://commits.webkit.org/214609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-19 06:59:40 +00:00
#include <wtf/UniqueArray.h>
#include <wtf/Vector.h>
#include <wtf/text/CString.h>
Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Add some string function exports to Windows so the WebKitTestRunner can use them. Reviewed by Geoff Garen. * win/WebKit2.def: Tools: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Fix crash preventing WebKitTestRunner from working in Release. WebKitTestRunner used ostringstream to collect output from the test. ostringstream is incompatible with our FastMalloc overrides. When copying strings out ostringstream a new string is allocated with FastMalloc because the allocation is inlined. When that string is freed is uses the system malloc because that call is not inlined. I removed ostringstream in favor of StringBuilder. Properly set NDEBUG on Release builds so we don't crash when when we free the strings StringBuilder created. Reviewed by Geoff Garen. Add DEBUG_DEFINES to set NDEBUG on release builds. * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Remove ostringstream member in favor of StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::initialize): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::done): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (WTF): (WTR::InjectedBundle::stringBuilder): (InjectedBundle): Append output to StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::hasPrefix): (WTR::dumpPath): (WTR::rangeToStr): (WTR::styleDecToStr): (WTR::frameToStr): (WTR::dumpFrameScrollPosition): (WTR::dumpFrameText): (WTR::dumpDescendantFramesText): (WTR::InjectedBundlePage::dump): (WTR::InjectedBundlePage::didReceiveTitleForFrame): (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): (WTR::InjectedBundlePage::willSendRequestForFrame): (WTR::InjectedBundlePage::decidePolicyForNavigationAction): (WTR::lastFileURLPathComponent): (WTR::InjectedBundlePage::willAddMessageToConsole): (WTR::InjectedBundlePage::willSetStatusbarText): (WTR::InjectedBundlePage::willRunJavaScriptAlert): (WTR::InjectedBundlePage::willRunJavaScriptConfirm): (WTR::InjectedBundlePage::willRunJavaScriptPrompt): (WTR::InjectedBundlePage::shouldBeginEditing): (WTR::InjectedBundlePage::shouldEndEditing): (WTR::InjectedBundlePage::shouldInsertNode): (WTR::InjectedBundlePage::shouldInsertText): (WTR::InjectedBundlePage::shouldDeleteRange): (WTR::InjectedBundlePage::shouldChangeSelectedRange): (WTR::InjectedBundlePage::shouldApplyStyle): (WTR::InjectedBundlePage::didBeginEditing): (WTR::InjectedBundlePage::didEndEditing): (WTR::InjectedBundlePage::didChange): (WTR::InjectedBundlePage::didChangeSelection): (WTR::InjectedBundlePage::supportsFullScreen): (WTR::InjectedBundlePage::enterFullScreenForElement): (WTR::InjectedBundlePage::exitFullScreenForElement): (WTR::InjectedBundlePage::beganEnterFullScreen): (WTR::InjectedBundlePage::beganExitFullScreen): (WTR::dumpBackForwardListItem): (WTR::InjectedBundlePage::dumpBackForwardList): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::waitToDumpWatchdogTimerFired): (WTR::LayoutTestController::dumpConfigurationForViewport): Convert between WTF::String and WKStringRef. * WebKitTestRunner/StringFunctions.h: (WTR::toWTFString): (WTR): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Canonical link: https://commits.webkit.org/98644@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-17 00:29:38 +00:00
#include <wtf/text/WTFString.h>
namespace WTR {
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
WKRetainPtr<WKStringRef> toWKString(JSContextRef, JSValueRef);
WTF::String toWTFString(JSContextRef, JSValueRef);
inline WKRetainPtr<WKStringRef> toWK(JSStringRef string)
{
2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 No code changes so no new tests. Revert the changes that were needed to use KURL in WebKitTestRunner. * Configurations/WebCore.xcconfig: * WebCore.exp.in: 2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 Add API's to WKURL and WKString to satisfy WebKitTestRunner's needs. * Shared/API/c/WKString.cpp: (WKStringIsEqualToUTF8CStringIgnoringCase): * Shared/API/c/WKString.h: * Shared/API/c/WKURL.cpp: (WKURLCopyHostName): (WKURLCopyScheme): * Shared/API/c/WKURL.h: * Shared/WebString.h: (WebKit::WebString::equalToUTF8StringIgnoringCase): * Shared/WebURL.h: Added OwnPtr<KURL> member to be able to lazily parse the URL and store the result. (WebKit::WebURL::host): (WebKit::WebURL::protocol): (WebKit::WebURL::parseURLIfNecessary): * win/WebKit2.def: Revert the symbol exports that were needed to use KURL in WebKitTestRunner. 2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::willSendRequestForFrame): Use new WebKit2 API's instead of KURL to analyze the URL. * WebKitTestRunner/StringFunctions.h: (WTR::adoptWK): Moved from InjectedBundlePage.cpp to make it available globally in the WebKitTestRunner project. (WTR::toWK): Use adoptWK. (WTR::operator<<): Added helper for printing a WKURL. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Do not link against WebCore. Canonical link: https://commits.webkit.org/70964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-15 00:32:53 +00:00
return adoptWK(WKStringCreateWithJSString(string));
}
Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext https://bugs.webkit.org/show_bug.cgi?id=189455 Reviewed by Keith Miller. Source/JavaScriptCore: * API/JSObjectRef.cpp: (OpaqueJSPropertyNameArray): Use Ref<OpaqueJSString> instead of JSRetainPtr<JSStringRef>. (JSObjectCopyPropertyNames): Remove now-unneeded use of leakRef and adopt constructor. (JSPropertyNameArrayGetNameAtIndex): Use ptr() instead of get() since the array elements are now Ref. * API/JSRetainPtr.h: While JSRetainPtr is written as a template, it only works for two specific unrelated types, JSStringRef and JSGlobalContextRef. Simplified the default constructor using data member initialization. Prepared to make the adopt constructor private (got everything compiling that way, then made it public again so that Apple internal software will still build). Got rid of unneeded templated constructor and assignment operator, since it's not relevant since there is no inheritance between JSRetainPtr template types. Added WARN_UNUSED_RETURN to leakRef as in RefPtr and RetainPtr. Added move constructor and move assignment operator for slightly better performance. Simplified implementations of various member functions so they are more obviously correct, by using leakPtr in more of them and using std::exchange to make the flow of values more obvious. * API/JSValue.mm: (+[JSValue valueWithNewSymbolFromDescription:inContext:]): Added a missing JSStringRelease to fix a leak. * API/tests/CustomGlobalObjectClassTest.c: (customGlobalObjectClassTest): Added a JSGlobalContextRelease to fix a leak. (globalObjectSetPrototypeTest): Ditto. (globalObjectPrivatePropertyTest): Ditto. * API/tests/ExecutionTimeLimitTest.cpp: (testResetAfterTimeout): Added a call to JSStringRelease to fix a leak. (testExecutionTimeLimit): Ditto, lots more. * API/tests/FunctionOverridesTest.cpp: (testFunctionOverrides): Added a call to JSStringRelease to fix a leak. * API/tests/JSObjectGetProxyTargetTest.cpp: (testJSObjectGetProxyTarget): Added a call to JSGlobalContextRelease to fix a leak. * API/tests/PingPongStackOverflowTest.cpp: (testPingPongStackOverflow): Added calls to JSGlobalContextRelease and JSStringRelease to fix leaks. * API/tests/testapi.c: (throwException): Added. Helper function for repeated idiom where we want to throw an exception, but with additional JSStringRelease calls so we don't have to leak just to keep the code simpler to read. (MyObject_getProperty): Use throwException. (MyObject_setProperty): Ditto. (MyObject_deleteProperty): Ditto. (isValueEqualToString): Added. Helper function for an idiom where we check if something is a string and then if it's equal to a particular string constant, but a version that has an additional JSStringRelease call so we don't have to leak just to keep the code simpler to read. (MyObject_callAsFunction): Use isValueEqualToString and throwException. (MyObject_callAsConstructor): Ditto. (MyObject_hasInstance): Ditto. (globalContextNameTest): Added a JSGlobalContextRelease to fix a leak. (testMarkingConstraintsAndHeapFinalizers): Ditto. Source/WebCore: * Modules/plugins/QuickTimePluginReplacement.mm: (WebCore::jsValueWithDictionaryInContext): Adding a missing JSStringRelease to fix a leak. Source/WebKit: * WebProcess/Automation/WebAutomationSessionProxy.cpp: (WebKit::toJSString): Use adopt function instead of adopt construuctor. (WebKit::evaluate): Ditto. (WebKit::evaluateJavaScriptCallback): Ditto. (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Ditto. Tools: There is a lot of copied and pasted code for WebKit vs. Legacy WebKit testing and even for macOS vs. iOS vs. Windows platform-specific code. For now, this patch just makes corresponding changes to the copied code. Later we might get better results by merging more code instead of having all these separate copies. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use the adopt function instead of the special Adopt constructor of JSRetainPtr. * DumpRenderTree/AccessibilityTextMarker.cpp: Removed unneeded include. * DumpRenderTree/AccessibilityUIElement.cpp: Ditto. (allAttributesCallback): Don't adopt at this level; changed the underlying function to return a JSRetainPtr so the adopt is right next to the call to the create or copy function. (attributesOfLinkedUIElementsCallback): Ditto. (attributesOfDocumentLinksCallback): Ditto. (attributesOfChildrenCallback): Ditto. (parameterizedAttributeNamesCallback): Ditto. (attributesOfColumnHeadersCallback): Ditto. (attributesOfRowHeadersCallback): Ditto. (attributesOfColumnsCallback): Ditto. (attributesOfRowsCallback): Ditto. (attributesOfVisibleCellsCallback): Ditto. (attributesOfHeaderCallback): Ditto. (rowIndexRangeCallback): Ditto. (columnIndexRangeCallback): Ditto. (rangeForLineCallback): Ditto. (boundsForRangeCallback): Ditto. (rangeForPositionCallback): Ditto. (stringForRangeCallback): Ditto. (attributedStringForRangeCallback): Ditto. (uiElementCountForSearchPredicateCallback): Use the free adopt function instead of the adopt member function. (uiElementForSearchPredicateCallback): Ditto. (selectTextWithCriteriaCallback): Don't adopt at this level. (attributedStringForElementCallback): Ditto. (setValueCallback): Use free adopt. (stringAttributeValueCallback): Don't adopt at this level. (uiElementArrayAttributeValueCallback): Ditto. (uiElementAttributeValueCallback): Ditto. (stringForTextMarkerRangeCallback): Ditto. (attributedStringForTextMarkerRangeCallback): Ditto. (attributedStringForTextMarkerRangeWithOptionsCallback): Ditto. (getARIADropEffectsCallback): Ditto. (getClassListCallback): Ditto. (getRoleCallback): Ditto. (getSubroleCallback): Ditto. (getRoleDescriptionCallback): Ditto. (getComputedRoleStringCallback): Ditto. (getTitleCallback): Ditto. (getDescriptionCallback): Ditto. (getStringValueCallback): Ditto. (getLanguageCallback): Ditto. (getHelpTextCallback): Ditto. (getOrientationCallback): Ditto. (getPathDescriptionCallback): Ditto. (getSelectedTextRangeCallback): Ditto. (speakAsCallback): Ditto. (getValueDescriptionCallback): Ditto. (getAccessibilityValueCallback): Ditto. (getDocumentEncodingCallback): Ditto. (getDocumentURICallback): Ditto. (getURLCallback): Ditto. (characterAtOffsetCallback): Ditto. (wordAtOffsetCallback): Ditto. (lineAtOffsetCallback): Ditto. (sentenceAtOffsetCallback): Ditto. (stringForSelectionCallback): Ditto. (getIdentifierCallback): Ditto. (getTraitsCallback): Ditto. (supportedActionsCallback): Ditto. (mathPostscriptsDescriptionCallback): Ditto. (mathPrescriptsDescriptionCallback): Ditto. (AccessibilityUIElement::rangeForLine): Updated to return JSRetainPtr. (AccessibilityUIElement::rangeForPosition): Ditto. (AccessibilityUIElement::speakAs): Ditto. (AccessibilityUIElement::pathDescription const): Ditto. (AccessibilityUIElement::stringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. * DumpRenderTree/AccessibilityUIElement.h: Use JSRetainPtr instead of raw pointers for the results of the functions that create strings. The old way was difficult to get right; the functions didn't even follow the create/copy naming rule. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use the adopt function instead of the JSRetainPtr adopt constructor. Also nullptr instead of 0. * DumpRenderTree/GCController.cpp: (GCController::makeWindowObject): Use adopt function instead of constructor. * DumpRenderTree/TestRunner.cpp: (pathToLocalResourceCallback): Use adopt function instead of constructor. (addDisallowedURLCallback): Ditto. (addURLToRedirectCallback): Ditto. (clearApplicationCacheForOriginCallback): Ditto. (applicationCacheDiskUsageForOriginCallback): Ditto. (decodeHostNameCallback): Don't adopt at this level. (encodeHostNameCallback): Ditto. (execCommandCallback): Use adopt instead of JSRetainPtr::adopt. (findStringCallback): Use adopt function instead of constructor. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (queueLoadingScriptCallback): Ditto. (queueNonLoadingScriptCallback): Ditto. (setAuthenticationPasswordCallback): Ditto. (setAuthenticationUsernameCallback): Ditto. (setDomainRelaxationForbiddenForURLSchemeCallback): Ditto. (setMockGeolocationPositionUnavailableErrorCallback): Ditto. (setPOSIXLocaleCallback): Ditto. (setPersistentUserStyleSheetLocationCallback): Ditto. (setUserStyleSheetLocationCallback): Ditto. (setValueForUserCallback): Ditto. (setWillSendRequestClearHeaderCallback): Ditto. (setPageVisibilityCallback): Ditto. (evaluateInWebInspectorCallback): Ditto. (evaluateScriptInIsolatedWorldCallback): Ditto. (evaluateScriptInIsolatedWorldAndReturnValueCallback): Ditto. (addOriginAccessWhitelistEntryCallback): Ditto. (removeOriginAccessWhitelistEntryCallback): Ditto. (setScrollbarPolicyCallback): Ditto. (addUserScriptCallback): Ditto. (addUserStyleSheetCallback): Ditto. (apiTestNewWindowDataLoadBaseURLCallback): Ditto. (authenticateSessionCallback): Ditto. (getTitleTextDirectionCallback): Ditto. (getInspectorTestStubURLCallback): Ditto. (simulateLegacyWebNotificationClickCallback): Ditto. (setTextDirectionCallback): Ditto. (grantWebNotificationPermissionCallback): Ditto. (denyWebNotificationPermissionCallback): Ditto. (accummulateLogsForChannel): Ditto. (runUIScriptCallback): Ditto. (TestRunner::makeWindowObject): Ditto. (TestRunner::uiScriptDidComplete): Ditto. (TestRunner::setOpenPanelFiles): Ditto. * DumpRenderTree/TestRunner.h: Use JSRetainPtr instead of raw pointers for the results of the functions that create strings. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use the adopt function instead of the adopt constructor. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Added. This helper function makes reduces the repetitive code to create empty strings. (concatenateAttributeAndValue): Changed to return a JSRetainPtr. (AccessibilityUIElement::identifier): Ditto. (AccessibilityUIElement::traits): Ditto. (AccessibilityUIElement::url): Ditto. (AccessibilityUIElement::speakAs): Ditto. (AccessibilityUIElement::stringForSelection): Ditto. (AccessibilityUIElement::stringForRange): Ditto. (AccessibilityUIElement::attributedStringForRange): Ditto. (AccessibilityUIElement::attributedStringForElement): Ditto. (AccessibilityUIElement::pathDescription const): Ditto. (AccessibilityUIElement::stringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::description): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::stringValue): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::helpText const): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::rowIndexRange): Ditto. (AccessibilityUIElement::columnIndexRange): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. (AccessibilityUIElement::selectTextWithCriteria): Ditto. (AccessibilityUIElement::classList const): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Changed the createJSStringRef method to return a JSRetainPtr. * DumpRenderTree/mac/AccessibilityCommonMac.mm: (-[NSString createJSStringRef]): Ditto. (searchPredicateParameterizedAttributeForSearchCriteria): Use the adopt function instead of the adopt constructor. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Ditto. * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: (-[NSString createJSStringRef]): Return a JSRetainPtr. (makeValueRefForValue): Updated for the above, no adopt needed here now. (makeObjectRefForDictionary): Ditto. (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Added. This helper function makes reduces the repetitive code to create empty strings. (concatenateAttributeAndValue): Changed to return a JSRetainPtr. (descriptionOfElements): Ditto. (selectTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::description): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::stringValue): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::helpText const): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::speakAs): Ditto. (AccessibilityUIElement::classList const): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::rangeForLine): Ditto. (AccessibilityUIElement::rangeForPosition): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::stringForRange): Ditto. (AccessibilityUIElement::attributedStringForRange): Ditto. (AccessibilityUIElement::selectTextWithCriteria): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::rowIndexRange): Ditto. (AccessibilityUIElement::columnIndexRange): Ditto. (AccessibilityUIElement::pathDescription const): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. (AccessibilityUIElement::url): Ditto. (AccessibilityUIElement::stringForTextMarkerRange): Ditto. (createJSStringRef): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. (AccessibilityUIElement::supportedActions): Ditto. (AccessibilityUIElement::mathPostscriptsDescription const): Ditto. (AccessibilityUIElement::mathPrescriptsDescription const): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use the adopt function instead of the adopt constructor. * DumpRenderTree/mac/TestRunnerMac.mm: (originsArrayToJS): Ditto. (TestRunner::copyDecodedHostName): Return a JSRetainPtr. (TestRunner::copyEncodedHostName): Ditto. (TestRunner::pathToLocalResource): Ditto. (TestRunner::queueLoad): Use adopt function instead of constructor. (TestRunner::findString): Ditto. (TestRunner::inspectorTestStubURL): Return a JSRetainPtr. * DumpRenderTree/win/AccessibilityControllerWin.cpp: (AccessibilityController::winNotificationReceived): Use adopt function instead of adopt constructor. (AccessibilityController::platformName const): Ditto. * DumpRenderTree/win/AccessibilityUIElementWin.cpp: (createEmptyJSString): Added. This helper function makes reduces the repetitive code to create empty strings. (AccessibilityUIElement::allAttributes): Changed to return a JSRetainPtr. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::description): Ditto. (AccessibilityUIElement::stringValue): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::helpText const): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::rowIndexRange): Ditto. (AccessibilityUIElement::columnIndexRange): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::stringForRange): Ditto. (AccessibilityUIElement::attributedStringForRange): Ditto. (AccessibilityUIElement::selectTextWithCriteria): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. (AccessibilityUIElement::url): Ditto. (AccessibilityUIElement::classList const): Ditto. * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::copyDecodedHostName): Changed to return a JSRetainPtr. (TestRunner::copyEncodedHostName): Ditto. (TestRunner::pathToLocalResource): Ditto. (TestRunner::queueLoad): Ditto. (TestRunner::findString): Ditto. (TestRunner::inspectorTestStubURL): Ditto. * TestRunnerShared/Bindings/JSWrapper.h: (WTR::setProperty): Use adopt function instead of constructor. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Ditto. (UIScriptContext::runUIScript): Ditto. * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::toDeviceOrientation): Ditto. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (nsTextCheckingType): Changed this function to not take an rvalue reference to a JSRetainPtr since it doesn't take ownership. (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Updated for the above change. * TestWebKitAPI/JavaScriptTest.cpp: (TestWebKitAPI::javaScriptCallback): Use adopt function instead of adopt member function. * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: Removed unneeded include. * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: Ditto. * TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm: Use adopt function instead of adopt constructor. * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: Ditto. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: Removed unneeded includes. * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto. * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_platformTypeConstructor): Use the adopt function instead of the JSRetainPtr adopt constructor. Also nullptr instead of 0. * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::arrayLength): Use adopt function instead of constructor. (WTR::parseModifierArray): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Ditto. (WTR::dumpPath): Ditto. (WTR::toJS): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::findString): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Ditto. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Ditto. (WTR::TestRunner::setOpenPanelFiles): Ditto. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Ditto. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (-[NSString createJSStringRef]): Return a JSRetainPtr. This fixes storage leaks in many functions below, which were using the create function and putting the value right into a JSRetainPtr without adoption. (WTR::createEmptyJSString): Added. This helper function reduces the repetitive code to create empty strings. (WTR::concatenateAttributeAndValue): Return a JSRetainPtr. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createEmptyJSString, fixing a storage leak due to missing adoption. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::roleDescription): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::stringForRange): Removed unneeded null check. (WTR::AccessibilityUIElement::attributedStringForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Use createEmptyJSString, fixing a storage leak due to missing adoption. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::selectedTextRange): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::stringForSelection): Removed unneeded null check. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Use createEmptyJSString, fixing a storage leak due to missing adoption. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h: Use JSRetainPtr for the return value of createJSStringRef. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (-[NSString createJSStringRef]): Ditto. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use the adopt function instead of the adopt constructor. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Ditto * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (-[NSString createJSStringRef]): Return a JSRetainPtr. (makeValueRefForValue): Updated for above by removing adopt. (makeObjectRefForDictionary): Ditto. (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Added. This helper function makes reduces the repetitive code to create empty strings. (WTR::concatenateAttributeAndValue): Return a JSRetainPtr. (WTR::descriptionOfElements): Ditto. (WTR::selectTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createEmptyJSString, fixing a storage leak due to missing adoption. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::createJSStringRef): Return a JSRetainPtr. * WebKitTestRunner/StringFunctions.h: (WTR::toWK): Take a const& to eliminate a little bit of reference count churn. (WTR::toJS): Use the adopt function instead of the constructor. Canonical link: https://commits.webkit.org/204612@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-15 16:17:24 +00:00
inline WKRetainPtr<WKStringRef> toWK(const JSRetainPtr<JSStringRef>& string)
{
return toWK(string.get());
}
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
inline WKRetainPtr<WKStringRef> toWK(const char* string)
{
return adoptWK(WKStringCreateWithUTF8CString(string));
}
Refactor TestOptions code in WebKitTestRunner to make it easier to rationalize and extend https://bugs.webkit.org/show_bug.cgi?id=217390 Reviewed by Darin Adler. Refactors TestOptions code in WebKitTestRunner to make it clear how options coming in at different levels are treated and what precedence each has. The order is (from least to most): - Global features passed to WebKitTestRunner via the command line (e.g. --show-touches) - Hardcoded features based on the path of the test being run (hopefully we can remove all soon) - Hardcoded platform specific defaults (currently only used by macOS for useThreadedScrolling). - Features from the test headers within the test itself. - Finally, a second chance for more platform specific defaults (currenly only used the Cocoa ports for setting enableProcessSwapOnNavigation and enableProcessSwapOnWindowOpen based on NSUserDefaults.) To make this change work, and pave the way for future autogeneration of some of these test options, the TestOptions struct (now class) was overhauled. Instead of storing the state itself, TestOptions is now an immutable owner of a TestFeatures object. TestFeatures is a simple struct that contains maps of option keys to values and can be merged with other TestFeatures objects. TestOptions takes a TestFeatures at construction, and exposes getters for all keys, as well as defaults for when they are not in the maps. In future changes, I would like to remove many of these (the ones that correspond with WebKit preferences anyway) and have the keys and values automatically dealt with by WKPreferences. * WebKitTestRunner/Options.cpp: * WebKitTestRunner/Options.h: Switch to std::unordered_map for consistency and ease of conversion. * WebKitTestRunner/PlatformWebView.h: (WTR::PlatformWebView::viewSupportsOptions const): Update to call new TestOptions functions. * WebKitTestRunner/StringFunctions.h: (WTR::toWK): (WTR::toWTFString): Add conversions for std::string. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Replace some bools with a new global TestFeatures instance that forms the base of all TestFeatures merges. (WTR::TestController::generateContextConfiguration const): (WTR::TestController::generatePageConfiguration): (WTR::TestController::createWebViewWithOptions): (WTR::TestController::ensureViewSupportsOptionsForTest): (WTR::TestController::resetPreferencesToConsistentValues): (WTR::TestController::resetStateToConsistentValues): Update to call new TestOptions functions. (WTR::TestController::createTestURL): Expose as a static member function on TestController for use in other files. (WTR::TestController::testOptionsForTest const): Rework to be a sequence of TestFeatures merges. (WTR::TestController::updateWebViewSizeForTest): (WTR::TestController::updateWindowScaleForTest): Update to call new TestOptions functions. (WTR::createTestURL): Deleted. (WTR::parseBooleanTestHeaderValue): Deleted. (WTR::parseStringTestHeaderValueAsRelativePath): Deleted. (WTR::parseStringTestHeaderValueAsURL): Deleted. (WTR::updateTestOptionsFromTestHeader): Deleted. (WTR::TestController::platformAddTestOptions const): Deleted. Moved TestOptions parsing to TestOptions.cpp * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::createTestSettingsDictionary): Update to call new TestOptions functions. * WebKitTestRunner/TestOptions.h: Reworks TestOptions to be an immutable owner of a TestFeatures struct, which is a set of maps that map feature string keys, to values of type bool, double, string or string vector. * WebKitTestRunner/TestOptions.cpp: (WTR::merge): Merges two TestFeatures objects. If both contain the same key, the 'additional' TestFeatures overrides the 'base' TestFeatures. (WTR::dumpFeatures): Helper to dump features to stderr, useful for debugging. (WTR::keyType): Helper for parser to know which value parser to use. (WTR::parseBooleanTestHeaderValue): (WTR::parseStringTestHeaderValueAsRelativePath): (WTR::parseStringTestHeaderValueAsURL): Value parsers moved from TestController.cpp (WTR::parseTestHeader): Header parser moved from TestController.cpp. Update to now return a TestFeatures object and use keyType to pick value parser rather than inlining the if statements. (WTR::hardcodedFeaturesBasedOnPathForTest): Moved from the TestOptions contructor and reworked to return a TestFeatures object to be merged by the caller. (WTR::featureDefaultsFromTestHeaderForTest): Creates a TestFeatures for the test headers of the current test. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformSpecificFeatureOverridesDefaultsForTest const): Reworked to now return a TestFeatures object that will be merged, rather than updating a TestOptions. Moves enableInAppBrowserPrivacy work to TestController::platformWillRunTest where it is more appropriate. (WTR::TestController::platformInitializeDataStore): (WTR::TestController::platformCreateWebView): (WTR::TestController::finishCreatingPlatformWebView): (WTR::TestController::setApplicationBundleIdentifier): (WTR::TestController::cocoaResetStateToConsistentValues): (WTR::contentMode): Update to call new TestOptions functions. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::platformConfigureViewForTest): Update to call new TestOptions functions. (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Moved GeneratedTouchesDebugWindow work to TestController::platformConfigureViewForTest where it is more appropriate and removed shouldShowTouches setting as that is done globally now. * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::PlatformWebView): Update to call new TestOptions functions. * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Remove shouldUseRemoteLayerTree and shouldShowWebView, as those are now done globally, and re-implemented useThreadedScrolling to use boolFeatures. * WebKitTestRunner/win/TestControllerWin.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. * WebKitTestRunner/gtk/TestControllerGTK.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. Canonical link: https://commits.webkit.org/230271@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 00:45:29 +00:00
inline WKRetainPtr<WKStringRef> toWK(const std::string& string)
{
return toWK(string.c_str());
}
inline WKRetainPtr<WKStringRef> toWK(const WTF::String& string)
{
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
return toWK(string.utf8().data());
}
inline JSRetainPtr<JSStringRef> toJS(WKStringRef string)
{
Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext https://bugs.webkit.org/show_bug.cgi?id=189455 Reviewed by Keith Miller. Source/JavaScriptCore: * API/JSObjectRef.cpp: (OpaqueJSPropertyNameArray): Use Ref<OpaqueJSString> instead of JSRetainPtr<JSStringRef>. (JSObjectCopyPropertyNames): Remove now-unneeded use of leakRef and adopt constructor. (JSPropertyNameArrayGetNameAtIndex): Use ptr() instead of get() since the array elements are now Ref. * API/JSRetainPtr.h: While JSRetainPtr is written as a template, it only works for two specific unrelated types, JSStringRef and JSGlobalContextRef. Simplified the default constructor using data member initialization. Prepared to make the adopt constructor private (got everything compiling that way, then made it public again so that Apple internal software will still build). Got rid of unneeded templated constructor and assignment operator, since it's not relevant since there is no inheritance between JSRetainPtr template types. Added WARN_UNUSED_RETURN to leakRef as in RefPtr and RetainPtr. Added move constructor and move assignment operator for slightly better performance. Simplified implementations of various member functions so they are more obviously correct, by using leakPtr in more of them and using std::exchange to make the flow of values more obvious. * API/JSValue.mm: (+[JSValue valueWithNewSymbolFromDescription:inContext:]): Added a missing JSStringRelease to fix a leak. * API/tests/CustomGlobalObjectClassTest.c: (customGlobalObjectClassTest): Added a JSGlobalContextRelease to fix a leak. (globalObjectSetPrototypeTest): Ditto. (globalObjectPrivatePropertyTest): Ditto. * API/tests/ExecutionTimeLimitTest.cpp: (testResetAfterTimeout): Added a call to JSStringRelease to fix a leak. (testExecutionTimeLimit): Ditto, lots more. * API/tests/FunctionOverridesTest.cpp: (testFunctionOverrides): Added a call to JSStringRelease to fix a leak. * API/tests/JSObjectGetProxyTargetTest.cpp: (testJSObjectGetProxyTarget): Added a call to JSGlobalContextRelease to fix a leak. * API/tests/PingPongStackOverflowTest.cpp: (testPingPongStackOverflow): Added calls to JSGlobalContextRelease and JSStringRelease to fix leaks. * API/tests/testapi.c: (throwException): Added. Helper function for repeated idiom where we want to throw an exception, but with additional JSStringRelease calls so we don't have to leak just to keep the code simpler to read. (MyObject_getProperty): Use throwException. (MyObject_setProperty): Ditto. (MyObject_deleteProperty): Ditto. (isValueEqualToString): Added. Helper function for an idiom where we check if something is a string and then if it's equal to a particular string constant, but a version that has an additional JSStringRelease call so we don't have to leak just to keep the code simpler to read. (MyObject_callAsFunction): Use isValueEqualToString and throwException. (MyObject_callAsConstructor): Ditto. (MyObject_hasInstance): Ditto. (globalContextNameTest): Added a JSGlobalContextRelease to fix a leak. (testMarkingConstraintsAndHeapFinalizers): Ditto. Source/WebCore: * Modules/plugins/QuickTimePluginReplacement.mm: (WebCore::jsValueWithDictionaryInContext): Adding a missing JSStringRelease to fix a leak. Source/WebKit: * WebProcess/Automation/WebAutomationSessionProxy.cpp: (WebKit::toJSString): Use adopt function instead of adopt construuctor. (WebKit::evaluate): Ditto. (WebKit::evaluateJavaScriptCallback): Ditto. (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Ditto. Tools: There is a lot of copied and pasted code for WebKit vs. Legacy WebKit testing and even for macOS vs. iOS vs. Windows platform-specific code. For now, this patch just makes corresponding changes to the copied code. Later we might get better results by merging more code instead of having all these separate copies. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use the adopt function instead of the special Adopt constructor of JSRetainPtr. * DumpRenderTree/AccessibilityTextMarker.cpp: Removed unneeded include. * DumpRenderTree/AccessibilityUIElement.cpp: Ditto. (allAttributesCallback): Don't adopt at this level; changed the underlying function to return a JSRetainPtr so the adopt is right next to the call to the create or copy function. (attributesOfLinkedUIElementsCallback): Ditto. (attributesOfDocumentLinksCallback): Ditto. (attributesOfChildrenCallback): Ditto. (parameterizedAttributeNamesCallback): Ditto. (attributesOfColumnHeadersCallback): Ditto. (attributesOfRowHeadersCallback): Ditto. (attributesOfColumnsCallback): Ditto. (attributesOfRowsCallback): Ditto. (attributesOfVisibleCellsCallback): Ditto. (attributesOfHeaderCallback): Ditto. (rowIndexRangeCallback): Ditto. (columnIndexRangeCallback): Ditto. (rangeForLineCallback): Ditto. (boundsForRangeCallback): Ditto. (rangeForPositionCallback): Ditto. (stringForRangeCallback): Ditto. (attributedStringForRangeCallback): Ditto. (uiElementCountForSearchPredicateCallback): Use the free adopt function instead of the adopt member function. (uiElementForSearchPredicateCallback): Ditto. (selectTextWithCriteriaCallback): Don't adopt at this level. (attributedStringForElementCallback): Ditto. (setValueCallback): Use free adopt. (stringAttributeValueCallback): Don't adopt at this level. (uiElementArrayAttributeValueCallback): Ditto. (uiElementAttributeValueCallback): Ditto. (stringForTextMarkerRangeCallback): Ditto. (attributedStringForTextMarkerRangeCallback): Ditto. (attributedStringForTextMarkerRangeWithOptionsCallback): Ditto. (getARIADropEffectsCallback): Ditto. (getClassListCallback): Ditto. (getRoleCallback): Ditto. (getSubroleCallback): Ditto. (getRoleDescriptionCallback): Ditto. (getComputedRoleStringCallback): Ditto. (getTitleCallback): Ditto. (getDescriptionCallback): Ditto. (getStringValueCallback): Ditto. (getLanguageCallback): Ditto. (getHelpTextCallback): Ditto. (getOrientationCallback): Ditto. (getPathDescriptionCallback): Ditto. (getSelectedTextRangeCallback): Ditto. (speakAsCallback): Ditto. (getValueDescriptionCallback): Ditto. (getAccessibilityValueCallback): Ditto. (getDocumentEncodingCallback): Ditto. (getDocumentURICallback): Ditto. (getURLCallback): Ditto. (characterAtOffsetCallback): Ditto. (wordAtOffsetCallback): Ditto. (lineAtOffsetCallback): Ditto. (sentenceAtOffsetCallback): Ditto. (stringForSelectionCallback): Ditto. (getIdentifierCallback): Ditto. (getTraitsCallback): Ditto. (supportedActionsCallback): Ditto. (mathPostscriptsDescriptionCallback): Ditto. (mathPrescriptsDescriptionCallback): Ditto. (AccessibilityUIElement::rangeForLine): Updated to return JSRetainPtr. (AccessibilityUIElement::rangeForPosition): Ditto. (AccessibilityUIElement::speakAs): Ditto. (AccessibilityUIElement::pathDescription const): Ditto. (AccessibilityUIElement::stringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. * DumpRenderTree/AccessibilityUIElement.h: Use JSRetainPtr instead of raw pointers for the results of the functions that create strings. The old way was difficult to get right; the functions didn't even follow the create/copy naming rule. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use the adopt function instead of the JSRetainPtr adopt constructor. Also nullptr instead of 0. * DumpRenderTree/GCController.cpp: (GCController::makeWindowObject): Use adopt function instead of constructor. * DumpRenderTree/TestRunner.cpp: (pathToLocalResourceCallback): Use adopt function instead of constructor. (addDisallowedURLCallback): Ditto. (addURLToRedirectCallback): Ditto. (clearApplicationCacheForOriginCallback): Ditto. (applicationCacheDiskUsageForOriginCallback): Ditto. (decodeHostNameCallback): Don't adopt at this level. (encodeHostNameCallback): Ditto. (execCommandCallback): Use adopt instead of JSRetainPtr::adopt. (findStringCallback): Use adopt function instead of constructor. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (queueLoadingScriptCallback): Ditto. (queueNonLoadingScriptCallback): Ditto. (setAuthenticationPasswordCallback): Ditto. (setAuthenticationUsernameCallback): Ditto. (setDomainRelaxationForbiddenForURLSchemeCallback): Ditto. (setMockGeolocationPositionUnavailableErrorCallback): Ditto. (setPOSIXLocaleCallback): Ditto. (setPersistentUserStyleSheetLocationCallback): Ditto. (setUserStyleSheetLocationCallback): Ditto. (setValueForUserCallback): Ditto. (setWillSendRequestClearHeaderCallback): Ditto. (setPageVisibilityCallback): Ditto. (evaluateInWebInspectorCallback): Ditto. (evaluateScriptInIsolatedWorldCallback): Ditto. (evaluateScriptInIsolatedWorldAndReturnValueCallback): Ditto. (addOriginAccessWhitelistEntryCallback): Ditto. (removeOriginAccessWhitelistEntryCallback): Ditto. (setScrollbarPolicyCallback): Ditto. (addUserScriptCallback): Ditto. (addUserStyleSheetCallback): Ditto. (apiTestNewWindowDataLoadBaseURLCallback): Ditto. (authenticateSessionCallback): Ditto. (getTitleTextDirectionCallback): Ditto. (getInspectorTestStubURLCallback): Ditto. (simulateLegacyWebNotificationClickCallback): Ditto. (setTextDirectionCallback): Ditto. (grantWebNotificationPermissionCallback): Ditto. (denyWebNotificationPermissionCallback): Ditto. (accummulateLogsForChannel): Ditto. (runUIScriptCallback): Ditto. (TestRunner::makeWindowObject): Ditto. (TestRunner::uiScriptDidComplete): Ditto. (TestRunner::setOpenPanelFiles): Ditto. * DumpRenderTree/TestRunner.h: Use JSRetainPtr instead of raw pointers for the results of the functions that create strings. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use the adopt function instead of the adopt constructor. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Added. This helper function makes reduces the repetitive code to create empty strings. (concatenateAttributeAndValue): Changed to return a JSRetainPtr. (AccessibilityUIElement::identifier): Ditto. (AccessibilityUIElement::traits): Ditto. (AccessibilityUIElement::url): Ditto. (AccessibilityUIElement::speakAs): Ditto. (AccessibilityUIElement::stringForSelection): Ditto. (AccessibilityUIElement::stringForRange): Ditto. (AccessibilityUIElement::attributedStringForRange): Ditto. (AccessibilityUIElement::attributedStringForElement): Ditto. (AccessibilityUIElement::pathDescription const): Ditto. (AccessibilityUIElement::stringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::description): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::stringValue): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::helpText const): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::rowIndexRange): Ditto. (AccessibilityUIElement::columnIndexRange): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. (AccessibilityUIElement::selectTextWithCriteria): Ditto. (AccessibilityUIElement::classList const): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Changed the createJSStringRef method to return a JSRetainPtr. * DumpRenderTree/mac/AccessibilityCommonMac.mm: (-[NSString createJSStringRef]): Ditto. (searchPredicateParameterizedAttributeForSearchCriteria): Use the adopt function instead of the adopt constructor. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Ditto. * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: (-[NSString createJSStringRef]): Return a JSRetainPtr. (makeValueRefForValue): Updated for the above, no adopt needed here now. (makeObjectRefForDictionary): Ditto. (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Added. This helper function makes reduces the repetitive code to create empty strings. (concatenateAttributeAndValue): Changed to return a JSRetainPtr. (descriptionOfElements): Ditto. (selectTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::description): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::stringValue): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::helpText const): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::speakAs): Ditto. (AccessibilityUIElement::classList const): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::rangeForLine): Ditto. (AccessibilityUIElement::rangeForPosition): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::stringForRange): Ditto. (AccessibilityUIElement::attributedStringForRange): Ditto. (AccessibilityUIElement::selectTextWithCriteria): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::rowIndexRange): Ditto. (AccessibilityUIElement::columnIndexRange): Ditto. (AccessibilityUIElement::pathDescription const): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. (AccessibilityUIElement::url): Ditto. (AccessibilityUIElement::stringForTextMarkerRange): Ditto. (createJSStringRef): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. (AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. (AccessibilityUIElement::supportedActions): Ditto. (AccessibilityUIElement::mathPostscriptsDescription const): Ditto. (AccessibilityUIElement::mathPrescriptsDescription const): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use the adopt function instead of the adopt constructor. * DumpRenderTree/mac/TestRunnerMac.mm: (originsArrayToJS): Ditto. (TestRunner::copyDecodedHostName): Return a JSRetainPtr. (TestRunner::copyEncodedHostName): Ditto. (TestRunner::pathToLocalResource): Ditto. (TestRunner::queueLoad): Use adopt function instead of constructor. (TestRunner::findString): Ditto. (TestRunner::inspectorTestStubURL): Return a JSRetainPtr. * DumpRenderTree/win/AccessibilityControllerWin.cpp: (AccessibilityController::winNotificationReceived): Use adopt function instead of adopt constructor. (AccessibilityController::platformName const): Ditto. * DumpRenderTree/win/AccessibilityUIElementWin.cpp: (createEmptyJSString): Added. This helper function makes reduces the repetitive code to create empty strings. (AccessibilityUIElement::allAttributes): Changed to return a JSRetainPtr. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::description): Ditto. (AccessibilityUIElement::stringValue): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::helpText const): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::rowIndexRange): Ditto. (AccessibilityUIElement::columnIndexRange): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::stringForRange): Ditto. (AccessibilityUIElement::attributedStringForRange): Ditto. (AccessibilityUIElement::selectTextWithCriteria): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. (AccessibilityUIElement::url): Ditto. (AccessibilityUIElement::classList const): Ditto. * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::copyDecodedHostName): Changed to return a JSRetainPtr. (TestRunner::copyEncodedHostName): Ditto. (TestRunner::pathToLocalResource): Ditto. (TestRunner::queueLoad): Ditto. (TestRunner::findString): Ditto. (TestRunner::inspectorTestStubURL): Ditto. * TestRunnerShared/Bindings/JSWrapper.h: (WTR::setProperty): Use adopt function instead of constructor. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Ditto. (UIScriptContext::runUIScript): Ditto. * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::toDeviceOrientation): Ditto. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (nsTextCheckingType): Changed this function to not take an rvalue reference to a JSRetainPtr since it doesn't take ownership. (-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Updated for the above change. * TestWebKitAPI/JavaScriptTest.cpp: (TestWebKitAPI::javaScriptCallback): Use adopt function instead of adopt member function. * TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: Removed unneeded include. * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: Ditto. * TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm: Use adopt function instead of adopt constructor. * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: Ditto. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: Removed unneeded includes. * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto. * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_platformTypeConstructor): Use the adopt function instead of the JSRetainPtr adopt constructor. Also nullptr instead of 0. * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::arrayLength): Use adopt function instead of constructor. (WTR::parseModifierArray): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Ditto. (WTR::dumpPath): Ditto. (WTR::toJS): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::findString): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Ditto. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Ditto. (WTR::TestRunner::setOpenPanelFiles): Ditto. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Ditto. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (-[NSString createJSStringRef]): Return a JSRetainPtr. This fixes storage leaks in many functions below, which were using the create function and putting the value right into a JSRetainPtr without adoption. (WTR::createEmptyJSString): Added. This helper function reduces the repetitive code to create empty strings. (WTR::concatenateAttributeAndValue): Return a JSRetainPtr. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createEmptyJSString, fixing a storage leak due to missing adoption. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::roleDescription): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::stringForRange): Removed unneeded null check. (WTR::AccessibilityUIElement::attributedStringForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Use createEmptyJSString, fixing a storage leak due to missing adoption. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::selectedTextRange): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::stringForSelection): Removed unneeded null check. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Use createEmptyJSString, fixing a storage leak due to missing adoption. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h: Use JSRetainPtr for the return value of createJSStringRef. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (-[NSString createJSStringRef]): Ditto. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use the adopt function instead of the adopt constructor. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Ditto * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: (-[NSString createJSStringRef]): Return a JSRetainPtr. (makeValueRefForValue): Updated for above by removing adopt. (makeObjectRefForDictionary): Ditto. (-[AccessibilityNotificationHandler _notificationReceived:]): Ditto. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Added. This helper function makes reduces the repetitive code to create empty strings. (WTR::concatenateAttributeAndValue): Return a JSRetainPtr. (WTR::descriptionOfElements): Ditto. (WTR::selectTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createEmptyJSString, fixing a storage leak due to missing adoption. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::createJSStringRef): Return a JSRetainPtr. * WebKitTestRunner/StringFunctions.h: (WTR::toWK): Take a const& to eliminate a little bit of reference count churn. (WTR::toJS): Use the adopt function instead of the constructor. Canonical link: https://commits.webkit.org/204612@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-15 16:17:24 +00:00
return adopt(WKStringCopyJSString(string));
}
inline JSRetainPtr<JSStringRef> toJS(const WKRetainPtr<WKStringRef>& string)
{
return toJS(string.get());
}
inline std::string toSTD(WKStringRef string)
{
size_t bufferSize = WKStringGetMaximumUTF8CStringSize(string);
[WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part https://bugs.webkit.org/show_bug.cgi?id=200620 Source/JavaScriptCore: Reviewed by Geoff Garen. * API/JSCallbackObject.h: (JSC::JSCallbackObjectData::setPrivateProperty): * API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject<Parent>::JSCallbackObject): * API/JSClassRef.cpp: (OpaqueJSClassContextData::OpaqueJSClassContextData): (OpaqueJSClass::contextData): * API/JSMarkingConstraintPrivate.cpp: (JSContextGroupAddMarkingConstraint): * API/JSWrapperMap.mm: (-[JSWrapperMap initWithGlobalContextRef:]): * API/ObjCCallbackFunction.mm: (ArgumentTypeDelegate::typeInteger): (ArgumentTypeDelegate::typeDouble): (ArgumentTypeDelegate::typeBool): (ArgumentTypeDelegate::typeId): (ArgumentTypeDelegate::typeOfClass): (ArgumentTypeDelegate::typeStruct): (ResultTypeDelegate::typeInteger): (ResultTypeDelegate::typeDouble): (ResultTypeDelegate::typeBool): (ResultTypeDelegate::typeVoid): (ResultTypeDelegate::typeId): (ResultTypeDelegate::typeOfClass): (ResultTypeDelegate::typeBlock): (ResultTypeDelegate::typeStruct): (objCCallbackFunctionForInvocation): * API/glib/JSCContext.cpp: (jscContextSetVirtualMachine): * API/glib/JSCWrapperMap.cpp: (JSC::WrapperMap::WrapperMap): * assembler/ProbeStack.cpp: (JSC::Probe::Stack::ensurePageFor): * b3/B3LowerToAir.cpp: * b3/B3Procedure.cpp: (JSC::B3::Procedure::Procedure): (JSC::B3::Procedure::dominators): (JSC::B3::Procedure::naturalLoops): (JSC::B3::Procedure::backwardsCFG): (JSC::B3::Procedure::backwardsDominators): (JSC::B3::Procedure::addDataSection): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::cCallSpecial): * b3/air/AirGenerate.cpp: (JSC::B3::Air::prepareForGeneration): * b3/air/testair.cpp: * b3/testb3.h: (compileProc): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/AccessCaseSnippetParams.cpp: * bytecode/BytecodeBasicBlock.cpp: (JSC::BytecodeBasicBlock::computeImpl): * bytecode/CallLinkInfo.cpp: (JSC::CallLinkInfo::setFrameShuffleData): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::ensureJITDataSlow): (JSC::CodeBlock::setCalleeSaveRegisters): (JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow): * bytecode/CodeBlock.h: (JSC::CodeBlock::createRareDataIfNecessary): * bytecode/DFGExitProfile.cpp: (JSC::DFG::ExitProfile::add): * bytecode/DeferredCompilationCallback.cpp: (JSC::DeferredCompilationCallback::ensureDeferredSourceDump): * bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback): * bytecode/GetByIdVariant.cpp: (JSC::GetByIdVariant::operator=): * bytecode/LazyOperandValueProfile.cpp: (JSC::CompressedLazyOperandValueProfileHolder::add): * bytecode/PolyProtoAccessChain.h: (JSC::PolyProtoAccessChain::clone): * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerate): * bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeForStubInfo): * bytecode/PutByIdVariant.cpp: (JSC::PutByIdVariant::operator=): * bytecode/RecordedStatuses.cpp: (JSC::RecordedStatuses::addCallLinkStatus): (JSC::RecordedStatuses::addGetByIdStatus): (JSC::RecordedStatuses::addPutByIdStatus): (JSC::RecordedStatuses::addInByIdStatus): * bytecode/StructureStubClearingWatchpoint.cpp: (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::livenessAnalysisSlow): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedCodeBlock::createRareDataIfNecessary): * bytecode/UnlinkedFunctionExecutable.cpp: (JSC::UnlinkedFunctionExecutable::ensureRareDataSlow): * bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::generate): * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::AbstractInterpreter): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::Graph): (JSC::DFG::Graph::livenessFor): (JSC::DFG::Graph::killsFor): (JSC::DFG::Graph::ensureCPSCFG): (JSC::DFG::Graph::ensureCPSDominators): (JSC::DFG::Graph::ensureSSADominators): (JSC::DFG::Graph::ensureCPSNaturalLoops): (JSC::DFG::Graph::ensureSSANaturalLoops): (JSC::DFG::Graph::ensureBackwardsCFG): (JSC::DFG::Graph::ensureBackwardsDominators): (JSC::DFG::Graph::ensureControlEquivalenceAnalysis): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::JITCompiler): (JSC::DFG::JITCompiler::link): (JSC::DFG::JITCompiler::compile): (JSC::DFG::JITCompiler::compileFunction): (JSC::DFG::JITCompiler::addressOfDoubleConstant): * dfg/DFGLivenessAnalysisPhase.cpp: * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGSSAConversionPhase.cpp: (JSC::DFG::SSAConversionPhase::run): * dfg/DFGSlowPathGenerator.h: (JSC::DFG::slowPathCall): (JSC::DFG::slowPathMove): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::arrayify): (JSC::DFG::SpeculativeJIT::compileGetByValOnString): (JSC::DFG::SpeculativeJIT::compileCreateDirectArguments): (JSC::DFG::SpeculativeJIT::compileArraySlice): (JSC::DFG::SpeculativeJIT::emitStructureCheck): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::createNewThread): * disassembler/Disassembler.cpp: (JSC::disassembleAsynchronously): * ftl/FTLAbstractHeap.cpp: (JSC::FTL::IndexedAbstractHeap::atSlow): * ftl/FTLCompile.cpp: (JSC::FTL::compile): * ftl/FTLFail.cpp: (JSC::FTL::fail): * ftl/FTLLink.cpp: (JSC::FTL::link): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::lazySlowPath): * ftl/FTLState.cpp: (JSC::FTL::State::State): * heap/CompleteSubspace.cpp: (JSC::CompleteSubspace::allocatorForSlow): * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::protectedObjectTypeCounts): (JSC::Heap::objectTypeCounts): (JSC::Heap::addCoreConstraints): * heap/HeapInlines.h: * heap/HeapSnapshotBuilder.cpp: (JSC::HeapSnapshotBuilder::buildSnapshot): * heap/IsoCellSet.cpp: (JSC::IsoCellSet::addSlow): * heap/IsoSubspace.cpp: (JSC::IsoSubspace::IsoSubspace): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * inspector/JSGlobalObjectConsoleClient.cpp: (Inspector::JSGlobalObjectConsoleClient::messageWithTypeAndLevel): (Inspector::JSGlobalObjectConsoleClient::profile): (Inspector::JSGlobalObjectConsoleClient::profileEnd): (Inspector::JSGlobalObjectConsoleClient::warnUnimplemented): * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController): (Inspector::JSGlobalObjectInspectorController::reportAPIException): (Inspector::JSGlobalObjectInspectorController::ensureInspectorAgent): (Inspector::JSGlobalObjectInspectorController::ensureDebuggerAgent): (Inspector::JSGlobalObjectInspectorController::createLazyAgents): * inspector/agents/InspectorAgent.cpp: (Inspector::InspectorAgent::InspectorAgent): * inspector/agents/InspectorConsoleAgent.cpp: (Inspector::InspectorConsoleAgent::InspectorConsoleAgent): (Inspector::InspectorConsoleAgent::startTiming): (Inspector::InspectorConsoleAgent::logTiming): (Inspector::InspectorConsoleAgent::stopTiming): (Inspector::InspectorConsoleAgent::count): (Inspector::InspectorConsoleAgent::countReset): * inspector/agents/InspectorDebuggerAgent.cpp: (Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent): * inspector/agents/InspectorHeapAgent.cpp: (Inspector::InspectorHeapAgent::InspectorHeapAgent): * inspector/agents/InspectorScriptProfilerAgent.cpp: (Inspector::InspectorScriptProfilerAgent::InspectorScriptProfilerAgent): * inspector/agents/InspectorTargetAgent.cpp: (Inspector::InspectorTargetAgent::InspectorTargetAgent): * inspector/agents/JSGlobalObjectDebuggerAgent.cpp: (Inspector::JSGlobalObjectDebuggerAgent::breakpointActionLog): * inspector/agents/JSGlobalObjectRuntimeAgent.cpp: (Inspector::JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent): * inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp: (Inspector::RemoteInspectorSocketEndpoint::createClient): * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * inspector/scripts/codegen/objc_generator_templates.py: * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result: * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result: * inspector/scripts/tests/generic/expected/domain-availability.json-result: * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result: * inspector/scripts/tests/generic/expected/enum-values.json-result: * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result: * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result: * jit/JIT.cpp: (JSC::JIT::compileWithoutLinking): (JSC::JIT::link): * jit/JITThunks.cpp: (JSC::JITThunks::JITThunks): * jit/Repatch.cpp: (JSC::linkPolymorphicCall): * jsc.cpp: (runJSC): * parser/Parser.cpp: (JSC::Parser<LexerType>::Parser): * parser/Parser.h: (JSC::Scope::pushLabel): (JSC::Parser<LexerType>::parse): * parser/ParserArena.h: (JSC::ParserArena::identifierArena): * profiler/ProfilerCompilation.cpp: (JSC::Profiler::Compilation::executionCounterFor): * runtime/Error.cpp: (JSC::getStackTrace): * runtime/FunctionExecutable.cpp: (JSC::FunctionExecutable::ensureRareDataSlow): * runtime/FunctionRareData.h: (JSC::FunctionRareData::createAllocationProfileClearingWatchpoint): * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): (JSC::JSGlobalObject::tryInstallArraySpeciesWatchpoint): * runtime/JSGlobalObject.h: (JSC::JSGlobalObject::createRareDataIfNeeded): * runtime/JSRunLoopTimer.cpp: (JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData): (JSC::JSRunLoopTimer::Manager::registerVM): * runtime/PropertyMapHashTable.h: (JSC::PropertyTable::addDeletedOffset): * runtime/PropertyTable.cpp: (JSC::PropertyTable::PropertyTable): * runtime/RegExp.cpp: (JSC::RegExp::finishCreation): * runtime/RegExp.h: * runtime/ScriptExecutable.cpp: (JSC::ScriptExecutable::ensureTemplateObjectMapImpl): * runtime/Structure.cpp: (JSC::Structure::ensurePropertyReplacementWatchpointSet): * runtime/StructureRareData.cpp: (JSC::StructureRareData::setObjectToStringValue): * runtime/SymbolTable.cpp: (JSC::SymbolTable::localToEntry): (JSC::SymbolTable::cloneScopePart): (JSC::SymbolTable::prepareForTypeProfiling): (JSC::SymbolTable::setRareDataCodeBlock): * runtime/TypeSet.cpp: (JSC::StructureShape::propertyHash): * runtime/VM.cpp: (JSC::VM::VM): (JSC::VM::ensureHeapProfiler): (JSC::VM::enableTypeProfiler): (JSC::VM::enableControlFlowProfiler): (JSC::VM::queueMicrotask): (JSC::VM::ensureShadowChicken): * wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::AirIRGenerator::emitPatchpoint): (JSC::Wasm::AirIRGenerator::emitCheck): (JSC::Wasm::parseAndCompileAir): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::complete): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::work): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::Worklist): * wasm/js/JSToWasm.cpp: (JSC::Wasm::createJSToWasmWrapper): * yarr/YarrInterpreter.cpp: (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): (JSC::Yarr::ByteCompiler::regexBegin): * yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::compile): * yarr/YarrPattern.cpp: (JSC::Yarr::CharacterClassConstructor::charClass): (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor): (JSC::Yarr::YarrPatternConstructor::resetForReparsing): (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin): (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin): (JSC::Yarr::YarrPatternConstructor::copyDisjunction): (JSC::Yarr::anycharCreate): * yarr/YarrPattern.h: (JSC::Yarr::PatternDisjunction::addNewAlternative): * yarr/create_regex_tables: * yarr/generateYarrUnicodePropertyTables.py: Source/WebCore: Reviewed by Geoff Garen. * Modules/applicationmanifest/ApplicationManifestParser.cpp: (WebCore::ApplicationManifestParser::logDeveloperWarning): * Modules/beacon/NavigatorBeacon.cpp: (WebCore::NavigatorBeacon::from): * Modules/cache/DOMWindowCaches.cpp: (WebCore::DOMWindowCaches::from): * Modules/cache/WorkerGlobalScopeCaches.cpp: (WebCore::WorkerGlobalScopeCaches::from): * Modules/credentialmanagement/NavigatorCredentials.cpp: (WebCore::NavigatorCredentials::from): * Modules/encryptedmedia/InitDataRegistry.cpp: (WebCore::InitDataRegistry::extractPsshBoxesFromCenc): * Modules/encryptedmedia/legacy/LegacyCDM.cpp: (WebCore::LegacyCDM::create): * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp: (WebCore::LegacyCDMPrivateClearKey::createSession): * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::loadBlob): * Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::fetch): (WebCore::FetchResponse::BodyLoader::start): * Modules/gamepad/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::from): * Modules/geolocation/GeolocationController.cpp: (WebCore::provideGeolocationTo): * Modules/geolocation/NavigatorGeolocation.cpp: (WebCore::NavigatorGeolocation::from): * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: (WebCore::DOMWindowIndexedDatabase::from): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::index): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::createObjectStore): (WebCore::IDBTransaction::createIndex): * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: (WebCore::WorkerGlobalScopeIndexedDatabase::from): * Modules/indexeddb/client/IDBConnectionToServer.cpp: (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer): * Modules/indexeddb/client/TransactionOperation.cpp: (WebCore::IDBClient::TransactionOperation::TransactionOperation): * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase): (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::ensureQuotaUser): * Modules/indexeddb/server/IndexValueStore.cpp: (WebCore::IDBServer::IndexValueStore::addRecord): * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp: (WebCore::IDBServer::MemoryBackingStoreTransaction::create): (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction): (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged): * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: (WebCore::IDBServer::MemoryIDBBackingStore::create): (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo): * Modules/indexeddb/server/MemoryIndex.cpp: (WebCore::IDBServer::MemoryIndex::putIndexKey): (WebCore::IDBServer::MemoryIndex::maybeOpenCursor): * Modules/indexeddb/server/MemoryObjectStore.cpp: (WebCore::IDBServer::MemoryObjectStore::addRecord): (WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor): * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement): * Modules/indexeddb/server/SQLiteIDBCursor.cpp: (WebCore::IDBServer::SQLiteIDBCursor::maybeCreate): (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor): (WebCore::IDBServer::SQLiteIDBCursor::createSQLiteStatement): (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord): * Modules/indexeddb/server/SQLiteIDBTransaction.cpp: (WebCore::IDBServer::SQLiteIDBTransaction::begin): * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp: (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction): * Modules/indexeddb/shared/IDBRequestData.cpp: (WebCore::IDBRequestData::IDBRequestData): (WebCore::IDBRequestData::isolatedCopy): * Modules/indexeddb/shared/IDBRequestData.h: (WebCore::IDBRequestData::decode): * Modules/indexeddb/shared/IDBResultData.cpp: (WebCore::IDBResultData::IDBResultData): (WebCore::IDBResultData::isolatedCopy): (WebCore::IDBResultData::openDatabaseSuccess): (WebCore::IDBResultData::openDatabaseUpgradeNeeded): (WebCore::IDBResultData::deleteDatabaseSuccess): (WebCore::IDBResultData::putOrAddSuccess): (WebCore::IDBResultData::getRecordSuccess): (WebCore::IDBResultData::getAllRecordsSuccess): (WebCore::IDBResultData::openCursorSuccess): (WebCore::IDBResultData::iterateCursorSuccess): * Modules/indexeddb/shared/IDBResultData.h: (WebCore::IDBResultData::decode): * Modules/indexeddb/shared/IDBTransactionInfo.cpp: (WebCore::IDBTransactionInfo::versionChange): (WebCore::IDBTransactionInfo::IDBTransactionInfo): (WebCore::IDBTransactionInfo::isolatedCopy): * Modules/indexeddb/shared/IDBTransactionInfo.h: (WebCore::IDBTransactionInfo::decode): * Modules/indexeddb/shared/InProcessIDBServer.cpp: (WebCore::InProcessIDBServer::quotaManager): * Modules/mediacapabilities/NavigatorMediaCapabilities.cpp: (WebCore::NavigatorMediaCapabilities::from): * Modules/mediasession/WebMediaSessionManager.cpp: (WebCore::WebMediaSessionManager::mockPicker): (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::buffered const): (WebCore::MediaSource::setLiveSeekableRange): * Modules/mediastream/NavigatorMediaDevices.cpp: (WebCore::NavigatorMediaDevices::from): * Modules/mediastream/UserMediaController.cpp: (WebCore::provideUserMediaTo): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: (WebCore::LibWebRTCDataChannelHandler::channelEvent): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): (WebCore::LibWebRTCMediaEndpoint::collectTransceivers): (WebCore::LibWebRTCMediaEndpoint::newTransceiver): (WebCore::LibWebRTCMediaEndpoint::createTransceiverBackends): (WebCore::LibWebRTCMediaEndpoint::transceiverBackendFromSender): (WebCore::LibWebRTCMediaEndpoint::createDataChannel): * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::createLibWebRTCPeerConnectionBackend): (WebCore::LibWebRTCPeerConnectionBackend::videoReceiver): (WebCore::LibWebRTCPeerConnectionBackend::audioReceiver): (WebCore::LibWebRTCPeerConnectionBackend::addTrack): (WebCore::LibWebRTCPeerConnectionBackend::addTransceiver): * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp: (WebCore::LibWebRTCRtpSenderBackend::createDTMFBackend): * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: (WebCore::LibWebRTCRtpTransceiverBackend::createReceiverBackend): (WebCore::LibWebRTCRtpTransceiverBackend::createSenderBackend): * Modules/notifications/Notification.cpp: (WebCore::Notification::Notification): * Modules/notifications/NotificationController.cpp: (WebCore::provideNotification): * Modules/quota/DOMWindowQuota.cpp: (WebCore::DOMWindowQuota::from): * Modules/quota/NavigatorStorageQuota.cpp: (WebCore::NavigatorStorageQuota::from): * Modules/quota/WorkerNavigatorStorageQuota.cpp: (WebCore::WorkerNavigatorStorageQuota::from): * Modules/speech/DOMWindowSpeechSynthesis.cpp: (WebCore::DOMWindowSpeechSynthesis::from): * Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::ensurePlatformSpeechSynthesizer): * Modules/webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::decodeAsync): * Modules/webaudio/AudioBasicInspectorNode.cpp: (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode): * Modules/webaudio/AudioBasicProcessorNode.cpp: (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode): * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::decodeAudioData): * Modules/webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): * Modules/webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): * Modules/webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::createKernel): (WebCore::BiquadProcessor::getFrequencyResponse): * Modules/webaudio/ChannelMergerNode.cpp: (WebCore::ChannelMergerNode::ChannelMergerNode): * Modules/webaudio/ChannelSplitterNode.cpp: (WebCore::ChannelSplitterNode::ChannelSplitterNode): * Modules/webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::ConvolverNode): (WebCore::ConvolverNode::setBuffer): * Modules/webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): * Modules/webaudio/DelayProcessor.cpp: (WebCore::DelayProcessor::createKernel): * Modules/webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): (WebCore::DynamicsCompressorNode::initialize): * Modules/webaudio/GainNode.cpp: (WebCore::GainNode::GainNode): * Modules/webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::setFormat): * Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): (WebCore::MediaStreamAudioSourceNode::setFormat): * Modules/webaudio/OscillatorNode.cpp: (WebCore::OscillatorNode::OscillatorNode): * Modules/webaudio/PannerNode.cpp: (WebCore::PannerNode::PannerNode): * Modules/webaudio/PeriodicWave.cpp: (WebCore::PeriodicWave::createBandLimitedTables): * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::RealtimeAnalyser): (WebCore::RealtimeAnalyser::setFftSize): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::ScriptProcessorNode): * Modules/webaudio/WaveShaperDSPKernel.cpp: (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling): * Modules/webaudio/WaveShaperNode.cpp: (WebCore::WaveShaperNode::WaveShaperNode): * Modules/webaudio/WaveShaperProcessor.cpp: (WebCore::WaveShaperProcessor::createKernel): * Modules/webauthn/fido/FidoHidMessage.cpp: (fido::FidoHidMessage::FidoHidMessage): * Modules/webauthn/fido/FidoHidPacket.cpp: (fido::FidoHidInitPacket::createFromSerializedData): (fido::FidoHidContinuationPacket::createFromSerializedData): * Modules/webdatabase/Database.cpp: (WebCore::Database::openAndVerifyVersion): (WebCore::Database::close): (WebCore::Database::scheduleTransaction): (WebCore::Database::scheduleTransactionStep): (WebCore::Database::tableNames): * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::DatabaseTracker::recordCreatingDatabase): (WebCore::DatabaseTracker::recordDeletingDatabase): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::executeSql): (WebCore::SQLTransaction::openTransactionAndPreflight): * Modules/webdriver/NavigatorWebDriver.cpp: (WebCore::NavigatorWebDriver::from): * Modules/webgpu/NavigatorGPU.cpp: (WebCore::NavigatorGPU::from): * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h: * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h: * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding): (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding): * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::TypeNamer::createNameNode): * Modules/webgpu/WHLSL/WHLSLChecker.cpp: (WebCore::WHLSL::Checker::assignConcreteType): (WebCore::WHLSL::Checker::assignType): (WebCore::WHLSL::Checker::forwardType): * Modules/webgpu/WHLSL/WHLSLParser.cpp: (WebCore::WHLSL::Parser::parseSemantic): * Modules/webgpu/WorkerNavigatorGPU.cpp: (WebCore::WorkerNavigatorGPU::from): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake): (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpgradeURL): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): * Modules/websockets/WebSocketDeflateFramer.cpp: (WebCore::WebSocketDeflateFramer::createExtensionProcessor): (WebCore::WebSocketDeflateFramer::enableDeflate): (WebCore::WebSocketDeflateFramer::deflate): (WebCore::WebSocketDeflateFramer::inflate): * Modules/websockets/WebSocketDeflater.cpp: (WebCore::WebSocketDeflater::WebSocketDeflater): (WebCore::WebSocketInflater::WebSocketInflater): * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): * Modules/webvr/NavigatorWebVR.cpp: (WebCore::NavigatorWebVR::from): * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates): * animation/WebAnimation.cpp: (WebCore::WebAnimation::updateFinishedState): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::queueTaskToEventLoop): * bindings/js/JSEventTargetCustom.cpp: (WebCore::jsEventTargetCast): * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop): * bindings/js/SerializedScriptValue.cpp: (WebCore::transferArrayBuffers): (WebCore::SerializedScriptValue::create): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::decode): * bindings/js/WebCoreJSClientData.cpp: (WebCore::JSVMClientData::initNormalWorld): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodNamed const): (JSC::Bindings::CClass::fieldNamed const): * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::methodNamed const): (JSC::Bindings::ObjcClass::fieldNamed const): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::CombinedURLFilters::CombinedURLFilters): (WebCore::ContentExtensions::CombinedURLFilters::addPattern): * crypto/SubtleCrypto.cpp: (WebCore::normalizeCryptoAlgorithmParameters): (WebCore::crossThreadCopyImportParams): * css/CSSCalculationValue.cpp: (WebCore::determineCategory): * css/CSSDefaultStyleSheets.cpp: (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle): (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle): * css/CSSFontFace.cpp: (WebCore::CSSFontFace::appendSources): * css/CSSFontFaceSet.cpp: (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered): * css/CSSGroupingRule.cpp: (WebCore::CSSGroupingRule::cssRules const): * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): * css/CSSKeyframesRule.cpp: (WebCore::CSSKeyframesRule::cssRules): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::cssRules): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::from): * css/DOMCSSRegisterCustomProperty.cpp: (WebCore::DOMCSSRegisterCustomProperty::from): * css/DocumentRuleSets.cpp: (WebCore::DocumentRuleSets::DocumentRuleSets): (WebCore::DocumentRuleSets::updateUserAgentMediaQueryStyleIfNeeded const): (WebCore::DocumentRuleSets::initializeUserStyle): (WebCore::makeRuleSet): (WebCore::DocumentRuleSets::resetAuthorStyle): (WebCore::ensureInvalidationRuleSets): * css/ElementRuleCollector.cpp: (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot): * css/FontFace.cpp: (WebCore::populateFontFaceWithArrayBuffer): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM): * css/RuleFeature.cpp: (WebCore::RuleFeatureSet::collectFeatures): (WebCore::RuleFeatureSet::add): * css/RuleSet.cpp: (WebCore::RuleSet::addToRuleSet): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertTo100PercentMinusLength): * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue): (WebCore::StyleBuilderCustom::applyInheritTextShadow): (WebCore::StyleBuilderCustom::applyInheritBoxShadow): (WebCore::StyleBuilderCustom::applyValueContent): * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::ensureCSSStyleDeclaration): (WebCore::MutableStyleProperties::ensureInlineCSSStyleDeclaration): * css/StyleResolver.cpp: (WebCore::StyleResolver::cascadedPropertiesForRollback): * css/makeprop.pl: (generateFillLayerPropertyInheritValueSetter): (generateFillLayerPropertyValueSetter): * css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::CSSParserImpl): (WebCore::CSSParserImpl::parsePageSelector): (WebCore::CSSParserImpl::consumeMediaRule): (WebCore::CSSParserImpl::consumeSupportsRule): (WebCore::CSSParserImpl::consumeKeyframesRule): * css/parser/CSSParserSelector.cpp: (WebCore::CSSParserSelector::parsePagePseudoSelector): (WebCore::CSSParserSelector::parsePseudoElementSelector): (WebCore::CSSParserSelector::parsePseudoClassSelector): (WebCore::CSSParserSelector::CSSParserSelector): (WebCore::CSSParserSelector::adoptSelectorVector): (WebCore::CSSParserSelector::prependTagSelector): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBasicShapePath): * css/parser/CSSSelectorParser.cpp: (WebCore::CSSSelectorParser::consumePseudo): * dom/CustomElementReactionQueue.cpp: (WebCore::CustomElementReactionQueue::ensureBackupQueue): * dom/DataTransfer.cpp: (WebCore::DataTransfer::items): (WebCore::DataTransfer::createForInputEvent): (WebCore::DataTransfer::createForDragStartEvent): (WebCore::DataTransfer::setDragImage): * dom/DeviceOrientationController.cpp: (WebCore::provideDeviceOrientationTo): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::buildAccessKeyCache): (WebCore::Document::implementation): (WebCore::Document::formController): (WebCore::Document::updateTextRenderer): (WebCore::Document::userAgentShadowTreeStyleResolver): (WebCore::Document::axObjectCache const): (WebCore::Document::setParsing): (WebCore::Document::accessSVGExtensions): (WebCore::Document::initSecurityContext): (WebCore::Document::textAutoSizing): (WebCore::Document::didAddWheelEventHandler): (WebCore::Document::didAddTouchEventHandler): (WebCore::Document::didLogMessage): (WebCore::Document::registerCSSProperty): (WebCore::Document::deviceOrientationAndMotionAccessController): (WebCore::Document::contentChangeObserver): (WebCore::Document::domTimerHoldingTank): * dom/Document.h: (WebCore::Document::createParserYieldToken): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): * dom/DocumentStorageAccess.cpp: (WebCore::DocumentStorageAccess::from): (WebCore::DocumentStorageAccess::requestStorageAccess): (WebCore::DocumentStorageAccess::enableTemporaryTimeUserGesture): * dom/Element.cpp: (WebCore::Element::attributes const): (WebCore::Element::setIsDefinedCustomElement): (WebCore::Element::enqueueToUpgrade): (WebCore::Element::classList): (WebCore::Element::dataset): (WebCore::Element::ensureIntersectionObserverData): (WebCore::Element::ensureResizeObserverData): * dom/EventListenerMap.cpp: (WebCore::EventListenerMap::add): * dom/EventNames.h: * dom/EventPath.cpp: (WebCore::EventPath::buildPath): (WebCore::EventPath::EventPath): * dom/IdTargetObserverRegistry.cpp: (WebCore::IdTargetObserverRegistry::addObserver): * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::KeyboardEvent): * dom/MutationObserver.cpp: (WebCore::queueMutationObserverCompoundMicrotask): * dom/MutationObserverInterestGroup.cpp: (WebCore::MutationObserverInterestGroup::createIfNeeded): * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): * dom/Node.cpp: (WebCore::Node::materializeRareData): (WebCore::Node::ensureEventTargetData): (WebCore::Node::registerMutationObserver): * dom/NodeRareData.h: (WebCore::NodeRareData::ensureNodeLists): (WebCore::NodeRareData::ensureMutationObserverData): * dom/RadioButtonGroups.cpp: (WebCore::RadioButtonGroups::addButton): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::reportException): (WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection): (WebCore::ScriptExecutionContext::ensureRejectedPromiseTrackerSlow): * dom/SelectorQuery.cpp: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): (WebCore::ShadowRoot::moveShadowRootToNewDocument): (WebCore::ShadowRoot::addSlotElementByName): * dom/SlotAssignment.cpp: (WebCore::SlotAssignment::addSlotElementByName): (WebCore::SlotAssignment::assignToSlot): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::addElementById): (WebCore::TreeScope::addElementByName): (WebCore::TreeScope::addImageMap): (WebCore::TreeScope::addImageElementByUsemap): (WebCore::TreeScope::labelElementForId): * editing/Editor.cpp: (WebCore::createDataTransferForClipboardEvent): (WebCore::Editor::Editor): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::ensureReplacementFragment): * editing/SelectionRectGatherer.cpp: (WebCore::SelectionRectGatherer::clearAndCreateNotifier): * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): * editing/cocoa/HTMLConverter.mm: (HTMLConverter::HTMLConverter): (HTMLConverterCaches::computedStylePropertyForElement): * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): * fileapi/AsyncFileStream.cpp: (WebCore::callOnFileThread): (WebCore::AsyncFileStream::AsyncFileStream): * fileapi/FileReader.cpp: (WebCore::FileReader::readInternal): * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): * history/PageCache.cpp: (WebCore::PageCache::addIfCacheable): * html/FileInputType.cpp: (WebCore::FileInputType::requestIcon): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): * html/FormController.cpp: (WebCore::SavedFormState::deserialize): (WebCore::FormController::createSavedFormStateMap): (WebCore::FormController::takeStateForFormElement): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::relList const): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::mapMouseEvent): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::setImageBuffer const): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::updateNamedElementCache const): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::create): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::updateVisibleValidationMessage): * html/HTMLFormControlsCollection.cpp: (WebCore::HTMLFormControlsCollection::updateNamedElementCache const): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::addToPastNamesMap): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::sandbox): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::ensureImageLoader): (WebCore::HTMLInputElement::resetListAttributeTargetObserver): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::sizes): (WebCore::HTMLLinkElement::relList): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::finishInitialization): (WebCore::HTMLMediaElement::seekWithTolerance): * html/HTMLOutputElement.cpp: (WebCore::HTMLOutputElement::htmlFor): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::didAttachRenderers): (WebCore::HTMLVideoElement::parseAttribute): * html/PublicURLManager.cpp: (WebCore::PublicURLManager::create): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessage): (WebCore::ValidationMessage::setMessageDOMAndStartTimer): (WebCore::ValidationMessage::requestToHideMessage): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::DisplayListDrawingContext::DisplayListDrawingContext): (WebCore::CanvasRenderingContext2DBase::drawingContext const): * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getExtension): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::initializeNewContext): (WebCore::WebGLRenderingContextBase::compileShader): (WebCore::WebGLRenderingContextBase::printToConsole): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::emitRule): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::insert): * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::insertAbove): (WebCore::HTMLElementStack::pushCommon): * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): * html/parser/HTMLToken.h: (WebCore::HTMLToken::beginDOCTYPE): * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::filterToken): (WebCore::XSSAuditor::decodedHTTPBodySuffixTree): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerTextElement::resolveCustomStyle): * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::parser): * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::parser): * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::loadTimerFired): * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::CommandLineAPIHost): (WebCore::CommandLineAPIHost::clearAllWrappers): * inspector/DOMEditor.cpp: (WebCore::DOMEditor::insertBefore): (WebCore::DOMEditor::removeChild): (WebCore::DOMEditor::setAttribute): (WebCore::DOMEditor::removeAttribute): (WebCore::DOMEditor::setOuterHTML): (WebCore::DOMEditor::insertAdjacentHTML): (WebCore::DOMEditor::replaceWholeText): (WebCore::DOMEditor::replaceChild): (WebCore::DOMEditor::setNodeValue): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::createLazyAgents): (WebCore::InspectorController::ensureInspectorAgent): (WebCore::InspectorController::ensureDOMAgent): (WebCore::InspectorController::ensurePageAgent): * inspector/InspectorHistory.cpp: (WebCore::InspectorHistory::markUndoableState): * inspector/InspectorStyleSheet.cpp: (ParsedStyleSheet::setSourceData): (WebCore::InspectorStyleSheet::ensureSourceData): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::resourceCreated): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): (WebCore::WorkerInspectorController::createLazyAgents): * inspector/agents/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): * inspector/agents/InspectorCPUProfilerAgent.cpp: (WebCore::InspectorCPUProfilerAgent::InspectorCPUProfilerAgent): * inspector/agents/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setStyleText): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): * inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): (WebCore::InspectorCanvasAgent::recordCanvasAction): * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMAgent::pushNodePathToFrontend): (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightQuad): (WebCore::InspectorDOMAgent::innerHighlightQuad): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::setInspectedNode): (WebCore::InspectorDOMAgent::didInvalidateStyleAttr): * inspector/agents/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): * inspector/agents/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent): * inspector/agents/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent): * inspector/agents/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::InspectorNetworkAgent): * inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): * inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::internalStart): (WebCore::InspectorTimelineAgent::startFromConsole): (WebCore::InspectorTimelineAgent::stopFromConsole): * inspector/agents/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::didReceiveResponse): (WebCore::WebConsoleAgent::didFailLoading): * inspector/agents/WebHeapAgent.cpp: (WebCore::WebHeapAgent::WebHeapAgent): * inspector/agents/page/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::PageRuntimeAgent): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::breakpointActionLog): * layout/LayoutState.cpp: (WebCore::Layout::LayoutState::displayBoxForLayoutBox const): (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded): (WebCore::Layout::LayoutState::createFormattingContext): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::collectInlineContent const): * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const): * layout/inlineformatting/InlineLine.cpp: (WebCore::Layout::Line::Line): (WebCore::Layout::Line::appendNonBreakableSpace): (WebCore::Layout::Line::appendTextContent): (WebCore::Layout::Line::appendNonReplacedInlineBox): (WebCore::Layout::Line::appendHardLineBreak): * layout/inlineformatting/InlineTextItem.cpp: (WebCore::Layout::InlineTextItem::createAndAppendTextItems): (WebCore::Layout::InlineTextItem::split const): * layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::Box): (WebCore::Layout::Box::ensureRareData): * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutBox): (WebCore::Layout::TreeBuilder::createTableStructure): (WebCore::Layout::printLayoutTreeForLiveDocuments): * layout/tableformatting/TableGrid.cpp: (WebCore::Layout::TableGrid::appendCell): * loader/ContentFilter.cpp: (WebCore::ContentFilter::create): * loader/CrossOriginAccessControl.cpp: (WebCore::validatePreflightResponse): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::loadApplicationManifest): (WebCore::DocumentLoader::addAllArchiveResources): (WebCore::DocumentLoader::addArchiveResource): (WebCore::DocumentLoader::loadMainResource): (WebCore::DocumentLoader::didGetLoadDecisionForIcon): * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::init): (WebCore::FrameLoader::initForSynthesizedDocument): (WebCore::FrameLoader::detachChildren): * loader/LinkLoader.cpp: (WebCore::createLinkPreloadResourceClient): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::scheduleRedirect): (WebCore::NavigationScheduler::scheduleLocationChange): (WebCore::NavigationScheduler::scheduleFormSubmission): (WebCore::NavigationScheduler::scheduleRefresh): (WebCore::NavigationScheduler::scheduleHistoryNavigation): (WebCore::NavigationScheduler::schedulePageBlock): * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::incrementProgress): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::checkForHeadCharset): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::setBodyDataFrom): (WebCore::CachedImage::createImage): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::redirectReceived): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::addClientToSet): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::preload): (WebCore::CachedResourceLoader::clearPreloads): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::ensureSessionResourceMap): (WebCore::MemoryCache::addImageToCache): (WebCore::MemoryCache::lruListFor): * loader/ios/PreviewLoader.mm: (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]): (-[WebPreviewLoader connection:didFailWithError:]): (WebCore::PreviewLoader::create): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::maybeCreateContextMenu): * page/DebugPageOverlays.cpp: (WebCore::MouseWheelRegionOverlay::updateRegion): * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): * page/FrameView.cpp: (WebCore::FrameView::addEmbeddedObjectToUpdate): (WebCore::FrameView::addSlowRepaintObject): (WebCore::FrameView::addViewportConstrainedObject): (WebCore::FrameView::addScrollableArea): * page/FrameViewLayoutContext.cpp: (WebCore::FrameViewLayoutContext::pushLayoutState): (WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded): * page/NavigatorBase.cpp: (WebCore::NavigatorBase::serviceWorker): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::initGroup): (WebCore::Page::setResourceUsageOverlayVisible): * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::addMessage): (WebCore::PageConsoleClient::messageWithTypeAndLevel): (WebCore::PageConsoleClient::screenshot): * page/PageGroup.cpp: (WebCore::PageGroup::captionPreferences): * page/Performance.cpp: (WebCore::Performance::mark): (WebCore::Performance::clearMarks): (WebCore::Performance::measure): (WebCore::Performance::clearMeasures): * page/PrintContext.cpp: (WebCore::PrintContext::outputLinkedDestinations): * page/RenderingUpdateScheduler.cpp: (WebCore::RenderingUpdateScheduler::startTimer): * page/RenderingUpdateScheduler.h: (WebCore::RenderingUpdateScheduler::create): * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): * page/SettingsBase.cpp: (WebCore::SettingsBase::SettingsBase): * page/UserContentController.cpp: (WebCore::UserContentController::addUserScript): (WebCore::UserContentController::addUserStyleSheet): * page/WheelEventDeltaFilter.cpp: (WebCore::WheelEventDeltaFilter::create): * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationController::CSSAnimationController): * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::updateSourceSelf): * page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::create): (WebCore::ContentSecurityPolicyDirectiveList::setCSPDirective): * page/linux/ResourceUsageOverlayLinux.cpp: (WebCore::ResourceUsageOverlay::platformInitialize): * page/mac/PageMac.mm: (WebCore::Page::addSchedulePair): * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator): * page/scrolling/ScrollingMomentumCalculator.cpp: (WebCore::ScrollingMomentumCalculator::create): * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::appendChild): (WebCore::ScrollingStateNode::insertChild): * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::commit): * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::appendChild): * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm: (WebCore::ScrollingMomentumCalculator::create): * platform/Length.cpp: (WebCore::convertTo100PercentMinusLength): (WebCore::blendMixedTypes): * platform/RemoteCommandListener.cpp: (WebCore::RemoteCommandListener::create): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::create): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollAnimator const): (WebCore::ScrollableArea::ensureSnapOffsetsInfo): * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): * platform/audio/AudioBus.cpp: (WebCore::AudioBus::AudioBus): (WebCore::AudioBus::copyWithGainFrom): * platform/audio/AudioChannel.h: * platform/audio/AudioResampler.cpp: (WebCore::AudioResampler::AudioResampler): (WebCore::AudioResampler::configureChannels): * platform/audio/DynamicsCompressor.cpp: (WebCore::DynamicsCompressor::setNumberOfChannels): * platform/audio/DynamicsCompressorKernel.cpp: (WebCore::DynamicsCompressorKernel::setNumberOfChannels): * platform/audio/FFTFrame.cpp: (WebCore::FFTFrame::createInterpolatedFrame): * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::load): * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::createForSubject): (WebCore::HRTFElevation::createByInterpolatingSlices): * platform/audio/HRTFKernel.cpp: (WebCore::HRTFKernel::HRTFKernel): (WebCore::HRTFKernel::createImpulseResponse): * platform/audio/MultiChannelResampler.cpp: (WebCore::MultiChannelResampler::MultiChannelResampler): * platform/audio/Panner.cpp: (WebCore::Panner::create): * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::create): * platform/audio/Reverb.cpp: (WebCore::Reverb::initialize): * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::ReverbConvolver): * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::ReverbConvolverStage): * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (WebCore::AudioDestination::create): * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestination::create): * platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::AudioSession): * platform/audio/mac/AudioDestinationMac.cpp: (WebCore::AudioDestination::create): * platform/audio/mac/AudioSampleDataSource.mm: (WebCore::AudioSampleDataSource::setInputFormat): (WebCore::AudioSampleDataSource::setOutputFormat): * platform/audio/mac/AudioSessionMac.cpp: (WebCore::AudioSession::AudioSession): * platform/cf/KeyedDecoderCF.cpp: (WebCore::KeyedDecoder::decoder): * platform/cf/KeyedEncoderCF.cpp: (WebCore::KeyedEncoder::encoder): * platform/cf/MainThreadSharedTimerCF.cpp: (WebCore::setupPowerObserver): * platform/cocoa/NetworkExtensionContentFilter.mm: (WebCore::NetworkExtensionContentFilter::create): * platform/cocoa/ParentalControlsContentFilter.mm: (WebCore::ParentalControlsContentFilter::create): * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::updateScrollSnapPoints): * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::CDMFactoryClearKey::createCDM): * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: (WebCore::GameControllerGamepadProvider::controllerDidConnect): * platform/gamepad/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::deviceAdded): * platform/generic/KeyedDecoderGeneric.cpp: (WebCore::KeyedDecoderGeneric::Dictionary::add): (WebCore::KeyedDecoder::decoder): (WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric): * platform/generic/KeyedEncoderGeneric.cpp: (WebCore::KeyedEncoder::encoder): * platform/generic/ScrollAnimatorGeneric.cpp: (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric): (WebCore::ScrollAnimatorGeneric::ensureSmoothScrollingAnimation): * platform/glib/KeyedDecoderGlib.cpp: (WebCore::KeyedDecoder::decoder): * platform/glib/KeyedEncoderGlib.cpp: (WebCore::KeyedEncoder::encoder): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startTimer): (WebCore::BitmapImage::decode): * platform/graphics/ComplexTextController.cpp: (WebCore::TextLayout::TextLayout): * platform/graphics/Font.cpp: (WebCore::Font::ensureDerivedFontData const): * platform/graphics/Font.h: (WebCore::Font::boundsForGlyph const): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getCachedFontPlatformData): * platform/graphics/FontCascade.cpp: (WebCore::retrieveOrAddCachedFonts): (WebCore::FontCascade::displayListForTextRun const): * platform/graphics/FontCascadeFonts.cpp: (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setGlyphDataForCharacter): * platform/graphics/GlyphMetricsMap.h: (WebCore::GlyphMetricsMap<T>::locatePageSlowCase): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::setTransform): (WebCore::GraphicsLayer::setChildrenTransform): * platform/graphics/GraphicsLayer.h: * platform/graphics/Image.cpp: (WebCore::Image::startAnimationAsynchronously): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::MediaPlayer): (WebCore::MediaPlayer::loadWithNextMediaEngine): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekable const): * platform/graphics/PathUtilities.cpp: (WebCore::FloatPointGraph::findOrCreateNode): * platform/graphics/Region.cpp: (WebCore::Region::setShape): * platform/graphics/Region.h: (WebCore::Region::copyShape const): (WebCore::Region::decode): * platform/graphics/TextTrackRepresentation.cpp: (WebCore::TextTrackRepresentation::create): * platform/graphics/angle/GraphicsContext3DANGLE.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::prepare): * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: (WebCore::CDMFactoryFairPlayStreaming::createCDM): * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::buffered const): * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp: (WebCore::WebMediaSessionManagerMac::platformPicker): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges const): (WebCore::MediaPlayerPrivateAVFoundationCF::createSession): (WebCore::AVFWrapper::notificationCallback): (WebCore::AVFWrapper::legibleOutputCallback): (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource): (WebCore::AVFWrapper::platformLayer): * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): (WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): (WebCore::AudioTrackPrivateAVFObjC::setAssetTrack): (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC): (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack): * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::readTrackMetadata): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRotationSession): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateAVFoundationObjC::createSession): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastImage): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage): * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): (WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack): (WebCore::VideoTrackPrivateAVFObjC::setAssetTrack): (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm: (WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC): (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): (WebCore::GraphicsLayerCA::ensureLayerAnimations): (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): * platform/graphics/ca/TileController.cpp: (WebCore::TileController::TileController): (WebCore::TileController::setContentsScale): (WebCore::TileController::adjustTileCoverageRectForScrolling): (WebCore::TileController::tiledScrollingIndicatorLayer): * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::commonInit): (WebCore::PlatformCALayerCocoa::setShapeRoundedRect): * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: (-[WebTiledBackingLayer createTileController:]): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::PlatformCALayerWin): * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: (WebTiledBackingLayerWin::createTileController): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::createFactory): (WebCore::m_private): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBufferData::swapBuffersIfNeeded): (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: (WebCore::FontFamilySpecificationCoreText::fontRanges const): * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::ensureGraphicsContext): * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: (TextTrackRepresentation::create): * platform/graphics/cv/TextureCacheCV.mm: (WebCore::TextureCacheCV::create): * platform/graphics/displaylists/DisplayListReplayer.cpp: (WebCore::DisplayList::Replayer::replay): * platform/graphics/filters/FilterOperation.cpp: (WebCore::ReferenceFilterOperation::loadExternalDocumentIfNeeded): * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/gpu/Texture.cpp: (WebCore::Texture::create): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): (WebCore::MediaPlayerPrivateGStreamer::buffered const): (WebCore::MediaPlayerPrivateGStreamer::ensureAudioSourceProvider): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor): (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime): (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcMakeRequest): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine): (WebCore::MediaPlayerPrivateGStreamerMSE::buffered const): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp: (WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: * platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp: (WebCore::ISOProtectionSchemeInfoBox::parse): * platform/graphics/iso/ISOSchemeInformationBox.cpp: (WebCore::ISOSchemeInformationBox::parse): * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/nicosia/NicosiaSceneIntegration.cpp: (Nicosia::SceneIntegration::createUpdateScope): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::createCommand): * platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp: (Nicosia::PaintingContextCairo::ForPainting::ForPainting): (Nicosia::PaintingContextCairo::ForRecording::ForRecording): * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp: (Nicosia::BackingStoreTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp: (Nicosia::CompositionLayerTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp: (Nicosia::ContentLayerTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: (Nicosia::GC3DLayer::swapBuffersIfNeeded): * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.cpp: (Nicosia::ImageBackingTextureMapperImpl::createFactory): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::mappedSymbolName): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: (WebCore::TextureMapperGC3DPlatformLayer::swapBuffersIfNeeded): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): (WebCore::TextureMapper::platformCreateAccelerated): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::clone): * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: (WebCore::TiledBackingStore::createTiles): * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): (WebCore::TransformState::applyTransform): (WebCore::TransformState::setLastPlanarSecondaryQuad): * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::setSecondaryQuad): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/win/FontCustomPlatformDataCairo.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/win/FullScreenController.cpp: (WebCore::FullScreenController::FullScreenController): (WebCore::FullScreenController::enterFullScreen): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::platformInit): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): * platform/graphics/win/GraphicsContextImplDirect2D.cpp: (WebCore::GraphicsContextImplDirect2D::createFactory): (WebCore::m_private): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::createWindowsBitmap): * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaFoundation::buffered const): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CustomVideoPresenter): * platform/graphics/win/WKCAImageQueue.cpp: (WebCore::WKCAImageQueue::WKCAImageQueue): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForGlobalSelection): (WebCore::Pasteboard::createForDragAndDrop): * platform/gtk/PasteboardHelper.cpp: (WebCore::PasteboardHelper::writeClipboardContents): * platform/gtk/RenderThemeGadget.cpp: (WebCore::RenderThemeGadget::create): * platform/gtk/RenderThemeWidget.cpp: (WebCore::RenderThemeWidget::getOrCreate): (WebCore::RenderThemeScrollbar::RenderThemeScrollbar): (WebCore::RenderThemeComboBox::RenderThemeComboBox): * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::decodeHelper): * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::decode): * platform/image-decoders/gif/GIFImageReader.cpp: (GIFFrameContext::decode): (GIFImageReader::addFrameIfNecessary): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::decodeAtIndex): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::decode): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::decode): * platform/ios/LegacyTileCache.mm: (WebCore::LegacyTileCache::LegacyTileCache): (WebCore::LegacyTileCache::commitScaleChange): * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::createForCopyAndPaste): * platform/ios/QuickLook.mm: (WebCore::registerQLPreviewConverterIfNeeded): * platform/ios/RemoteCommandListenerIOS.mm: (WebCore::RemoteCommandListener::create): * platform/ios/ScrollAnimatorIOS.mm: (WebCore::ScrollAnimator::create): * platform/libwpe/PasteboardLibWPE.cpp: (WebCore::Pasteboard::createForCopyAndPaste): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): * platform/mac/RemoteCommandListenerMac.mm: (WebCore::RemoteCommandListener::create): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimator::create): * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: (WebCore::MediaRecorderPrivateAVFImpl::create): * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp: (WebCore::m_capturer): (WebCore::GStreamerAudioCaptureSource::GStreamerAudioCaptureSource): * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: (WebCore::webkit_media_stream_src_init): * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp: (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource): (WebCore::m_capturer): * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: (WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::BasicPacketSocketFactory::BasicPacketSocketFactory): (WebCore::initializePeerConnectionFactoryAndThreads): (WebCore::LibWebRTCProvider::createPeerConnection): (WebCore::LibWebRTCProvider::certificateGenerator): * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp: (WebCore::LibWebRTCProviderGStreamer::createDecoderFactory): (WebCore::LibWebRTCProviderGStreamer::createEncoderFactory): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable): * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm: (WebCore::MockRealtimeAudioSourceMac::reconfigure): * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm: (WebCore::RealtimeOutgoingVideoSourceCocoa::convertToYUV): (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer): * platform/mock/RTCNotifiersMock.cpp: (WebCore::RemoteDataChannelNotifier::fire): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::registerMediaEngine): (WebCore::MockMediaPlayerMediaSource::buffered const): * platform/network/BlobResourceHandle.cpp: * platform/network/DataURLDecoder.cpp: (WebCore::DataURLDecoder::createDecodeTask): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): * platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSessionDataTask _restart]): * platform/network/curl/CookieJarDB.cpp: (WebCore::CookieJarDB::searchCookies): (WebCore::CookieJarDB::createPrepareStatement): * platform/network/curl/CurlCacheManager.cpp: (WebCore::CurlCacheManager::loadIndex): (WebCore::CurlCacheManager::didReceiveResponse): * platform/network/curl/CurlContext.cpp: (WebCore::CurlContext::CurlContext): (WebCore::CurlHandle::willSetupSslCtx): * platform/network/curl/CurlFormDataStream.cpp: (WebCore::CurlFormDataStream::getPostData): * platform/network/curl/CurlMultipartHandle.cpp: (WebCore::CurlMultipartHandle::createIfNeeded): * platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::runOnMainThread): (WebCore::CurlRequest::setupTransfer): * platform/network/curl/CurlRequestScheduler.cpp: (WebCore::CurlRequestScheduler::workerThread): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::delegate): * platform/network/curl/SocketStreamHandleImplCurl.cpp: (WebCore::SocketStreamHandleImpl::callOnWorkerThread): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]): * platform/network/soup/DNSResolveQueueSoup.cpp: (WebCore::DNSResolveQueueSoup::resolve): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage): * platform/text/BidiResolver.h: (WebCore::DerivedClass>::appendRunInternal): * platform/text/LocaleICU.cpp: (WebCore::Locale::create): (WebCore::LocaleICU::createLabelVector): (WebCore::createFallbackMonthLabels): (WebCore::createFallbackAMPMLabels): * platform/text/LocaleNone.cpp: (WebCore::Locale::create): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerCodecs): * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::registerCodecs): * platform/text/TextCodecReplacement.cpp: (WebCore::TextCodecReplacement::registerCodecs): * platform/text/TextCodecUTF16.cpp: (WebCore::TextCodecUTF16::registerCodecs): * platform/text/TextCodecUTF8.cpp: (WebCore::TextCodecUTF8::registerCodecs): * platform/text/TextCodecUserDefined.cpp: (WebCore::TextCodecUserDefined::registerCodecs): * platform/text/mac/LocaleMac.mm: (WebCore::Locale::create): * platform/text/win/LocaleWin.cpp: (WebCore::Locale::create): * platform/text/win/TextCodecWin.cpp: (WebCore::newTextCodecWin): * platform/vr/openvr/VRPlatformManagerOpenVR.cpp: (WebCore::VRPlatformManagerOpenVR::create): (WebCore::VRPlatformManagerOpenVR::getVRDisplays): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): * platform/win/SearchPopupMenuDB.cpp: (WebCore::SearchPopupMenuDB::createPreparedStatement): * platform/win/WCDataObject.cpp: (WebCore::WCDataObject::SetData): * rendering/CSSFilter.cpp: (WebCore::CSSFilter::buildReferenceFilter): * rendering/ComplexLineLayout.cpp: (WebCore::createRun): (WebCore::ComplexLineLayout::createRootInlineBox): (WebCore::ComplexLineLayout::handleTrailingSpaces): (WebCore::ComplexLineLayout::linkToEndLineIfNeeded): * rendering/FloatingObjects.cpp: (WebCore::FloatingObject::create): (WebCore::FloatingObject::copyToNewContainer const): (WebCore::FloatingObject::cloneForNewParent const): (WebCore::FloatingObjects::computePlacedFloatsTree): * rendering/Grid.cpp: (WebCore::GridIterator::nextEmptyGridArea): * rendering/GridBaselineAlignment.cpp: (WebCore::GridBaselineAlignment::updateBaselineAlignmentContext): * rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::computeFlexFactorUnitSize const): (WebCore::GridTrackSizingAlgorithm::setup): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): (WebCore::HitTestResult::listBasedTestResult const): (WebCore::HitTestResult::mutableListBasedTestResult): * rendering/InlineIterator.h: (WebCore::addPlaceholderRunForIsolatedInline): * rendering/LayerOverlapMap.cpp: (WebCore::LayerOverlapMap::pushCompositingContainer): * rendering/RenderBlock.cpp: (WebCore::insertIntoTrackedRendererMaps): (WebCore::PositionedDescendantsMap::addDescendant): (WebCore::RenderBlock::beginUpdateScrollInfoAfterLayoutTransaction): (WebCore::ensureBlockRareData): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutInlineChildren): (WebCore::RenderBlockFlow::layoutLineGridBox): (WebCore::RenderBlockFlow::createFloatingObjects): (WebCore::RenderBlockFlow::ensureLineBoxes): (WebCore::RenderBlockFlow::materializeRareBlockFlowData): * rendering/RenderBox.cpp: (WebCore::controlStatesForRenderer): (WebCore::RenderBox::createInlineBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::ensureContinuationChainNode): * rendering/RenderCounter.cpp: (WebCore::makeCounterNode): * rendering/RenderFragmentContainer.cpp: (WebCore::RenderFragmentContainer::setRenderBoxFragmentInfo): * rendering/RenderFragmentedFlow.cpp: (WebCore::RenderFragmentedFlow::containingFragmentMap): * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::push): (WebCore::RenderGeometryMap::pushView): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const): (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const): * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): * rendering/RenderInline.cpp: (WebCore::RenderInline::createInlineFlowBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateNormalFlowList): (WebCore::RenderLayer::collectLayers): (WebCore::RenderLayer::updateTransform): (WebCore::RenderLayer::updateClipRects): (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateAncestorClippingStack): (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers): * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::createLayer): * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::createInlineBox): * rendering/RenderMultiColumnFlow.cpp: (WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow): * rendering/RenderObject.cpp: (WebCore::RenderObject::ensureRareData): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderText.cpp: (WebCore::RenderText::createTextBox): (WebCore::RenderText::momentarilyRevealLastTypedCharacter): * rendering/RenderView.cpp: (WebCore::RenderView::repaintViewRectangle const): (WebCore::RenderView::compositor): (WebCore::RenderView::imageQualityController): (WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::appendFloat): * rendering/SelectionRangeData.cpp: (WebCore::collect): (WebCore::SelectionRangeData::collectBounds const): (WebCore::SelectionRangeData::apply): * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::Layout::runResolver const): * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::paintFlow): (WebCore::SimpleLineLayout::generateLineBoxTree): * rendering/TextAutoSizing.cpp: (WebCore::TextAutoSizing::addTextNode): * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::skipLeadingWhitespace): * rendering/shapes/RasterShape.cpp: (WebCore::RasterShapeIntervals::computeShapeMarginIntervals const): * rendering/shapes/Shape.cpp: (WebCore::createInsetShape): (WebCore::createCircleShape): (WebCore::createEllipseShape): (WebCore::createPolygonShape): (WebCore::Shape::createShape): (WebCore::Shape::createRasterShape): (WebCore::Shape::createBoxShape): * rendering/shapes/ShapeOutsideInfo.h: * rendering/style/BasicShapes.cpp: (WebCore::BasicShapePath::blend const): * rendering/style/ContentData.h: * rendering/style/FillLayer.cpp: (WebCore::FillLayer::FillLayer): (WebCore::FillLayer::operator=): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::clonePtr): (WebCore::RenderStyle::addCachedPseudoStyle): (WebCore::RenderStyle::addCustomPaintWatchProperty): (WebCore::RenderStyle::setContent): (WebCore::RenderStyle::accessCounterDirectives): (WebCore::RenderStyle::ensureAnimations): (WebCore::RenderStyle::ensureTransitions): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleShadowSVGData::StyleShadowSVGData): * rendering/style/ShadowData.cpp: (WebCore::ShadowData::ShadowData): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::RenderSVGImage): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineFlowBox): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives const): (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::updateShapeFromElement): * rendering/svg/SVGResources.cpp: (WebCore::SVGResources::setClipper): (WebCore::SVGResources::setFilter): (WebCore::SVGResources::setMarkerStart): (WebCore::SVGResources::setMarkerMid): (WebCore::SVGResources::setMarkerEnd): (WebCore::SVGResources::setMasker): (WebCore::SVGResources::setFill): (WebCore::SVGResources::setStroke): * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::addResourcesFromRenderer): * rendering/svg/SVGTextMetricsBuilder.cpp: (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): * rendering/updating/RenderTreeBuilder.cpp: (WebCore::RenderTreeBuilder::RenderTreeBuilder): * rendering/updating/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::RenderTreeUpdater): * style/StyleInvalidator.cpp: (WebCore::Style::Invalidator::Invalidator): * style/StyleRelations.cpp: (WebCore::Style::commitRelationsToRenderStyle): * style/StyleScope.cpp: (WebCore::Style::Scope::resolver): (WebCore::Style::Scope::activeStyleSheetsContains const): * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolve): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::SVGDocumentExtensions): (WebCore::SVGDocumentExtensions::addPendingResource): (WebCore::SVGDocumentExtensions::addElementReferencingTarget): * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::ensureSVGRareData): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::supplementalTransform): * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::copy const): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::schedule): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): * svg/properties/SVGAnimatedDecoratedProperty.h: (WebCore::SVGAnimatedDecoratedProperty::create): * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: * svg/properties/SVGDecoratedEnumeration.h: (WebCore::SVGDecoratedEnumeration::create): * svg/properties/SVGPrimitivePropertyAnimator.h: (WebCore::SVGPrimitivePropertyAnimator::create): * svg/properties/SVGValuePropertyAnimatorImpl.h: * svg/properties/SVGValuePropertyListAnimatorImpl.h: * testing/InternalSettings.cpp: (WebCore::InternalSettings::from): * testing/Internals.cpp: (WebCore::InspectorStubFrontend::InspectorStubFrontend): (WebCore::Internals::Internals): (WebCore::Internals::enableMockSpeechSynthesizer): (WebCore::Internals::openDummyInspectorFrontend): (WebCore::Internals::setPrinting): (WebCore::Internals::initializeMockCDM): (WebCore::Internals::queueMicroTask): * testing/LegacyMockCDM.cpp: (WebCore::LegacyMockCDM::createSession): * testing/MockCDMFactory.cpp: (WebCore::MockCDMFactory::createCDM): * testing/MockContentFilter.cpp: (WebCore::MockContentFilter::create): * testing/MockGamepadProvider.cpp: (WebCore::MockGamepadProvider::setMockGamepadDetails): * workers/WorkerConsoleClient.cpp: (WebCore::WorkerConsoleClient::messageWithTypeAndLevel): * workers/WorkerEventQueue.cpp: (WebCore::WorkerEventQueue::enqueueEvent): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): (WebCore::WorkerGlobalScope::addMessage): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope): * workers/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::WorkerRunLoop): (WebCore::WorkerRunLoop::postTaskAndTerminate): (WebCore::WorkerRunLoop::postTaskForMode): * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::loadAsynchronously): (WebCore::WorkerScriptLoader::createResourceRequest): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::ready): (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::removeRegistration): (WebCore::ServiceWorkerContainer::updateRegistration): (WebCore::ServiceWorkerContainer::getRegistration): (WebCore::ServiceWorkerContainer::getRegistrations): * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::terminateWorker): * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): (WebCore::ServiceWorkerThreadProxy::createBlobLoader): * workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): * workers/service/server/SWServer.cpp: (WebCore::SWServer::addRegistrationFromStore): (WebCore::SWServer::SWServer): (WebCore::SWServer::scheduleJob): (WebCore::SWServer::unregisterServiceWorkerClient): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::runRegisterJob): * worklets/PaintWorkletGlobalScope.cpp: (WebCore::PaintWorkletGlobalScope::registerPaint): * worklets/WorkletConsoleClient.cpp: (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::addConsoleMessage): * worklets/WorkletScriptController.cpp: (WebCore::WorkletScriptController::initScriptWithSubclass): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::upload): * xml/XPathFunctions.cpp: * xml/XPathPredicate.cpp: (WebCore::XPath::evaluatePredicate): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::loadChildSheet): * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::handleError): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendStartElementNSCallback): (WebCore::PendingCallbacks::appendEndElementNSCallback): (WebCore::PendingCallbacks::appendCharactersCallback): (WebCore::PendingCallbacks::appendProcessingInstructionCallback): (WebCore::PendingCallbacks::appendCDATABlockCallback): (WebCore::PendingCallbacks::appendCommentCallback): (WebCore::PendingCallbacks::appendInternalSubsetCallback): (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::doEnd): Source/WebCore/PAL: Reviewed by Geoffrey Garen. * pal/crypto/openssl/CryptoDigestOpenSSL.cpp: (PAL::CryptoDigestContextImpl::create): * pal/system/ClockGeneric.cpp: (PAL::Clock::create): * pal/system/mac/ClockCM.mm: (Clock::create): Source/WebDriver: Reviewed by Geoffrey Garen. * WebDriverService.cpp: (WebDriver::WebDriverService::connectToBrowser): * glib/SessionHostGlib.cpp: (WebDriver::SessionHost::launchBrowser): (WebDriver::SessionHost::sendMessageToBackend): Source/WebKit: Reviewed by Geoffrey Garen. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: (WebKit::ResourceLoadStatisticsPersistentStorage::startMonitoringDisk): (WebKit::ResourceLoadStatisticsPersistentStorage::monitorDirectoryForNewStatistics): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::startDownload): (WebKit::DownloadManager::convertNetworkLoadToDownload): (WebKit::DownloadManager::resumeDownload): * NetworkProcess/Downloads/DownloadMap.cpp: (WebKit::DownloadMap::add): * NetworkProcess/Downloads/PendingDownload.cpp: (WebKit::PendingDownload::PendingDownload): * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::establishSWServerConnection): * NetworkProcess/NetworkContentRuleListManager.cpp: (WebKit::NetworkContentRuleListManager::addContentRuleLists): * NetworkProcess/NetworkDataTaskBlob.cpp: (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob): (WebKit::NetworkDataTaskBlob::download): * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp: (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker): * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::didReceiveResponse): * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight): (WebKit::NetworkLoadChecker::contentSecurityPolicy): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::switchToNewTestingSession): (WebKit::NetworkProcess::ensureSession): (WebKit::NetworkProcess::swServerForSession): (WebKit::NetworkProcess::initializeQuotaUsers): (WebKit::NetworkProcess::storageQuotaManager): * NetworkProcess/NetworkProcess.h: (WebKit::NetworkProcess::addSupplement): * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::m_shouldCaptureExtraNetworkLoadMetrics): (WebKit::NetworkResourceLoader::startNetworkLoad): * NetworkProcess/NetworkSocketChannel.cpp: (WebKit::NetworkSocketChannel::create): * NetworkProcess/PreconnectTask.cpp: * NetworkProcess/WebStorage/LocalStorageDatabase.cpp: (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate): * NetworkProcess/WebStorage/LocalStorageNamespace.cpp: (WebKit::LocalStorageNamespace::getOrCreateStorageArea): * NetworkProcess/WebStorage/SessionStorageNamespace.cpp: (WebKit::SessionStorageNamespace::getOrCreateStorageArea): * NetworkProcess/WebStorage/StorageArea.cpp: (WebKit::StorageArea::clone const): * NetworkProcess/WebStorage/StorageManager.cpp: (WebKit::StorageManager::createSessionStorageNamespace): (WebKit::StorageManager::getOrCreateLocalStorageNamespace): (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace): (WebKit::StorageManager::getOrCreateSessionStorageNamespace): * NetworkProcess/WebStorage/StorageManagerSet.cpp: (WebKit::StorageManagerSet::add): * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp: (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea): * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::Cache): (WebKit::NetworkCache::Cache::makeEntry): (WebKit::NetworkCache::Cache::makeRedirectEntry): (WebKit::NetworkCache::Cache::update): * NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::decodeStorageRecord): * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresourceLoad): (WebKit::NetworkCache::SpeculativeLoadManager::retrieve): (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry): (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests): (WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource): (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation): * NetworkProcess/cache/NetworkCacheStorage.cpp: (WebKit::NetworkCache::Storage::synchronize): (WebKit::NetworkCache::Storage::readRecord): (WebKit::NetworkCache::retrieveFromMemory): (WebKit::NetworkCache::Storage::retrieve): (WebKit::NetworkCache::Storage::store): (WebKit::NetworkCache::Storage::traverse): * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp: (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord): * NetworkProcess/cache/PrefetchCache.cpp: (WebKit::PrefetchCache::store): (WebKit::PrefetchCache::storeRedirect): * NetworkProcess/cocoa/NetworkProcessCocoa.mm: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): (WebKit::NetworkProcess::networkHTTPSUpgradeChecker): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): (WebKit::NetworkSessionCocoa::create): (WebKit::NetworkSessionCocoa::createWebSocketTask): * NetworkProcess/curl/NetworkProcessCurl.cpp: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): * NetworkProcess/curl/NetworkSessionCurl.h: * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm: (WebKit::NetworkConnectionToWebProcess::paymentCoordinator): (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAuthorizationPresenter): * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::download): * NetworkProcess/soup/NetworkProcessSoup.cpp: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): * NetworkProcess/soup/NetworkSessionSoup.cpp: (WebKit::NetworkSessionSoup::NetworkSessionSoup): (WebKit::NetworkSessionSoup::createWebSocketTask): * NetworkProcess/soup/NetworkSessionSoup.h: * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp: (webkitSoupRequestInputStreamReadAsync): * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: (WebKit::NetworkMDNSRegister::registerMDNSName): * NetworkProcess/webrtc/NetworkRTCMonitor.cpp: (WebKit::NetworkRTCMonitor::startUpdating): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): (WebKit::NetworkRTCProvider::createSocket): (WebKit::NetworkRTCProvider::wrapNewTCPConnection): * Platform/IPC/Connection.cpp: (IPC::Connection::dispatchWorkQueueMessageReceiverMessage): (IPC::Connection::createSyncMessageEncoder): (IPC::Connection::enableIncomingMessagesThrottling): (IPC::Connection::dispatchSyncMessage): * Platform/IPC/Connection.h: (IPC::Connection::send): (IPC::Connection::sendWithAsyncReply): * Platform/IPC/Decoder.cpp: (IPC::Decoder::unwrapForTesting): * Platform/IPC/HandleMessage.h: (IPC::handleMessageAsync): * Platform/IPC/MessageSender.h: * Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): (IPC::Connection::open): (IPC::createMessageDecoder): (IPC::Connection::receiveSourceEventHandler): * Platform/IPC/unix/ConnectionUnix.cpp: (IPC::Connection::processMessage): (IPC::Connection::sendOutputMessage): * Platform/IPC/win/ConnectionWin.cpp: (IPC::Connection::readEventHandler): * Platform/mac/LayerHostingContext.mm: (WebKit::LayerHostingContext::createForPort): (WebKit::LayerHostingContext::createForExternalHostingProcess): (WebKit::LayerHostingContext::createForExternalPluginHostingProcess): * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPluginInternal): * Shared/API/APIURL.h: (API::URL::create): (API::URL::parseURLIfNecessary const): * Shared/API/Cocoa/RemoteObjectInvocation.mm: (WebKit::RemoteObjectInvocation::decode): * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: (-[_WKRemoteObjectRegistry _initWithWebPage:]): (-[_WKRemoteObjectRegistry _initWithWebPageProxy:]): (-[_WKRemoteObjectRegistry _sendInvocation:interface:]): * Shared/API/glib/WebKitContextMenuItem.cpp: (webkitContextMenuItemCreate): (webkit_context_menu_item_new): (webkit_context_menu_item_new_from_gaction): (webkit_context_menu_item_new_from_stock_action): (webkit_context_menu_item_new_from_stock_action_with_label): (webkit_context_menu_item_new_with_submenu): (webkit_context_menu_item_new_separator): * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): * Shared/Cocoa/SandboxExtensionCocoa.mm: (WebKit::SandboxExtension::Handle::decode): * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::texmapLayer): (WebKit::CoordinatedGraphicsScene::ensureRootLayer): * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::ThreadedCompositor::ThreadedCompositor): * Shared/Plugins/NPRemoteObjectMap.cpp: (WebKit::NPRemoteObjectMap::registerNPObject): * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: (WebKit::RemoteScrollingCoordinatorTransaction::decode): * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/win/ShareableBitmapDirect2D.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::registerObserver): * UIProcess/API/C/WKContext.cpp: (WKContextSetInjectedBundleClient): (WKContextSetHistoryClient): (WKContextSetDownloadClient): * UIProcess/API/C/WKGeolocationManager.cpp: (WKGeolocationManagerSetProvider): * UIProcess/API/C/WKNotificationManager.cpp: (WKNotificationManagerSetProvider): * UIProcess/API/C/WKPage.cpp: (WKPageSetPageContextMenuClient): (WKPageSetPageDiagnosticLoggingClient): (WKPageSetPageFindClient): (WKPageSetPageFindMatchesClient): (WKPageSetPageFormClient): (WKPageSetPageLoaderClient): (WKPageSetPagePolicyClient): (WKPageSetPageUIClient): (WKPageSetPageStateClient): * UIProcess/API/C/mac/WKPagePrivateMac.mm: (-[WKObservablePageState initWithPage:]): * UIProcess/API/C/wpe/WKView.cpp: (WKViewSetViewClient): * UIProcess/API/Cocoa/WKBrowsingContextController.mm: (-[WKBrowsingContextController _initWithPageRef:]): * UIProcess/API/Cocoa/WKHTTPCookieStore.mm: (-[WKHTTPCookieStore addObserver:]): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _setDownloadDelegate:]): (-[WKProcessPool _setAutomationDelegate:]): * UIProcess/API/Cocoa/WKUserContentController.mm: (-[WKUserContentController addScriptMessageHandler:name:]): (-[WKUserContentController _addScriptMessageHandler:name:userContentWorld:]): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): (-[WKWebView setAllowsBackForwardNavigationGestures:]): (-[WKWebView _setInputDelegate:]): * UIProcess/API/Cocoa/_WKAutomationSession.mm: (-[_WKAutomationSession setDelegate:]): * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController init]): * UIProcess/API/glib/IconDatabase.cpp: (WebKit::readySQLiteStatement): * UIProcess/API/glib/WebKitAutomationSession.cpp: (webkitAutomationSessionConstructed): * UIProcess/API/glib/WebKitContextMenuClient.cpp: (attachContextMenuClientToView): * UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp: (attachCustomProtocolManagerClientToContext): * UIProcess/API/glib/WebKitDownloadClient.cpp: (attachDownloadClientToContext): * UIProcess/API/glib/WebKitFaviconDatabase.cpp: (webkitFaviconDatabaseOpen): * UIProcess/API/glib/WebKitFindController.cpp: (webkitFindControllerConstructed): * UIProcess/API/glib/WebKitFormClient.cpp: (attachFormClientToView): * UIProcess/API/glib/WebKitGeolocationManager.cpp: (webkitGeolocationManagerCreate): * UIProcess/API/glib/WebKitIconLoadingClient.cpp: (attachIconLoadingClientToView): * UIProcess/API/glib/WebKitInjectedBundleClient.cpp: (attachInjectedBundleClientToContext): * UIProcess/API/glib/WebKitNotificationProvider.cpp: (WebKitNotificationProvider::WebKitNotificationProvider): * UIProcess/API/glib/WebKitUIClient.cpp: (attachUIClientToView): * UIProcess/API/glib/WebKitUserContentManager.cpp: (webkit_user_content_manager_register_script_message_handler): (webkit_user_content_manager_register_script_message_handler_in_world): * UIProcess/API/glib/WebKitWebContext.cpp: (webkitWebContextConstructed): (webkit_web_context_set_automation_allowed): * UIProcess/API/glib/WebKitWebView.cpp: (webkitWebViewConstructed): * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/API/gtk/WebKitEmojiChooser.cpp: (webkitEmojiChooserSetupEmojiSections): * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: (WebKit::RemoteInspectorProtocolHandler::handleRequest): * UIProcess/API/gtk/WebKitWebInspector.cpp: (webkitWebInspectorCreate): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseConstructed): (webkitWebViewBaseGestureController): (webkitWebViewBaseDragAndDropHandler): (webkitWebViewBaseDidRelaunchWebProcess): * UIProcess/API/mac/WKView.mm: (-[WKView maybeInstallIconLoadingClient]): (-[WKView initWithFrame:processPool:configuration:]): * UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::PageClientImpl): (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/API/wpe/WPEView.cpp: (WKWPE::View::View): (WKWPE::View::setClient): * UIProcess/API/wpe/qt/WPEQtView.cpp: (WPEQtView::notifyLoadChangedCallback): (WPEQtView::notifyLoadFailedCallback): (WPEQtView::runJavaScript): * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp: (WPEQtViewBackend::create): * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::WebAutomationSession): * UIProcess/AuxiliaryProcessProxy.h: (WebKit::AuxiliaryProcessProxy::send): * UIProcess/Cocoa/IconLoadingDelegate.mm: (WebKit::IconLoadingDelegate::createIconLoadingClient): * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::createContextMenuClient): (WebKit::UIDelegate::createUIClient): * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitialize): (WebKit::WebProcessPool::startDisplayLink): * UIProcess/Cocoa/WebProcessProxyCocoa.mm: (WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended): * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::createDrawingAreaProxy): (WebKit::WebViewImpl::setTextIndicator): (WebKit::WebViewImpl::ensureGestureController): * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp: (WebKit::DrawingAreaProxyCoordinatedGraphics::incorporateUpdate): (WebKit::DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing): * UIProcess/DeviceIdHashSaltStorage.cpp: (WebKit::DeviceIdHashSaltStorage::getDataFromDecoder const): (WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::createDownloadProxy): * UIProcess/Gamepad/UIGamepadProvider.cpp: (WebKit::UIGamepadProvider::setInitialConnectedGamepads): (WebKit::UIGamepadProvider::platformGamepadConnected): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::createDownloadProxy): (WebKit::NetworkProcessProxy::takeUploadAssertion): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): (WebKit::WebNotificationManagerProxy::setProvider): * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::pluginRequiresGtk2): * UIProcess/ProcessThrottler.cpp: (WebKit::ProcessThrottler::didConnectToProcess): * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator): * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: (WebKit::RemoteLayerTreeHost::makeNode): * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm: (WebKit::RemoteLayerTreeNode::createWithPlainLayer): * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm: (WebKit::RemoteLayerTreeHost::makeNode): * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren): * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS): * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::ScrollingTreeFrameScrollingNodeRemoteMac): * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp: (WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::ScrollingTreeOverflowScrollingNodeRemoteMac): * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::deviceAdded): * UIProcess/WebGeolocationManagerProxy.cpp: (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy): (WebKit::WebGeolocationManagerProxy::setProvider): * UIProcess/WebMediaSessionFocusManager.cpp: (WebKit::WebMediaSessionFocusManager::setFocusedMediaElement): * UIProcess/WebPageInspectorController.cpp: (WebKit::WebPageInspectorController::WebPageInspectorController): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::m_resetRecentCrashCountTimer): (WebKit::WebPageProxy::setFormClient): (WebKit::WebPageProxy::setUIClient): (WebKit::WebPageProxy::setIconLoadingClient): (WebKit::WebPageProxy::setFindClient): (WebKit::WebPageProxy::setFindMatchesClient): (WebKit::WebPageProxy::setContextMenuClient): (WebKit::WebPageProxy::setInjectedBundleClient): (WebKit::WebPageProxy::suspendCurrentPageIfPossible): (WebKit::WebPageProxy::didAttachToRunningProcess): (WebKit::WebPageProxy::setDrawingArea): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::loadData): (WebKit::WebPageProxy::handleWheelEvent): (WebKit::WebPageProxy::processNextQueuedWheelEvent): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::setFullscreenClient): (WebKit::WebPageProxy::userMediaPermissionRequestManager): (WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled): (WebKit::WebPageProxy::speechSynthesisData): * UIProcess/WebProcessCache.cpp: (WebKit::WebProcessCache::addProcessIfPossible): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::WebProcessPool): (WebKit::WebProcessPool::setInjectedBundleClient): (WebKit::WebProcessPool::setHistoryClient): (WebKit::WebProcessPool::setDownloadClient): (WebKit::WebProcessPool::setAutomationClient): (WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient): (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::didCollectPrewarmInformation): (WebKit::WebProcessPool::setWebProcessHasUploads): (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia): * UIProcess/WebProcessProxy.cpp: * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::createBackend): * UIProcess/glib/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::inspect): * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: (WebKit::AcceleratedBackingStoreWayland::checkRequirements): * UIProcess/gtk/DragAndDropHandler.cpp: (WebKit::DragAndDropHandler::dragDataSelection): * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::initializeEGL): * UIProcess/ios/EditableImageController.mm: (WebKit::EditableImageController::ensureEditableImage): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView didMoveToWindow]): * UIProcess/ios/WKContentView.mm: (-[WKContentView _commonInitializationWithProcessPool:configuration:]): (-[WKContentView initWithFrame:processPool:configuration:webView:]): (-[WKContentView _createDrawingAreaProxy:]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView becomeFirstResponderForWebView]): (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::elementDidFocus): (WebKit::WebPageProxy::paymentCoordinatorAuthorizationPresenter): * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::PageClientImpl): * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController initWithWindow:webView:page:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:usePlatformFindUI:]): * UIProcess/socket/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::inspect): * UIProcess/socket/RemoteInspectorProtocolHandler.cpp: (WebKit::RemoteInspectorProtocolHandler::platformStartTask): * UIProcess/win/BackingStoreDirect2D.cpp: (WebKit::BackingStore::createBackend): * UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): * WebProcess/Gamepad/WebGamepadProvider.cpp: (WebKit::WebGamepadProvider::setInitialGamepads): (WebKit::WebGamepadProvider::gamepadConnected): * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetClient): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetContextMenuClient): (WKBundlePageSetEditorClient): (WKBundlePageSetFormClient): (WKBundlePageSetPageLoaderClient): (WKBundlePageSetResourceLoadClient): (WKBundlePageSetUIClient): * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (WKBundlePageOverlayCreate): * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: (WKBundlePageBannerCreateBannerWithCALayer): * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp: (WebKit::getOrCreateDOMObjectCacheFrameObserver): (WebKit::DOMObjectCache::put): * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp: (WebKit::WebKitExtensionManager::initialize): * WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp: (webkitWebEditorCreate): * WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp: (webkitWebExtensionCreate): * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: (webkitFrameGetOrCreate): (webkitWebPageCreate): * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm: (-[WKDOMTextIterator initWithRange:]): * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::InjectedBundle): (WebKit::InjectedBundle::setClient): * WebProcess/Network/WebSocketChannel.cpp: (WebKit::PendingMessage::PendingMessage): (WebKit::WebSocketChannel::send): * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::LibWebRTCProvider::createPeerConnection): (WebKit::LibWebRTCProvider::createSocketFactory): * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: (WebKit::LibWebRTCSocketFactory::createServerTcpSocket): (WebKit::LibWebRTCSocketFactory::createUdpSocket): (WebKit::LibWebRTCSocketFactory::createClientTcpSocket): (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket): (WebKit::LibWebRTCSocketFactory::createAsyncResolver): * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::PluginDestructionProtector::PluginDestructionProtector): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::scheduleTimer): * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::deliverData): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePluginX11::create): * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::initialize): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::createWebEvent const): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::installServiceWorker): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createColorChooser): (WebKit::WebChromeClient::createDataListSuggestionPicker): * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::showPaintRect): * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: (WebKit::WebPasteboardOverrides::addOverride): * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::create): * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::ensureBackingStore): (WebKit::PlatformCALayerRemote::setTransform): (WebKit::PlatformCALayerRemote::setSublayerTransform): (WebKit::PlatformCALayerRemote::setFilters): (WebKit::PlatformCALayerRemote::setShapeRoundedRect): * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp: (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking): * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): (WebKit::RemoteLayerTreeDrawingArea::flushLayers): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSubframe): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_textAutoSizingAdjustmentTimer): (WebKit::WebPage::setInjectedBundleContextMenuClient): (WebKit::WebPage::setInjectedBundleEditorClient): (WebKit::WebPage::setInjectedBundleFormClient): (WebKit::WebPage::setInjectedBundlePageLoaderClient): (WebKit::WebPage::setInjectedBundleResourceLoadClient): (WebKit::WebPage::setInjectedBundleUIClient): (WebKit::WebPage::close): (WebKit::WebPage::beginPrinting): * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::print): * WebProcess/WebPage/ios/FindControllerIOS.mm: (WebKit::FindController::updateFindIndicator): * WebProcess/WebPage/mac/DrawingAreaMac.cpp: (WebKit::DisplayRefreshMonitorMac::requestRefreshCallback): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::markAllLayersVolatile): (WebKit::WebProcess::ensureAutomationSessionProxy): (WebKit::WebProcess::libWebRTCNetwork): (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::addSupplement): * WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::Source::Source): * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::processTaskStateDidChange): (WebKit::WebProcess::updateCPUMonitorState): Source/WebKitLegacy: Reviewed by Geoffrey Garen. * Storage/StorageSyncManager.cpp: (WebCore::StorageSyncManager::StorageSyncManager): * Storage/StorageThread.cpp: (WebCore::StorageThread::dispatch): (WebCore::StorageThread::terminate): * Storage/StorageTracker.cpp: (WebKit::StorageTracker::StorageTracker): * WebCoreSupport/NetworkStorageSessionMap.cpp: (NetworkStorageSessionMap::defaultStorageSession): (NetworkStorageSessionMap::switchToNewTestingSession): (NetworkStorageSessionMap::ensureSession): Source/WebKitLegacy/cf: Reviewed by Geoffrey Garen. * WebCoreSupport/WebInspectorClientCF.cpp: (WebInspectorClient::createFrontendSettings): Source/WebKitLegacy/ios: Reviewed by Geoffrey Garen. * WebCoreSupport/WebFixedPositionContent.mm: (-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]): Source/WebKitLegacy/mac: Reviewed by Geoffrey Garen. * History/WebHistory.mm: (-[WebHistoryPrivate init]): * History/WebHistoryItem.mm: (-[WebHistoryItem initFromDictionaryRepresentation:]): * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCGetScriptableNPObjectReply): (WKPCBooleanReply): (WKPCBooleanAndDataReply): (WKPCInstantiatePluginReply): * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::methodNamed): (WebKit::ProxyInstance::fieldNamed): * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView createPlugin]): * Plugins/WebNetscapePluginEventHandler.mm: (WebNetscapePluginEventHandler::create): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): * Storage/WebDatabaseManagerClient.mm: (DidModifyOriginData::dispatchToMainThread): * WebCoreSupport/WebFrameLoaderClient.mm: (addRedirectURL): (WebFrameLoaderClient::savePlatformDataToCachedFrame): * WebCoreSupport/WebInspectorClient.mm: (WebInspectorClient::openLocalFrontend): * WebView/WebDeviceOrientationProviderMock.mm: * WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]): * WebView/WebMediaPlaybackTargetPicker.mm: (WebMediaPlaybackTargetPicker::create): * WebView/WebTextIterator.mm: (-[WebTextIterator initWithRange:]): * WebView/WebView.mm: (-[WebView _injectOutlookQuirksScript]): (-[WebView _commonInitializationWithFrameName:groupName:]): (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]): (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]): (-[WebView _selectionServiceController]): (-[WebView _setTextIndicator:withLifetime:]): * WebView/WebViewData.mm: (WebViewLayerFlushScheduler::WebViewLayerFlushScheduler): (-[WebViewPrivate init]): Source/WebKitLegacy/win: Reviewed by Geoffrey Garen. * FullscreenVideoController.cpp: (FullscreenVideoController::FullscreenVideoController): * Plugins/PluginStream.cpp: (WebCore::PluginStream::didReceiveData): * Plugins/PluginView.cpp: (WebCore::PluginView::load): * Plugins/PluginViewWin.cpp: (WebCore::PluginView::wndProc): * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::WebChromeClient): * WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::WebFrameLoaderClient): (WebFrameLoaderClient::savePlatformDataToCachedFrame): * WebCoreSupport/WebInspectorClient.cpp: (WebInspectorClient::openLocalFrontend): (WebInspectorClient::highlight): * WebElementPropertyBag.cpp: (WebElementPropertyBag::WebElementPropertyBag): * WebHistoryItem.cpp: (WebHistoryItem::initFromDictionaryRepresentation): * WebKitQuartzCoreAdditions/CAD3DRenderer.cpp: (WKQCA::CAD3DRenderer::createD3DPostProcessingContext): * WebNotificationCenter.cpp: (WebNotificationCenter::WebNotificationCenter): * WebView.cpp: (WebView::handleMouseEvent): (WebView::registerEmbeddedViewMIMEType): (WebView::enterVideoFullscreenForVideoElement): (WebView::addUserScriptToGroup): (WebView::addUserStyleSheetToGroup): (WebView::setAcceleratedCompositing): Source/WTF: Reviewed by Geoff Garen. This patch is second part of bug 200620 patch. I split I split it into three pieces to make roll-out easy. his part, we convert std::make_unique to WTF::makeUnique or WTF::makeUniqueWithoutFastMallocCheck. In the third patch, we will add a static_assert to makeUnique, which ensures the given class T is FastMalloced or IsoHeaped. This patch adds `WTF::makeUnique<T>` and `WTF::makeUniqueWithoutFastMallocCheck<T>` as drop-in replacement for `std::make_unique<T>`. `WTF::makeUnique<T>` has one additional `static_assert` check which ensures `T` FastMalloc / IsoHeap annotated. If it is not, the compile error happens. In this patch, I tried using this everywhere in WebKit as much as possible. And we found that surprisingly many classes are missing FastMalloc annotation and allocated from system-malloc. Using WTF::makeUnique enforces classes / structs to use FastMalloc. WTF::makeUniqueWithoutFastMallocCheck is offered for the corner cases. This is identical to std::make_unique. We use this for classes that are offered by non-WebKit code base, like, zlib. This clear name can make us easily find this allocation is intentionally done by system-malloc. We do not take the following direction, `WTF::makeUnique` automatically allocates FastMalloc even if FastMalloc annotation is not attached. Since default deleter is performing `delete` and this is not what we want for FastMalloced ones, we need to return std::unique_ptr<T, FastFreeDeleter> for T if T does not have FastMalloc-annotation. Automatically doing this sounds a bit dangerous. auto pointer = WTF::makeUnique<T>(); // Super dangerous, but sometimes it is required... auto* rawPointer = pointer.release(); // Passing rawPointer to somewhere, and delete rawPointer; The above one becomes invalid because pointer may start requiring non `delete` destroying function. In the above case, the correct way becomes the following. rawPointer->~T(); fastFree(rawPointer); This looks non-intuitive. And having two ways to destroying objects (`delete` or the above one) can be error-prone. If we have WTF_MAKE_FAST_ALLOCATED for T, we do not need to care about this. "new" and "delete" operators are defined, and C++ way works. The simple invariant, "makeUnique just does `new` internally. And `delete` operator does `delete`. default deleter is just doing `delete`", is kept. While we need to annotate many classes with WTF_MAKE_FAST_ALLOCATED, it is one time cost when we add a class. And, by introducing `WTF::makeUnique<>`, we no longer forget adding this. makeUnique(...) static_assert(T is FastMalloced or IsoHeaped); return make_unique<T>(...) * benchmarks/LockFairnessTest.cpp: * benchmarks/LockSpeedTest.cpp: * wtf/ConcurrentVector.h: * wtf/CrossThreadTaskHandler.cpp: (WTF::CrossThreadTaskHandler::taskRunLoop): * wtf/FilePrintStream.cpp: (WTF::FilePrintStream::open): * wtf/Function.h: (WTF::Function<Out): * wtf/HashTable.h: (WTF::KeyTraits>::HashTable): * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor): * wtf/StdLibExtras.h: (WTF::makeUnique): (WTF::makeUniqueWithoutFastMallocCheck): * wtf/StreamBuffer.h: (WTF::StreamBuffer::append): * wtf/UniqueRef.h: (WTF::makeUniqueRefWithoutFastMallocCheck): (WTF::makeUniqueRef): * wtf/glib/RunLoopGLib.cpp: (WTF::RunLoop::dispatchAfter): * wtf/text/StringView.cpp: (WTF::StringView::GraphemeClusters::Iterator::Iterator): Tools: Reviewed by Geoffrey Garen. * DumpRenderTree/TestRunner.cpp: (addURLToRedirectCallback): (setWillSendRequestClearHeaderCallback): (TestRunner::setAccummulateLogsForChannel): (TestRunner::runUIScript): (TestRunner::setOpenPanelFiles): * DumpRenderTree/mac/DumpRenderTree.mm: (dumpFramesAsText): * DumpRenderTree/mac/EventSendingController.mm: (eventPressedMouseButtonsSwizzlerForViewAndEvent): * DumpRenderTree/win/DRTDataObject.cpp: (DRTDataObject::SetData): * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::FrameLoadDelegate): * DumpRenderTree/win/UIDelegate.cpp: (DRTUndoManager::DRTUndoManager): (UIDelegate::UIDelegate): (UIDelegate::resetUndoManager): * TestWebKitAPI/JavaScriptTest.cpp: (TestWebKitAPI::runJSTest): * TestWebKitAPI/PlatformUtilities.cpp: (TestWebKitAPI::Util::toSTD): * TestWebKitAPI/Tests/WTF/Expected.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): (TestWebKitAPI::testMovingUsingEnsure): (TestWebKitAPI::testMovingUsingAdd): * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/ListHashSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Lock.cpp: (TestWebKitAPI::runLockTest): * TestWebKitAPI/Tests/WTF/ParkingLot.cpp: * TestWebKitAPI/Tests/WTF/RefCounter.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Variant.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/CARingBuffer.cpp: (TestWebKitAPI::CARingBufferTest::SetUp): * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: (TestWebKitAPI::createTestValue): * TestWebKitAPI/Tests/WebCore/FidoHidMessageTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp: * TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp: (TestWebKitAPI::createNewPage): * TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp: (TestWebKitAPI::createNewPage): * TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp: * TestWebKitAPI/Tests/WebKit/UserMessage.cpp: (TestWebKitAPI::WebKit2UserMessageRoundTripTest::SetUp): * TestWebKitAPI/Tests/WebKit/WillLoad.cpp: (TestWebKitAPI::WebKit2WillLoadTest::SetUp): * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm: (TestWebKitAPI::ForceLightAppearanceInBundleTest::didReceiveMessage): * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: (serverCallback): (testWebViewAuthenticationProxyHTTPS): * TestWebKitAPI/Tests/WebKitGtk/DOMDOMWindowTest.cpp: (WebKitDOMDOMWindowTest::create): * TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm: (TestWebKitAPI::Util::toSTD): * TestWebKitAPI/cocoa/TestWKWebView.mm: (applyWorkaroundToAllowWritingAttributedStringsToItemProviders): (-[TestWKWebView initWithFrame:configuration:addToWindow:]): * TestWebKitAPI/mac/TestFontOptions.mm: (-[TestFontOptions initWithFontOptions:]): * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::callAfterScrollingCompletes): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setOpenPanelFiles): * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: * WebKitTestRunner/StringFunctions.h: (WTR::toSTD): (WTR::toWTFString): * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): (WTR::TestController::generatePageConfiguration): (WTR::TestController::resetStateToConsistentValues): (WTR::createTestURL): (WTR::TestController::runTest): (WTR::TestController::platformCreateWebView): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::runUISideScript): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): (WTR::TestController::setDefaultCalendarType): * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::getGDKKeySymForKeyRef): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::setKeyboardInputModeIdentifier): * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::wpeKeySymForKeyRef): Canonical link: https://commits.webkit.org/214609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-19 06:59:40 +00:00
auto buffer = makeUniqueWithoutFastMallocCheck<char[]>(bufferSize);
size_t stringLength = WKStringGetUTF8CString(string, buffer.get(), bufferSize);
return std::string(buffer.get(), stringLength - 1);
}
inline std::string toSTD(const WKRetainPtr<WKStringRef>& string)
{
return toSTD(string.get());
}
Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Add some string function exports to Windows so the WebKitTestRunner can use them. Reviewed by Geoff Garen. * win/WebKit2.def: Tools: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Fix crash preventing WebKitTestRunner from working in Release. WebKitTestRunner used ostringstream to collect output from the test. ostringstream is incompatible with our FastMalloc overrides. When copying strings out ostringstream a new string is allocated with FastMalloc because the allocation is inlined. When that string is freed is uses the system malloc because that call is not inlined. I removed ostringstream in favor of StringBuilder. Properly set NDEBUG on Release builds so we don't crash when when we free the strings StringBuilder created. Reviewed by Geoff Garen. Add DEBUG_DEFINES to set NDEBUG on release builds. * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Remove ostringstream member in favor of StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::initialize): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::done): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (WTF): (WTR::InjectedBundle::stringBuilder): (InjectedBundle): Append output to StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::hasPrefix): (WTR::dumpPath): (WTR::rangeToStr): (WTR::styleDecToStr): (WTR::frameToStr): (WTR::dumpFrameScrollPosition): (WTR::dumpFrameText): (WTR::dumpDescendantFramesText): (WTR::InjectedBundlePage::dump): (WTR::InjectedBundlePage::didReceiveTitleForFrame): (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): (WTR::InjectedBundlePage::willSendRequestForFrame): (WTR::InjectedBundlePage::decidePolicyForNavigationAction): (WTR::lastFileURLPathComponent): (WTR::InjectedBundlePage::willAddMessageToConsole): (WTR::InjectedBundlePage::willSetStatusbarText): (WTR::InjectedBundlePage::willRunJavaScriptAlert): (WTR::InjectedBundlePage::willRunJavaScriptConfirm): (WTR::InjectedBundlePage::willRunJavaScriptPrompt): (WTR::InjectedBundlePage::shouldBeginEditing): (WTR::InjectedBundlePage::shouldEndEditing): (WTR::InjectedBundlePage::shouldInsertNode): (WTR::InjectedBundlePage::shouldInsertText): (WTR::InjectedBundlePage::shouldDeleteRange): (WTR::InjectedBundlePage::shouldChangeSelectedRange): (WTR::InjectedBundlePage::shouldApplyStyle): (WTR::InjectedBundlePage::didBeginEditing): (WTR::InjectedBundlePage::didEndEditing): (WTR::InjectedBundlePage::didChange): (WTR::InjectedBundlePage::didChangeSelection): (WTR::InjectedBundlePage::supportsFullScreen): (WTR::InjectedBundlePage::enterFullScreenForElement): (WTR::InjectedBundlePage::exitFullScreenForElement): (WTR::InjectedBundlePage::beganEnterFullScreen): (WTR::InjectedBundlePage::beganExitFullScreen): (WTR::dumpBackForwardListItem): (WTR::InjectedBundlePage::dumpBackForwardList): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::waitToDumpWatchdogTimerFired): (WTR::LayoutTestController::dumpConfigurationForViewport): Convert between WTF::String and WKStringRef. * WebKitTestRunner/StringFunctions.h: (WTR::toWTFString): (WTR): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Canonical link: https://commits.webkit.org/98644@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-17 00:29:38 +00:00
inline WTF::String toWTFString(WKStringRef string)
{
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
if (!string)
return nullString();
Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Add some string function exports to Windows so the WebKitTestRunner can use them. Reviewed by Geoff Garen. * win/WebKit2.def: Tools: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Fix crash preventing WebKitTestRunner from working in Release. WebKitTestRunner used ostringstream to collect output from the test. ostringstream is incompatible with our FastMalloc overrides. When copying strings out ostringstream a new string is allocated with FastMalloc because the allocation is inlined. When that string is freed is uses the system malloc because that call is not inlined. I removed ostringstream in favor of StringBuilder. Properly set NDEBUG on Release builds so we don't crash when when we free the strings StringBuilder created. Reviewed by Geoff Garen. Add DEBUG_DEFINES to set NDEBUG on release builds. * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Remove ostringstream member in favor of StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::initialize): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::done): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (WTF): (WTR::InjectedBundle::stringBuilder): (InjectedBundle): Append output to StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::hasPrefix): (WTR::dumpPath): (WTR::rangeToStr): (WTR::styleDecToStr): (WTR::frameToStr): (WTR::dumpFrameScrollPosition): (WTR::dumpFrameText): (WTR::dumpDescendantFramesText): (WTR::InjectedBundlePage::dump): (WTR::InjectedBundlePage::didReceiveTitleForFrame): (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): (WTR::InjectedBundlePage::willSendRequestForFrame): (WTR::InjectedBundlePage::decidePolicyForNavigationAction): (WTR::lastFileURLPathComponent): (WTR::InjectedBundlePage::willAddMessageToConsole): (WTR::InjectedBundlePage::willSetStatusbarText): (WTR::InjectedBundlePage::willRunJavaScriptAlert): (WTR::InjectedBundlePage::willRunJavaScriptConfirm): (WTR::InjectedBundlePage::willRunJavaScriptPrompt): (WTR::InjectedBundlePage::shouldBeginEditing): (WTR::InjectedBundlePage::shouldEndEditing): (WTR::InjectedBundlePage::shouldInsertNode): (WTR::InjectedBundlePage::shouldInsertText): (WTR::InjectedBundlePage::shouldDeleteRange): (WTR::InjectedBundlePage::shouldChangeSelectedRange): (WTR::InjectedBundlePage::shouldApplyStyle): (WTR::InjectedBundlePage::didBeginEditing): (WTR::InjectedBundlePage::didEndEditing): (WTR::InjectedBundlePage::didChange): (WTR::InjectedBundlePage::didChangeSelection): (WTR::InjectedBundlePage::supportsFullScreen): (WTR::InjectedBundlePage::enterFullScreenForElement): (WTR::InjectedBundlePage::exitFullScreenForElement): (WTR::InjectedBundlePage::beganEnterFullScreen): (WTR::InjectedBundlePage::beganExitFullScreen): (WTR::dumpBackForwardListItem): (WTR::InjectedBundlePage::dumpBackForwardList): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::waitToDumpWatchdogTimerFired): (WTR::LayoutTestController::dumpConfigurationForViewport): Convert between WTF::String and WKStringRef. * WebKitTestRunner/StringFunctions.h: (WTR::toWTFString): (WTR): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Canonical link: https://commits.webkit.org/98644@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-17 00:29:38 +00:00
size_t bufferSize = WKStringGetMaximumUTF8CStringSize(string);
[WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part https://bugs.webkit.org/show_bug.cgi?id=200620 Source/JavaScriptCore: Reviewed by Geoff Garen. * API/JSCallbackObject.h: (JSC::JSCallbackObjectData::setPrivateProperty): * API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject<Parent>::JSCallbackObject): * API/JSClassRef.cpp: (OpaqueJSClassContextData::OpaqueJSClassContextData): (OpaqueJSClass::contextData): * API/JSMarkingConstraintPrivate.cpp: (JSContextGroupAddMarkingConstraint): * API/JSWrapperMap.mm: (-[JSWrapperMap initWithGlobalContextRef:]): * API/ObjCCallbackFunction.mm: (ArgumentTypeDelegate::typeInteger): (ArgumentTypeDelegate::typeDouble): (ArgumentTypeDelegate::typeBool): (ArgumentTypeDelegate::typeId): (ArgumentTypeDelegate::typeOfClass): (ArgumentTypeDelegate::typeStruct): (ResultTypeDelegate::typeInteger): (ResultTypeDelegate::typeDouble): (ResultTypeDelegate::typeBool): (ResultTypeDelegate::typeVoid): (ResultTypeDelegate::typeId): (ResultTypeDelegate::typeOfClass): (ResultTypeDelegate::typeBlock): (ResultTypeDelegate::typeStruct): (objCCallbackFunctionForInvocation): * API/glib/JSCContext.cpp: (jscContextSetVirtualMachine): * API/glib/JSCWrapperMap.cpp: (JSC::WrapperMap::WrapperMap): * assembler/ProbeStack.cpp: (JSC::Probe::Stack::ensurePageFor): * b3/B3LowerToAir.cpp: * b3/B3Procedure.cpp: (JSC::B3::Procedure::Procedure): (JSC::B3::Procedure::dominators): (JSC::B3::Procedure::naturalLoops): (JSC::B3::Procedure::backwardsCFG): (JSC::B3::Procedure::backwardsDominators): (JSC::B3::Procedure::addDataSection): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::cCallSpecial): * b3/air/AirGenerate.cpp: (JSC::B3::Air::prepareForGeneration): * b3/air/testair.cpp: * b3/testb3.h: (compileProc): * bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * bytecode/AccessCaseSnippetParams.cpp: * bytecode/BytecodeBasicBlock.cpp: (JSC::BytecodeBasicBlock::computeImpl): * bytecode/CallLinkInfo.cpp: (JSC::CallLinkInfo::setFrameShuffleData): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::ensureJITDataSlow): (JSC::CodeBlock::setCalleeSaveRegisters): (JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeOffsetSlow): * bytecode/CodeBlock.h: (JSC::CodeBlock::createRareDataIfNecessary): * bytecode/DFGExitProfile.cpp: (JSC::DFG::ExitProfile::add): * bytecode/DeferredCompilationCallback.cpp: (JSC::DeferredCompilationCallback::ensureDeferredSourceDump): * bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback): * bytecode/GetByIdVariant.cpp: (JSC::GetByIdVariant::operator=): * bytecode/LazyOperandValueProfile.cpp: (JSC::CompressedLazyOperandValueProfileHolder::add): * bytecode/PolyProtoAccessChain.h: (JSC::PolyProtoAccessChain::clone): * bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::regenerate): * bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeForStubInfo): * bytecode/PutByIdVariant.cpp: (JSC::PutByIdVariant::operator=): * bytecode/RecordedStatuses.cpp: (JSC::RecordedStatuses::addCallLinkStatus): (JSC::RecordedStatuses::addGetByIdStatus): (JSC::RecordedStatuses::addPutByIdStatus): (JSC::RecordedStatuses::addInByIdStatus): * bytecode/StructureStubClearingWatchpoint.cpp: (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint): * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::addAccessCase): * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::livenessAnalysisSlow): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedCodeBlock::createRareDataIfNecessary): * bytecode/UnlinkedFunctionExecutable.cpp: (JSC::UnlinkedFunctionExecutable::ensureRareDataSlow): * bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::generate): * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::AbstractInterpreter): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::Graph): (JSC::DFG::Graph::livenessFor): (JSC::DFG::Graph::killsFor): (JSC::DFG::Graph::ensureCPSCFG): (JSC::DFG::Graph::ensureCPSDominators): (JSC::DFG::Graph::ensureSSADominators): (JSC::DFG::Graph::ensureCPSNaturalLoops): (JSC::DFG::Graph::ensureSSANaturalLoops): (JSC::DFG::Graph::ensureBackwardsCFG): (JSC::DFG::Graph::ensureBackwardsDominators): (JSC::DFG::Graph::ensureControlEquivalenceAnalysis): * dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::JITCompiler): (JSC::DFG::JITCompiler::link): (JSC::DFG::JITCompiler::compile): (JSC::DFG::JITCompiler::compileFunction): (JSC::DFG::JITCompiler::addressOfDoubleConstant): * dfg/DFGLivenessAnalysisPhase.cpp: * dfg/DFGPlan.cpp: (JSC::DFG::Plan::compileInThreadImpl): * dfg/DFGSSAConversionPhase.cpp: (JSC::DFG::SSAConversionPhase::run): * dfg/DFGSlowPathGenerator.h: (JSC::DFG::slowPathCall): (JSC::DFG::slowPathMove): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::emitAllocateRawObject): (JSC::DFG::SpeculativeJIT::arrayify): (JSC::DFG::SpeculativeJIT::compileGetByValOnString): (JSC::DFG::SpeculativeJIT::compileCreateDirectArguments): (JSC::DFG::SpeculativeJIT::compileArraySlice): (JSC::DFG::SpeculativeJIT::emitStructureCheck): (JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize): * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::createNewThread): * disassembler/Disassembler.cpp: (JSC::disassembleAsynchronously): * ftl/FTLAbstractHeap.cpp: (JSC::FTL::IndexedAbstractHeap::atSlow): * ftl/FTLCompile.cpp: (JSC::FTL::compile): * ftl/FTLFail.cpp: (JSC::FTL::fail): * ftl/FTLLink.cpp: (JSC::FTL::link): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::lazySlowPath): * ftl/FTLState.cpp: (JSC::FTL::State::State): * heap/CompleteSubspace.cpp: (JSC::CompleteSubspace::allocatorForSlow): * heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::protectedObjectTypeCounts): (JSC::Heap::objectTypeCounts): (JSC::Heap::addCoreConstraints): * heap/HeapInlines.h: * heap/HeapSnapshotBuilder.cpp: (JSC::HeapSnapshotBuilder::buildSnapshot): * heap/IsoCellSet.cpp: (JSC::IsoCellSet::addSlow): * heap/IsoSubspace.cpp: (JSC::IsoSubspace::IsoSubspace): * heap/MarkingConstraintSet.cpp: (JSC::MarkingConstraintSet::add): * inspector/JSGlobalObjectConsoleClient.cpp: (Inspector::JSGlobalObjectConsoleClient::messageWithTypeAndLevel): (Inspector::JSGlobalObjectConsoleClient::profile): (Inspector::JSGlobalObjectConsoleClient::profileEnd): (Inspector::JSGlobalObjectConsoleClient::warnUnimplemented): * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController): (Inspector::JSGlobalObjectInspectorController::reportAPIException): (Inspector::JSGlobalObjectInspectorController::ensureInspectorAgent): (Inspector::JSGlobalObjectInspectorController::ensureDebuggerAgent): (Inspector::JSGlobalObjectInspectorController::createLazyAgents): * inspector/agents/InspectorAgent.cpp: (Inspector::InspectorAgent::InspectorAgent): * inspector/agents/InspectorConsoleAgent.cpp: (Inspector::InspectorConsoleAgent::InspectorConsoleAgent): (Inspector::InspectorConsoleAgent::startTiming): (Inspector::InspectorConsoleAgent::logTiming): (Inspector::InspectorConsoleAgent::stopTiming): (Inspector::InspectorConsoleAgent::count): (Inspector::InspectorConsoleAgent::countReset): * inspector/agents/InspectorDebuggerAgent.cpp: (Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent): * inspector/agents/InspectorHeapAgent.cpp: (Inspector::InspectorHeapAgent::InspectorHeapAgent): * inspector/agents/InspectorScriptProfilerAgent.cpp: (Inspector::InspectorScriptProfilerAgent::InspectorScriptProfilerAgent): * inspector/agents/InspectorTargetAgent.cpp: (Inspector::InspectorTargetAgent::InspectorTargetAgent): * inspector/agents/JSGlobalObjectDebuggerAgent.cpp: (Inspector::JSGlobalObjectDebuggerAgent::breakpointActionLog): * inspector/agents/JSGlobalObjectRuntimeAgent.cpp: (Inspector::JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent): * inspector/remote/socket/RemoteInspectorSocketEndpoint.cpp: (Inspector::RemoteInspectorSocketEndpoint::createClient): * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * inspector/scripts/codegen/objc_generator_templates.py: * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result: * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result: * inspector/scripts/tests/generic/expected/domain-availability.json-result: * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result: * inspector/scripts/tests/generic/expected/enum-values.json-result: * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result: * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result: * jit/JIT.cpp: (JSC::JIT::compileWithoutLinking): (JSC::JIT::link): * jit/JITThunks.cpp: (JSC::JITThunks::JITThunks): * jit/Repatch.cpp: (JSC::linkPolymorphicCall): * jsc.cpp: (runJSC): * parser/Parser.cpp: (JSC::Parser<LexerType>::Parser): * parser/Parser.h: (JSC::Scope::pushLabel): (JSC::Parser<LexerType>::parse): * parser/ParserArena.h: (JSC::ParserArena::identifierArena): * profiler/ProfilerCompilation.cpp: (JSC::Profiler::Compilation::executionCounterFor): * runtime/Error.cpp: (JSC::getStackTrace): * runtime/FunctionExecutable.cpp: (JSC::FunctionExecutable::ensureRareDataSlow): * runtime/FunctionRareData.h: (JSC::FunctionRareData::createAllocationProfileClearingWatchpoint): * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): (JSC::JSGlobalObject::tryInstallArraySpeciesWatchpoint): * runtime/JSGlobalObject.h: (JSC::JSGlobalObject::createRareDataIfNeeded): * runtime/JSRunLoopTimer.cpp: (JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData): (JSC::JSRunLoopTimer::Manager::registerVM): * runtime/PropertyMapHashTable.h: (JSC::PropertyTable::addDeletedOffset): * runtime/PropertyTable.cpp: (JSC::PropertyTable::PropertyTable): * runtime/RegExp.cpp: (JSC::RegExp::finishCreation): * runtime/RegExp.h: * runtime/ScriptExecutable.cpp: (JSC::ScriptExecutable::ensureTemplateObjectMapImpl): * runtime/Structure.cpp: (JSC::Structure::ensurePropertyReplacementWatchpointSet): * runtime/StructureRareData.cpp: (JSC::StructureRareData::setObjectToStringValue): * runtime/SymbolTable.cpp: (JSC::SymbolTable::localToEntry): (JSC::SymbolTable::cloneScopePart): (JSC::SymbolTable::prepareForTypeProfiling): (JSC::SymbolTable::setRareDataCodeBlock): * runtime/TypeSet.cpp: (JSC::StructureShape::propertyHash): * runtime/VM.cpp: (JSC::VM::VM): (JSC::VM::ensureHeapProfiler): (JSC::VM::enableTypeProfiler): (JSC::VM::enableControlFlowProfiler): (JSC::VM::queueMicrotask): (JSC::VM::ensureShadowChicken): * wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::AirIRGenerator::emitPatchpoint): (JSC::Wasm::AirIRGenerator::emitCheck): (JSC::Wasm::parseAndCompileAir): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): * wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::complete): * wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::work): * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::Worklist): * wasm/js/JSToWasm.cpp: (JSC::Wasm::createJSToWasmWrapper): * yarr/YarrInterpreter.cpp: (JSC::Yarr::ByteCompiler::compile): (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): (JSC::Yarr::ByteCompiler::regexBegin): * yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::compile): * yarr/YarrPattern.cpp: (JSC::Yarr::CharacterClassConstructor::charClass): (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor): (JSC::Yarr::YarrPatternConstructor::resetForReparsing): (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin): (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin): (JSC::Yarr::YarrPatternConstructor::copyDisjunction): (JSC::Yarr::anycharCreate): * yarr/YarrPattern.h: (JSC::Yarr::PatternDisjunction::addNewAlternative): * yarr/create_regex_tables: * yarr/generateYarrUnicodePropertyTables.py: Source/WebCore: Reviewed by Geoff Garen. * Modules/applicationmanifest/ApplicationManifestParser.cpp: (WebCore::ApplicationManifestParser::logDeveloperWarning): * Modules/beacon/NavigatorBeacon.cpp: (WebCore::NavigatorBeacon::from): * Modules/cache/DOMWindowCaches.cpp: (WebCore::DOMWindowCaches::from): * Modules/cache/WorkerGlobalScopeCaches.cpp: (WebCore::WorkerGlobalScopeCaches::from): * Modules/credentialmanagement/NavigatorCredentials.cpp: (WebCore::NavigatorCredentials::from): * Modules/encryptedmedia/InitDataRegistry.cpp: (WebCore::InitDataRegistry::extractPsshBoxesFromCenc): * Modules/encryptedmedia/legacy/LegacyCDM.cpp: (WebCore::LegacyCDM::create): * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp: (WebCore::LegacyCDMPrivateClearKey::createSession): * Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::loadBlob): * Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::fetch): (WebCore::FetchResponse::BodyLoader::start): * Modules/gamepad/NavigatorGamepad.cpp: (WebCore::NavigatorGamepad::from): * Modules/geolocation/GeolocationController.cpp: (WebCore::provideGeolocationTo): * Modules/geolocation/NavigatorGeolocation.cpp: (WebCore::NavigatorGeolocation::from): * Modules/indexeddb/DOMWindowIndexedDatabase.cpp: (WebCore::DOMWindowIndexedDatabase::from): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::index): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::createObjectStore): (WebCore::IDBTransaction::createIndex): * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: (WebCore::WorkerGlobalScopeIndexedDatabase::from): * Modules/indexeddb/client/IDBConnectionToServer.cpp: (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer): * Modules/indexeddb/client/TransactionOperation.cpp: (WebCore::IDBClient::TransactionOperation::TransactionOperation): * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase): (WebCore::IDBServer::IDBServer::createBackingStore): (WebCore::IDBServer::IDBServer::ensureQuotaUser): * Modules/indexeddb/server/IndexValueStore.cpp: (WebCore::IDBServer::IndexValueStore::addRecord): * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp: (WebCore::IDBServer::MemoryBackingStoreTransaction::create): (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction): (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged): * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: (WebCore::IDBServer::MemoryIDBBackingStore::create): (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo): * Modules/indexeddb/server/MemoryIndex.cpp: (WebCore::IDBServer::MemoryIndex::putIndexKey): (WebCore::IDBServer::MemoryIndex::maybeOpenCursor): * Modules/indexeddb/server/MemoryObjectStore.cpp: (WebCore::IDBServer::MemoryObjectStore::addRecord): (WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor): * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement): * Modules/indexeddb/server/SQLiteIDBCursor.cpp: (WebCore::IDBServer::SQLiteIDBCursor::maybeCreate): (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor): (WebCore::IDBServer::SQLiteIDBCursor::createSQLiteStatement): (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord): * Modules/indexeddb/server/SQLiteIDBTransaction.cpp: (WebCore::IDBServer::SQLiteIDBTransaction::begin): * Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore): (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp: (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction): * Modules/indexeddb/shared/IDBRequestData.cpp: (WebCore::IDBRequestData::IDBRequestData): (WebCore::IDBRequestData::isolatedCopy): * Modules/indexeddb/shared/IDBRequestData.h: (WebCore::IDBRequestData::decode): * Modules/indexeddb/shared/IDBResultData.cpp: (WebCore::IDBResultData::IDBResultData): (WebCore::IDBResultData::isolatedCopy): (WebCore::IDBResultData::openDatabaseSuccess): (WebCore::IDBResultData::openDatabaseUpgradeNeeded): (WebCore::IDBResultData::deleteDatabaseSuccess): (WebCore::IDBResultData::putOrAddSuccess): (WebCore::IDBResultData::getRecordSuccess): (WebCore::IDBResultData::getAllRecordsSuccess): (WebCore::IDBResultData::openCursorSuccess): (WebCore::IDBResultData::iterateCursorSuccess): * Modules/indexeddb/shared/IDBResultData.h: (WebCore::IDBResultData::decode): * Modules/indexeddb/shared/IDBTransactionInfo.cpp: (WebCore::IDBTransactionInfo::versionChange): (WebCore::IDBTransactionInfo::IDBTransactionInfo): (WebCore::IDBTransactionInfo::isolatedCopy): * Modules/indexeddb/shared/IDBTransactionInfo.h: (WebCore::IDBTransactionInfo::decode): * Modules/indexeddb/shared/InProcessIDBServer.cpp: (WebCore::InProcessIDBServer::quotaManager): * Modules/mediacapabilities/NavigatorMediaCapabilities.cpp: (WebCore::NavigatorMediaCapabilities::from): * Modules/mediasession/WebMediaSessionManager.cpp: (WebCore::WebMediaSessionManager::mockPicker): (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::buffered const): (WebCore::MediaSource::setLiveSeekableRange): * Modules/mediastream/NavigatorMediaDevices.cpp: (WebCore::NavigatorMediaDevices::from): * Modules/mediastream/UserMediaController.cpp: (WebCore::provideUserMediaTo): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: (WebCore::LibWebRTCDataChannelHandler::channelEvent): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): (WebCore::LibWebRTCMediaEndpoint::collectTransceivers): (WebCore::LibWebRTCMediaEndpoint::newTransceiver): (WebCore::LibWebRTCMediaEndpoint::createTransceiverBackends): (WebCore::LibWebRTCMediaEndpoint::transceiverBackendFromSender): (WebCore::LibWebRTCMediaEndpoint::createDataChannel): * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::createLibWebRTCPeerConnectionBackend): (WebCore::LibWebRTCPeerConnectionBackend::videoReceiver): (WebCore::LibWebRTCPeerConnectionBackend::audioReceiver): (WebCore::LibWebRTCPeerConnectionBackend::addTrack): (WebCore::LibWebRTCPeerConnectionBackend::addTransceiver): * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp: (WebCore::LibWebRTCRtpSenderBackend::createDTMFBackend): * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: (WebCore::LibWebRTCRtpTransceiverBackend::createReceiverBackend): (WebCore::LibWebRTCRtpTransceiverBackend::createSenderBackend): * Modules/notifications/Notification.cpp: (WebCore::Notification::Notification): * Modules/notifications/NotificationController.cpp: (WebCore::provideNotification): * Modules/quota/DOMWindowQuota.cpp: (WebCore::DOMWindowQuota::from): * Modules/quota/NavigatorStorageQuota.cpp: (WebCore::NavigatorStorageQuota::from): * Modules/quota/WorkerNavigatorStorageQuota.cpp: (WebCore::WorkerNavigatorStorageQuota::from): * Modules/speech/DOMWindowSpeechSynthesis.cpp: (WebCore::DOMWindowSpeechSynthesis::from): * Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::ensurePlatformSpeechSynthesizer): * Modules/webaudio/AsyncAudioDecoder.cpp: (WebCore::AsyncAudioDecoder::decodeAsync): * Modules/webaudio/AudioBasicInspectorNode.cpp: (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode): * Modules/webaudio/AudioBasicProcessorNode.cpp: (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode): * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::decodeAudioData): * Modules/webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::AudioDestinationNode): * Modules/webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): * Modules/webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::createKernel): (WebCore::BiquadProcessor::getFrequencyResponse): * Modules/webaudio/ChannelMergerNode.cpp: (WebCore::ChannelMergerNode::ChannelMergerNode): * Modules/webaudio/ChannelSplitterNode.cpp: (WebCore::ChannelSplitterNode::ChannelSplitterNode): * Modules/webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::ConvolverNode): (WebCore::ConvolverNode::setBuffer): * Modules/webaudio/DelayNode.cpp: (WebCore::DelayNode::DelayNode): * Modules/webaudio/DelayProcessor.cpp: (WebCore::DelayProcessor::createKernel): * Modules/webaudio/DynamicsCompressorNode.cpp: (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): (WebCore::DynamicsCompressorNode::initialize): * Modules/webaudio/GainNode.cpp: (WebCore::GainNode::GainNode): * Modules/webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::setFormat): * Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): (WebCore::MediaStreamAudioSourceNode::setFormat): * Modules/webaudio/OscillatorNode.cpp: (WebCore::OscillatorNode::OscillatorNode): * Modules/webaudio/PannerNode.cpp: (WebCore::PannerNode::PannerNode): * Modules/webaudio/PeriodicWave.cpp: (WebCore::PeriodicWave::createBandLimitedTables): * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::RealtimeAnalyser): (WebCore::RealtimeAnalyser::setFftSize): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::ScriptProcessorNode): * Modules/webaudio/WaveShaperDSPKernel.cpp: (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling): * Modules/webaudio/WaveShaperNode.cpp: (WebCore::WaveShaperNode::WaveShaperNode): * Modules/webaudio/WaveShaperProcessor.cpp: (WebCore::WaveShaperProcessor::createKernel): * Modules/webauthn/fido/FidoHidMessage.cpp: (fido::FidoHidMessage::FidoHidMessage): * Modules/webauthn/fido/FidoHidPacket.cpp: (fido::FidoHidInitPacket::createFromSerializedData): (fido::FidoHidContinuationPacket::createFromSerializedData): * Modules/webdatabase/Database.cpp: (WebCore::Database::openAndVerifyVersion): (WebCore::Database::close): (WebCore::Database::scheduleTransaction): (WebCore::Database::scheduleTransactionStep): (WebCore::Database::tableNames): * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::DatabaseTracker::recordCreatingDatabase): (WebCore::DatabaseTracker::recordDeletingDatabase): * Modules/webdatabase/SQLTransaction.cpp: (WebCore::SQLTransaction::executeSql): (WebCore::SQLTransaction::openTransactionAndPreflight): * Modules/webdriver/NavigatorWebDriver.cpp: (WebCore::NavigatorWebDriver::from): * Modules/webgpu/NavigatorGPU.cpp: (WebCore::NavigatorGPU::from): * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h: * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h: * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding): (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding): * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: (WebCore::WHLSL::Metal::TypeNamer::createNameNode): * Modules/webgpu/WHLSL/WHLSLChecker.cpp: (WebCore::WHLSL::Checker::assignConcreteType): (WebCore::WHLSL::Checker::assignType): (WebCore::WHLSL::Checker::forwardType): * Modules/webgpu/WHLSL/WHLSLParser.cpp: (WebCore::WHLSL::Parser::parseSemantic): * Modules/webgpu/WorkerNavigatorGPU.cpp: (WebCore::WorkerNavigatorGPU::from): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake): (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError): (WebCore::ThreadableWebSocketChannelClientWrapper::didUpgradeURL): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): * Modules/websockets/WebSocketDeflateFramer.cpp: (WebCore::WebSocketDeflateFramer::createExtensionProcessor): (WebCore::WebSocketDeflateFramer::enableDeflate): (WebCore::WebSocketDeflateFramer::deflate): (WebCore::WebSocketDeflateFramer::inflate): * Modules/websockets/WebSocketDeflater.cpp: (WebCore::WebSocketDeflater::WebSocketDeflater): (WebCore::WebSocketInflater::WebSocketInflater): * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): * Modules/webvr/NavigatorWebVR.cpp: (WebCore::NavigatorWebVR::from): * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates): * animation/WebAnimation.cpp: (WebCore::WebAnimation::updateFinishedState): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::queueTaskToEventLoop): * bindings/js/JSEventTargetCustom.cpp: (WebCore::jsEventTargetCast): * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop): * bindings/js/SerializedScriptValue.cpp: (WebCore::transferArrayBuffers): (WebCore::SerializedScriptValue::create): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::decode): * bindings/js/WebCoreJSClientData.cpp: (WebCore::JSVMClientData::initNormalWorld): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodNamed const): (JSC::Bindings::CClass::fieldNamed const): * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::methodNamed const): (JSC::Bindings::ObjcClass::fieldNamed const): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::CombinedURLFilters::CombinedURLFilters): (WebCore::ContentExtensions::CombinedURLFilters::addPattern): * crypto/SubtleCrypto.cpp: (WebCore::normalizeCryptoAlgorithmParameters): (WebCore::crossThreadCopyImportParams): * css/CSSCalculationValue.cpp: (WebCore::determineCategory): * css/CSSDefaultStyleSheets.cpp: (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle): (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle): * css/CSSFontFace.cpp: (WebCore::CSSFontFace::appendSources): * css/CSSFontFaceSet.cpp: (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered): * css/CSSGroupingRule.cpp: (WebCore::CSSGroupingRule::cssRules const): * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): * css/CSSKeyframesRule.cpp: (WebCore::CSSKeyframesRule::cssRules): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::cssRules): * css/DOMCSSPaintWorklet.cpp: (WebCore::DOMCSSPaintWorklet::from): * css/DOMCSSRegisterCustomProperty.cpp: (WebCore::DOMCSSRegisterCustomProperty::from): * css/DocumentRuleSets.cpp: (WebCore::DocumentRuleSets::DocumentRuleSets): (WebCore::DocumentRuleSets::updateUserAgentMediaQueryStyleIfNeeded const): (WebCore::DocumentRuleSets::initializeUserStyle): (WebCore::makeRuleSet): (WebCore::DocumentRuleSets::resetAuthorStyle): (WebCore::ensureInvalidationRuleSets): * css/ElementRuleCollector.cpp: (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot): * css/FontFace.cpp: (WebCore::populateFontFaceWithArrayBuffer): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM): * css/RuleFeature.cpp: (WebCore::RuleFeatureSet::collectFeatures): (WebCore::RuleFeatureSet::add): * css/RuleSet.cpp: (WebCore::RuleSet::addToRuleSet): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertTo100PercentMinusLength): * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue): (WebCore::StyleBuilderCustom::applyInheritTextShadow): (WebCore::StyleBuilderCustom::applyInheritBoxShadow): (WebCore::StyleBuilderCustom::applyValueContent): * css/StyleProperties.cpp: (WebCore::MutableStyleProperties::ensureCSSStyleDeclaration): (WebCore::MutableStyleProperties::ensureInlineCSSStyleDeclaration): * css/StyleResolver.cpp: (WebCore::StyleResolver::cascadedPropertiesForRollback): * css/makeprop.pl: (generateFillLayerPropertyInheritValueSetter): (generateFillLayerPropertyValueSetter): * css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::CSSParserImpl): (WebCore::CSSParserImpl::parsePageSelector): (WebCore::CSSParserImpl::consumeMediaRule): (WebCore::CSSParserImpl::consumeSupportsRule): (WebCore::CSSParserImpl::consumeKeyframesRule): * css/parser/CSSParserSelector.cpp: (WebCore::CSSParserSelector::parsePagePseudoSelector): (WebCore::CSSParserSelector::parsePseudoElementSelector): (WebCore::CSSParserSelector::parsePseudoClassSelector): (WebCore::CSSParserSelector::CSSParserSelector): (WebCore::CSSParserSelector::adoptSelectorVector): (WebCore::CSSParserSelector::prependTagSelector): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBasicShapePath): * css/parser/CSSSelectorParser.cpp: (WebCore::CSSSelectorParser::consumePseudo): * dom/CustomElementReactionQueue.cpp: (WebCore::CustomElementReactionQueue::ensureBackupQueue): * dom/DataTransfer.cpp: (WebCore::DataTransfer::items): (WebCore::DataTransfer::createForInputEvent): (WebCore::DataTransfer::createForDragStartEvent): (WebCore::DataTransfer::setDragImage): * dom/DeviceOrientationController.cpp: (WebCore::provideDeviceOrientationTo): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::buildAccessKeyCache): (WebCore::Document::implementation): (WebCore::Document::formController): (WebCore::Document::updateTextRenderer): (WebCore::Document::userAgentShadowTreeStyleResolver): (WebCore::Document::axObjectCache const): (WebCore::Document::setParsing): (WebCore::Document::accessSVGExtensions): (WebCore::Document::initSecurityContext): (WebCore::Document::textAutoSizing): (WebCore::Document::didAddWheelEventHandler): (WebCore::Document::didAddTouchEventHandler): (WebCore::Document::didLogMessage): (WebCore::Document::registerCSSProperty): (WebCore::Document::deviceOrientationAndMotionAccessController): (WebCore::Document::contentChangeObserver): (WebCore::Document::domTimerHoldingTank): * dom/Document.h: (WebCore::Document::createParserYieldToken): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::DocumentEventQueue): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): * dom/DocumentStorageAccess.cpp: (WebCore::DocumentStorageAccess::from): (WebCore::DocumentStorageAccess::requestStorageAccess): (WebCore::DocumentStorageAccess::enableTemporaryTimeUserGesture): * dom/Element.cpp: (WebCore::Element::attributes const): (WebCore::Element::setIsDefinedCustomElement): (WebCore::Element::enqueueToUpgrade): (WebCore::Element::classList): (WebCore::Element::dataset): (WebCore::Element::ensureIntersectionObserverData): (WebCore::Element::ensureResizeObserverData): * dom/EventListenerMap.cpp: (WebCore::EventListenerMap::add): * dom/EventNames.h: * dom/EventPath.cpp: (WebCore::EventPath::buildPath): (WebCore::EventPath::EventPath): * dom/IdTargetObserverRegistry.cpp: (WebCore::IdTargetObserverRegistry::addObserver): * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::KeyboardEvent): * dom/MutationObserver.cpp: (WebCore::queueMutationObserverCompoundMicrotask): * dom/MutationObserverInterestGroup.cpp: (WebCore::MutationObserverInterestGroup::createIfNeeded): * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): * dom/Node.cpp: (WebCore::Node::materializeRareData): (WebCore::Node::ensureEventTargetData): (WebCore::Node::registerMutationObserver): * dom/NodeRareData.h: (WebCore::NodeRareData::ensureNodeLists): (WebCore::NodeRareData::ensureMutationObserverData): * dom/RadioButtonGroups.cpp: (WebCore::RadioButtonGroups::addButton): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::reportException): (WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection): (WebCore::ScriptExecutionContext::ensureRejectedPromiseTrackerSlow): * dom/SelectorQuery.cpp: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): (WebCore::ShadowRoot::moveShadowRootToNewDocument): (WebCore::ShadowRoot::addSlotElementByName): * dom/SlotAssignment.cpp: (WebCore::SlotAssignment::addSlotElementByName): (WebCore::SlotAssignment::assignToSlot): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::addElementById): (WebCore::TreeScope::addElementByName): (WebCore::TreeScope::addImageMap): (WebCore::TreeScope::addImageElementByUsemap): (WebCore::TreeScope::labelElementForId): * editing/Editor.cpp: (WebCore::createDataTransferForClipboardEvent): (WebCore::Editor::Editor): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::ensureReplacementFragment): * editing/SelectionRectGatherer.cpp: (WebCore::SelectionRectGatherer::clearAndCreateNotifier): * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): * editing/cocoa/HTMLConverter.mm: (HTMLConverter::HTMLConverter): (HTMLConverterCaches::computedStylePropertyForElement): * editing/markup.cpp: (WebCore::createPageForSanitizingWebContent): * fileapi/AsyncFileStream.cpp: (WebCore::callOnFileThread): (WebCore::AsyncFileStream::AsyncFileStream): * fileapi/FileReader.cpp: (WebCore::FileReader::readInternal): * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): * history/PageCache.cpp: (WebCore::PageCache::addIfCacheable): * html/FileInputType.cpp: (WebCore::FileInputType::requestIcon): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): * html/FormController.cpp: (WebCore::SavedFormState::deserialize): (WebCore::FormController::createSavedFormStateMap): (WebCore::FormController::takeStateForFormElement): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::relList const): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::mapMouseEvent): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::setImageBuffer const): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::updateNamedElementCache const): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::create): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::updateVisibleValidationMessage): * html/HTMLFormControlsCollection.cpp: (WebCore::HTMLFormControlsCollection::updateNamedElementCache const): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::addToPastNamesMap): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::sandbox): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::ensureImageLoader): (WebCore::HTMLInputElement::resetListAttributeTargetObserver): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::sizes): (WebCore::HTMLLinkElement::relList): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::finishInitialization): (WebCore::HTMLMediaElement::seekWithTolerance): * html/HTMLOutputElement.cpp: (WebCore::HTMLOutputElement::htmlFor): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::create): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::didAttachRenderers): (WebCore::HTMLVideoElement::parseAttribute): * html/PublicURLManager.cpp: (WebCore::PublicURLManager::create): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessage): (WebCore::ValidationMessage::setMessageDOMAndStartTimer): (WebCore::ValidationMessage::requestToHideMessage): * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::DisplayListDrawingContext::DisplayListDrawingContext): (WebCore::CanvasRenderingContext2DBase::drawingContext const): * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getExtension): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::initializeNewContext): (WebCore::WebGLRenderingContextBase::compileShader): (WebCore::WebGLRenderingContextBase::printToConsole): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::emitRule): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::insert): * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::insertAbove): (WebCore::HTMLElementStack::pushCommon): * html/parser/HTMLPreloadScanner.cpp: (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): * html/parser/HTMLToken.h: (WebCore::HTMLToken::beginDOCTYPE): * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::filterToken): (WebCore::XSSAuditor::decodedHTTPBodySuffixTree): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerTextElement::resolveCustomStyle): * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::parser): * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::parser): * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::loadTimerFired): * inspector/CommandLineAPIHost.cpp: (WebCore::CommandLineAPIHost::CommandLineAPIHost): (WebCore::CommandLineAPIHost::clearAllWrappers): * inspector/DOMEditor.cpp: (WebCore::DOMEditor::insertBefore): (WebCore::DOMEditor::removeChild): (WebCore::DOMEditor::setAttribute): (WebCore::DOMEditor::removeAttribute): (WebCore::DOMEditor::setOuterHTML): (WebCore::DOMEditor::insertAdjacentHTML): (WebCore::DOMEditor::replaceWholeText): (WebCore::DOMEditor::replaceChild): (WebCore::DOMEditor::setNodeValue): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::createLazyAgents): (WebCore::InspectorController::ensureInspectorAgent): (WebCore::InspectorController::ensureDOMAgent): (WebCore::InspectorController::ensurePageAgent): * inspector/InspectorHistory.cpp: (WebCore::InspectorHistory::markUndoableState): * inspector/InspectorStyleSheet.cpp: (ParsedStyleSheet::setSourceData): (WebCore::InspectorStyleSheet::ensureSourceData): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::resourceCreated): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): (WebCore::WorkerInspectorController::createLazyAgents): * inspector/agents/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): * inspector/agents/InspectorCPUProfilerAgent.cpp: (WebCore::InspectorCPUProfilerAgent::InspectorCPUProfilerAgent): * inspector/agents/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::setStyleSheetText): (WebCore::InspectorCSSAgent::setStyleText): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): * inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): (WebCore::InspectorCanvasAgent::recordCanvasAction): * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMAgent::pushNodePathToFrontend): (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightQuad): (WebCore::InspectorDOMAgent::innerHighlightQuad): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::setInspectedNode): (WebCore::InspectorDOMAgent::didInvalidateStyleAttr): * inspector/agents/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): * inspector/agents/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent): * inspector/agents/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent): * inspector/agents/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::InspectorNetworkAgent): * inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): * inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::internalStart): (WebCore::InspectorTimelineAgent::startFromConsole): (WebCore::InspectorTimelineAgent::stopFromConsole): * inspector/agents/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::didReceiveResponse): (WebCore::WebConsoleAgent::didFailLoading): * inspector/agents/WebHeapAgent.cpp: (WebCore::WebHeapAgent::WebHeapAgent): * inspector/agents/page/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::PageRuntimeAgent): * inspector/agents/worker/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::breakpointActionLog): * layout/LayoutState.cpp: (WebCore::Layout::LayoutState::displayBoxForLayoutBox const): (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded): (WebCore::Layout::LayoutState::createFormattingContext): * layout/inlineformatting/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::collectInlineContent const): * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const): * layout/inlineformatting/InlineLine.cpp: (WebCore::Layout::Line::Line): (WebCore::Layout::Line::appendNonBreakableSpace): (WebCore::Layout::Line::appendTextContent): (WebCore::Layout::Line::appendNonReplacedInlineBox): (WebCore::Layout::Line::appendHardLineBreak): * layout/inlineformatting/InlineTextItem.cpp: (WebCore::Layout::InlineTextItem::createAndAppendTextItems): (WebCore::Layout::InlineTextItem::split const): * layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::Box): (WebCore::Layout::Box::ensureRareData): * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createLayoutBox): (WebCore::Layout::TreeBuilder::createTableStructure): (WebCore::Layout::printLayoutTreeForLiveDocuments): * layout/tableformatting/TableGrid.cpp: (WebCore::Layout::TableGrid::appendCell): * loader/ContentFilter.cpp: (WebCore::ContentFilter::create): * loader/CrossOriginAccessControl.cpp: (WebCore::validatePreflightResponse): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::loadApplicationManifest): (WebCore::DocumentLoader::addAllArchiveResources): (WebCore::DocumentLoader::addArchiveResource): (WebCore::DocumentLoader::loadMainResource): (WebCore::DocumentLoader::didGetLoadDecisionForIcon): * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::init): (WebCore::FrameLoader::initForSynthesizedDocument): (WebCore::FrameLoader::detachChildren): * loader/LinkLoader.cpp: (WebCore::createLinkPreloadResourceClient): * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::scheduleRedirect): (WebCore::NavigationScheduler::scheduleLocationChange): (WebCore::NavigationScheduler::scheduleFormSubmission): (WebCore::NavigationScheduler::scheduleRefresh): (WebCore::NavigationScheduler::scheduleHistoryNavigation): (WebCore::NavigationScheduler::schedulePageBlock): * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::incrementProgress): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::checkForHeadCharset): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::setBodyDataFrom): (WebCore::CachedImage::createImage): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::redirectReceived): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::addClientToSet): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::preload): (WebCore::CachedResourceLoader::clearPreloads): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::ensureSessionResourceMap): (WebCore::MemoryCache::addImageToCache): (WebCore::MemoryCache::lruListFor): * loader/ios/PreviewLoader.mm: (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]): (-[WebPreviewLoader connection:didFailWithError:]): (WebCore::PreviewLoader::create): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::maybeCreateContextMenu): * page/DebugPageOverlays.cpp: (WebCore::MouseWheelRegionOverlay::updateRegion): * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): * page/FrameView.cpp: (WebCore::FrameView::addEmbeddedObjectToUpdate): (WebCore::FrameView::addSlowRepaintObject): (WebCore::FrameView::addViewportConstrainedObject): (WebCore::FrameView::addScrollableArea): * page/FrameViewLayoutContext.cpp: (WebCore::FrameViewLayoutContext::pushLayoutState): (WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded): * page/NavigatorBase.cpp: (WebCore::NavigatorBase::serviceWorker): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::initGroup): (WebCore::Page::setResourceUsageOverlayVisible): * page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::addMessage): (WebCore::PageConsoleClient::messageWithTypeAndLevel): (WebCore::PageConsoleClient::screenshot): * page/PageGroup.cpp: (WebCore::PageGroup::captionPreferences): * page/Performance.cpp: (WebCore::Performance::mark): (WebCore::Performance::clearMarks): (WebCore::Performance::measure): (WebCore::Performance::clearMeasures): * page/PrintContext.cpp: (WebCore::PrintContext::outputLinkedDestinations): * page/RenderingUpdateScheduler.cpp: (WebCore::RenderingUpdateScheduler::startTimer): * page/RenderingUpdateScheduler.h: (WebCore::RenderingUpdateScheduler::create): * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): * page/SettingsBase.cpp: (WebCore::SettingsBase::SettingsBase): * page/UserContentController.cpp: (WebCore::UserContentController::addUserScript): (WebCore::UserContentController::addUserStyleSheet): * page/WheelEventDeltaFilter.cpp: (WebCore::WheelEventDeltaFilter::create): * page/animation/CSSAnimationController.cpp: (WebCore::CSSAnimationController::CSSAnimationController): * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::updateSourceSelf): * page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::create): (WebCore::ContentSecurityPolicyDirectiveList::setCSPDirective): * page/linux/ResourceUsageOverlayLinux.cpp: (WebCore::ResourceUsageOverlay::platformInitialize): * page/mac/PageMac.mm: (WebCore::Page::addSchedulePair): * page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator): * page/scrolling/ScrollingMomentumCalculator.cpp: (WebCore::ScrollingMomentumCalculator::create): * page/scrolling/ScrollingStateNode.cpp: (WebCore::ScrollingStateNode::appendChild): (WebCore::ScrollingStateNode::insertChild): * page/scrolling/ScrollingStateTree.cpp: (WebCore::ScrollingStateTree::commit): * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::appendChild): * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm: (WebCore::ScrollingMomentumCalculator::create): * platform/Length.cpp: (WebCore::convertTo100PercentMinusLength): (WebCore::blendMixedTypes): * platform/RemoteCommandListener.cpp: (WebCore::RemoteCommandListener::create): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::create): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollAnimator const): (WebCore::ScrollableArea::ensureSnapOffsetsInfo): * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): * platform/audio/AudioBus.cpp: (WebCore::AudioBus::AudioBus): (WebCore::AudioBus::copyWithGainFrom): * platform/audio/AudioChannel.h: * platform/audio/AudioResampler.cpp: (WebCore::AudioResampler::AudioResampler): (WebCore::AudioResampler::configureChannels): * platform/audio/DynamicsCompressor.cpp: (WebCore::DynamicsCompressor::setNumberOfChannels): * platform/audio/DynamicsCompressorKernel.cpp: (WebCore::DynamicsCompressorKernel::setNumberOfChannels): * platform/audio/FFTFrame.cpp: (WebCore::FFTFrame::createInterpolatedFrame): * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::load): * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::createForSubject): (WebCore::HRTFElevation::createByInterpolatingSlices): * platform/audio/HRTFKernel.cpp: (WebCore::HRTFKernel::HRTFKernel): (WebCore::HRTFKernel::createImpulseResponse): * platform/audio/MultiChannelResampler.cpp: (WebCore::MultiChannelResampler::MultiChannelResampler): * platform/audio/Panner.cpp: (WebCore::Panner::create): * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::create): * platform/audio/Reverb.cpp: (WebCore::Reverb::initialize): * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::ReverbConvolver): * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::ReverbConvolverStage): * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: (WebCore::AudioDestination::create): * platform/audio/ios/AudioDestinationIOS.cpp: (WebCore::AudioDestination::create): * platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::AudioSession): * platform/audio/mac/AudioDestinationMac.cpp: (WebCore::AudioDestination::create): * platform/audio/mac/AudioSampleDataSource.mm: (WebCore::AudioSampleDataSource::setInputFormat): (WebCore::AudioSampleDataSource::setOutputFormat): * platform/audio/mac/AudioSessionMac.cpp: (WebCore::AudioSession::AudioSession): * platform/cf/KeyedDecoderCF.cpp: (WebCore::KeyedDecoder::decoder): * platform/cf/KeyedEncoderCF.cpp: (WebCore::KeyedEncoder::encoder): * platform/cf/MainThreadSharedTimerCF.cpp: (WebCore::setupPowerObserver): * platform/cocoa/NetworkExtensionContentFilter.mm: (WebCore::NetworkExtensionContentFilter::create): * platform/cocoa/ParentalControlsContentFilter.mm: (WebCore::ParentalControlsContentFilter::create): * platform/cocoa/ScrollController.mm: (WebCore::ScrollController::updateScrollSnapPoints): * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::CDMFactoryClearKey::createCDM): * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: (WebCore::GameControllerGamepadProvider::controllerDidConnect): * platform/gamepad/mac/HIDGamepadProvider.cpp: (WebCore::HIDGamepadProvider::deviceAdded): * platform/generic/KeyedDecoderGeneric.cpp: (WebCore::KeyedDecoderGeneric::Dictionary::add): (WebCore::KeyedDecoder::decoder): (WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric): * platform/generic/KeyedEncoderGeneric.cpp: (WebCore::KeyedEncoder::encoder): * platform/generic/ScrollAnimatorGeneric.cpp: (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric): (WebCore::ScrollAnimatorGeneric::ensureSmoothScrollingAnimation): * platform/glib/KeyedDecoderGlib.cpp: (WebCore::KeyedDecoder::decoder): * platform/glib/KeyedEncoderGlib.cpp: (WebCore::KeyedEncoder::encoder): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startTimer): (WebCore::BitmapImage::decode): * platform/graphics/ComplexTextController.cpp: (WebCore::TextLayout::TextLayout): * platform/graphics/Font.cpp: (WebCore::Font::ensureDerivedFontData const): * platform/graphics/Font.h: (WebCore::Font::boundsForGlyph const): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getCachedFontPlatformData): * platform/graphics/FontCascade.cpp: (WebCore::retrieveOrAddCachedFonts): (WebCore::FontCascade::displayListForTextRun const): * platform/graphics/FontCascadeFonts.cpp: (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setGlyphDataForCharacter): * platform/graphics/GlyphMetricsMap.h: (WebCore::GlyphMetricsMap<T>::locatePageSlowCase): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::setTransform): (WebCore::GraphicsLayer::setChildrenTransform): * platform/graphics/GraphicsLayer.h: * platform/graphics/Image.cpp: (WebCore::Image::startAnimationAsynchronously): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::MediaPlayer): (WebCore::MediaPlayer::loadWithNextMediaEngine): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::seekable const): * platform/graphics/PathUtilities.cpp: (WebCore::FloatPointGraph::findOrCreateNode): * platform/graphics/Region.cpp: (WebCore::Region::setShape): * platform/graphics/Region.h: (WebCore::Region::copyShape const): (WebCore::Region::decode): * platform/graphics/TextTrackRepresentation.cpp: (WebCore::TextTrackRepresentation::create): * platform/graphics/angle/GraphicsContext3DANGLE.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::prepare): * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: (WebCore::CDMFactoryFairPlayStreaming::createCDM): * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::buffered const): * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp: (WebCore::WebMediaSessionManagerMac::platformPicker): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges const): (WebCore::MediaPlayerPrivateAVFoundationCF::createSession): (WebCore::AVFWrapper::notificationCallback): (WebCore::AVFWrapper::legibleOutputCallback): (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource): (WebCore::AVFWrapper::platformLayer): * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): (WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack): (WebCore::AudioTrackPrivateAVFObjC::setAssetTrack): (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC): (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack): * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::readTrackMetadata): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRotationSession): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateAVFoundationObjC::createSession): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastImage): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage): * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): (WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack): (WebCore::VideoTrackPrivateAVFObjC::setAssetTrack): (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm: (WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC): (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): (WebCore::GraphicsLayerCA::ensureLayerAnimations): (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): * platform/graphics/ca/TileController.cpp: (WebCore::TileController::TileController): (WebCore::TileController::setContentsScale): (WebCore::TileController::adjustTileCoverageRectForScrolling): (WebCore::TileController::tiledScrollingIndicatorLayer): * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayerCocoa::commonInit): (WebCore::PlatformCALayerCocoa::setShapeRoundedRect): * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: (-[WebTiledBackingLayer createTileController:]): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::PlatformCALayerWin): * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: (WebTiledBackingLayerWin::createTileController): * platform/graphics/cairo/GraphicsContextImplCairo.cpp: (WebCore::GraphicsContextImplCairo::createFactory): (WebCore::m_private): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBufferData::swapBuffersIfNeeded): (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: (WebCore::FontFamilySpecificationCoreText::fontRanges const): * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::ensureGraphicsContext): * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: (TextTrackRepresentation::create): * platform/graphics/cv/TextureCacheCV.mm: (WebCore::TextureCacheCV::create): * platform/graphics/displaylists/DisplayListReplayer.cpp: (WebCore::DisplayList::Replayer::replay): * platform/graphics/filters/FilterOperation.cpp: (WebCore::ReferenceFilterOperation::loadExternalDocumentIfNeeded): * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/gpu/Texture.cpp: (WebCore::Texture::create): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): (WebCore::MediaPlayerPrivateGStreamer::buffered const): (WebCore::MediaPlayerPrivateGStreamer::ensureAudioSourceProvider): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor): (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime): (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcMakeRequest): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine): (WebCore::MediaPlayerPrivateGStreamerMSE::buffered const): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp: (WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer): (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine): * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: * platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp: (WebCore::ISOProtectionSchemeInfoBox::parse): * platform/graphics/iso/ISOSchemeInformationBox.cpp: (WebCore::ISOSchemeInformationBox::parse): * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/nicosia/NicosiaSceneIntegration.cpp: (Nicosia::SceneIntegration::createUpdateScope): * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::createCommand): * platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp: (Nicosia::PaintingContextCairo::ForPainting::ForPainting): (Nicosia::PaintingContextCairo::ForRecording::ForRecording): * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp: (Nicosia::BackingStoreTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp: (Nicosia::CompositionLayerTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp: (Nicosia::ContentLayerTextureMapperImpl::createFactory): * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: (Nicosia::GC3DLayer::swapBuffersIfNeeded): * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.cpp: (Nicosia::ImageBackingTextureMapperImpl::createFactory): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::mappedSymbolName): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp: (WebCore::TextureMapperGC3DPlatformLayer::swapBuffersIfNeeded): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): (WebCore::TextureMapper::platformCreateAccelerated): * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: (WebCore::TextureMapperPlatformLayerBuffer::clone): * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: (WebCore::TiledBackingStore::createTiles): * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::operator=): (WebCore::TransformState::applyTransform): (WebCore::TransformState::setLastPlanarSecondaryQuad): * platform/graphics/transforms/TransformState.h: (WebCore::TransformState::setSecondaryQuad): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/win/FontCustomPlatformDataCairo.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/win/FullScreenController.cpp: (WebCore::FullScreenController::FullScreenController): (WebCore::FullScreenController::enterFullScreen): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::platformInit): * platform/graphics/win/GraphicsContextDirect2D.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::platformInit): * platform/graphics/win/GraphicsContextImplDirect2D.cpp: (WebCore::GraphicsContextImplDirect2D::createFactory): (WebCore::m_private): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::createWindowsBitmap): * platform/graphics/win/ImageBufferDirect2D.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine): (WebCore::MediaPlayerPrivateMediaFoundation::buffered const): (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CustomVideoPresenter): * platform/graphics/win/WKCAImageQueue.cpp: (WebCore::WKCAImageQueue::WKCAImageQueue): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForGlobalSelection): (WebCore::Pasteboard::createForDragAndDrop): * platform/gtk/PasteboardHelper.cpp: (WebCore::PasteboardHelper::writeClipboardContents): * platform/gtk/RenderThemeGadget.cpp: (WebCore::RenderThemeGadget::create): * platform/gtk/RenderThemeWidget.cpp: (WebCore::RenderThemeWidget::getOrCreate): (WebCore::RenderThemeScrollbar::RenderThemeScrollbar): (WebCore::RenderThemeComboBox::RenderThemeComboBox): * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::decodeHelper): * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::decode): * platform/image-decoders/gif/GIFImageReader.cpp: (GIFFrameContext::decode): (GIFImageReader::addFrameIfNecessary): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::decodeAtIndex): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::decode): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::decode): * platform/ios/LegacyTileCache.mm: (WebCore::LegacyTileCache::LegacyTileCache): (WebCore::LegacyTileCache::commitScaleChange): * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::createForDragAndDrop): (WebCore::Pasteboard::createForCopyAndPaste): * platform/ios/QuickLook.mm: (WebCore::registerQLPreviewConverterIfNeeded): * platform/ios/RemoteCommandListenerIOS.mm: (WebCore::RemoteCommandListener::create): * platform/ios/ScrollAnimatorIOS.mm: (WebCore::ScrollAnimator::create): * platform/libwpe/PasteboardLibWPE.cpp: (WebCore::Pasteboard::createForCopyAndPaste): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): * platform/mac/RemoteCommandListenerMac.mm: (WebCore::RemoteCommandListener::create): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimator::create): * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: (WebCore::MediaRecorderPrivateAVFImpl::create): * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp: (WebCore::m_capturer): (WebCore::GStreamerAudioCaptureSource::GStreamerAudioCaptureSource): * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: (WebCore::webkit_media_stream_src_init): * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp: (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource): (WebCore::m_capturer): * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: (WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::BasicPacketSocketFactory::BasicPacketSocketFactory): (WebCore::initializePeerConnectionFactoryAndThreads): (WebCore::LibWebRTCProvider::createPeerConnection): (WebCore::LibWebRTCProvider::certificateGenerator): * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp: (WebCore::LibWebRTCProviderGStreamer::createDecoderFactory): (WebCore::LibWebRTCProviderGStreamer::createEncoderFactory): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable): * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm: (WebCore::MockRealtimeAudioSourceMac::reconfigure): * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm: (WebCore::RealtimeOutgoingVideoSourceCocoa::convertToYUV): (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer): * platform/mock/RTCNotifiersMock.cpp: (WebCore::RemoteDataChannelNotifier::fire): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::registerMediaEngine): (WebCore::MockMediaPlayerMediaSource::buffered const): * platform/network/BlobResourceHandle.cpp: * platform/network/DataURLDecoder.cpp: (WebCore::DataURLDecoder::createDecodeTask): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): * platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSessionDataTask _restart]): * platform/network/curl/CookieJarDB.cpp: (WebCore::CookieJarDB::searchCookies): (WebCore::CookieJarDB::createPrepareStatement): * platform/network/curl/CurlCacheManager.cpp: (WebCore::CurlCacheManager::loadIndex): (WebCore::CurlCacheManager::didReceiveResponse): * platform/network/curl/CurlContext.cpp: (WebCore::CurlContext::CurlContext): (WebCore::CurlHandle::willSetupSslCtx): * platform/network/curl/CurlFormDataStream.cpp: (WebCore::CurlFormDataStream::getPostData): * platform/network/curl/CurlMultipartHandle.cpp: (WebCore::CurlMultipartHandle::createIfNeeded): * platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::runOnMainThread): (WebCore::CurlRequest::setupTransfer): * platform/network/curl/CurlRequestScheduler.cpp: (WebCore::CurlRequestScheduler::workerThread): * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::delegate): * platform/network/curl/SocketStreamHandleImplCurl.cpp: (WebCore::SocketStreamHandleImpl::callOnWorkerThread): * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]): * platform/network/soup/DNSResolveQueueSoup.cpp: (WebCore::DNSResolveQueueSoup::resolve): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage): * platform/text/BidiResolver.h: (WebCore::DerivedClass>::appendRunInternal): * platform/text/LocaleICU.cpp: (WebCore::Locale::create): (WebCore::LocaleICU::createLabelVector): (WebCore::createFallbackMonthLabels): (WebCore::createFallbackAMPMLabels): * platform/text/LocaleNone.cpp: (WebCore::Locale::create): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerCodecs): * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::registerCodecs): * platform/text/TextCodecReplacement.cpp: (WebCore::TextCodecReplacement::registerCodecs): * platform/text/TextCodecUTF16.cpp: (WebCore::TextCodecUTF16::registerCodecs): * platform/text/TextCodecUTF8.cpp: (WebCore::TextCodecUTF8::registerCodecs): * platform/text/TextCodecUserDefined.cpp: (WebCore::TextCodecUserDefined::registerCodecs): * platform/text/mac/LocaleMac.mm: (WebCore::Locale::create): * platform/text/win/LocaleWin.cpp: (WebCore::Locale::create): * platform/text/win/TextCodecWin.cpp: (WebCore::newTextCodecWin): * platform/vr/openvr/VRPlatformManagerOpenVR.cpp: (WebCore::VRPlatformManagerOpenVR::create): (WebCore::VRPlatformManagerOpenVR::getVRDisplays): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::createForCopyAndPaste): (WebCore::Pasteboard::createForDragAndDrop): * platform/win/SearchPopupMenuDB.cpp: (WebCore::SearchPopupMenuDB::createPreparedStatement): * platform/win/WCDataObject.cpp: (WebCore::WCDataObject::SetData): * rendering/CSSFilter.cpp: (WebCore::CSSFilter::buildReferenceFilter): * rendering/ComplexLineLayout.cpp: (WebCore::createRun): (WebCore::ComplexLineLayout::createRootInlineBox): (WebCore::ComplexLineLayout::handleTrailingSpaces): (WebCore::ComplexLineLayout::linkToEndLineIfNeeded): * rendering/FloatingObjects.cpp: (WebCore::FloatingObject::create): (WebCore::FloatingObject::copyToNewContainer const): (WebCore::FloatingObject::cloneForNewParent const): (WebCore::FloatingObjects::computePlacedFloatsTree): * rendering/Grid.cpp: (WebCore::GridIterator::nextEmptyGridArea): * rendering/GridBaselineAlignment.cpp: (WebCore::GridBaselineAlignment::updateBaselineAlignmentContext): * rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::computeFlexFactorUnitSize const): (WebCore::GridTrackSizingAlgorithm::setup): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): (WebCore::HitTestResult::listBasedTestResult const): (WebCore::HitTestResult::mutableListBasedTestResult): * rendering/InlineIterator.h: (WebCore::addPlaceholderRunForIsolatedInline): * rendering/LayerOverlapMap.cpp: (WebCore::LayerOverlapMap::pushCompositingContainer): * rendering/RenderBlock.cpp: (WebCore::insertIntoTrackedRendererMaps): (WebCore::PositionedDescendantsMap::addDescendant): (WebCore::RenderBlock::beginUpdateScrollInfoAfterLayoutTransaction): (WebCore::ensureBlockRareData): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutInlineChildren): (WebCore::RenderBlockFlow::layoutLineGridBox): (WebCore::RenderBlockFlow::createFloatingObjects): (WebCore::RenderBlockFlow::ensureLineBoxes): (WebCore::RenderBlockFlow::materializeRareBlockFlowData): * rendering/RenderBox.cpp: (WebCore::controlStatesForRenderer): (WebCore::RenderBox::createInlineBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::ensureContinuationChainNode): * rendering/RenderCounter.cpp: (WebCore::makeCounterNode): * rendering/RenderFragmentContainer.cpp: (WebCore::RenderFragmentContainer::setRenderBoxFragmentInfo): * rendering/RenderFragmentedFlow.cpp: (WebCore::RenderFragmentedFlow::containingFragmentMap): * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::push): (WebCore::RenderGeometryMap::pushView): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const): (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const): * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): * rendering/RenderInline.cpp: (WebCore::RenderInline::createInlineFlowBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateNormalFlowList): (WebCore::RenderLayer::collectLayers): (WebCore::RenderLayer::updateTransform): (WebCore::RenderLayer::updateClipRects): (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateAncestorClippingStack): (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers): * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::createLayer): * rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::createInlineBox): * rendering/RenderMultiColumnFlow.cpp: (WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow): * rendering/RenderObject.cpp: (WebCore::RenderObject::ensureRareData): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderText.cpp: (WebCore::RenderText::createTextBox): (WebCore::RenderText::momentarilyRevealLastTypedCharacter): * rendering/RenderView.cpp: (WebCore::RenderView::repaintViewRectangle const): (WebCore::RenderView::compositor): (WebCore::RenderView::imageQualityController): (WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::appendFloat): * rendering/SelectionRangeData.cpp: (WebCore::collect): (WebCore::SelectionRangeData::collectBounds const): (WebCore::SelectionRangeData::apply): * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::Layout::runResolver const): * rendering/SimpleLineLayoutFunctions.cpp: (WebCore::SimpleLineLayout::paintFlow): (WebCore::SimpleLineLayout::generateLineBoxTree): * rendering/TextAutoSizing.cpp: (WebCore::TextAutoSizing::addTextNode): * rendering/line/LineBreaker.cpp: (WebCore::LineBreaker::skipLeadingWhitespace): * rendering/shapes/RasterShape.cpp: (WebCore::RasterShapeIntervals::computeShapeMarginIntervals const): * rendering/shapes/Shape.cpp: (WebCore::createInsetShape): (WebCore::createCircleShape): (WebCore::createEllipseShape): (WebCore::createPolygonShape): (WebCore::Shape::createShape): (WebCore::Shape::createRasterShape): (WebCore::Shape::createBoxShape): * rendering/shapes/ShapeOutsideInfo.h: * rendering/style/BasicShapes.cpp: (WebCore::BasicShapePath::blend const): * rendering/style/ContentData.h: * rendering/style/FillLayer.cpp: (WebCore::FillLayer::FillLayer): (WebCore::FillLayer::operator=): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::clonePtr): (WebCore::RenderStyle::addCachedPseudoStyle): (WebCore::RenderStyle::addCustomPaintWatchProperty): (WebCore::RenderStyle::setContent): (WebCore::RenderStyle::accessCounterDirectives): (WebCore::RenderStyle::ensureAnimations): (WebCore::RenderStyle::ensureTransitions): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleShadowSVGData::StyleShadowSVGData): * rendering/style/ShadowData.cpp: (WebCore::ShadowData::ShadowData): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::RenderSVGImage): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineFlowBox): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives const): (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::updateShapeFromElement): * rendering/svg/SVGResources.cpp: (WebCore::SVGResources::setClipper): (WebCore::SVGResources::setFilter): (WebCore::SVGResources::setMarkerStart): (WebCore::SVGResources::setMarkerMid): (WebCore::SVGResources::setMarkerEnd): (WebCore::SVGResources::setMasker): (WebCore::SVGResources::setFill): (WebCore::SVGResources::setStroke): * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::addResourcesFromRenderer): * rendering/svg/SVGTextMetricsBuilder.cpp: (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): * rendering/updating/RenderTreeBuilder.cpp: (WebCore::RenderTreeBuilder::RenderTreeBuilder): * rendering/updating/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::RenderTreeUpdater): * style/StyleInvalidator.cpp: (WebCore::Style::Invalidator::Invalidator): * style/StyleRelations.cpp: (WebCore::Style::commitRelationsToRenderStyle): * style/StyleScope.cpp: (WebCore::Style::Scope::resolver): (WebCore::Style::Scope::activeStyleSheetsContains const): * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolve): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::SVGDocumentExtensions): (WebCore::SVGDocumentExtensions::addPendingResource): (WebCore::SVGDocumentExtensions::addElementReferencingTarget): * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::ensureSVGRareData): * svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::supplementalTransform): * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::copy const): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::schedule): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): * svg/properties/SVGAnimatedDecoratedProperty.h: (WebCore::SVGAnimatedDecoratedProperty::create): * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: * svg/properties/SVGDecoratedEnumeration.h: (WebCore::SVGDecoratedEnumeration::create): * svg/properties/SVGPrimitivePropertyAnimator.h: (WebCore::SVGPrimitivePropertyAnimator::create): * svg/properties/SVGValuePropertyAnimatorImpl.h: * svg/properties/SVGValuePropertyListAnimatorImpl.h: * testing/InternalSettings.cpp: (WebCore::InternalSettings::from): * testing/Internals.cpp: (WebCore::InspectorStubFrontend::InspectorStubFrontend): (WebCore::Internals::Internals): (WebCore::Internals::enableMockSpeechSynthesizer): (WebCore::Internals::openDummyInspectorFrontend): (WebCore::Internals::setPrinting): (WebCore::Internals::initializeMockCDM): (WebCore::Internals::queueMicroTask): * testing/LegacyMockCDM.cpp: (WebCore::LegacyMockCDM::createSession): * testing/MockCDMFactory.cpp: (WebCore::MockCDMFactory::createCDM): * testing/MockContentFilter.cpp: (WebCore::MockContentFilter::create): * testing/MockGamepadProvider.cpp: (WebCore::MockGamepadProvider::setMockGamepadDetails): * workers/WorkerConsoleClient.cpp: (WebCore::WorkerConsoleClient::messageWithTypeAndLevel): * workers/WorkerEventQueue.cpp: (WebCore::WorkerEventQueue::enqueueEvent): * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): (WebCore::WorkerGlobalScope::addMessage): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope): * workers/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::WorkerRunLoop): (WebCore::WorkerRunLoop::postTaskAndTerminate): (WebCore::WorkerRunLoop::postTaskForMode): * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::loadAsynchronously): (WebCore::WorkerScriptLoader::createResourceRequest): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): * workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::ready): (WebCore::ServiceWorkerContainer::addRegistration): (WebCore::ServiceWorkerContainer::removeRegistration): (WebCore::ServiceWorkerContainer::updateRegistration): (WebCore::ServiceWorkerContainer::getRegistration): (WebCore::ServiceWorkerContainer::getRegistrations): * workers/service/context/SWContextManager.cpp: (WebCore::SWContextManager::terminateWorker): * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy): (WebCore::ServiceWorkerThreadProxy::createBlobLoader): * workers/service/server/RegistrationDatabase.cpp: (WebCore::RegistrationDatabase::openSQLiteDatabase): * workers/service/server/SWServer.cpp: (WebCore::SWServer::addRegistrationFromStore): (WebCore::SWServer::SWServer): (WebCore::SWServer::scheduleJob): (WebCore::SWServer::unregisterServiceWorkerClient): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::runRegisterJob): * worklets/PaintWorkletGlobalScope.cpp: (WebCore::PaintWorkletGlobalScope::registerPaint): * worklets/WorkletConsoleClient.cpp: (WebCore::WorkletConsoleClient::messageWithTypeAndLevel): * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::WorkletGlobalScope): (WebCore::WorkletGlobalScope::addConsoleMessage): * worklets/WorkletScriptController.cpp: (WebCore::WorkletScriptController::initScriptWithSubclass): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::upload): * xml/XPathFunctions.cpp: * xml/XPathPredicate.cpp: (WebCore::XPath::evaluatePredicate): * xml/XSLStyleSheetLibxslt.cpp: (WebCore::XSLStyleSheet::loadChildSheet): * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::handleError): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendStartElementNSCallback): (WebCore::PendingCallbacks::appendEndElementNSCallback): (WebCore::PendingCallbacks::appendCharactersCallback): (WebCore::PendingCallbacks::appendProcessingInstructionCallback): (WebCore::PendingCallbacks::appendCDATABlockCallback): (WebCore::PendingCallbacks::appendCommentCallback): (WebCore::PendingCallbacks::appendInternalSubsetCallback): (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::doEnd): Source/WebCore/PAL: Reviewed by Geoffrey Garen. * pal/crypto/openssl/CryptoDigestOpenSSL.cpp: (PAL::CryptoDigestContextImpl::create): * pal/system/ClockGeneric.cpp: (PAL::Clock::create): * pal/system/mac/ClockCM.mm: (Clock::create): Source/WebDriver: Reviewed by Geoffrey Garen. * WebDriverService.cpp: (WebDriver::WebDriverService::connectToBrowser): * glib/SessionHostGlib.cpp: (WebDriver::SessionHost::launchBrowser): (WebDriver::SessionHost::sendMessageToBackend): Source/WebKit: Reviewed by Geoffrey Garen. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: (WebKit::ResourceLoadStatisticsPersistentStorage::startMonitoringDisk): (WebKit::ResourceLoadStatisticsPersistentStorage::monitorDirectoryForNewStatistics): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::startDownload): (WebKit::DownloadManager::convertNetworkLoadToDownload): (WebKit::DownloadManager::resumeDownload): * NetworkProcess/Downloads/DownloadMap.cpp: (WebKit::DownloadMap::add): * NetworkProcess/Downloads/PendingDownload.cpp: (WebKit::PendingDownload::PendingDownload): * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::establishSWServerConnection): * NetworkProcess/NetworkContentRuleListManager.cpp: (WebKit::NetworkContentRuleListManager::addContentRuleLists): * NetworkProcess/NetworkDataTaskBlob.cpp: (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob): (WebKit::NetworkDataTaskBlob::download): * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp: (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker): * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::didReceiveResponse): * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight): (WebKit::NetworkLoadChecker::contentSecurityPolicy): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::switchToNewTestingSession): (WebKit::NetworkProcess::ensureSession): (WebKit::NetworkProcess::swServerForSession): (WebKit::NetworkProcess::initializeQuotaUsers): (WebKit::NetworkProcess::storageQuotaManager): * NetworkProcess/NetworkProcess.h: (WebKit::NetworkProcess::addSupplement): * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::m_shouldCaptureExtraNetworkLoadMetrics): (WebKit::NetworkResourceLoader::startNetworkLoad): * NetworkProcess/NetworkSocketChannel.cpp: (WebKit::NetworkSocketChannel::create): * NetworkProcess/PreconnectTask.cpp: * NetworkProcess/WebStorage/LocalStorageDatabase.cpp: (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate): * NetworkProcess/WebStorage/LocalStorageNamespace.cpp: (WebKit::LocalStorageNamespace::getOrCreateStorageArea): * NetworkProcess/WebStorage/SessionStorageNamespace.cpp: (WebKit::SessionStorageNamespace::getOrCreateStorageArea): * NetworkProcess/WebStorage/StorageArea.cpp: (WebKit::StorageArea::clone const): * NetworkProcess/WebStorage/StorageManager.cpp: (WebKit::StorageManager::createSessionStorageNamespace): (WebKit::StorageManager::getOrCreateLocalStorageNamespace): (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace): (WebKit::StorageManager::getOrCreateSessionStorageNamespace): * NetworkProcess/WebStorage/StorageManagerSet.cpp: (WebKit::StorageManagerSet::add): * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp: (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea): * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::Cache): (WebKit::NetworkCache::Cache::makeEntry): (WebKit::NetworkCache::Cache::makeRedirectEntry): (WebKit::NetworkCache::Cache::update): * NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::decodeStorageRecord): * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresourceLoad): (WebKit::NetworkCache::SpeculativeLoadManager::retrieve): (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry): (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests): (WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource): (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation): * NetworkProcess/cache/NetworkCacheStorage.cpp: (WebKit::NetworkCache::Storage::synchronize): (WebKit::NetworkCache::Storage::readRecord): (WebKit::NetworkCache::retrieveFromMemory): (WebKit::NetworkCache::Storage::retrieve): (WebKit::NetworkCache::Storage::store): (WebKit::NetworkCache::Storage::traverse): * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp: (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord): * NetworkProcess/cache/PrefetchCache.cpp: (WebKit::PrefetchCache::store): (WebKit::PrefetchCache::storeRedirect): * NetworkProcess/cocoa/NetworkProcessCocoa.mm: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): (WebKit::NetworkProcess::networkHTTPSUpgradeChecker): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): (WebKit::NetworkSessionCocoa::create): (WebKit::NetworkSessionCocoa::createWebSocketTask): * NetworkProcess/curl/NetworkProcessCurl.cpp: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): * NetworkProcess/curl/NetworkSessionCurl.h: * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm: (WebKit::NetworkConnectionToWebProcess::paymentCoordinator): (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAuthorizationPresenter): * NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::download): * NetworkProcess/soup/NetworkProcessSoup.cpp: (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): * NetworkProcess/soup/NetworkSessionSoup.cpp: (WebKit::NetworkSessionSoup::NetworkSessionSoup): (WebKit::NetworkSessionSoup::createWebSocketTask): * NetworkProcess/soup/NetworkSessionSoup.h: * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp: (webkitSoupRequestInputStreamReadAsync): * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: (WebKit::NetworkMDNSRegister::registerMDNSName): * NetworkProcess/webrtc/NetworkRTCMonitor.cpp: (WebKit::NetworkRTCMonitor::startUpdating): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): (WebKit::NetworkRTCProvider::createSocket): (WebKit::NetworkRTCProvider::wrapNewTCPConnection): * Platform/IPC/Connection.cpp: (IPC::Connection::dispatchWorkQueueMessageReceiverMessage): (IPC::Connection::createSyncMessageEncoder): (IPC::Connection::enableIncomingMessagesThrottling): (IPC::Connection::dispatchSyncMessage): * Platform/IPC/Connection.h: (IPC::Connection::send): (IPC::Connection::sendWithAsyncReply): * Platform/IPC/Decoder.cpp: (IPC::Decoder::unwrapForTesting): * Platform/IPC/HandleMessage.h: (IPC::handleMessageAsync): * Platform/IPC/MessageSender.h: * Platform/IPC/cocoa/ConnectionCocoa.mm: (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): (IPC::Connection::open): (IPC::createMessageDecoder): (IPC::Connection::receiveSourceEventHandler): * Platform/IPC/unix/ConnectionUnix.cpp: (IPC::Connection::processMessage): (IPC::Connection::sendOutputMessage): * Platform/IPC/win/ConnectionWin.cpp: (IPC::Connection::readEventHandler): * Platform/mac/LayerHostingContext.mm: (WebKit::LayerHostingContext::createForPort): (WebKit::LayerHostingContext::createForExternalHostingProcess): (WebKit::LayerHostingContext::createForExternalPluginHostingProcess): * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPluginInternal): * Shared/API/APIURL.h: (API::URL::create): (API::URL::parseURLIfNecessary const): * Shared/API/Cocoa/RemoteObjectInvocation.mm: (WebKit::RemoteObjectInvocation::decode): * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: (-[_WKRemoteObjectRegistry _initWithWebPage:]): (-[_WKRemoteObjectRegistry _initWithWebPageProxy:]): (-[_WKRemoteObjectRegistry _sendInvocation:interface:]): * Shared/API/glib/WebKitContextMenuItem.cpp: (webkitContextMenuItemCreate): (webkit_context_menu_item_new): (webkit_context_menu_item_new_from_gaction): (webkit_context_menu_item_new_from_stock_action): (webkit_context_menu_item_new_from_stock_action_with_label): (webkit_context_menu_item_new_with_submenu): (webkit_context_menu_item_new_separator): * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): * Shared/Cocoa/SandboxExtensionCocoa.mm: (WebKit::SandboxExtension::Handle::decode): * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::texmapLayer): (WebKit::CoordinatedGraphicsScene::ensureRootLayer): * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::ThreadedCompositor::ThreadedCompositor): * Shared/Plugins/NPRemoteObjectMap.cpp: (WebKit::NPRemoteObjectMap::registerNPObject): * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: (WebKit::RemoteScrollingCoordinatorTransaction::decode): * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * Shared/win/ShareableBitmapDirect2D.cpp: (WebKit::ShareableBitmap::createGraphicsContext): * UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::registerObserver): * UIProcess/API/C/WKContext.cpp: (WKContextSetInjectedBundleClient): (WKContextSetHistoryClient): (WKContextSetDownloadClient): * UIProcess/API/C/WKGeolocationManager.cpp: (WKGeolocationManagerSetProvider): * UIProcess/API/C/WKNotificationManager.cpp: (WKNotificationManagerSetProvider): * UIProcess/API/C/WKPage.cpp: (WKPageSetPageContextMenuClient): (WKPageSetPageDiagnosticLoggingClient): (WKPageSetPageFindClient): (WKPageSetPageFindMatchesClient): (WKPageSetPageFormClient): (WKPageSetPageLoaderClient): (WKPageSetPagePolicyClient): (WKPageSetPageUIClient): (WKPageSetPageStateClient): * UIProcess/API/C/mac/WKPagePrivateMac.mm: (-[WKObservablePageState initWithPage:]): * UIProcess/API/C/wpe/WKView.cpp: (WKViewSetViewClient): * UIProcess/API/Cocoa/WKBrowsingContextController.mm: (-[WKBrowsingContextController _initWithPageRef:]): * UIProcess/API/Cocoa/WKHTTPCookieStore.mm: (-[WKHTTPCookieStore addObserver:]): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _setDownloadDelegate:]): (-[WKProcessPool _setAutomationDelegate:]): * UIProcess/API/Cocoa/WKUserContentController.mm: (-[WKUserContentController addScriptMessageHandler:name:]): (-[WKUserContentController _addScriptMessageHandler:name:userContentWorld:]): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): (-[WKWebView setAllowsBackForwardNavigationGestures:]): (-[WKWebView _setInputDelegate:]): * UIProcess/API/Cocoa/_WKAutomationSession.mm: (-[_WKAutomationSession setDelegate:]): * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController init]): * UIProcess/API/glib/IconDatabase.cpp: (WebKit::readySQLiteStatement): * UIProcess/API/glib/WebKitAutomationSession.cpp: (webkitAutomationSessionConstructed): * UIProcess/API/glib/WebKitContextMenuClient.cpp: (attachContextMenuClientToView): * UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp: (attachCustomProtocolManagerClientToContext): * UIProcess/API/glib/WebKitDownloadClient.cpp: (attachDownloadClientToContext): * UIProcess/API/glib/WebKitFaviconDatabase.cpp: (webkitFaviconDatabaseOpen): * UIProcess/API/glib/WebKitFindController.cpp: (webkitFindControllerConstructed): * UIProcess/API/glib/WebKitFormClient.cpp: (attachFormClientToView): * UIProcess/API/glib/WebKitGeolocationManager.cpp: (webkitGeolocationManagerCreate): * UIProcess/API/glib/WebKitIconLoadingClient.cpp: (attachIconLoadingClientToView): * UIProcess/API/glib/WebKitInjectedBundleClient.cpp: (attachInjectedBundleClientToContext): * UIProcess/API/glib/WebKitNotificationProvider.cpp: (WebKitNotificationProvider::WebKitNotificationProvider): * UIProcess/API/glib/WebKitUIClient.cpp: (attachUIClientToView): * UIProcess/API/glib/WebKitUserContentManager.cpp: (webkit_user_content_manager_register_script_message_handler): (webkit_user_content_manager_register_script_message_handler_in_world): * UIProcess/API/glib/WebKitWebContext.cpp: (webkitWebContextConstructed): (webkit_web_context_set_automation_allowed): * UIProcess/API/glib/WebKitWebView.cpp: (webkitWebViewConstructed): * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/API/gtk/WebKitEmojiChooser.cpp: (webkitEmojiChooserSetupEmojiSections): * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: (WebKit::RemoteInspectorProtocolHandler::handleRequest): * UIProcess/API/gtk/WebKitWebInspector.cpp: (webkitWebInspectorCreate): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseConstructed): (webkitWebViewBaseGestureController): (webkitWebViewBaseDragAndDropHandler): (webkitWebViewBaseDidRelaunchWebProcess): * UIProcess/API/mac/WKView.mm: (-[WKView maybeInstallIconLoadingClient]): (-[WKView initWithFrame:processPool:configuration:]): * UIProcess/API/wpe/PageClientImpl.cpp: (WebKit::PageClientImpl::PageClientImpl): (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/API/wpe/WPEView.cpp: (WKWPE::View::View): (WKWPE::View::setClient): * UIProcess/API/wpe/qt/WPEQtView.cpp: (WPEQtView::notifyLoadChangedCallback): (WPEQtView::notifyLoadFailedCallback): (WPEQtView::runJavaScript): * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp: (WPEQtViewBackend::create): * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::WebAutomationSession): * UIProcess/AuxiliaryProcessProxy.h: (WebKit::AuxiliaryProcessProxy::send): * UIProcess/Cocoa/IconLoadingDelegate.mm: (WebKit::IconLoadingDelegate::createIconLoadingClient): * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::createContextMenuClient): (WebKit::UIDelegate::createUIClient): * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitialize): (WebKit::WebProcessPool::startDisplayLink): * UIProcess/Cocoa/WebProcessProxyCocoa.mm: (WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended): * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::createDrawingAreaProxy): (WebKit::WebViewImpl::setTextIndicator): (WebKit::WebViewImpl::ensureGestureController): * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp: (WebKit::DrawingAreaProxyCoordinatedGraphics::incorporateUpdate): (WebKit::DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing): * UIProcess/DeviceIdHashSaltStorage.cpp: (WebKit::DeviceIdHashSaltStorage::getDataFromDecoder const): (WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::createDownloadProxy): * UIProcess/Gamepad/UIGamepadProvider.cpp: (WebKit::UIGamepadProvider::setInitialConnectedGamepads): (WebKit::UIGamepadProvider::platformGamepadConnected): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::createDownloadProxy): (WebKit::NetworkProcessProxy::takeUploadAssertion): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): (WebKit::WebNotificationManagerProxy::setProvider): * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::pluginRequiresGtk2): * UIProcess/ProcessThrottler.cpp: (WebKit::ProcessThrottler::didConnectToProcess): * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): (WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator): * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: (WebKit::RemoteLayerTreeHost::makeNode): * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm: (WebKit::RemoteLayerTreeNode::createWithPlainLayer): * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm: (WebKit::RemoteLayerTreeHost::makeNode): * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren): * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS): * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::ScrollingTreeFrameScrollingNodeRemoteMac): * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp: (WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::ScrollingTreeOverflowScrollingNodeRemoteMac): * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::deviceAdded): * UIProcess/WebGeolocationManagerProxy.cpp: (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy): (WebKit::WebGeolocationManagerProxy::setProvider): * UIProcess/WebMediaSessionFocusManager.cpp: (WebKit::WebMediaSessionFocusManager::setFocusedMediaElement): * UIProcess/WebPageInspectorController.cpp: (WebKit::WebPageInspectorController::WebPageInspectorController): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::m_resetRecentCrashCountTimer): (WebKit::WebPageProxy::setFormClient): (WebKit::WebPageProxy::setUIClient): (WebKit::WebPageProxy::setIconLoadingClient): (WebKit::WebPageProxy::setFindClient): (WebKit::WebPageProxy::setFindMatchesClient): (WebKit::WebPageProxy::setContextMenuClient): (WebKit::WebPageProxy::setInjectedBundleClient): (WebKit::WebPageProxy::suspendCurrentPageIfPossible): (WebKit::WebPageProxy::didAttachToRunningProcess): (WebKit::WebPageProxy::setDrawingArea): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::loadData): (WebKit::WebPageProxy::handleWheelEvent): (WebKit::WebPageProxy::processNextQueuedWheelEvent): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::setFullscreenClient): (WebKit::WebPageProxy::userMediaPermissionRequestManager): (WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled): (WebKit::WebPageProxy::speechSynthesisData): * UIProcess/WebProcessCache.cpp: (WebKit::WebProcessCache::addProcessIfPossible): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::WebProcessPool): (WebKit::WebProcessPool::setInjectedBundleClient): (WebKit::WebProcessPool::setHistoryClient): (WebKit::WebProcessPool::setDownloadClient): (WebKit::WebProcessPool::setAutomationClient): (WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient): (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::didCollectPrewarmInformation): (WebKit::WebProcessPool::setWebProcessHasUploads): (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia): * UIProcess/WebProcessProxy.cpp: * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::createBackend): * UIProcess/glib/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::inspect): * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: (WebKit::AcceleratedBackingStoreWayland::checkRequirements): * UIProcess/gtk/DragAndDropHandler.cpp: (WebKit::DragAndDropHandler::dragDataSelection): * UIProcess/gtk/WaylandCompositor.cpp: (WebKit::WaylandCompositor::initializeEGL): * UIProcess/ios/EditableImageController.mm: (WebKit::EditableImageController::ensureEditableImage): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView didMoveToWindow]): * UIProcess/ios/WKContentView.mm: (-[WKContentView _commonInitializationWithProcessPool:configuration:]): (-[WKContentView initWithFrame:processPool:configuration:webView:]): (-[WKContentView _createDrawingAreaProxy:]): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView becomeFirstResponderForWebView]): (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::elementDidFocus): (WebKit::WebPageProxy::paymentCoordinatorAuthorizationPresenter): * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::PageClientImpl): * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController initWithWindow:webView:page:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:usePlatformFindUI:]): * UIProcess/socket/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::inspect): * UIProcess/socket/RemoteInspectorProtocolHandler.cpp: (WebKit::RemoteInspectorProtocolHandler::platformStartTask): * UIProcess/win/BackingStoreDirect2D.cpp: (WebKit::BackingStore::createBackend): * UIProcess/win/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy): * UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): * WebProcess/Gamepad/WebGamepadProvider.cpp: (WebKit::WebGamepadProvider::setInitialGamepads): (WebKit::WebGamepadProvider::gamepadConnected): * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetClient): * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetContextMenuClient): (WKBundlePageSetEditorClient): (WKBundlePageSetFormClient): (WKBundlePageSetPageLoaderClient): (WKBundlePageSetResourceLoadClient): (WKBundlePageSetUIClient): * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: (WKBundlePageOverlayCreate): * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: (WKBundlePageBannerCreateBannerWithCALayer): * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp: (WebKit::getOrCreateDOMObjectCacheFrameObserver): (WebKit::DOMObjectCache::put): * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp: (WebKit::WebKitExtensionManager::initialize): * WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp: (webkitWebEditorCreate): * WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp: (webkitWebExtensionCreate): * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: (webkitFrameGetOrCreate): (webkitWebPageCreate): * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm: (-[WKDOMTextIterator initWithRange:]): * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): (-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::InjectedBundle): (WebKit::InjectedBundle::setClient): * WebProcess/Network/WebSocketChannel.cpp: (WebKit::PendingMessage::PendingMessage): (WebKit::WebSocketChannel::send): * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::LibWebRTCProvider::createPeerConnection): (WebKit::LibWebRTCProvider::createSocketFactory): * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: (WebKit::LibWebRTCSocketFactory::createServerTcpSocket): (WebKit::LibWebRTCSocketFactory::createUdpSocket): (WebKit::LibWebRTCSocketFactory::createClientTcpSocket): (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket): (WebKit::LibWebRTCSocketFactory::createAsyncResolver): * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::PluginDestructionProtector::PluginDestructionProtector): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::scheduleTimer): * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::deliverData): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePluginX11::create): * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::initialize): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::createWebEvent const): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::installServiceWorker): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createColorChooser): (WebKit::WebChromeClient::createDataListSuggestionPicker): * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::showPaintRect): * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: (WebKit::WebPasteboardOverrides::addOverride): * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::create): * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::ensureBackingStore): (WebKit::PlatformCALayerRemote::setTransform): (WebKit::PlatformCALayerRemote::setSublayerTransform): (WebKit::PlatformCALayerRemote::setFilters): (WebKit::PlatformCALayerRemote::setShapeRoundedRect): * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp: (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking): * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): (WebKit::RemoteLayerTreeDrawingArea::flushLayers): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSubframe): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_textAutoSizingAdjustmentTimer): (WebKit::WebPage::setInjectedBundleContextMenuClient): (WebKit::WebPage::setInjectedBundleEditorClient): (WebKit::WebPage::setInjectedBundleFormClient): (WebKit::WebPage::setInjectedBundlePageLoaderClient): (WebKit::WebPage::setInjectedBundleResourceLoadClient): (WebKit::WebPage::setInjectedBundleUIClient): (WebKit::WebPage::close): (WebKit::WebPage::beginPrinting): * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::print): * WebProcess/WebPage/ios/FindControllerIOS.mm: (WebKit::FindController::updateFindIndicator): * WebProcess/WebPage/mac/DrawingAreaMac.cpp: (WebKit::DisplayRefreshMonitorMac::requestRefreshCallback): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::markAllLayersVolatile): (WebKit::WebProcess::ensureAutomationSessionProxy): (WebKit::WebProcess::libWebRTCNetwork): (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::addSupplement): * WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::Source::Source): * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::processTaskStateDidChange): (WebKit::WebProcess::updateCPUMonitorState): Source/WebKitLegacy: Reviewed by Geoffrey Garen. * Storage/StorageSyncManager.cpp: (WebCore::StorageSyncManager::StorageSyncManager): * Storage/StorageThread.cpp: (WebCore::StorageThread::dispatch): (WebCore::StorageThread::terminate): * Storage/StorageTracker.cpp: (WebKit::StorageTracker::StorageTracker): * WebCoreSupport/NetworkStorageSessionMap.cpp: (NetworkStorageSessionMap::defaultStorageSession): (NetworkStorageSessionMap::switchToNewTestingSession): (NetworkStorageSessionMap::ensureSession): Source/WebKitLegacy/cf: Reviewed by Geoffrey Garen. * WebCoreSupport/WebInspectorClientCF.cpp: (WebInspectorClient::createFrontendSettings): Source/WebKitLegacy/ios: Reviewed by Geoffrey Garen. * WebCoreSupport/WebFixedPositionContent.mm: (-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]): Source/WebKitLegacy/mac: Reviewed by Geoffrey Garen. * History/WebHistory.mm: (-[WebHistoryPrivate init]): * History/WebHistoryItem.mm: (-[WebHistoryItem initFromDictionaryRepresentation:]): * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCGetScriptableNPObjectReply): (WKPCBooleanReply): (WKPCBooleanAndDataReply): (WKPCInstantiatePluginReply): * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::methodNamed): (WebKit::ProxyInstance::fieldNamed): * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView createPlugin]): * Plugins/WebNetscapePluginEventHandler.mm: (WebNetscapePluginEventHandler::create): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): * Storage/WebDatabaseManagerClient.mm: (DidModifyOriginData::dispatchToMainThread): * WebCoreSupport/WebFrameLoaderClient.mm: (addRedirectURL): (WebFrameLoaderClient::savePlatformDataToCachedFrame): * WebCoreSupport/WebInspectorClient.mm: (WebInspectorClient::openLocalFrontend): * WebView/WebDeviceOrientationProviderMock.mm: * WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]): * WebView/WebMediaPlaybackTargetPicker.mm: (WebMediaPlaybackTargetPicker::create): * WebView/WebTextIterator.mm: (-[WebTextIterator initWithRange:]): * WebView/WebView.mm: (-[WebView _injectOutlookQuirksScript]): (-[WebView _commonInitializationWithFrameName:groupName:]): (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]): (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]): (-[WebView _selectionServiceController]): (-[WebView _setTextIndicator:withLifetime:]): * WebView/WebViewData.mm: (WebViewLayerFlushScheduler::WebViewLayerFlushScheduler): (-[WebViewPrivate init]): Source/WebKitLegacy/win: Reviewed by Geoffrey Garen. * FullscreenVideoController.cpp: (FullscreenVideoController::FullscreenVideoController): * Plugins/PluginStream.cpp: (WebCore::PluginStream::didReceiveData): * Plugins/PluginView.cpp: (WebCore::PluginView::load): * Plugins/PluginViewWin.cpp: (WebCore::PluginView::wndProc): * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::WebChromeClient): * WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::WebFrameLoaderClient): (WebFrameLoaderClient::savePlatformDataToCachedFrame): * WebCoreSupport/WebInspectorClient.cpp: (WebInspectorClient::openLocalFrontend): (WebInspectorClient::highlight): * WebElementPropertyBag.cpp: (WebElementPropertyBag::WebElementPropertyBag): * WebHistoryItem.cpp: (WebHistoryItem::initFromDictionaryRepresentation): * WebKitQuartzCoreAdditions/CAD3DRenderer.cpp: (WKQCA::CAD3DRenderer::createD3DPostProcessingContext): * WebNotificationCenter.cpp: (WebNotificationCenter::WebNotificationCenter): * WebView.cpp: (WebView::handleMouseEvent): (WebView::registerEmbeddedViewMIMEType): (WebView::enterVideoFullscreenForVideoElement): (WebView::addUserScriptToGroup): (WebView::addUserStyleSheetToGroup): (WebView::setAcceleratedCompositing): Source/WTF: Reviewed by Geoff Garen. This patch is second part of bug 200620 patch. I split I split it into three pieces to make roll-out easy. his part, we convert std::make_unique to WTF::makeUnique or WTF::makeUniqueWithoutFastMallocCheck. In the third patch, we will add a static_assert to makeUnique, which ensures the given class T is FastMalloced or IsoHeaped. This patch adds `WTF::makeUnique<T>` and `WTF::makeUniqueWithoutFastMallocCheck<T>` as drop-in replacement for `std::make_unique<T>`. `WTF::makeUnique<T>` has one additional `static_assert` check which ensures `T` FastMalloc / IsoHeap annotated. If it is not, the compile error happens. In this patch, I tried using this everywhere in WebKit as much as possible. And we found that surprisingly many classes are missing FastMalloc annotation and allocated from system-malloc. Using WTF::makeUnique enforces classes / structs to use FastMalloc. WTF::makeUniqueWithoutFastMallocCheck is offered for the corner cases. This is identical to std::make_unique. We use this for classes that are offered by non-WebKit code base, like, zlib. This clear name can make us easily find this allocation is intentionally done by system-malloc. We do not take the following direction, `WTF::makeUnique` automatically allocates FastMalloc even if FastMalloc annotation is not attached. Since default deleter is performing `delete` and this is not what we want for FastMalloced ones, we need to return std::unique_ptr<T, FastFreeDeleter> for T if T does not have FastMalloc-annotation. Automatically doing this sounds a bit dangerous. auto pointer = WTF::makeUnique<T>(); // Super dangerous, but sometimes it is required... auto* rawPointer = pointer.release(); // Passing rawPointer to somewhere, and delete rawPointer; The above one becomes invalid because pointer may start requiring non `delete` destroying function. In the above case, the correct way becomes the following. rawPointer->~T(); fastFree(rawPointer); This looks non-intuitive. And having two ways to destroying objects (`delete` or the above one) can be error-prone. If we have WTF_MAKE_FAST_ALLOCATED for T, we do not need to care about this. "new" and "delete" operators are defined, and C++ way works. The simple invariant, "makeUnique just does `new` internally. And `delete` operator does `delete`. default deleter is just doing `delete`", is kept. While we need to annotate many classes with WTF_MAKE_FAST_ALLOCATED, it is one time cost when we add a class. And, by introducing `WTF::makeUnique<>`, we no longer forget adding this. makeUnique(...) static_assert(T is FastMalloced or IsoHeaped); return make_unique<T>(...) * benchmarks/LockFairnessTest.cpp: * benchmarks/LockSpeedTest.cpp: * wtf/ConcurrentVector.h: * wtf/CrossThreadTaskHandler.cpp: (WTF::CrossThreadTaskHandler::taskRunLoop): * wtf/FilePrintStream.cpp: (WTF::FilePrintStream::open): * wtf/Function.h: (WTF::Function<Out): * wtf/HashTable.h: (WTF::KeyTraits>::HashTable): * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor): * wtf/StdLibExtras.h: (WTF::makeUnique): (WTF::makeUniqueWithoutFastMallocCheck): * wtf/StreamBuffer.h: (WTF::StreamBuffer::append): * wtf/UniqueRef.h: (WTF::makeUniqueRefWithoutFastMallocCheck): (WTF::makeUniqueRef): * wtf/glib/RunLoopGLib.cpp: (WTF::RunLoop::dispatchAfter): * wtf/text/StringView.cpp: (WTF::StringView::GraphemeClusters::Iterator::Iterator): Tools: Reviewed by Geoffrey Garen. * DumpRenderTree/TestRunner.cpp: (addURLToRedirectCallback): (setWillSendRequestClearHeaderCallback): (TestRunner::setAccummulateLogsForChannel): (TestRunner::runUIScript): (TestRunner::setOpenPanelFiles): * DumpRenderTree/mac/DumpRenderTree.mm: (dumpFramesAsText): * DumpRenderTree/mac/EventSendingController.mm: (eventPressedMouseButtonsSwizzlerForViewAndEvent): * DumpRenderTree/win/DRTDataObject.cpp: (DRTDataObject::SetData): * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::FrameLoadDelegate): * DumpRenderTree/win/UIDelegate.cpp: (DRTUndoManager::DRTUndoManager): (UIDelegate::UIDelegate): (UIDelegate::resetUndoManager): * TestWebKitAPI/JavaScriptTest.cpp: (TestWebKitAPI::runJSTest): * TestWebKitAPI/PlatformUtilities.cpp: (TestWebKitAPI::Util::toSTD): * TestWebKitAPI/Tests/WTF/Expected.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): (TestWebKitAPI::testMovingUsingEnsure): (TestWebKitAPI::testMovingUsingAdd): * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/ListHashSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Lock.cpp: (TestWebKitAPI::runLockTest): * TestWebKitAPI/Tests/WTF/ParkingLot.cpp: * TestWebKitAPI/Tests/WTF/RefCounter.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/ThreadGroup.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Variant.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/CARingBuffer.cpp: (TestWebKitAPI::CARingBufferTest::SetUp): * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: (TestWebKitAPI::createTestValue): * TestWebKitAPI/Tests/WebCore/FidoHidMessageTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp: * TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp: (TestWebKitAPI::createNewPage): * TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp: (TestWebKitAPI::createNewPage): * TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp: * TestWebKitAPI/Tests/WebKit/UserMessage.cpp: (TestWebKitAPI::WebKit2UserMessageRoundTripTest::SetUp): * TestWebKitAPI/Tests/WebKit/WillLoad.cpp: (TestWebKitAPI::WebKit2WillLoadTest::SetUp): * TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm: (TestWebKitAPI::ForceLightAppearanceInBundleTest::didReceiveMessage): * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: (serverCallback): (testWebViewAuthenticationProxyHTTPS): * TestWebKitAPI/Tests/WebKitGtk/DOMDOMWindowTest.cpp: (WebKitDOMDOMWindowTest::create): * TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm: (TestWebKitAPI::Util::toSTD): * TestWebKitAPI/cocoa/TestWKWebView.mm: (applyWorkaroundToAllowWritingAttributedStringsToItemProviders): (-[TestWKWebView initWithFrame:configuration:addToWindow:]): * TestWebKitAPI/mac/TestFontOptions.mm: (-[TestFontOptions initWithFontOptions:]): * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::EventSendingController::callAfterScrollingCompletes): * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setOpenPanelFiles): * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: * WebKitTestRunner/StringFunctions.h: (WTR::toSTD): (WTR::toWTFString): * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): (WTR::TestController::generatePageConfiguration): (WTR::TestController::resetStateToConsistentValues): (WTR::createTestURL): (WTR::TestController::runTest): (WTR::TestController::platformCreateWebView): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::runUISideScript): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): (WTR::TestController::setDefaultCalendarType): * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::getGDKKeySymForKeyRef): * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::setKeyboardInputModeIdentifier): * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseDown): (WTR::EventSenderProxy::mouseUp): (WTR::EventSenderProxy::mouseMoveTo): * WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: (WTR::wpeKeySymForKeyRef): Canonical link: https://commits.webkit.org/214609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-19 06:59:40 +00:00
auto buffer = makeUniqueWithoutFastMallocCheck<char[]>(bufferSize);
size_t stringLength = WKStringGetUTF8CStringNonStrict(string, buffer.get(), bufferSize);
if (!stringLength)
return "(null)"_s;
Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Add some string function exports to Windows so the WebKitTestRunner can use them. Reviewed by Geoff Garen. * win/WebKit2.def: Tools: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Fix crash preventing WebKitTestRunner from working in Release. WebKitTestRunner used ostringstream to collect output from the test. ostringstream is incompatible with our FastMalloc overrides. When copying strings out ostringstream a new string is allocated with FastMalloc because the allocation is inlined. When that string is freed is uses the system malloc because that call is not inlined. I removed ostringstream in favor of StringBuilder. Properly set NDEBUG on Release builds so we don't crash when when we free the strings StringBuilder created. Reviewed by Geoff Garen. Add DEBUG_DEFINES to set NDEBUG on release builds. * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Remove ostringstream member in favor of StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::initialize): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::done): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (WTF): (WTR::InjectedBundle::stringBuilder): (InjectedBundle): Append output to StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::hasPrefix): (WTR::dumpPath): (WTR::rangeToStr): (WTR::styleDecToStr): (WTR::frameToStr): (WTR::dumpFrameScrollPosition): (WTR::dumpFrameText): (WTR::dumpDescendantFramesText): (WTR::InjectedBundlePage::dump): (WTR::InjectedBundlePage::didReceiveTitleForFrame): (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): (WTR::InjectedBundlePage::willSendRequestForFrame): (WTR::InjectedBundlePage::decidePolicyForNavigationAction): (WTR::lastFileURLPathComponent): (WTR::InjectedBundlePage::willAddMessageToConsole): (WTR::InjectedBundlePage::willSetStatusbarText): (WTR::InjectedBundlePage::willRunJavaScriptAlert): (WTR::InjectedBundlePage::willRunJavaScriptConfirm): (WTR::InjectedBundlePage::willRunJavaScriptPrompt): (WTR::InjectedBundlePage::shouldBeginEditing): (WTR::InjectedBundlePage::shouldEndEditing): (WTR::InjectedBundlePage::shouldInsertNode): (WTR::InjectedBundlePage::shouldInsertText): (WTR::InjectedBundlePage::shouldDeleteRange): (WTR::InjectedBundlePage::shouldChangeSelectedRange): (WTR::InjectedBundlePage::shouldApplyStyle): (WTR::InjectedBundlePage::didBeginEditing): (WTR::InjectedBundlePage::didEndEditing): (WTR::InjectedBundlePage::didChange): (WTR::InjectedBundlePage::didChangeSelection): (WTR::InjectedBundlePage::supportsFullScreen): (WTR::InjectedBundlePage::enterFullScreenForElement): (WTR::InjectedBundlePage::exitFullScreenForElement): (WTR::InjectedBundlePage::beganEnterFullScreen): (WTR::InjectedBundlePage::beganExitFullScreen): (WTR::dumpBackForwardListItem): (WTR::InjectedBundlePage::dumpBackForwardList): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::waitToDumpWatchdogTimerFired): (WTR::LayoutTestController::dumpConfigurationForViewport): Convert between WTF::String and WKStringRef. * WebKitTestRunner/StringFunctions.h: (WTR::toWTFString): (WTR): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Canonical link: https://commits.webkit.org/98644@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-17 00:29:38 +00:00
return WTF::String::fromUTF8WithLatin1Fallback(buffer.get(), stringLength - 1);
2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 No code changes so no new tests. Revert the changes that were needed to use KURL in WebKitTestRunner. * Configurations/WebCore.xcconfig: * WebCore.exp.in: 2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 Add API's to WKURL and WKString to satisfy WebKitTestRunner's needs. * Shared/API/c/WKString.cpp: (WKStringIsEqualToUTF8CStringIgnoringCase): * Shared/API/c/WKString.h: * Shared/API/c/WKURL.cpp: (WKURLCopyHostName): (WKURLCopyScheme): * Shared/API/c/WKURL.h: * Shared/WebString.h: (WebKit::WebString::equalToUTF8StringIgnoringCase): * Shared/WebURL.h: Added OwnPtr<KURL> member to be able to lazily parse the URL and store the result. (WebKit::WebURL::host): (WebKit::WebURL::protocol): (WebKit::WebURL::parseURLIfNecessary): * win/WebKit2.def: Revert the symbol exports that were needed to use KURL in WebKitTestRunner. 2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::willSendRequestForFrame): Use new WebKit2 API's instead of KURL to analyze the URL. * WebKitTestRunner/StringFunctions.h: (WTR::adoptWK): Moved from InjectedBundlePage.cpp to make it available globally in the WebKitTestRunner project. (WTR::toWK): Use adoptWK. (WTR::operator<<): Added helper for printing a WKURL. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Do not link against WebCore. Canonical link: https://commits.webkit.org/70964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-15 00:32:53 +00:00
}
Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Add some string function exports to Windows so the WebKitTestRunner can use them. Reviewed by Geoff Garen. * win/WebKit2.def: Tools: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Fix crash preventing WebKitTestRunner from working in Release. WebKitTestRunner used ostringstream to collect output from the test. ostringstream is incompatible with our FastMalloc overrides. When copying strings out ostringstream a new string is allocated with FastMalloc because the allocation is inlined. When that string is freed is uses the system malloc because that call is not inlined. I removed ostringstream in favor of StringBuilder. Properly set NDEBUG on Release builds so we don't crash when when we free the strings StringBuilder created. Reviewed by Geoff Garen. Add DEBUG_DEFINES to set NDEBUG on release builds. * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Remove ostringstream member in favor of StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::initialize): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::done): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (WTF): (WTR::InjectedBundle::stringBuilder): (InjectedBundle): Append output to StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::hasPrefix): (WTR::dumpPath): (WTR::rangeToStr): (WTR::styleDecToStr): (WTR::frameToStr): (WTR::dumpFrameScrollPosition): (WTR::dumpFrameText): (WTR::dumpDescendantFramesText): (WTR::InjectedBundlePage::dump): (WTR::InjectedBundlePage::didReceiveTitleForFrame): (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): (WTR::InjectedBundlePage::willSendRequestForFrame): (WTR::InjectedBundlePage::decidePolicyForNavigationAction): (WTR::lastFileURLPathComponent): (WTR::InjectedBundlePage::willAddMessageToConsole): (WTR::InjectedBundlePage::willSetStatusbarText): (WTR::InjectedBundlePage::willRunJavaScriptAlert): (WTR::InjectedBundlePage::willRunJavaScriptConfirm): (WTR::InjectedBundlePage::willRunJavaScriptPrompt): (WTR::InjectedBundlePage::shouldBeginEditing): (WTR::InjectedBundlePage::shouldEndEditing): (WTR::InjectedBundlePage::shouldInsertNode): (WTR::InjectedBundlePage::shouldInsertText): (WTR::InjectedBundlePage::shouldDeleteRange): (WTR::InjectedBundlePage::shouldChangeSelectedRange): (WTR::InjectedBundlePage::shouldApplyStyle): (WTR::InjectedBundlePage::didBeginEditing): (WTR::InjectedBundlePage::didEndEditing): (WTR::InjectedBundlePage::didChange): (WTR::InjectedBundlePage::didChangeSelection): (WTR::InjectedBundlePage::supportsFullScreen): (WTR::InjectedBundlePage::enterFullScreenForElement): (WTR::InjectedBundlePage::exitFullScreenForElement): (WTR::InjectedBundlePage::beganEnterFullScreen): (WTR::InjectedBundlePage::beganExitFullScreen): (WTR::dumpBackForwardListItem): (WTR::InjectedBundlePage::dumpBackForwardList): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::waitToDumpWatchdogTimerFired): (WTR::LayoutTestController::dumpConfigurationForViewport): Convert between WTF::String and WKStringRef. * WebKitTestRunner/StringFunctions.h: (WTR::toWTFString): (WTR): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Canonical link: https://commits.webkit.org/98644@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-17 00:29:38 +00:00
inline WTF::String toWTFString(const WKRetainPtr<WKStringRef>& string)
2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 No code changes so no new tests. Revert the changes that were needed to use KURL in WebKitTestRunner. * Configurations/WebCore.xcconfig: * WebCore.exp.in: 2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 Add API's to WKURL and WKString to satisfy WebKitTestRunner's needs. * Shared/API/c/WKString.cpp: (WKStringIsEqualToUTF8CStringIgnoringCase): * Shared/API/c/WKString.h: * Shared/API/c/WKURL.cpp: (WKURLCopyHostName): (WKURLCopyScheme): * Shared/API/c/WKURL.h: * Shared/WebString.h: (WebKit::WebString::equalToUTF8StringIgnoringCase): * Shared/WebURL.h: Added OwnPtr<KURL> member to be able to lazily parse the URL and store the result. (WebKit::WebURL::host): (WebKit::WebURL::protocol): (WebKit::WebURL::parseURLIfNecessary): * win/WebKit2.def: Revert the symbol exports that were needed to use KURL in WebKitTestRunner. 2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::willSendRequestForFrame): Use new WebKit2 API's instead of KURL to analyze the URL. * WebKitTestRunner/StringFunctions.h: (WTR::adoptWK): Moved from InjectedBundlePage.cpp to make it available globally in the WebKitTestRunner project. (WTR::toWK): Use adoptWK. (WTR::operator<<): Added helper for printing a WKURL. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Do not link against WebCore. Canonical link: https://commits.webkit.org/70964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-15 00:32:53 +00:00
{
Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Add some string function exports to Windows so the WebKitTestRunner can use them. Reviewed by Geoff Garen. * win/WebKit2.def: Tools: https://bugs.webkit.org/show_bug.cgi?id=81065 <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Fix crash preventing WebKitTestRunner from working in Release. WebKitTestRunner used ostringstream to collect output from the test. ostringstream is incompatible with our FastMalloc overrides. When copying strings out ostringstream a new string is allocated with FastMalloc because the allocation is inlined. When that string is freed is uses the system malloc because that call is not inlined. I removed ostringstream in favor of StringBuilder. Properly set NDEBUG on Release builds so we don't crash when when we free the strings StringBuilder created. Reviewed by Geoff Garen. Add DEBUG_DEFINES to set NDEBUG on release builds. * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Remove ostringstream member in favor of StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::initialize): (WTR::InjectedBundle::beginTesting): (WTR::InjectedBundle::done): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (WTF): (WTR::InjectedBundle::stringBuilder): (InjectedBundle): Append output to StringBuilder. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::hasPrefix): (WTR::dumpPath): (WTR::rangeToStr): (WTR::styleDecToStr): (WTR::frameToStr): (WTR::dumpFrameScrollPosition): (WTR::dumpFrameText): (WTR::dumpDescendantFramesText): (WTR::InjectedBundlePage::dump): (WTR::InjectedBundlePage::didReceiveTitleForFrame): (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): (WTR::InjectedBundlePage::willSendRequestForFrame): (WTR::InjectedBundlePage::decidePolicyForNavigationAction): (WTR::lastFileURLPathComponent): (WTR::InjectedBundlePage::willAddMessageToConsole): (WTR::InjectedBundlePage::willSetStatusbarText): (WTR::InjectedBundlePage::willRunJavaScriptAlert): (WTR::InjectedBundlePage::willRunJavaScriptConfirm): (WTR::InjectedBundlePage::willRunJavaScriptPrompt): (WTR::InjectedBundlePage::shouldBeginEditing): (WTR::InjectedBundlePage::shouldEndEditing): (WTR::InjectedBundlePage::shouldInsertNode): (WTR::InjectedBundlePage::shouldInsertText): (WTR::InjectedBundlePage::shouldDeleteRange): (WTR::InjectedBundlePage::shouldChangeSelectedRange): (WTR::InjectedBundlePage::shouldApplyStyle): (WTR::InjectedBundlePage::didBeginEditing): (WTR::InjectedBundlePage::didEndEditing): (WTR::InjectedBundlePage::didChange): (WTR::InjectedBundlePage::didChangeSelection): (WTR::InjectedBundlePage::supportsFullScreen): (WTR::InjectedBundlePage::enterFullScreenForElement): (WTR::InjectedBundlePage::exitFullScreenForElement): (WTR::InjectedBundlePage::beganEnterFullScreen): (WTR::InjectedBundlePage::beganExitFullScreen): (WTR::dumpBackForwardListItem): (WTR::InjectedBundlePage::dumpBackForwardList): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::waitToDumpWatchdogTimerFired): (WTR::LayoutTestController::dumpConfigurationForViewport): Convert between WTF::String and WKStringRef. * WebKitTestRunner/StringFunctions.h: (WTR::toWTFString): (WTR): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Canonical link: https://commits.webkit.org/98644@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-17 00:29:38 +00:00
return toWTFString(string.get());
2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 No code changes so no new tests. Revert the changes that were needed to use KURL in WebKitTestRunner. * Configurations/WebCore.xcconfig: * WebCore.exp.in: 2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 Add API's to WKURL and WKString to satisfy WebKitTestRunner's needs. * Shared/API/c/WKString.cpp: (WKStringIsEqualToUTF8CStringIgnoringCase): * Shared/API/c/WKString.h: * Shared/API/c/WKURL.cpp: (WKURLCopyHostName): (WKURLCopyScheme): * Shared/API/c/WKURL.h: * Shared/WebString.h: (WebKit::WebString::equalToUTF8StringIgnoringCase): * Shared/WebURL.h: Added OwnPtr<KURL> member to be able to lazily parse the URL and store the result. (WebKit::WebURL::host): (WebKit::WebURL::protocol): (WebKit::WebURL::parseURLIfNecessary): * win/WebKit2.def: Revert the symbol exports that were needed to use KURL in WebKitTestRunner. 2011-03-14 Balazs Kelemen <kbalazs@webkit.org> Reviewed by Adam Roben. [Qt][WK2]Unbreak InjectedBundle on Qt https://bugs.webkit.org/show_bug.cgi?id=54109 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::willSendRequestForFrame): Use new WebKit2 API's instead of KURL to analyze the URL. * WebKitTestRunner/StringFunctions.h: (WTR::adoptWK): Moved from InjectedBundlePage.cpp to make it available globally in the WebKitTestRunner project. (WTR::toWK): Use adoptWK. (WTR::operator<<): Added helper for printing a WKURL. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Do not link against WebCore. Canonical link: https://commits.webkit.org/70964@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-03-15 00:32:53 +00:00
}
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
inline WTF::String toWTFString(JSStringRef string)
{
return toWTFString(toWK(string));
}
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
inline WTF::String toWTFString(const JSRetainPtr<JSStringRef>& string)
{
return toWTFString(string.get());
}
Refactor TestOptions code in WebKitTestRunner to make it easier to rationalize and extend https://bugs.webkit.org/show_bug.cgi?id=217390 Reviewed by Darin Adler. Refactors TestOptions code in WebKitTestRunner to make it clear how options coming in at different levels are treated and what precedence each has. The order is (from least to most): - Global features passed to WebKitTestRunner via the command line (e.g. --show-touches) - Hardcoded features based on the path of the test being run (hopefully we can remove all soon) - Hardcoded platform specific defaults (currently only used by macOS for useThreadedScrolling). - Features from the test headers within the test itself. - Finally, a second chance for more platform specific defaults (currenly only used the Cocoa ports for setting enableProcessSwapOnNavigation and enableProcessSwapOnWindowOpen based on NSUserDefaults.) To make this change work, and pave the way for future autogeneration of some of these test options, the TestOptions struct (now class) was overhauled. Instead of storing the state itself, TestOptions is now an immutable owner of a TestFeatures object. TestFeatures is a simple struct that contains maps of option keys to values and can be merged with other TestFeatures objects. TestOptions takes a TestFeatures at construction, and exposes getters for all keys, as well as defaults for when they are not in the maps. In future changes, I would like to remove many of these (the ones that correspond with WebKit preferences anyway) and have the keys and values automatically dealt with by WKPreferences. * WebKitTestRunner/Options.cpp: * WebKitTestRunner/Options.h: Switch to std::unordered_map for consistency and ease of conversion. * WebKitTestRunner/PlatformWebView.h: (WTR::PlatformWebView::viewSupportsOptions const): Update to call new TestOptions functions. * WebKitTestRunner/StringFunctions.h: (WTR::toWK): (WTR::toWTFString): Add conversions for std::string. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Replace some bools with a new global TestFeatures instance that forms the base of all TestFeatures merges. (WTR::TestController::generateContextConfiguration const): (WTR::TestController::generatePageConfiguration): (WTR::TestController::createWebViewWithOptions): (WTR::TestController::ensureViewSupportsOptionsForTest): (WTR::TestController::resetPreferencesToConsistentValues): (WTR::TestController::resetStateToConsistentValues): Update to call new TestOptions functions. (WTR::TestController::createTestURL): Expose as a static member function on TestController for use in other files. (WTR::TestController::testOptionsForTest const): Rework to be a sequence of TestFeatures merges. (WTR::TestController::updateWebViewSizeForTest): (WTR::TestController::updateWindowScaleForTest): Update to call new TestOptions functions. (WTR::createTestURL): Deleted. (WTR::parseBooleanTestHeaderValue): Deleted. (WTR::parseStringTestHeaderValueAsRelativePath): Deleted. (WTR::parseStringTestHeaderValueAsURL): Deleted. (WTR::updateTestOptionsFromTestHeader): Deleted. (WTR::TestController::platformAddTestOptions const): Deleted. Moved TestOptions parsing to TestOptions.cpp * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::createTestSettingsDictionary): Update to call new TestOptions functions. * WebKitTestRunner/TestOptions.h: Reworks TestOptions to be an immutable owner of a TestFeatures struct, which is a set of maps that map feature string keys, to values of type bool, double, string or string vector. * WebKitTestRunner/TestOptions.cpp: (WTR::merge): Merges two TestFeatures objects. If both contain the same key, the 'additional' TestFeatures overrides the 'base' TestFeatures. (WTR::dumpFeatures): Helper to dump features to stderr, useful for debugging. (WTR::keyType): Helper for parser to know which value parser to use. (WTR::parseBooleanTestHeaderValue): (WTR::parseStringTestHeaderValueAsRelativePath): (WTR::parseStringTestHeaderValueAsURL): Value parsers moved from TestController.cpp (WTR::parseTestHeader): Header parser moved from TestController.cpp. Update to now return a TestFeatures object and use keyType to pick value parser rather than inlining the if statements. (WTR::hardcodedFeaturesBasedOnPathForTest): Moved from the TestOptions contructor and reworked to return a TestFeatures object to be merged by the caller. (WTR::featureDefaultsFromTestHeaderForTest): Creates a TestFeatures for the test headers of the current test. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformSpecificFeatureOverridesDefaultsForTest const): Reworked to now return a TestFeatures object that will be merged, rather than updating a TestOptions. Moves enableInAppBrowserPrivacy work to TestController::platformWillRunTest where it is more appropriate. (WTR::TestController::platformInitializeDataStore): (WTR::TestController::platformCreateWebView): (WTR::TestController::finishCreatingPlatformWebView): (WTR::TestController::setApplicationBundleIdentifier): (WTR::TestController::cocoaResetStateToConsistentValues): (WTR::contentMode): Update to call new TestOptions functions. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::platformConfigureViewForTest): Update to call new TestOptions functions. (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Moved GeneratedTouchesDebugWindow work to TestController::platformConfigureViewForTest where it is more appropriate and removed shouldShowTouches setting as that is done globally now. * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::PlatformWebView): Update to call new TestOptions functions. * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Remove shouldUseRemoteLayerTree and shouldShowWebView, as those are now done globally, and re-implemented useThreadedScrolling to use boolFeatures. * WebKitTestRunner/win/TestControllerWin.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. * WebKitTestRunner/gtk/TestControllerGTK.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. Canonical link: https://commits.webkit.org/230271@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 00:45:29 +00:00
inline WTF::String toWTFString(const std::string& string)
{
return WTF::String::fromUTF8(string.c_str());
}
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
inline WKRetainPtr<WKStringRef> toWKString(JSContextRef context, JSValueRef value)
{
return toWK(createJSString(context, value).get());
}
inline WTF::String toWTFString(JSContextRef context, JSValueRef value)
{
// FIXME: Could make this efficient by using the WTFString inside OpaqueJSString if we wanted to.
return toWTFString(createJSString(context, value));
}
Refactor TestOptions code in WebKitTestRunner to make it easier to rationalize and extend https://bugs.webkit.org/show_bug.cgi?id=217390 Reviewed by Darin Adler. Refactors TestOptions code in WebKitTestRunner to make it clear how options coming in at different levels are treated and what precedence each has. The order is (from least to most): - Global features passed to WebKitTestRunner via the command line (e.g. --show-touches) - Hardcoded features based on the path of the test being run (hopefully we can remove all soon) - Hardcoded platform specific defaults (currently only used by macOS for useThreadedScrolling). - Features from the test headers within the test itself. - Finally, a second chance for more platform specific defaults (currenly only used the Cocoa ports for setting enableProcessSwapOnNavigation and enableProcessSwapOnWindowOpen based on NSUserDefaults.) To make this change work, and pave the way for future autogeneration of some of these test options, the TestOptions struct (now class) was overhauled. Instead of storing the state itself, TestOptions is now an immutable owner of a TestFeatures object. TestFeatures is a simple struct that contains maps of option keys to values and can be merged with other TestFeatures objects. TestOptions takes a TestFeatures at construction, and exposes getters for all keys, as well as defaults for when they are not in the maps. In future changes, I would like to remove many of these (the ones that correspond with WebKit preferences anyway) and have the keys and values automatically dealt with by WKPreferences. * WebKitTestRunner/Options.cpp: * WebKitTestRunner/Options.h: Switch to std::unordered_map for consistency and ease of conversion. * WebKitTestRunner/PlatformWebView.h: (WTR::PlatformWebView::viewSupportsOptions const): Update to call new TestOptions functions. * WebKitTestRunner/StringFunctions.h: (WTR::toWK): (WTR::toWTFString): Add conversions for std::string. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Replace some bools with a new global TestFeatures instance that forms the base of all TestFeatures merges. (WTR::TestController::generateContextConfiguration const): (WTR::TestController::generatePageConfiguration): (WTR::TestController::createWebViewWithOptions): (WTR::TestController::ensureViewSupportsOptionsForTest): (WTR::TestController::resetPreferencesToConsistentValues): (WTR::TestController::resetStateToConsistentValues): Update to call new TestOptions functions. (WTR::TestController::createTestURL): Expose as a static member function on TestController for use in other files. (WTR::TestController::testOptionsForTest const): Rework to be a sequence of TestFeatures merges. (WTR::TestController::updateWebViewSizeForTest): (WTR::TestController::updateWindowScaleForTest): Update to call new TestOptions functions. (WTR::createTestURL): Deleted. (WTR::parseBooleanTestHeaderValue): Deleted. (WTR::parseStringTestHeaderValueAsRelativePath): Deleted. (WTR::parseStringTestHeaderValueAsURL): Deleted. (WTR::updateTestOptionsFromTestHeader): Deleted. (WTR::TestController::platformAddTestOptions const): Deleted. Moved TestOptions parsing to TestOptions.cpp * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::createTestSettingsDictionary): Update to call new TestOptions functions. * WebKitTestRunner/TestOptions.h: Reworks TestOptions to be an immutable owner of a TestFeatures struct, which is a set of maps that map feature string keys, to values of type bool, double, string or string vector. * WebKitTestRunner/TestOptions.cpp: (WTR::merge): Merges two TestFeatures objects. If both contain the same key, the 'additional' TestFeatures overrides the 'base' TestFeatures. (WTR::dumpFeatures): Helper to dump features to stderr, useful for debugging. (WTR::keyType): Helper for parser to know which value parser to use. (WTR::parseBooleanTestHeaderValue): (WTR::parseStringTestHeaderValueAsRelativePath): (WTR::parseStringTestHeaderValueAsURL): Value parsers moved from TestController.cpp (WTR::parseTestHeader): Header parser moved from TestController.cpp. Update to now return a TestFeatures object and use keyType to pick value parser rather than inlining the if statements. (WTR::hardcodedFeaturesBasedOnPathForTest): Moved from the TestOptions contructor and reworked to return a TestFeatures object to be merged by the caller. (WTR::featureDefaultsFromTestHeaderForTest): Creates a TestFeatures for the test headers of the current test. * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformSpecificFeatureOverridesDefaultsForTest const): Reworked to now return a TestFeatures object that will be merged, rather than updating a TestOptions. Moves enableInAppBrowserPrivacy work to TestController::platformWillRunTest where it is more appropriate. (WTR::TestController::platformInitializeDataStore): (WTR::TestController::platformCreateWebView): (WTR::TestController::finishCreatingPlatformWebView): (WTR::TestController::setApplicationBundleIdentifier): (WTR::TestController::cocoaResetStateToConsistentValues): (WTR::contentMode): Update to call new TestOptions functions. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetStateToConsistentValues): (WTR::TestController::platformConfigureViewForTest): Update to call new TestOptions functions. (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Moved GeneratedTouchesDebugWindow work to TestController::platformConfigureViewForTest where it is more appropriate and removed shouldShowTouches setting as that is done globally now. * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::PlatformWebView): Update to call new TestOptions functions. * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Remove shouldUseRemoteLayerTree and shouldShowWebView, as those are now done globally, and re-implemented useThreadedScrolling to use boolFeatures. * WebKitTestRunner/win/TestControllerWin.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. * WebKitTestRunner/gtk/TestControllerGTK.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): (WTR::TestController::updatePlatformSpecificTestOptionsForTest const): Deleted. Updated for new signature. Canonical link: https://commits.webkit.org/230271@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 00:45:29 +00:00
template<typename StringType>
inline std::vector<StringType> split(const StringType& string, char delimiter)
{
std::vector<StringType> result;
size_t i = 0;
while (i < string.size()) {
auto foundIndex = string.find_first_of(delimiter, i);
if (foundIndex != i)
result.push_back(string.substr(i, foundIndex - i));
if (foundIndex == StringType::npos)
break;
i = foundIndex + 1;
}
return result;
}
Refactor test runner code to cut down on copy/paste code and long-winded repetitive idioms https://bugs.webkit.org/show_bug.cgi?id=217028 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/JSRetainPtr.h: Added support for JSClassRef. Tools: I did a lot of simplifying, but even more is possible. For some reason, the test code is a hotbed of repeated idioms, and copy and paste rather than helper functions. Even after the refactoring, I have some doubts about the way this code is written with so much repeated marshaling for each function. * DumpRenderTree/AccessibilityController.cpp: (AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/AccessibilityController.h: Updated for the above. * DumpRenderTree/AccessibilityUIElement.cpp: (uiElementCountForSearchPredicateCallback): Removed unneeded initialization of JSRetainPtr, which starts out null. * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_platformTypeConstructor): Use toOptionalBool and createJSString. (_returnExpression): Use makeValue. * DumpRenderTree/GCController.cpp: (GCController::GCController): Deleted. (GCController::~GCController): Deleted. (collectCallback): Use a reference and auto. (collectOnAlternateThreadCallback): Ditto. (getJSObjectCountCallback): Ditto. (GCController::makeWindowObject): Use setGlobalObjectProperty. (AccessibilityController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. * DumpRenderTree/GCController.h: Updated for the above. * DumpRenderTree/TestRunner.cpp: (encodeHostNameCallback): Use createJSString. (execCommandCallback): Ditto. (findStringCallback): Ditto. (isCommandEnabledCallback): Ditto. (overridePreferenceCallback): Ditto. (queueLoadCallback): Ditto. (queueLoadHTMLStringCallback): Ditto. (TestRunner::makeWindowObject): Use setGlobalObjectProperty. (TestRunner::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TestRunner::staticValues): Made return value const*. (TestRunner::staticFunctions): Ditto. (TestRunner::waitToDumpWatchdogTimerFired): Simplified printing. (TestRunner::cacheTestRunnerCallback): Updated to use object pointers as hash table values instead of values, since callbacks need to be objects. (TestRunner::callTestRunnerCallback): Ditto. (TestRunner::clearTestRunnerCallbacks): Ditto. (TestRunner::setOpenPanelFiles): Use arrayLength. * DumpRenderTree/TestRunner.h: Updated for the above. * DumpRenderTree/ios/AccessibilityControllerIOS.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: (createEmptyJSString): Dleted. (AccessibilityUIElement::stringForTextMarkerRange): Use createJSString. (AccessibilityUIElement::attributesOfLinkedUIElements): Ditto. (AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (AccessibilityUIElement::attributesOfChildren): Ditto. (AccessibilityUIElement::allAttributes): Ditto. (AccessibilityUIElement::stringAttributeValue): Ditto. (AccessibilityUIElement::parameterizedAttributeNames): Ditto. (AccessibilityUIElement::role): Ditto. (AccessibilityUIElement::subrole): Ditto. (AccessibilityUIElement::roleDescription): Ditto. (AccessibilityUIElement::computedRoleString): Ditto. (AccessibilityUIElement::title): Ditto. (AccessibilityUIElement::orientation const): Ditto. (AccessibilityUIElement::language): Ditto. (AccessibilityUIElement::valueDescription): Ditto. (AccessibilityUIElement::ariaDropEffects const): Ditto. (AccessibilityUIElement::boundsForRange): Ditto. (AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (AccessibilityUIElement::attributesOfRowHeaders): Ditto. (AccessibilityUIElement::attributesOfColumns): Ditto. (AccessibilityUIElement::attributesOfRows): Ditto. (AccessibilityUIElement::attributesOfVisibleCells): Ditto. (AccessibilityUIElement::attributesOfHeader): Ditto. (AccessibilityUIElement::selectedTextRange): Ditto. (AccessibilityUIElement::accessibilityValue const): Ditto. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/AccessibilityCommonMac.h: Removed unneeded "extern". * DumpRenderTree/mac/AccessibilityCommonMac.mm: (searchPredicateParameterizedAttributeForSearchCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. * DumpRenderTree/mac/AccessibilityControllerMac.mm: (AccessibilityController::platformName const): Use createJSString. * DumpRenderTree/mac/AccessibilityUIElementMac.mm: (createEmptyJSString): Deleted. (selectTextParameterizedAttributeForCriteria): Use arrayLength. Removed unneeded call to JSValueToObject after JSValueIsObject. (searchTextParameterizedAttributeForCriteria): Ditto. (AccessibilityUIElement::accessibilityValue const): Use createJSString. (AccessibilityUIElement::documentEncoding): Ditto. (AccessibilityUIElement::documentURI): Ditto. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Use auto. Pass fewer arguments to makeWindowObject. Simplified object creation code by using adoptNS instead of release. (-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]): Use createJSString. * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::findString): Use arrayLength. * DumpRenderTree/win/FrameLoadDelegate.cpp: (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): Pass fewer arguments to makeWindowObject. * DumpRenderTree/win/TextInputController.cpp: (TextInputController::makeWindowObject): Use setGlobalObjectProperty. (TextInputController::createJSClass): Replaced getJSClass with this. Return a JSRetainPtr to make it clear this passes ownership to the caller. (TextInputController::staticValues): Made return value const*. (TextInputController::staticFunctions): Ditto. * DumpRenderTree/win/TextInputController.h: Updated for above. * TestRunnerShared/Bindings/JSBasics.cpp: (WTR::toOptionalBool): Renamed from JSValueMakeBooleanOrNull. (WTR::toOptionalDouble): Added. (WTR::makeValue): Added with overloads for various types. Replaced JSValueToNullableBoolean and JSValueMakeStringOrNull. (WTR::createJSString): Added with overloads for various types. (WTR::property): Added. (WTR::stringProperty): Added. (WTR::booleanProperty): Added. (WTR::numericProperty): Added. (WTR::objectProperty): Refactored to call property. (WTR::arrayLength): Added. (WTR::setGlobalObjectProperty): Added. (WTR::call): Refactored to let objectProperty do more of the null checking. (WTR::callConstructor): Ditto. * TestRunnerShared/Bindings/JSBasics.h: Updated for the above. * TestRunnerShared/Bindings/JSWrappable.h: Reduced includes a bit. * TestRunnerShared/Bindings/JSWrapper.h: Added setGlobalObjectProperty. * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: (UIScriptContext::UIScriptContext): Pass fewer arguments to makeWindowObject. (UIScriptContext::runUIScript): Use createJSString. (UIScriptContext::objectFromRect const): Use setProperty. * TestRunnerShared/UIScriptContext/UIScriptController.h: Updated for the above. * TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp: (WTR::toDeviceOrientation): Use createJSString and JSStringIsEqualToUTF8CString. (WTR::UIScriptController::makeWindowObject): Use setGlobalObjectProperty. * TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: (-[LayoutTestSpellChecker setResultsFromJSValue:inContext:]): Use createJSString and removed unneeded use of lroundl. * WebKitTestRunner/DictionaryFunctions.h: Added. Contains convenience functions for dealing with WKDictionaryRef. * WebKitTestRunner/EventSenderProxy.h: Initialize data members. * WebKitTestRunner/GeolocationProviderMock.cpp: (GeolocationProviderMock::setPosition): Use Optional instead of separate bool. * WebKitTestRunner/GeolocationProviderMock.h: Updated for the above. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AccessibilityController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): Use static initialization and a lambda instead of an if statement to initialize. (_platformTypeConstructor): Use toOptionalBool and createJSString. Also added support for nullable doubles and used auto a bit more. (_returnExpression): Use makeValue. * InjectedBundle/Bindings/TestRunner.idl: Made the optional arguments to the setMockGeolocationPosition function "double?" instead of "object". * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::getMenuItemChildrenCallback): Use auto and not JSValueToObject. (WTR::arrayLength): Moved to JSBasics.h/cpp. (WTR::parseTouchModifier): Added. Factored out of the EventSendingController::setTouchModifier function. (WTR::parseModifierArray): Use createJSString and remove unneeded ignored exception out argument, since that is optional. Also added overload that gets the context. (WTR::EventSendingController::EventSendingController): Deleted. (WTR::EventSendingController::~EventSendingController): Deleted. (WTR::createMouseMessageBody): Use adoptWK and setValue. Return a WKRetainPtr. (WTR::EventSendingController::mouseDown): Use postSynchronousPageMessage. (WTR::EventSendingController::mouseUp): Ditto. (WTR::EventSendingController::mouseMoveTo): Use setValue and postSynchronousPageMessages. (WTR::EventSendingController::mouseForceClick): Ditto. (WTR::EventSendingController::startAndCancelMouseForceClick): Ditto. (WTR::EventSendingController::mouseForceDown): Ditto. (WTR::EventSendingController::mouseForceUp): Ditto. (WTR::EventSendingController::mouseForceChanged): Ditto. (WTR::EventSendingController::leapForward): Ditto. (WTR::EventSendingController::scheduleAsynchronousClick): Use postPageMessage. (WTR::createKeyDownMessageBody): Use setValue. (WTR::EventSendingController::keyDown): Use postSynchronousPageMessage. (WTR::EventSendingController::scheduleAsynchronousKeyDown): Use postPageMessage. (WTR::EventSendingController::mouseScrollBy): Use setValue and postPageMessage. (WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases): Use setValue and postPageMessage. (WTR::EventSendingController::continuousMouseScrollBy): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::contextClick): Use auto and not JSValueToObject. (WTR::toMonitorWheelEventsOptions): Use booleanProperty. (WTR::EventSendingController::addTouchPoint): Use setValue and postSynchronousPageMessage. (WTR::EventSendingController::updateTouchPoint): Ditto. (WTR::EventSendingController::setTouchModifier): Ditto. (WTR::EventSendingController::setTouchPointRadius): Ditto. (WTR::EventSendingController::touchStart): Ditto. (WTR::EventSendingController::touchMove): Ditto. (WTR::EventSendingController::touchEnd): Ditto. (WTR::EventSendingController::touchCancel): Ditto. (WTR::EventSendingController::clearTouchPoints): Ditto. (WTR::EventSendingController::releaseTouchPoint): Ditto. (WTR::EventSendingController::cancelTouchPoint): Ditto. (WTR::EventSendingController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the above. Deleted various unneeded functions. * WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::GCController): Deleted. (WTR::GCController::~GCController): Deleted. (WTR::GCController::makeWindowObject): Use setGlobalObjectProperty. * WebKitTestRunner/InjectedBundle/GCController.h: Updated for the above. Also marked the class final. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didCreatePage): Use booleanValue. (WTR::InjectedBundle::didReceiveMessage): Use toWK. (WTR::InjectedBundle::postPageMessage): Added. (WTR::InjectedBundle::reportLiveDocuments): Use postPageMessage. (WTR::InjectedBundle::didReceiveMessageToPage): Use dictionaryValue, booleanValue, postPageMessage, value, and more to streamline. (WTR::InjectedBundle::booleanForKey): Deleted. (WTR::InjectedBundle::stringForKey): Deleted. (WTR::InjectedBundle::beginTesting): Use booleanValue. (WTR::InjectedBundle::done): Use stringValue. (WTR::InjectedBundle::closeOtherPages): Use setValue and toWK. (WTR::InjectedBundle::dumpToStdErr): Use postPageMessage (WTR::InjectedBundle::outputText): Use toWK. (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Use postPageMessage. (WTR::InjectedBundle::postAddChromeInputField): Ditto. (WTR::InjectedBundle::postRemoveChromeInputField): Ditto. (WTR::InjectedBundle::postFocusWebView): Ditto. (WTR::InjectedBundle::postSetBackingScaleFactor): Ditto. (WTR::InjectedBundle::postSetWindowIsKey): Use toWK. (WTR::InjectedBundle::postSetViewSize): Use setValue and toWK. (WTR::InjectedBundle::postSimulateWebNotificationClick): Use postPageMessage. (WTR::InjectedBundle::postSetAddsVisitedLinks): Ditto. (WTR::InjectedBundle::setGeolocationPermission): Ditto. (WTR::InjectedBundle::setMockGeolocationPosition): Use setValue and postPageMessage, and use Optional instead of bool/double pairs. (WTR::InjectedBundle::setMockGeolocationPositionUnavailableError): Use postPageMessage. (WTR::InjectedBundle::isGeolocationProviderActive const): Use toWK and booleanValue. (WTR::InjectedBundle::imageCountInGeneralPasteboard const): Use toWK and uint64Value. (WTR::InjectedBundle::setUserMediaPermission): Use postPageMessage. (WTR::InjectedBundle::resetUserMediaPermission): Ditto. (WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin): Use setValue and postPageMessage. (WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin): Uset setValue and uint64Value. (WTR::InjectedBundle::setCustomPolicyDelegate): Use setValue and postPageMessage. (WTR::InjectedBundle::setHidden): Ditto. (WTR::InjectedBundle::setCacheModel): Ditto. (WTR::InjectedBundle::shouldProcessWorkQueue const): Use toWK and booleanValue. (WTR::InjectedBundle::processWorkQueue): Use postPageMessage. (WTR::InjectedBundle::queueBackNavigation): Ditto. (WTR::InjectedBundle::queueForwardNavigation): Ditto. (WTR::InjectedBundle::queueLoad): Use setValue and postPageMessage. (WTR::InjectedBundle::queueLoadHTMLString): Ditto. (WTR::InjectedBundle::queueReload): Ditto. (WTR::InjectedBundle::queueLoadingScript): Ditto. (WTR::InjectedBundle::queueNonLoadingScript): Ditto. (WTR::postMessage): Added. Overloads for many types to keep caller code streamlined. (WTR::postSynchronousMessage): Ditto. (WTR::postPageMessage): Ditto. (WTR::postSynchronousPageMessage): Ditto. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Updated for the above. * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::propertyValue): Deleted. Use functions from JSBasics.h instead. (WTR::propertyValueDouble): Ditto. (WTR::propertyValueInt): Ditto. (WTR::numericWindowProperty): Renamed from numericWindowPropertyValue for brevity and for consistency with JSBasics.h functions. (WTR::dumpPath): Use stringProperty, objectProperty, and makeString. (WTR::rangeToStr): Use auto, numericProperty, and makeString. (WTR::NavigationTypeToString): Use toWK. (WTR::string): Renamed from securityOriginToStr. Use makeString. (WTR::frameToStr): Use auto. (WTR::InjectedBundlePage::resetAfterTest): Removed unneeded local. (WTR::dumpFrameDescriptionSuitableForTestResult): Use auto. (WTR::dumpRequestDescriptionSuitableForTestResult): Ditto. (WTR::dumpErrorDescriptionSuitableForTestResult): Use auto and toWK. (WTR::dumpFrameScrollPosition): Update for name change. (WTR::toJS): Deleted. Use functions from JSBasics.h instead. (WTR::hasDocumentElement): Use objectProperty. (WTR::InjectedBundlePage::didClearWindowForFrame): Use setGlobalObjectProperty, and pass fewer arguments to makeWindowObject. (WTR::InjectedBundlePage::decidePolicyForNavigationAction): Streamline code a bit. (WTR::InjectedBundlePage::decidePolicyForResponse): Use makeString. (WTR::lastFileURLPathComponent): Ditto. (WTR::InjectedBundlePage::willSetStatusbarText): Ditto. (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Ditto. (WTR::InjectedBundlePage::didExceedDatabaseQuota): Ditto. (WTR::InjectedBundlePage::shouldBeginEditing): Ditto. (WTR::InjectedBundlePage::shouldEndEditing): Ditto. * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::TestRunner): Use toWK. (WTR::page): Added. (WTR::mainFrame): Added. (WTR::mainFrameJSContext): Added. (WTR::TestRunner::display): Use page. (WTR::TestRunner::displayAndTrackRepaints): Use page. (WTR::toWK): Added overload for double. (WTR::createWKDictionary): Added. (WTR::postSynchronousMessageWithReturnValue): Added. (WTR::postSynchronousMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageWithReturnValue): Added. (WTR::postSynchronousPageMessageReturningBoolean): Added. (WTR::postSynchronousPageMessageReturningUInt64): Added. (WTR::postSynchronousMessageReturningUInt64): Added. (WTR::overridePreference): Added. (WTR::TestRunner::shouldDumpPixels const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setDumpPixels): Use postSynchronousMessage. (WTR::TestRunner::whatToDump const): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setWhatToDump): Use postSynchronousMessage. (WTR::TestRunner::setWaitUntilDone): Use postSynchronousMessage. (WTR::TestRunner::shouldWaitUntilDone const): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Use postSynchronousMessage. (WTR::TestRunner::shouldDumpFrameLoadCallbacks): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::addUserScript): Use page. (WTR::TestRunner::addUserStyleSheet): Ditto. (WTR::TestRunner::execCommand): Ditto. (WTR::findOptionsFromArray): Use mainFrameJSContext, arrayLength, and createJSString. (WTR::TestRunner::findString): Use page. (WTR::TestRunner::findStringMatchesInPage): Ditto. (WTR::TestRunner::replaceFindMatchesAtIndices): Use mainFrameJSContext and arrayLength and removed unneeded call to std::round. (WTR::TestRunner::clearAllDatabases): Use postSynchronousMessage. (WTR::TestRunner::syncLocalStorage): Ditto. (WTR::TestRunner::clearAllApplicationCaches): Use page. (WTR::TestRunner::clearApplicationCacheForOrigin): Ditto. (WTR::TestRunner::setAppCacheMaximumSize): Ditto. (WTR::TestRunner::applicationCacheDiskUsageForOrigin): Ditto. (WTR::stringArrayToJS): Tweaked coding style a bit. (WTR::TestRunner::originsWithApplicationCache): Use page. (WTR::TestRunner::isCommandEnabled): Ditto. (WTR::TestRunner::setCanOpenWindows): Use postSynchronousMessage. (WTR::TestRunner::setXSSAuditorEnabled): Use overridePreference. (WTR::TestRunner::setMediaDevicesEnabled): Ditto. (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled): Ditto. (WTR::TestRunner::setCustomUserAgent): Use postSynchronousMessage. (WTR::TestRunner::setWebAPIStatisticsEnabled): Use overridePreference. (WTR::TestRunner::setModernMediaControlsEnabled): Ditto. (WTR::TestRunner::setWebGL2Enabled): Ditto. (WTR::TestRunner::setWritableStreamAPIEnabled): Ditto. (WTR::TestRunner::setTransformStreamAPIEnabled): Ditto. (WTR::TestRunner::setReadableByteStreamAPIEnabled): Ditto. (WTR::TestRunner::setEncryptedMediaAPIEnabled): Ditto. (WTR::TestRunner::setPictureInPictureAPIEnabled): Ditto. (WTR::TestRunner::setGenericCueAPIEnabled): Ditto. (WTR::TestRunner::setAllowsAnySSLCertificate): Use postSynchronousPageMessage. (WTR::TestRunner::setShouldSwapToEphemeralSessionOnNextNavigation): Ditto. (WTR::TestRunner::setShouldSwapToDefaultSessionOnNextNavigation): Ditto. (WTR::TestRunner::setPluginsEnabled): Use overridePreference. (WTR::TestRunner::isPageBoxVisible): Use mainFrame. (WTR::TestRunner::setValueForUser): Removed local. (WTR::TestRunner::setAudioResult): Ditto. (WTR::TestRunner::clearBackForwardList): Use page. (WTR::TestRunner::makeWindowObject): Use setGlobalObjectProperty. (WTR::TestRunner::showWebInspector): Use page. (WTR::TestRunner::closeWebInspector): Ditto. (WTR::TestRunner::evaluateInWebInspector): Ditto. (WTR::TestRunner::worldIDForWorld): Use range-based for loop. (WTR::TestRunner::evaluateScriptInIsolatedWorld): Use mainFrame. (WTR::TestRunner::setTextDirection): Use mainFrame. (WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation): Use postSynchronousPageMessage. (WTR::cacheTestRunnerCallback): Changed map to store objects instead of values. (WTR::callTestRunnerCallback): Simplify since map has objects. Use mainFrameJSContext. (WTR::TestRunner::clearTestRunnerCallbacks): Ditto. (WTR::TestRunner::setAlwaysAcceptCookies): Use postSynchronousMessage. (WTR::TestRunner::setOnlyAcceptFirstPartyCookies): Use auto and toWK. (WTR::TestRunner::setUserStyleSheetEnabled): Use toWK. (WTR::TestRunner::setUserStyleSheetLocation): Use page. (WTR::TestRunner::setTabKeyCyclesThroughElements): Ditto. (WTR::TestRunner::grantWebNotificationPermission): Ditto. (WTR::TestRunner::denyWebNotificationPermission): Ditto. (WTR::TestRunner::removeAllWebNotificationPermissions): Use mainFrameJSContext. (WTR::TestRunner::simulateWebNotificationClick): Ditto. (WTR::TestRunner::setMockGeolocationPosition): Use Optional<double> instead of bool/double pairs, letting the IDL bindings do the work for us. (WTR::TestRunner::setMockGeolocationPositionUnavailableError): Removed local. (WTR::TestRunner::isDoingMediaCapture const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setUserMediaPersistentPermissionForOrigin): Removed locals. (WTR::TestRunner::userMediaPermissionRequestCountForOrigin const): Ditto. (WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin): DItto. (WTR::TestRunner::callShouldCloseOnWebView): Use mainFrame. (WTR::TestRunner::queueLoad): Ditto. (WTR::TestRunner::queueLoadHTMLString): Removed a local. (WTR::TestRunner::queueLoadingScript): Ditto. (WTR::TestRunner::queueNonLoadingScript): Ditto. (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): Use postPageMessage. (WTR::TestRunner::setHandlesAuthenticationChallenges): Ditto. (WTR::TestRunner::setShouldLogCanAuthenticateAgainstProtectionSpace): Ditto. (WTR::TestRunner::setShouldLogDownloadCallbacks): Ditto. (WTR::TestRunner::setAuthenticationUsername): Ditto. (WTR::TestRunner::setAuthenticationPassword): Ditto. (WTR::TestRunner::secureEventInputIsEnabled const): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setBlockAllPlugins): Use postPageMessage. (WTR::TestRunner::setPluginSupportedMode): Ditto. (WTR::TestRunner::failNextNewCodeBlock): Use mainFrameJSContext. (WTR::TestRunner::numberOfDFGCompiles): Ditto. (WTR::TestRunner::neverInlineFunction): Ditto. (WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay): Use postPageMessage. (WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay): Ditto. (WTR::TestRunner::setNavigationGesturesEnabled): Ditto. (WTR::TestRunner::setIgnoresViewportScaleLimits): Ditto. (WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes): Ditto. (WTR::TestRunner::setShouldAllowDeviceOrientationAndMotionAccess): Ditto. (WTR::TestRunner::terminateNetworkProcess): Use postSynchronousPageMessage. (WTR::TestRunner::terminateServiceWorkers): Ditto. (WTR::TestRunner::setUseSeparateServiceWorkerProcess): Ditto. (WTR::TestRunner::runUIScript): Use postPageMessage. (WTR::TestRunner::runUIScriptImmediately): Ditto. (WTR::TestRunner::runUIScriptCallback): Use mainFrameJSContext. (WTR::TestRunner::setAllowedMenuActions): Use mainFrameJSContext, arrayLength, and postPageMessage. (WTR::TestRunner::installCustomMenuAction): Use postPageMessage. (WTR::TestRunner::clearStatisticsDataForDomain): Use postSynchronousMessage. (WTR::TestRunner::doesStatisticsDomainIDExistInDatabase): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsEnabled): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsEphemeral): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsDebugMode): Use postMessage. (WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode): Ditto. (WTR::TestRunner::setStatisticsLastSeen): Ditto. (WTR::TestRunner::setStatisticsMergeStatistic): Ditto. (WTR::TestRunner::setStatisticsExpiredStatistic): Ditto. (WTR::TestRunner::setStatisticsPrevalentResource): Ditto. (WTR::TestRunner::setStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::dumpResourceLoadStatistics): Use postSynchronousPageMessage. (WTR::TestRunner::isStatisticsPrevalentResource): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsVeryPrevalentResource): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder): Ditto. (WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo): Ditto. (WTR::TestRunner::setStatisticsHasHadUserInteraction): Use postMessage. (WTR::TestRunner::isStatisticsHasHadUserInteraction): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::isStatisticsOnlyInDatabaseOnce): Ditto. (WTR::TestRunner::setStatisticsGrandfathered): Use postSynchronousMessage. (WTR::TestRunner::setUseITPDatabase): Ditto. (WTR::TestRunner::isStatisticsGrandfathered): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsSubframeUnderTopFrameOrigin): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsSubresourceUnderTopFrameOrigin): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo): Ditto. (WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom): Ditto. (WTR::TestRunner::setStatisticsCrossSiteLoadWithLinkDecoration): Ditto. (WTR::TestRunner::setStatisticsTimeToLiveUserInteraction): Ditto. (WTR::TestRunner::statisticsDidRunTelemetryCallback): Use mainFrameJSContext. (WTR::TestRunner::statisticsProcessStatisticsAndDataRecords): Use postSynchronousMessage. (WTR::TestRunner::statisticsUpdateCookieBlocking): Use postMessage. (WTR::TestRunner::statisticsSubmitTelemetry): Use postSynchronousMessage. (WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Ditto. (WTR::TestRunner::setStatisticsIsRunningTest): Ditto. (WTR::TestRunner::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Ditto. (WTR::TestRunner::setStatisticsGrandfatheringTime): Ditto. (WTR::TestRunner::setStatisticsMaxStatisticsEntries): Ditto. (WTR::TestRunner::setStatisticsPruneEntriesDownTo): Ditto. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStore): Use postMessage. (WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto. (WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::statisticsDeleteCookiesForHost): Use postSynchronousMessage. (WTR::TestRunner::isStatisticsHasLocalStorage): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsCacheMaxAgeCap): Use postSynchronousMessage. (WTR::TestRunner::hasStatisticsIsolatedSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::setStatisticsShouldDowngradeReferrer): Use postMessage. (WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies): Ditto. (WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestRunner::statisticsSetToSameSiteStrictCookies): Ditto. (WTR::TestRunner::statisticsSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestRunner::statisticsSetThirdPartyCNAMEDomain): Ditto. (WTR::TestRunner::statisticsResetToConsistentState): Ditto. (WTR::TestRunner::getAllStorageAccessEntries): Ditto. (WTR::makeDomainsValue): Factored out. Use mainFrameJSContext. (WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Use makeDomainsValue. (WTR::TestRunner::loadedSubresourceDomains): Use postMessage. (WTR::TestRunner::callDidReceiveLoadedSubresourceDomainsCallback): Use makeDomainsValue. (WTR::TestRunner::addMockMediaDevice): Use postSynchronousMessage. (WTR::TestRunner::clearMockMediaDevices): Ditto. (WTR::TestRunner::removeMockMediaDevice): Ditto. (WTR::TestRunner::resetMockMediaDevices): Ditto. (WTR::TestRunner::setMockCameraOrientation): Ditto. (WTR::TestRunner::isMockRealtimeMediaSourceCenterEnabled): Use postSynchronousMessageReturningBoolean. (WTR::TestRunner::connectMockGamepad): Use postSynchronousMessage. (WTR::TestRunner::disconnectMockGamepad): Ditto. (WTR::TestRunner::setMockGamepadDetails): Ditto. (WTR::TestRunner::setMockGamepadAxisValue): Ditto. (WTR::TestRunner::setMockGamepadButtonValue): Ditto. (WTR::TestRunner::setOpenPanelFiles): Use mainFrameJSContext, arrayLength, createJSString, and postPageMessage. (WTR::TestRunner::setOpenPanelFilesMediaIcon): Use mainFrameJSContext and postPageMessage. (WTR::TestRunner::removeAllSessionCredentials): Use postMessage. (WTR::TestRunner::clearDOMCache): Use postSynchronousMessage. (WTR::TestRunner::clearDOMCaches): Ditto. (WTR::TestRunner::hasDOMCache): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::domCacheSize): Use postSynchronousPageMessageReturningUInt64. (WTR::TestRunner::setAllowStorageQuotaIncrease): Use postSynchronousPageMessage. (WTR::TestRunner::getApplicationManifestThen): Use postMessage. (WTR::TestRunner::injectUserScript): Use postSynchronousMessage. (WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting): Ditto. (WTR::TestRunner::setServiceWorkerFetchTimeout): Ditto. (WTR::TestRunner::addTestKeyToKeychain): Ditto. (WTR::TestRunner::cleanUpKeychain): Ditto. (WTR::TestRunner::keyExistsInKeychain): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Use postSynchronousMessageReturningUInt64. (WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously): Use postSynchronousMessage. (WTR::TestRunner::abortModal): Ditto. (WTR::TestRunner::dumpAdClickAttribution): Use postSynchronousPageMessage. (WTR::TestRunner::clearAdClickAttribution): Ditto. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Ditto. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Ditto. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Ditto. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Ditto. (WTR::TestRunner::setOffscreenCanvasEnabled): Use overridePreference. (WTR::TestRunner::hasAppBoundSession): Use postSynchronousPageMessageReturningBoolean. (WTR::TestRunner::clearAppBoundSession): Use postSynchronousMessage. (WTR::TestRunner::setAppBoundDomains): Use mainFrameJSContext, arrayLength, createJSString, and toWK. (WTR::TestRunner::postMessage): Added. * WebKitTestRunner/InjectedBundle/TestRunner.h: Updated for the above. Also changed overridePreference ot a static member function. * WebKitTestRunner/InjectedBundle/TextInputController.cpp: (WTR::TextInputController::TextInputController): Deleted. (WTR::TextInputController::~TextInputController): Deleted. (WTR::TextInputController::makeWindowObject): Use setGlobalObjectProperty. (WTR::arrayLength): Deleted. Use the one from JSBasics.h now. (WTR::createCompositionHighlightData): Use setValue. * WebKitTestRunner/InjectedBundle/TextInputController.h: Updated for the above. * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h now. (WTR::AccessibilityUIElement::attributesOfLinkedUIElements): Use createJSString. (WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto. (WTR::AccessibilityUIElement::attributesOfChildren): Ditto. (WTR::AccessibilityUIElement::allAttributes): Ditto. (WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto. (WTR::AccessibilityUIElement::stringAttributeValue): Ditto. (WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto. (WTR::AccessibilityUIElement::role): Ditto. (WTR::AccessibilityUIElement::subrole): Ditto. (WTR::AccessibilityUIElement::computedRoleString): Ditto. (WTR::AccessibilityUIElement::title): Ditto. (WTR::AccessibilityUIElement::orientation const): Ditto. (WTR::AccessibilityUIElement::language): Ditto. (WTR::AccessibilityUIElement::valueDescription): Ditto. (WTR::AccessibilityUIElement::isFocused const): Ditto. (WTR::AccessibilityUIElement::isSelectedOptionActive const): Ditto. (WTR::AccessibilityUIElement::isIndeterminate const): Ditto. (WTR::AccessibilityUIElement::ariaDropEffects const): Ditto. (WTR::AccessibilityUIElement::boundsForRange): Ditto. (WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto. (WTR::AccessibilityUIElement::attributesOfColumns): Ditto. (WTR::AccessibilityUIElement::attributesOfRows): Ditto. (WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto. (WTR::AccessibilityUIElement::attributesOfHeader): Ditto. (WTR::AccessibilityUIElement::clearSelectedChildren const): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Ditto. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. (WTR::AccessibilityUIElement::isSelectable const): Ditto. (WTR::AccessibilityUIElement::isMultiSelectable const): Ditto. (WTR::AccessibilityUIElement::isVisible const): Ditto. (WTR::AccessibilityUIElement::isOffScreen const): Ditto. (WTR::AccessibilityUIElement::isCollapsed const): Ditto. (WTR::AccessibilityUIElement::isSingleLine const): Ditto. (WTR::AccessibilityUIElement::isMultiLine const): Ditto. (WTR::AccessibilityUIElement::takeFocus): Ditto. (WTR::AccessibilityUIElement::takeSelection): Ditto. (WTR::AccessibilityUIElement::addSelection): Ditto. (WTR::AccessibilityUIElement::removeSelection): Ditto. (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. * WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::~EventSenderProxy): Deleted. * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: (WTR::makeJSArray): Return a JSObjectRef. Renamed from makeArrayRefForArray. (WTR::makeJSObject): Return a JSObjectRef. Renamed from makeObjectRefForDictionary. (WTR::makeValueRefForValue): Updated for the above. (WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use toWTFString and arrayLength. * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: (WTR::AccessibilityController::platformName): Use createJSString. * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::createEmptyJSString): Deleted. Use createJSString from JSBasics.h instead. (WTR::convertVectorToObjectArray): Deleted. (WTR::makeJSArray): Renamed from convertVectorToObjectArray. (WTR::selectTextParameterizedAttributeForCriteria): Use toWTFString and arrayLength. (WTR::searchTextParameterizedAttributeForCriteria): Ditto. (WTR::AccessibilityUIElement::rowHeaders const): Use makeJSArray. (WTR::AccessibilityUIElement::columnHeaders const): Ditto. (WTR::AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto. (WTR::AccessibilityUIElement::searchTextWithCriteria): Ditto. (WTR::AccessibilityUIElement::accessibilityValue const): Use createJSString. (WTR::AccessibilityUIElement::documentEncoding): Ditto. (WTR::AccessibilityUIElement::documentURI): Ditto. * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: (WTR::TestRunner::inspectorTestStubURL): Remove locals. * WebKitTestRunner/StringFunctions.h: Added toWKString overload that converts from a JSValueRef, JSStringRef, or JSRetainPtr<JSStringRef> and toWK overload that converts from a const char*. * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): Use toWK. (WTR::TestController::generateContextConfiguration const): Ditto. (WTR::TestController::resetPreferencesToConsistentValues): Ditto. (WTR::TestController::resetStateToConsistentValues): Use setValue. (WTR::TestController::updateLiveDocumentsAfterTest): Ditto. (WTR::TestController::checkForWorldLeaks): Use toWK. (WTR::contentExtensionJSONPath): Use toSTD. (WTR::TestController::configureContentExtensionForTest): Use toWK. (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle): Use stringValue and uint64Value. (WTR::TestController::didReceiveLiveDocumentsList): Use dictionaryValue and uint64Value. (WTR::TestController::didReceiveMessageFromInjectedBundle): Use dictionaryValue, stringValue, uint64Value, doubleValue, booleanValue. (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): Ditto. (WTR::TestController::setBlockAllPlugins): Use toWK. (WTR::TestController::setPluginSupportedMode): Ditto. (WTR::TestController::canAuthenticateAgainstProtectionSpace): Use auto. (WTR::TestController::didFinishNavigation): Removed local. (WTR::TestController::didReceiveAuthenticationChallenge): Use auto and toWTFString instead of toSTD. (WTR::TestController::setMockGeolocationPosition): Use Optional instead of pairs of bool and double. (WTR::TestController::handleCheckOfUserMediaPermissionForOrigin): Use toWK. (WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Ditto. (WTR::TestController::updateBundleIdentifierInNetworkProcess): Use toWK. * WebKitTestRunner/TestController.h: Updated for the above. * WebKitTestRunner/TestInvocation.cpp: (WTR::postPageMessage): Added. (WTR::TestInvocation::TestIncovation): Use toWTFString. (WTR::TestInvocation::createTestSettingsDictionary): Use auto and setValue. (WTR::TestInvocation::invoke): Use postPageMessage and setValue. (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Use postPageMessage and stringValue. (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Use dictionaryValue, booleanValue, value, stringValue, doubleValue, and optionalDoubleValue. (WTR::TestInvocation::uiScriptDidComplete): Use postPageMessage and setValue. (WTR::TestInvocation::didBeginSwipe): Use postPageMessage. (WTR::TestInvocation::willEndSwipe): Ditto. (WTR::TestInvocation::didEndSwipe): Ditto. (WTR::TestInvocation::didRemoveSwipeSnapshot): Ditto. (WTR::TestInvocation::notifyDownloadDone): Ditto. (WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore): Ditto. (WTR::TestInvocation::didClearStatisticsThroughWebsiteDataRemoval): Ditto. (WTR::TestInvocation::didSetShouldDowngradeReferrer): Ditto. (WTR::TestInvocation::didSetShouldBlockThirdPartyCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode): Ditto. (WTR::TestInvocation::didSetToSameSiteStrictCookies): Ditto. (WTR::TestInvocation::didSetFirstPartyHostCNAMEDomain): Ditto. (WTR::TestInvocation::didSetThirdPartyCNAMEDomain): Ditto. (WTR::TestInvocation::didResetStatisticsToConsistentState): Ditto. (WTR::TestInvocation::didSetBlockCookiesForHost): Ditto. (WTR::TestInvocation::didSetStatisticsDebugMode): Ditto. (WTR::TestInvocation::didSetPrevalentResourceForDebugMode): Ditto. (WTR::TestInvocation::didSetLastSeen): Ditto. (WTR::TestInvocation::didMergeStatistic): Ditto. (WTR::TestInvocation::didSetExpiredStatistic): Ditto. (WTR::TestInvocation::didSetPrevalentResource): Ditto. (WTR::TestInvocation::didSetVeryPrevalentResource): Ditto. (WTR::TestInvocation::didSetHasHadUserInteraction): Ditto. (WTR::TestInvocation::didReceiveAllStorageAccessEntries): Ditto. (WTR::TestInvocation::didReceiveLoadedSubresourceDomains): Ditto. (WTR::TestInvocation::didRemoveAllSessionCredentials): Ditto. (WTR::TestInvocation::didSetAppBoundDomains): Ditto. (WTR::TestInvocation::performCustomMenuAction): Ditto. * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added JSBasics.h to DictionaryFunctions.h to appropriate targets. * WebKitTestRunner/WorkQueueManager.cpp: (WTR::ScriptItem::ScriptItem): Use toWK. (WTR::WorkQueueManager::queueLoadHTMLString): Ditto. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Make most functions private. * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::overridePreference): Use toWTFString. * WebKitTestRunner/ios/UIScriptControllerIOS.h: Marked the class final and made most functions private. * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::arrayLength): Deleted. Use the one in JSBasics.h. (WTR::parseModifierArray): Use the new toWTFString overload. (WTR::UIScriptControllerIOS::typeCharacterUsingHardwareKeyboard): Ditto. * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::EventSenderProxy): Initialize in the class definition. (WTR::EventSenderProxy::keyDown): Use toWTFString. * WebKitTestRunner/mac/UIScriptControllerMac.h: Marked the class final and made most functions private. Canonical link: https://commits.webkit.org/229883@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-29 21:38:57 +00:00
} // namespace WTR