Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Jan 2016 13:13:41 +0000 (13:13 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Jan 2016 13:13:41 +0000 (13:13 +0000)
<https://webkit.org/b/152902>

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

Mostly mechanical conversion to NeverDestroyed throughout JavaScriptCore.

* API/JSAPIWrapperObject.mm:
(jsAPIWrapperObjectHandleOwner):
* API/JSManagedValue.mm:
(managedValueHandleOwner):
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::objectGroupForBreakpointAction):
* jit/ExecutableAllocator.cpp:
(JSC::DemandExecutableAllocator::allocators):

Source/WebCore:

Mostly mechanical conversion to NeverDestroyed throughout WebCore.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
(WebCore::stringForPlaybackTargetAvailability):
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::directionNext):
(WebCore::IDBCursor::directionNextUnique):
(WebCore::IDBCursor::directionPrev):
(WebCore::IDBCursor::directionPrevUnique):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::modeReadOnly):
(WebCore::IDBTransaction::modeReadWrite):
(WebCore::IDBTransaction::modeVersionChange):
(WebCore::IDBTransaction::modeReadOnlyLegacy):
(WebCore::IDBTransaction::modeReadWriteLegacy):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::readyState):
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::automaticKeyword):
(WebCore::MediaControlsHost::forcedOnlyKeyword):
(WebCore::MediaControlsHost::alwaysOnKeyword):
(WebCore::MediaControlsHost::externalDeviceType):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::openKeyword):
(WebCore::MediaSource::closedKeyword):
(WebCore::MediaSource::endedKeyword):
(WebCore::MediaSource::streamEndedWithError):
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::quickTimePluginReplacementScript):
(WebCore::QuickTimePluginReplacement::supportsMimeType):
(WebCore::QuickTimePluginReplacement::supportsFileExtension):
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::boundaryEventOccurred):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyIDForJSCSSPropertyName):
* bridge/c/c_instance.cpp:
(JSC::Bindings::globalExceptionString):
* css/MediaList.cpp:
(WebCore::addResolutionWarningMessageToConsole):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
* dom/ChildListMutationScope.cpp:
(WebCore::accumulatorMap):
* dom/DOMImplementation.cpp:
(WebCore::isSupportedSVG10Feature):
(WebCore::isSupportedSVG11Feature):
* dom/Document.cpp:
(WebCore::Document::readyState):
* dom/Element.cpp:
(WebCore::Element::webkitRegionOverset):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::isValidCSSContentType):
* dom/MutationObserver.cpp:
(WebCore::activeMutationObservers):
(WebCore::suspendedMutationObservers):
* dom/MutationRecord.cpp:
* dom/PseudoElement.cpp:
(WebCore::pseudoElementTagName):
(WebCore::PseudoElement::pseudoElementNameForEvents):
* dom/QualifiedName.cpp:
(WebCore::qualifiedNameCache):
(WebCore::nullQName):
* dom/ScriptElement.cpp:
(WebCore::isLegacySupportedJavaScriptLanguage):
(WebCore::ScriptElement::notifyFinished):
* editing/ApplyStyleCommand.cpp:
(WebCore::styleSpanClassString):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::shouldAddNamespaceElement):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isInterchangeNewlineNode):
(WebCore::isInterchangeConvertedSpaceSpan):
* editing/htmlediting.cpp:
(WebCore::nonBreakingSpaceString):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
(WebCore::createMarkupInternal):
* fileapi/Blob.cpp:
(WebCore::BlobURLRegistry::registry):
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
* html/DateInputType.cpp:
(WebCore::DateInputType::createStepRange):
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::createStepRange):
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::createStepRange):
* html/EmailInputType.cpp:
(WebCore::isValidEmailAddress):
* html/FormController.cpp:
(WebCore::FormKeyGenerator::formKey):
(WebCore::formStateSignature):
* html/HTMLAnchorElement.cpp:
(WebCore::rootEditableElementMap):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::formControlType):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::formControlType):
* html/HTMLFrameOwnerElement.h:
(WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::formControlType):
* html/HTMLLinkElement.cpp:
(WebCore::linkLoadEventSender):
* html/HTMLMediaElement.cpp:
(WebCore::documentToElementSetMap):
* html/HTMLObjectElement.cpp:
(WebCore::isRecognizedTagName):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::formControlType):
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::formControlType):
* html/HTMLPlugInElement.cpp:
(WebCore::registeredPluginReplacements):
* html/HTMLPlugInImageElement.cpp:
(WebCore::titleText):
(WebCore::subtitleText):
(WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::formControlType):
* html/HTMLStyleElement.cpp:
(WebCore::styleLoadEventSender):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::formControlType):
* html/HTMLTextFormControlElement.cpp:
(WebCore::directionString):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::appendFormData):
* html/InputTypeNames.cpp:
(WebCore::InputTypeNames::button):
(WebCore::InputTypeNames::checkbox):
(WebCore::InputTypeNames::color):
(WebCore::InputTypeNames::date):
(WebCore::InputTypeNames::datetime):
(WebCore::InputTypeNames::datetimelocal):
(WebCore::InputTypeNames::email):
(WebCore::InputTypeNames::file):
(WebCore::InputTypeNames::hidden):
(WebCore::InputTypeNames::image):
(WebCore::InputTypeNames::month):
(WebCore::InputTypeNames::number):
(WebCore::InputTypeNames::password):
(WebCore::InputTypeNames::radio):
(WebCore::InputTypeNames::range):
(WebCore::InputTypeNames::reset):
(WebCore::InputTypeNames::search):
(WebCore::InputTypeNames::submit):
(WebCore::InputTypeNames::telephone):
(WebCore::InputTypeNames::text):
(WebCore::InputTypeNames::time):
(WebCore::InputTypeNames::url):
(WebCore::InputTypeNames::week):
* html/MediaController.cpp:
(playbackStateWaiting):
(playbackStatePlaying):
(playbackStateEnded):
* html/MonthInputType.cpp:
(WebCore::MonthInputType::createStepRange):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::createStepRange):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::createStepRange):
* html/StepRange.cpp:
(WebCore::StepRange::acceptableError):
(WebCore::StepRange::alignValueForStep):
(WebCore::StepRange::stepMismatch):
* html/TimeInputType.cpp:
(WebCore::TimeInputType::createStepRange):
* html/WeekInputType.cpp:
(WebCore::WeekInputType::createStepRange):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::getImageData):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
(WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId):
(WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterInnerElement::MeterInnerElement):
(WebCore::MeterValueElement::valuePseudoId):
* html/shadow/MeterShadowElement.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::sliderThumbShadowPseudoId):
(WebCore::mediaSliderThumbShadowPseudoId):
(WebCore::SliderContainerElement::shadowPseudoId):
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::alternativeKeyword):
(WebCore::AudioTrack::descriptionKeyword):
(WebCore::AudioTrack::mainKeyword):
(WebCore::AudioTrack::mainDescKeyword):
(WebCore::AudioTrack::translationKeyword):
(WebCore::AudioTrack::commentaryKeyword):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::subtitlesKeyword):
(WebCore::TextTrack::captionsKeyword):
(WebCore::TextTrack::descriptionsKeyword):
(WebCore::TextTrack::chaptersKeyword):
(WebCore::TextTrack::metadataKeyword):
(WebCore::TextTrack::forcedKeyword):
(WebCore::TextTrack::disabledKeyword):
(WebCore::TextTrack::hiddenKeyword):
(WebCore::TextTrack::showingKeyword):
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::cueShadowPseudoId):
* html/track/VTTCue.cpp:
(WebCore::startKeyword):
(WebCore::middleKeyword):
(WebCore::endKeyword):
(WebCore::leftKeyword):
(WebCore::rightKeyword):
(WebCore::verticalGrowingLeftKeyword):
(WebCore::verticalGrowingRightKeyword):
(WebCore::VTTCueBox::vttCueBoxShadowPseudoId):
(WebCore::VTTCue::cueBackdropShadowPseudoId):
(WebCore::VTTCue::determineTextDirection):
(WebCore::VTTCue::markFutureAndPastNodes):
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::scroll):
(WebCore::VTTRegion::setScroll):
(WebCore::VTTRegion::parseSettingValue):
(WebCore::VTTRegion::textTrackCueContainerScrollingClass):
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::alternativeKeyword):
(WebCore::VideoTrack::captionsKeyword):
(WebCore::VideoTrack::mainKeyword):
(WebCore::VideoTrack::signKeyword):
(WebCore::VideoTrack::subtitlesKeyword):
(WebCore::VideoTrack::commentaryKeyword):
* html/track/WebVTTElement.cpp:
(WebCore::nodeTypeToTagName):
* html/track/WebVTTElement.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::collectMetadataHeader):
* inspector/InspectorCSSAgent.cpp:
(WebCore::computePseudoClassMask):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::sourceMapURLForResource):
* inspector/InspectorStyleSheet.cpp:
(WebCore::selectorsFromSource):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::sourceMapURLForScript):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::notifyFinished):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::corsPolicyPreventedLoad):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::initiatorName):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::defaultDatabaseFilename):
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::allowInlineScript):
(WebCore::CSPDirectiveList::allowInlineStyle):
(WebCore::CSPDirectiveList::allowEval):
(WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
* page/DOMWindow.cpp:
(WebCore::windowsWithUnloadEventListeners):
(WebCore::windowsWithBeforeUnloadEventListeners):
* page/EventHandler.cpp:
(WebCore::EventHandler::dragState):
(WebCore::focusDirectionForKey):
* page/Frame.cpp:
(WebCore::createRegExpForLabels):
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform):
* page/PageVisibilityState.cpp:
(WebCore::pageVisibilityStateString):
* page/SecurityPolicy.cpp:
(WebCore::originAccessMap):
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::shadowForBlending):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateKeyframeAnimations):
* platform/Cursor.cpp:
(WebCore::pointerCursor):
(WebCore::crossCursor):
(WebCore::handCursor):
(WebCore::moveCursor):
(WebCore::verticalTextCursor):
(WebCore::cellCursor):
(WebCore::contextMenuCursor):
(WebCore::aliasCursor):
(WebCore::zoomInCursor):
(WebCore::zoomOutCursor):
(WebCore::copyCursor):
(WebCore::noneCursor):
(WebCore::progressCursor):
(WebCore::noDropCursor):
(WebCore::notAllowedCursor):
(WebCore::iBeamCursor):
(WebCore::waitCursor):
(WebCore::helpCursor):
(WebCore::eastResizeCursor):
(WebCore::northResizeCursor):
(WebCore::northEastResizeCursor):
(WebCore::northWestResizeCursor):
(WebCore::southResizeCursor):
(WebCore::southEastResizeCursor):
(WebCore::southWestResizeCursor):
(WebCore::westResizeCursor):
(WebCore::northSouthResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::columnResizeCursor):
(WebCore::rowResizeCursor):
(WebCore::middlePanningCursor):
(WebCore::eastPanningCursor):
(WebCore::northPanningCursor):
(WebCore::northEastPanningCursor):
(WebCore::northWestPanningCursor):
(WebCore::southPanningCursor):
(WebCore::southEastPanningCursor):
(WebCore::southWestPanningCursor):
(WebCore::westPanningCursor):
(WebCore::grabCursor):
(WebCore::grabbingCursor):
* platform/Language.cpp:
(WebCore::preferredLanguagesOverride):
* platform/LocalizedStrings.cpp:
(WebCore::truncatedStringForLookupMenuItem):
* platform/MIMETypeRegistry.cpp:
(WebCore::mediaMIMETypeMap):
(WebCore::defaultMIMEType):
* platform/SchemeRegistry.cpp:
(WebCore::localURLSchemes):
(WebCore::displayIsolatedURLSchemes):
(WebCore::secureSchemes):
(WebCore::schemesWithUniqueOrigins):
(WebCore::emptyDocumentSchemes):
(WebCore::schemesForbiddenFromDomainRelaxation):
(WebCore::canDisplayOnlyIfCanRequestSchemes):
(WebCore::notAllowingJavascriptURLsSchemes):
(WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
(WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
(WebCore::CORSEnabledSchemes):
(WebCore::ContentSecurityPolicyBypassingSchemes):
* platform/ScrollbarTheme.cpp:
(WebCore::ScrollbarTheme::theme):
* platform/URL.cpp:
(WebCore::blankURL):
* platform/animation/Animation.cpp:
(WebCore::Animation::initialName):
* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::sharedSession):
* platform/audio/AudioSession.h:
* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::audioDestinations):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::repaintRectMap):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::transformColorSpace):
* platform/graphics/MediaPlayer.cpp:
(WebCore::applicationOctetStream):
(WebCore::textPlain):
(WebCore::codecs):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::singleton):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::playerToPrivateMap):
* platform/graphics/filters/SourceAlpha.cpp:
(WebCore::SourceAlpha::effectName):
* platform/graphics/filters/SourceGraphic.cpp:
(WebCore::SourceGraphic::effectName):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::mimeCommonTypesCache):
(WebCore::mimeModernTypesCache):
* platform/ios/CursorIOS.cpp:
(WebCore::cursor):
* platform/ios/TileControllerMemoryHandlerIOS.cpp:
(WebCore::tileControllerMemoryHandler):
* platform/ios/WebCoreMotionManager.mm:
(+[WebCoreMotionManager sharedManager]):
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::updateForEventName):
* platform/ios/wak/WKContentObservation.cpp:
(WebThreadGetObservedContentModifiers):
* platform/mac/DragImageMac.mm:
(WebCore::fontFromNSFont):
* platform/mac/ThemeMac.mm:
(WebCore::platformTheme):
* platform/mac/ThreadCheck.mm:
(WebCoreReportThreadViolation):
* platform/mediastream/mac/AVCaptureDeviceManager.h:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::singleton):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenter::platformCenter):
* platform/mock/mediasource/MockBox.cpp:
(WebCore::MockTrackBox::type):
(WebCore::MockInitializationBox::type):
(WebCore::MockSampleBox::type):
* platform/network/HTTPParsers.cpp:
(WebCore::parseXSSProtectionHeader):
* platform/network/ResourceHandle.cpp:
(WebCore::builtinResourceHandleConstructorMap):
(WebCore::builtinResourceHandleSynchronousLoaderMap):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::clientCerts):
* platform/text/AtomicStringKeyedMRUCache.h:
(WebCore::AtomicStringKeyedMRUCache::get):
* platform/text/cf/HyphenationCF.cpp:
(WebCore::cfLocaleCache):
* rendering/RenderBlock.cpp:
(WebCore::continuationOutlineTable):
* rendering/RenderCounter.cpp:
(WebCore::counterMaps):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::renderScrollbarTheme):
* rendering/RenderTheme.cpp:
(WebCore::customFocusRingColor):
* rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
* rendering/shapes/ShapeOutsideInfo.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::hyphenString):
(WebCore::RenderStyle::textEmphasisMarkString):
(WebCore::RenderStyle::initialDashboardRegions):
(WebCore::RenderStyle::noneDashboardRegions):
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::zeroLengthLinecapPath):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::nonScalingStrokePath):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::currentContentTransformation):
* rendering/svg/SVGResources.cpp:
(WebCore::clipperFilterMaskerTags):
(WebCore::markerTags):
(WebCore::fillAndStrokeTags):
(WebCore::chainableResourceTags):
* svg/SVGAngle.cpp:
(WebCore::SVGAngle::valueAsString):
* svg/SVGAnimateColorElement.cpp:
(WebCore::attributeValueIsCurrentColor):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::rotateMode):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::setCalcMode):
(WebCore::SVGAnimationElement::setAttributeType):
(WebCore::SVGAnimationElement::isAdditive):
(WebCore::SVGAnimationElement::isAccumulated):
(WebCore::inheritsFromProperty):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier):
(WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
(WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
(WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier):
(WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::radiusXIdentifier):
(WebCore::SVGFEMorphologyElement::radiusYIdentifier):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier):
(WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::filterResXIdentifier):
(WebCore::SVGFilterElement::filterResYIdentifier):
* svg/SVGGlyphMap.h:
(WebCore::SVGGlyphMap::svgGlyphForGlyph):
* svg/SVGLangSpace.cpp:
(WebCore::SVGLangSpace::xmlspace):
(WebCore::SVGLangSpace::addSupportedAttributes):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientTypeIdentifier):
(WebCore::SVGMarkerElement::orientAngleIdentifier):
(WebCore::SVGMarkerElement::synchronizeOrientType):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::type):
(WebCore::SVGStyleElement::media):
* svg/SVGTransform.cpp:
(WebCore::SVGTransform::transformTypePrefixForParsing):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::viewBoxIdentifier):
(WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
(WebCore::SVGViewSpec::transformIdentifier):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseClockValue):
(WebCore::SVGSMILElement::isSupportedAttribute):
(WebCore::SVGSMILElement::restart):
(WebCore::SVGSMILElement::fill):
(WebCore::SVGSMILElement::repeatCount):
(WebCore::SVGSMILElement::notifyDependentsIntervalChanged):

Source/WTF:

Mostly mechanical conversion to NeverDestroyed throughout WTF.

* wtf/RunLoop.cpp:
(WTF::RunLoop::current):
* wtf/ThreadingPthreads.cpp:
(WTF::threadMapMutex):
(WTF::threadMap):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194819 268f45cc-cd09-0410-ab3c-d52691b4dbfc

176 files changed:
Source/JavaScriptCore/API/JSAPIWrapperObject.mm
Source/JavaScriptCore/API/JSManagedValue.mm
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
Source/JavaScriptCore/jit/ExecutableAllocator.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/RunLoop.cpp
Source/WTF/wtf/ThreadingPthreads.cpp
Source/WebCore/ChangeLog
Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp
Source/WebCore/Modules/indexeddb/IDBCursor.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/indexeddb/legacy/LegacyRequest.cpp
Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
Source/WebCore/Modules/mediasource/MediaSource.cpp
Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm
Source/WebCore/Modules/speech/SpeechSynthesis.cpp
Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
Source/WebCore/bridge/c/c_instance.cpp
Source/WebCore/css/MediaList.cpp
Source/WebCore/css/StyleSheetContents.cpp
Source/WebCore/dom/ChildListMutationScope.cpp
Source/WebCore/dom/DOMImplementation.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/InlineStyleSheetOwner.cpp
Source/WebCore/dom/MutationObserver.cpp
Source/WebCore/dom/MutationRecord.cpp
Source/WebCore/dom/PseudoElement.cpp
Source/WebCore/dom/QualifiedName.cpp
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/MarkupAccumulator.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/markup.cpp
Source/WebCore/fileapi/Blob.cpp
Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp
Source/WebCore/html/DateInputType.cpp
Source/WebCore/html/DateTimeInputType.cpp
Source/WebCore/html/DateTimeLocalInputType.cpp
Source/WebCore/html/EmailInputType.cpp
Source/WebCore/html/FormController.cpp
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLButtonElement.cpp
Source/WebCore/html/HTMLFieldSetElement.cpp
Source/WebCore/html/HTMLFrameOwnerElement.h
Source/WebCore/html/HTMLKeygenElement.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLOptGroupElement.cpp
Source/WebCore/html/HTMLOutputElement.cpp
Source/WebCore/html/HTMLPlugInElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLStyleElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/ImageInputType.cpp
Source/WebCore/html/InputTypeNames.cpp
Source/WebCore/html/MediaController.cpp
Source/WebCore/html/MonthInputType.cpp
Source/WebCore/html/NumberInputType.cpp
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/StepRange.cpp
Source/WebCore/html/TimeInputType.cpp
Source/WebCore/html/WeekInputType.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/parser/XSSAuditor.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MeterShadowElement.cpp
Source/WebCore/html/shadow/MeterShadowElement.h
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/track/AudioTrack.cpp
Source/WebCore/html/track/TextTrack.cpp
Source/WebCore/html/track/TextTrackCue.h
Source/WebCore/html/track/VTTCue.cpp
Source/WebCore/html/track/VTTRegion.cpp
Source/WebCore/html/track/VideoTrack.cpp
Source/WebCore/html/track/WebVTTElement.cpp
Source/WebCore/html/track/WebVTTElement.h
Source/WebCore/html/track/WebVTTParser.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorStyleSheet.cpp
Source/WebCore/inspector/PageDebuggerAgent.cpp
Source/WebCore/loader/ImageLoader.cpp
Source/WebCore/loader/TextTrackLoader.cpp
Source/WebCore/loader/cache/CachedResourceRequest.cpp
Source/WebCore/loader/icon/IconDatabase.cpp
Source/WebCore/page/CaptionUserPreferences.cpp
Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Source/WebCore/page/ContentSecurityPolicy.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/NavigatorBase.cpp
Source/WebCore/page/PageVisibilityState.cpp
Source/WebCore/page/SecurityPolicy.cpp
Source/WebCore/page/UserContentURLPattern.cpp
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/page/animation/CompositeAnimation.cpp
Source/WebCore/platform/Cursor.cpp
Source/WebCore/platform/Language.cpp
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/MIMETypeRegistry.cpp
Source/WebCore/platform/SchemeRegistry.cpp
Source/WebCore/platform/ScrollbarTheme.cpp
Source/WebCore/platform/URL.cpp
Source/WebCore/platform/animation/Animation.cpp
Source/WebCore/platform/audio/AudioSession.cpp
Source/WebCore/platform/audio/AudioSession.h
Source/WebCore/platform/audio/HRTFElevation.cpp
Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/ImageBuffer.cpp
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/filters/SourceAlpha.cpp
Source/WebCore/platform/graphics/filters/SourceGraphic.cpp
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebCore/platform/ios/CursorIOS.cpp
Source/WebCore/platform/ios/LegacyTileGridTile.mm
Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.cpp
Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.h
Source/WebCore/platform/ios/WebCoreMotionManager.mm
Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm
Source/WebCore/platform/ios/wak/WKContentObservation.cpp
Source/WebCore/platform/mac/DragImageMac.mm
Source/WebCore/platform/mac/ThemeMac.mm
Source/WebCore/platform/mac/ThreadCheck.mm
Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h
Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm
Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp
Source/WebCore/platform/mock/mediasource/MockBox.cpp
Source/WebCore/platform/network/HTTPParsers.cpp
Source/WebCore/platform/network/ResourceHandle.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Source/WebCore/platform/text/AtomicStringKeyedMRUCache.h
Source/WebCore/platform/text/cf/HyphenationCF.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderCounter.cpp
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderScrollbarTheme.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderWidget.cpp
Source/WebCore/rendering/shapes/ShapeOutsideInfo.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/svg/RenderSVGPath.cpp
Source/WebCore/rendering/svg/RenderSVGShape.cpp
Source/WebCore/rendering/svg/SVGRenderingContext.cpp
Source/WebCore/rendering/svg/SVGResources.cpp
Source/WebCore/svg/SVGAngle.cpp
Source/WebCore/svg/SVGAnimateColorElement.cpp
Source/WebCore/svg/SVGAnimateMotionElement.cpp
Source/WebCore/svg/SVGAnimationElement.cpp
Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp
Source/WebCore/svg/SVGFEDropShadowElement.cpp
Source/WebCore/svg/SVGFEGaussianBlurElement.cpp
Source/WebCore/svg/SVGFEMorphologyElement.cpp
Source/WebCore/svg/SVGFESpecularLightingElement.cpp
Source/WebCore/svg/SVGFETurbulenceElement.cpp
Source/WebCore/svg/SVGFilterElement.cpp
Source/WebCore/svg/SVGGlyphMap.h
Source/WebCore/svg/SVGLangSpace.cpp
Source/WebCore/svg/SVGMarkerElement.cpp
Source/WebCore/svg/SVGStyleElement.cpp
Source/WebCore/svg/SVGTransform.cpp
Source/WebCore/svg/SVGViewSpec.cpp
Source/WebCore/svg/animation/SVGSMILElement.cpp

index ef54602..7236877 100644 (file)
@@ -30,6 +30,7 @@
 #include "JSCallbackObject.h"
 #include "JSVirtualMachineInternal.h"
 #include "Structure.h"
+#include <wtf/NeverDestroyed.h>
 
 #if JSC_OBJC_API_ENABLED
 
@@ -41,8 +42,8 @@ public:
 
 static JSAPIWrapperObjectHandleOwner* jsAPIWrapperObjectHandleOwner()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(JSAPIWrapperObjectHandleOwner, jsWrapperObjectHandleOwner, ());
-    return &jsWrapperObjectHandleOwner;
+    static NeverDestroyed<JSAPIWrapperObjectHandleOwner> jsWrapperObjectHandleOwner;
+    return &jsWrapperObjectHandleOwner.get();
 }
 
 void JSAPIWrapperObjectHandleOwner::finalize(JSC::Handle<JSC::Unknown> handle, void*)
index a72d19b..1c1f7a2 100644 (file)
@@ -37,6 +37,7 @@
 #import "WeakHandleOwner.h"
 #import "ObjcRuntimeExtras.h"
 #import "JSCInlines.h"
+#import <wtf/NeverDestroyed.h>
 #import <wtf/spi/cocoa/NSMapTableSPI.h>
 
 class JSManagedValueHandleOwner : public JSC::WeakHandleOwner {
@@ -47,8 +48,8 @@ public:
 
 static JSManagedValueHandleOwner* managedValueHandleOwner()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(JSManagedValueHandleOwner, jsManagedValueHandleOwner, ());
-    return &jsManagedValueHandleOwner;
+    static NeverDestroyed<JSManagedValueHandleOwner> jsManagedValueHandleOwner;
+    return &jsManagedValueHandleOwner.get();
 }
 
 class WeakValueRef {
index 88db6e0..323f30e 100644 (file)
@@ -1,3 +1,21 @@
+2016-01-09  Andreas Kling  <akling@apple.com>
+
+        Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
+        <https://webkit.org/b/152902>
+
+        Reviewed by Anders Carlsson.
+
+        Mostly mechanical conversion to NeverDestroyed throughout JavaScriptCore.
+
+        * API/JSAPIWrapperObject.mm:
+        (jsAPIWrapperObjectHandleOwner):
+        * API/JSManagedValue.mm:
+        (managedValueHandleOwner):
+        * inspector/agents/InspectorDebuggerAgent.cpp:
+        (Inspector::objectGroupForBreakpointAction):
+        * jit/ExecutableAllocator.cpp:
+        (JSC::DemandExecutableAllocator::allocators):
+
 2016-01-08  Filip Pizlo  <fpizlo@apple.com>
 
         FTL B3 should do varargs tail calls and stack overflows
index ec77a74..83d7f3b 100644 (file)
@@ -39,6 +39,7 @@
 #include "ScriptDebugServer.h"
 #include "ScriptObject.h"
 #include "ScriptValue.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/Stopwatch.h>
 #include <wtf/text/WTFString.h>
 
@@ -52,8 +53,8 @@ const char* InspectorDebuggerAgent::backtraceObjectGroup = "backtrace";
 // create objects in the same group.
 static String objectGroupForBreakpointAction(const ScriptBreakpointAction& action)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, objectGroup, ("breakpoint-action-", AtomicString::ConstructFromLiteral));
-    return makeString(objectGroup, String::number(action.identifier));
+    static NeverDestroyed<String> objectGroup(ASCIILiteral("breakpoint-action-"));
+    return makeString(objectGroup.get(), String::number(action.identifier));
 }
 
 InspectorDebuggerAgent::InspectorDebuggerAgent(AgentContext& context)
index d2911a3..7abaeb7 100644 (file)
@@ -134,8 +134,8 @@ private:
     Vector<PageReservation, 16> reservations;
     static HashSet<DemandExecutableAllocator*>& allocators()
     {
-        DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<DemandExecutableAllocator*>, sAllocators, ());
-        return sAllocators;
+        static NeverDestroyed<HashSet<DemandExecutableAllocator*>> set;
+        return set;
     }
 
     static StaticLock& allocatorsMutex()
index 62eb788..30b2a01 100644 (file)
@@ -1,3 +1,18 @@
+2016-01-09  Andreas Kling  <akling@apple.com>
+
+        Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
+        <https://webkit.org/b/152902>
+
+        Reviewed by Anders Carlsson.
+
+        Mostly mechanical conversion to NeverDestroyed throughout WTF.
+
+        * wtf/RunLoop.cpp:
+        (WTF::RunLoop::current):
+        * wtf/ThreadingPthreads.cpp:
+        (WTF::threadMapMutex):
+        (WTF::threadMap):
+
 2016-01-08  Anders Carlsson  <andersca@apple.com>
 
         Nullopt and InPlace should be structs, not enum values
index e35290d..701c18d 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "RunLoop.h"
 
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/ThreadSpecific.h>
 
@@ -56,8 +57,8 @@ void RunLoop::initializeMainRunLoop()
 
 RunLoop& RunLoop::current()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(WTF::ThreadSpecific<RunLoop::Holder>, runLoopHolder, ());
-    return runLoopHolder->runLoop();
+    static NeverDestroyed<ThreadSpecific<Holder>> runLoopHolder;
+    return runLoopHolder.get()->runLoop();
 }
 
 RunLoop& RunLoop::main()
index a97cf32..705f36d 100644 (file)
@@ -44,6 +44,7 @@
 #include "ThreadIdentifierDataPthreads.h"
 #include "ThreadSpecific.h"
 #include <wtf/DataLog.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/RawPointer.h>
 #include <wtf/WTFThreadData.h>
 #include <errno.h>
@@ -99,7 +100,7 @@ void threadWasJoined(ThreadIdentifier);
 
 static Mutex& threadMapMutex()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, mutex, ());
+    static NeverDestroyed<Mutex> mutex;
     return mutex;
 }
 
@@ -125,7 +126,7 @@ void initializeThreading()
 
 static ThreadMap& threadMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(ThreadMap, map, ());
+    static NeverDestroyed<ThreadMap> map;
     return map;
 }
 
index 2656e6b..0d23cf7 100644 (file)
@@ -1,3 +1,524 @@
+2016-01-09  Andreas Kling  <akling@apple.com>
+
+        Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
+        <https://webkit.org/b/152902>
+
+        Reviewed by Anders Carlsson.
+
+        Mostly mechanical conversion to NeverDestroyed throughout WebCore.
+
+        * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
+        (WebCore::stringForPlaybackTargetAvailability):
+        * Modules/indexeddb/IDBCursor.cpp:
+        (WebCore::IDBCursor::directionNext):
+        (WebCore::IDBCursor::directionNextUnique):
+        (WebCore::IDBCursor::directionPrev):
+        (WebCore::IDBCursor::directionPrevUnique):
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::modeReadOnly):
+        (WebCore::IDBTransaction::modeReadWrite):
+        (WebCore::IDBTransaction::modeVersionChange):
+        (WebCore::IDBTransaction::modeReadOnlyLegacy):
+        (WebCore::IDBTransaction::modeReadWriteLegacy):
+        * Modules/indexeddb/legacy/LegacyRequest.cpp:
+        (WebCore::LegacyRequest::readyState):
+        * Modules/mediacontrols/MediaControlsHost.cpp:
+        (WebCore::MediaControlsHost::automaticKeyword):
+        (WebCore::MediaControlsHost::forcedOnlyKeyword):
+        (WebCore::MediaControlsHost::alwaysOnKeyword):
+        (WebCore::MediaControlsHost::externalDeviceType):
+        * Modules/mediasource/MediaSource.cpp:
+        (WebCore::MediaSource::openKeyword):
+        (WebCore::MediaSource::closedKeyword):
+        (WebCore::MediaSource::endedKeyword):
+        (WebCore::MediaSource::streamEndedWithError):
+        * Modules/plugins/QuickTimePluginReplacement.mm:
+        (WebCore::quickTimePluginReplacementScript):
+        (WebCore::QuickTimePluginReplacement::supportsMimeType):
+        (WebCore::QuickTimePluginReplacement::supportsFileExtension):
+        * Modules/speech/SpeechSynthesis.cpp:
+        (WebCore::SpeechSynthesis::boundaryEventOccurred):
+        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+        (WebCore::cssPropertyIDForJSCSSPropertyName):
+        * bridge/c/c_instance.cpp:
+        (JSC::Bindings::globalExceptionString):
+        * css/MediaList.cpp:
+        (WebCore::addResolutionWarningMessageToConsole):
+        * css/StyleSheetContents.cpp:
+        (WebCore::StyleSheetContents::parseAuthorStyleSheet):
+        * dom/ChildListMutationScope.cpp:
+        (WebCore::accumulatorMap):
+        * dom/DOMImplementation.cpp:
+        (WebCore::isSupportedSVG10Feature):
+        (WebCore::isSupportedSVG11Feature):
+        * dom/Document.cpp:
+        (WebCore::Document::readyState):
+        * dom/Element.cpp:
+        (WebCore::Element::webkitRegionOverset):
+        * dom/EventDispatcher.cpp:
+        (WebCore::EventDispatcher::dispatchSimulatedClick):
+        * dom/InlineStyleSheetOwner.cpp:
+        (WebCore::isValidCSSContentType):
+        * dom/MutationObserver.cpp:
+        (WebCore::activeMutationObservers):
+        (WebCore::suspendedMutationObservers):
+        * dom/MutationRecord.cpp:
+        * dom/PseudoElement.cpp:
+        (WebCore::pseudoElementTagName):
+        (WebCore::PseudoElement::pseudoElementNameForEvents):
+        * dom/QualifiedName.cpp:
+        (WebCore::qualifiedNameCache):
+        (WebCore::nullQName):
+        * dom/ScriptElement.cpp:
+        (WebCore::isLegacySupportedJavaScriptLanguage):
+        (WebCore::ScriptElement::notifyFinished):
+        * editing/ApplyStyleCommand.cpp:
+        (WebCore::styleSpanClassString):
+        * editing/MarkupAccumulator.cpp:
+        (WebCore::MarkupAccumulator::shouldAddNamespaceElement):
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::isInterchangeNewlineNode):
+        (WebCore::isInterchangeConvertedSpaceSpan):
+        * editing/htmlediting.cpp:
+        (WebCore::nonBreakingSpaceString):
+        * editing/markup.cpp:
+        (WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
+        (WebCore::createMarkupInternal):
+        * fileapi/Blob.cpp:
+        (WebCore::BlobURLRegistry::registry):
+        * html/BaseChooserOnlyDateAndTimeInputType.cpp:
+        (WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
+        * html/DateInputType.cpp:
+        (WebCore::DateInputType::createStepRange):
+        * html/DateTimeInputType.cpp:
+        (WebCore::DateTimeInputType::createStepRange):
+        * html/DateTimeLocalInputType.cpp:
+        (WebCore::DateTimeLocalInputType::createStepRange):
+        * html/EmailInputType.cpp:
+        (WebCore::isValidEmailAddress):
+        * html/FormController.cpp:
+        (WebCore::FormKeyGenerator::formKey):
+        (WebCore::formStateSignature):
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::rootEditableElementMap):
+        * html/HTMLButtonElement.cpp:
+        (WebCore::HTMLButtonElement::formControlType):
+        * html/HTMLFieldSetElement.cpp:
+        (WebCore::HTMLFieldSetElement::formControlType):
+        * html/HTMLFrameOwnerElement.h:
+        (WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
+        * html/HTMLKeygenElement.cpp:
+        (WebCore::HTMLKeygenElement::formControlType):
+        * html/HTMLLinkElement.cpp:
+        (WebCore::linkLoadEventSender):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::documentToElementSetMap):
+        * html/HTMLObjectElement.cpp:
+        (WebCore::isRecognizedTagName):
+        * html/HTMLOptGroupElement.cpp:
+        (WebCore::HTMLOptGroupElement::formControlType):
+        * html/HTMLOutputElement.cpp:
+        (WebCore::HTMLOutputElement::formControlType):
+        * html/HTMLPlugInElement.cpp:
+        (WebCore::registeredPluginReplacements):
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::titleText):
+        (WebCore::subtitleText):
+        (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::formControlType):
+        * html/HTMLStyleElement.cpp:
+        (WebCore::styleLoadEventSender):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::formControlType):
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::directionString):
+        * html/ImageInputType.cpp:
+        (WebCore::ImageInputType::appendFormData):
+        * html/InputTypeNames.cpp:
+        (WebCore::InputTypeNames::button):
+        (WebCore::InputTypeNames::checkbox):
+        (WebCore::InputTypeNames::color):
+        (WebCore::InputTypeNames::date):
+        (WebCore::InputTypeNames::datetime):
+        (WebCore::InputTypeNames::datetimelocal):
+        (WebCore::InputTypeNames::email):
+        (WebCore::InputTypeNames::file):
+        (WebCore::InputTypeNames::hidden):
+        (WebCore::InputTypeNames::image):
+        (WebCore::InputTypeNames::month):
+        (WebCore::InputTypeNames::number):
+        (WebCore::InputTypeNames::password):
+        (WebCore::InputTypeNames::radio):
+        (WebCore::InputTypeNames::range):
+        (WebCore::InputTypeNames::reset):
+        (WebCore::InputTypeNames::search):
+        (WebCore::InputTypeNames::submit):
+        (WebCore::InputTypeNames::telephone):
+        (WebCore::InputTypeNames::text):
+        (WebCore::InputTypeNames::time):
+        (WebCore::InputTypeNames::url):
+        (WebCore::InputTypeNames::week):
+        * html/MediaController.cpp:
+        (playbackStateWaiting):
+        (playbackStatePlaying):
+        (playbackStateEnded):
+        * html/MonthInputType.cpp:
+        (WebCore::MonthInputType::createStepRange):
+        * html/NumberInputType.cpp:
+        (WebCore::NumberInputType::createStepRange):
+        * html/RangeInputType.cpp:
+        (WebCore::RangeInputType::createStepRange):
+        * html/StepRange.cpp:
+        (WebCore::StepRange::acceptableError):
+        (WebCore::StepRange::alignValueForStep):
+        (WebCore::StepRange::stepMismatch):
+        * html/TimeInputType.cpp:
+        (WebCore::TimeInputType::createStepRange):
+        * html/WeekInputType.cpp:
+        (WebCore::WeekInputType::createStepRange):
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::getImageData):
+        * html/parser/XSSAuditor.cpp:
+        (WebCore::XSSAuditor::init):
+        (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
+        (WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId):
+        (WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId):
+        * html/shadow/MeterShadowElement.cpp:
+        (WebCore::MeterInnerElement::MeterInnerElement):
+        (WebCore::MeterValueElement::valuePseudoId):
+        * html/shadow/MeterShadowElement.h:
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::sliderThumbShadowPseudoId):
+        (WebCore::mediaSliderThumbShadowPseudoId):
+        (WebCore::SliderContainerElement::shadowPseudoId):
+        * html/track/AudioTrack.cpp:
+        (WebCore::AudioTrack::alternativeKeyword):
+        (WebCore::AudioTrack::descriptionKeyword):
+        (WebCore::AudioTrack::mainKeyword):
+        (WebCore::AudioTrack::mainDescKeyword):
+        (WebCore::AudioTrack::translationKeyword):
+        (WebCore::AudioTrack::commentaryKeyword):
+        * html/track/TextTrack.cpp:
+        (WebCore::TextTrack::subtitlesKeyword):
+        (WebCore::TextTrack::captionsKeyword):
+        (WebCore::TextTrack::descriptionsKeyword):
+        (WebCore::TextTrack::chaptersKeyword):
+        (WebCore::TextTrack::metadataKeyword):
+        (WebCore::TextTrack::forcedKeyword):
+        (WebCore::TextTrack::disabledKeyword):
+        (WebCore::TextTrack::hiddenKeyword):
+        (WebCore::TextTrack::showingKeyword):
+        * html/track/TextTrackCue.h:
+        (WebCore::TextTrackCue::cueShadowPseudoId):
+        * html/track/VTTCue.cpp:
+        (WebCore::startKeyword):
+        (WebCore::middleKeyword):
+        (WebCore::endKeyword):
+        (WebCore::leftKeyword):
+        (WebCore::rightKeyword):
+        (WebCore::verticalGrowingLeftKeyword):
+        (WebCore::verticalGrowingRightKeyword):
+        (WebCore::VTTCueBox::vttCueBoxShadowPseudoId):
+        (WebCore::VTTCue::cueBackdropShadowPseudoId):
+        (WebCore::VTTCue::determineTextDirection):
+        (WebCore::VTTCue::markFutureAndPastNodes):
+        * html/track/VTTRegion.cpp:
+        (WebCore::VTTRegion::scroll):
+        (WebCore::VTTRegion::setScroll):
+        (WebCore::VTTRegion::parseSettingValue):
+        (WebCore::VTTRegion::textTrackCueContainerScrollingClass):
+        * html/track/VideoTrack.cpp:
+        (WebCore::VideoTrack::alternativeKeyword):
+        (WebCore::VideoTrack::captionsKeyword):
+        (WebCore::VideoTrack::mainKeyword):
+        (WebCore::VideoTrack::signKeyword):
+        (WebCore::VideoTrack::subtitlesKeyword):
+        (WebCore::VideoTrack::commentaryKeyword):
+        * html/track/WebVTTElement.cpp:
+        (WebCore::nodeTypeToTagName):
+        * html/track/WebVTTElement.h:
+        * html/track/WebVTTParser.cpp:
+        (WebCore::WebVTTParser::collectMetadataHeader):
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::computePseudoClassMask):
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::sourceMapURLForResource):
+        * inspector/InspectorStyleSheet.cpp:
+        (WebCore::selectorsFromSource):
+        * inspector/PageDebuggerAgent.cpp:
+        (WebCore::PageDebuggerAgent::sourceMapURLForScript):
+        * loader/ImageLoader.cpp:
+        (WebCore::ImageLoader::notifyFinished):
+        * loader/TextTrackLoader.cpp:
+        (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
+        * loader/cache/CachedResourceRequest.cpp:
+        (WebCore::CachedResourceRequest::initiatorName):
+        * loader/icon/IconDatabase.cpp:
+        (WebCore::IconDatabase::defaultDatabaseFilename):
+        * page/CaptionUserPreferences.cpp:
+        (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
+        * page/CaptionUserPreferencesMediaAF.cpp:
+        (WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS):
+        (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):
+        * page/ContentSecurityPolicy.cpp:
+        (WebCore::CSPDirectiveList::allowJavaScriptURLs):
+        (WebCore::CSPDirectiveList::allowInlineEventHandlers):
+        (WebCore::CSPDirectiveList::allowInlineScript):
+        (WebCore::CSPDirectiveList::allowInlineStyle):
+        (WebCore::CSPDirectiveList::allowEval):
+        (WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
+        * page/DOMWindow.cpp:
+        (WebCore::windowsWithUnloadEventListeners):
+        (WebCore::windowsWithBeforeUnloadEventListeners):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::dragState):
+        (WebCore::focusDirectionForKey):
+        * page/Frame.cpp:
+        (WebCore::createRegExpForLabels):
+        * page/NavigatorBase.cpp:
+        (WebCore::NavigatorBase::platform):
+        * page/PageVisibilityState.cpp:
+        (WebCore::pageVisibilityStateString):
+        * page/SecurityPolicy.cpp:
+        (WebCore::originAccessMap):
+        * page/UserContentURLPattern.cpp:
+        (WebCore::UserContentURLPattern::parse):
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::shadowForBlending):
+        * page/animation/CompositeAnimation.cpp:
+        (WebCore::CompositeAnimation::updateKeyframeAnimations):
+        * platform/Cursor.cpp:
+        (WebCore::pointerCursor):
+        (WebCore::crossCursor):
+        (WebCore::handCursor):
+        (WebCore::moveCursor):
+        (WebCore::verticalTextCursor):
+        (WebCore::cellCursor):
+        (WebCore::contextMenuCursor):
+        (WebCore::aliasCursor):
+        (WebCore::zoomInCursor):
+        (WebCore::zoomOutCursor):
+        (WebCore::copyCursor):
+        (WebCore::noneCursor):
+        (WebCore::progressCursor):
+        (WebCore::noDropCursor):
+        (WebCore::notAllowedCursor):
+        (WebCore::iBeamCursor):
+        (WebCore::waitCursor):
+        (WebCore::helpCursor):
+        (WebCore::eastResizeCursor):
+        (WebCore::northResizeCursor):
+        (WebCore::northEastResizeCursor):
+        (WebCore::northWestResizeCursor):
+        (WebCore::southResizeCursor):
+        (WebCore::southEastResizeCursor):
+        (WebCore::southWestResizeCursor):
+        (WebCore::westResizeCursor):
+        (WebCore::northSouthResizeCursor):
+        (WebCore::eastWestResizeCursor):
+        (WebCore::northEastSouthWestResizeCursor):
+        (WebCore::northWestSouthEastResizeCursor):
+        (WebCore::columnResizeCursor):
+        (WebCore::rowResizeCursor):
+        (WebCore::middlePanningCursor):
+        (WebCore::eastPanningCursor):
+        (WebCore::northPanningCursor):
+        (WebCore::northEastPanningCursor):
+        (WebCore::northWestPanningCursor):
+        (WebCore::southPanningCursor):
+        (WebCore::southEastPanningCursor):
+        (WebCore::southWestPanningCursor):
+        (WebCore::westPanningCursor):
+        (WebCore::grabCursor):
+        (WebCore::grabbingCursor):
+        * platform/Language.cpp:
+        (WebCore::preferredLanguagesOverride):
+        * platform/LocalizedStrings.cpp:
+        (WebCore::truncatedStringForLookupMenuItem):
+        * platform/MIMETypeRegistry.cpp:
+        (WebCore::mediaMIMETypeMap):
+        (WebCore::defaultMIMEType):
+        * platform/SchemeRegistry.cpp:
+        (WebCore::localURLSchemes):
+        (WebCore::displayIsolatedURLSchemes):
+        (WebCore::secureSchemes):
+        (WebCore::schemesWithUniqueOrigins):
+        (WebCore::emptyDocumentSchemes):
+        (WebCore::schemesForbiddenFromDomainRelaxation):
+        (WebCore::canDisplayOnlyIfCanRequestSchemes):
+        (WebCore::notAllowingJavascriptURLsSchemes):
+        (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
+        (WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
+        (WebCore::CORSEnabledSchemes):
+        (WebCore::ContentSecurityPolicyBypassingSchemes):
+        * platform/ScrollbarTheme.cpp:
+        (WebCore::ScrollbarTheme::theme):
+        * platform/URL.cpp:
+        (WebCore::blankURL):
+        * platform/animation/Animation.cpp:
+        (WebCore::Animation::initialName):
+        * platform/audio/AudioSession.cpp:
+        (WebCore::AudioSession::sharedSession):
+        * platform/audio/AudioSession.h:
+        * platform/audio/HRTFElevation.cpp:
+        (WebCore::getConcatenatedImpulseResponsesForSubject):
+        * platform/audio/ios/AudioDestinationIOS.cpp:
+        (WebCore::audioDestinations):
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::repaintRectMap):
+        * platform/graphics/ImageBuffer.cpp:
+        (WebCore::ImageBuffer::transformColorSpace):
+        * platform/graphics/MediaPlayer.cpp:
+        (WebCore::applicationOctetStream):
+        (WebCore::textPlain):
+        (WebCore::codecs):
+        * platform/graphics/ShadowBlur.cpp:
+        (WebCore::ScratchBuffer::singleton):
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::playerToPrivateMap):
+        * platform/graphics/filters/SourceAlpha.cpp:
+        (WebCore::SourceAlpha::effectName):
+        * platform/graphics/filters/SourceGraphic.cpp:
+        (WebCore::SourceGraphic::effectName):
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        (WebCore::mimeCommonTypesCache):
+        (WebCore::mimeModernTypesCache):
+        * platform/ios/CursorIOS.cpp:
+        (WebCore::cursor):
+        * platform/ios/TileControllerMemoryHandlerIOS.cpp:
+        (WebCore::tileControllerMemoryHandler):
+        * platform/ios/WebCoreMotionManager.mm:
+        (+[WebCoreMotionManager sharedManager]):
+        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
+        (WebVideoFullscreenModelVideoElement::updateForEventName):
+        * platform/ios/wak/WKContentObservation.cpp:
+        (WebThreadGetObservedContentModifiers):
+        * platform/mac/DragImageMac.mm:
+        (WebCore::fontFromNSFont):
+        * platform/mac/ThemeMac.mm:
+        (WebCore::platformTheme):
+        * platform/mac/ThreadCheck.mm:
+        (WebCoreReportThreadViolation):
+        * platform/mediastream/mac/AVCaptureDeviceManager.h:
+        * platform/mediastream/mac/AVCaptureDeviceManager.mm:
+        (WebCore::AVCaptureDeviceManager::singleton):
+        * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
+        (WebCore::RealtimeMediaSourceCenter::platformCenter):
+        * platform/mock/mediasource/MockBox.cpp:
+        (WebCore::MockTrackBox::type):
+        (WebCore::MockInitializationBox::type):
+        (WebCore::MockSampleBox::type):
+        * platform/network/HTTPParsers.cpp:
+        (WebCore::parseXSSProtectionHeader):
+        * platform/network/ResourceHandle.cpp:
+        (WebCore::builtinResourceHandleConstructorMap):
+        (WebCore::builtinResourceHandleSynchronousLoaderMap):
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::allowsAnyHTTPSCertificateHosts):
+        (WebCore::clientCerts):
+        * platform/text/AtomicStringKeyedMRUCache.h:
+        (WebCore::AtomicStringKeyedMRUCache::get):
+        * platform/text/cf/HyphenationCF.cpp:
+        (WebCore::cfLocaleCache):
+        * rendering/RenderBlock.cpp:
+        (WebCore::continuationOutlineTable):
+        * rendering/RenderCounter.cpp:
+        (WebCore::counterMaps):
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::drawPlatformResizerImage):
+        * rendering/RenderScrollbarTheme.cpp:
+        (WebCore::RenderScrollbarTheme::renderScrollbarTheme):
+        * rendering/RenderTheme.cpp:
+        (WebCore::customFocusRingColor):
+        * rendering/RenderWidget.cpp:
+        (WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
+        * rendering/shapes/ShapeOutsideInfo.h:
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::hyphenString):
+        (WebCore::RenderStyle::textEmphasisMarkString):
+        (WebCore::RenderStyle::initialDashboardRegions):
+        (WebCore::RenderStyle::noneDashboardRegions):
+        * rendering/style/RenderStyle.h:
+        * rendering/svg/RenderSVGPath.cpp:
+        (WebCore::RenderSVGPath::zeroLengthLinecapPath):
+        * rendering/svg/RenderSVGShape.cpp:
+        (WebCore::RenderSVGShape::nonScalingStrokePath):
+        * rendering/svg/SVGRenderingContext.cpp:
+        (WebCore::currentContentTransformation):
+        * rendering/svg/SVGResources.cpp:
+        (WebCore::clipperFilterMaskerTags):
+        (WebCore::markerTags):
+        (WebCore::fillAndStrokeTags):
+        (WebCore::chainableResourceTags):
+        * svg/SVGAngle.cpp:
+        (WebCore::SVGAngle::valueAsString):
+        * svg/SVGAnimateColorElement.cpp:
+        (WebCore::attributeValueIsCurrentColor):
+        * svg/SVGAnimateMotionElement.cpp:
+        (WebCore::SVGAnimateMotionElement::rotateMode):
+        * svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::setCalcMode):
+        (WebCore::SVGAnimationElement::setAttributeType):
+        (WebCore::SVGAnimationElement::isAdditive):
+        (WebCore::SVGAnimationElement::isAccumulated):
+        (WebCore::inheritsFromProperty):
+        * svg/SVGFEConvolveMatrixElement.cpp:
+        (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier):
+        (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier):
+        (WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
+        (WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
+        * svg/SVGFEDiffuseLightingElement.cpp:
+        (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier):
+        (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier):
+        * svg/SVGFEDropShadowElement.cpp:
+        (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
+        (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
+        * svg/SVGFEGaussianBlurElement.cpp:
+        (WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier):
+        (WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier):
+        * svg/SVGFEMorphologyElement.cpp:
+        (WebCore::SVGFEMorphologyElement::radiusXIdentifier):
+        (WebCore::SVGFEMorphologyElement::radiusYIdentifier):
+        * svg/SVGFESpecularLightingElement.cpp:
+        (WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier):
+        (WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier):
+        * svg/SVGFETurbulenceElement.cpp:
+        (WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier):
+        (WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier):
+        * svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::filterResXIdentifier):
+        (WebCore::SVGFilterElement::filterResYIdentifier):
+        * svg/SVGGlyphMap.h:
+        (WebCore::SVGGlyphMap::svgGlyphForGlyph):
+        * svg/SVGLangSpace.cpp:
+        (WebCore::SVGLangSpace::xmlspace):
+        (WebCore::SVGLangSpace::addSupportedAttributes):
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::orientTypeIdentifier):
+        (WebCore::SVGMarkerElement::orientAngleIdentifier):
+        (WebCore::SVGMarkerElement::synchronizeOrientType):
+        * svg/SVGStyleElement.cpp:
+        (WebCore::SVGStyleElement::type):
+        (WebCore::SVGStyleElement::media):
+        * svg/SVGTransform.cpp:
+        (WebCore::SVGTransform::transformTypePrefixForParsing):
+        * svg/SVGViewSpec.cpp:
+        (WebCore::SVGViewSpec::viewBoxIdentifier):
+        (WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
+        (WebCore::SVGViewSpec::transformIdentifier):
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::parseClockValue):
+        (WebCore::SVGSMILElement::isSupportedAttribute):
+        (WebCore::SVGSMILElement::restart):
+        (WebCore::SVGSMILElement::fill):
+        (WebCore::SVGSMILElement::repeatCount):
+        (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
+
 2016-01-08  Zalan Bujtas  <zalan@apple.com>
 
         Absolute positioning -webkit-search-cancel-button crashes Safari.
index 4ae427d..8dc0837 100644 (file)
 #include "config.h"
 #include "WebKitPlaybackTargetAvailabilityEvent.h"
 
+#include <wtf/NeverDestroyed.h>
+
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
 
 namespace WebCore {
 
 static const AtomicString& stringForPlaybackTargetAvailability(bool available)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, availableString, ("available", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, notAvailableString, ("not-available", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> availableString("available", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> notAvailableString("not-available", AtomicString::ConstructFromLiteral);
 
     return available ? availableString : notAvailableString;
 }
index 86380e1..03661e2 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "ExceptionCode.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -38,25 +39,25 @@ IDBCursor::IDBCursor()
 
 const AtomicString& IDBCursor::directionNext()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, next, ("next", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> next("next", AtomicString::ConstructFromLiteral);
     return next;
 }
 
 const AtomicString& IDBCursor::directionNextUnique()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, nextunique, ("nextunique", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> nextunique("nextunique", AtomicString::ConstructFromLiteral);
     return nextunique;
 }
 
 const AtomicString& IDBCursor::directionPrev()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, prev, ("prev", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> prev("prev", AtomicString::ConstructFromLiteral);
     return prev;
 }
 
 const AtomicString& IDBCursor::directionPrevUnique()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, prevunique, ("prevunique", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> prevunique("prevunique", AtomicString::ConstructFromLiteral);
     return prevunique;
 }
 
index 5170777..259fbf0 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "ExceptionCode.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -39,31 +40,31 @@ IDBTransaction::IDBTransaction(ScriptExecutionContext* context)
 
 const AtomicString& IDBTransaction::modeReadOnly()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, readonly, ("readonly", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> readonly("readonly", AtomicString::ConstructFromLiteral);
     return readonly;
 }
 
 const AtomicString& IDBTransaction::modeReadWrite()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, readwrite, ("readwrite", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> readwrite("readwrite", AtomicString::ConstructFromLiteral);
     return readwrite;
 }
 
 const AtomicString& IDBTransaction::modeVersionChange()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, versionchange, ("versionchange", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> versionchange("versionchange", AtomicString::ConstructFromLiteral);
     return versionchange;
 }
 
 const AtomicString& IDBTransaction::modeReadOnlyLegacy()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, readonly, ("0", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> readonly("0", AtomicString::ConstructFromLiteral);
     return readonly;
 }
 
 const AtomicString& IDBTransaction::modeReadWriteLegacy()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, readwrite, ("1", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> readwrite("1", AtomicString::ConstructFromLiteral);
     return readwrite;
 }
 
index 8b2f20d..bfcddc5 100644 (file)
@@ -47,6 +47,7 @@
 #include "Logging.h"
 #include "ScriptExecutionContext.h"
 #include "SharedBuffer.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -135,13 +136,13 @@ RefPtr<IDBTransaction> LegacyRequest::transaction() const
 const String& LegacyRequest::readyState() const
 {
     ASSERT(m_readyState == IDBRequestReadyState::Pending || m_readyState == IDBRequestReadyState::Done);
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, pending, ("pending", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, done, ("done", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> pending("pending", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> done("done", AtomicString::ConstructFromLiteral);
 
     if (m_readyState == IDBRequestReadyState::Pending)
-        return pending;
+        return pending.get();
 
-    return done;
+    return done.get();
 }
 
 void LegacyRequest::markEarlyDeath()
index 87bc382..f8f3eef 100644 (file)
@@ -45,19 +45,19 @@ namespace WebCore {
 
 const AtomicString& MediaControlsHost::automaticKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, automatic, ("automatic", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> automatic("automatic", AtomicString::ConstructFromLiteral);
     return automatic;
 }
 
 const AtomicString& MediaControlsHost::forcedOnlyKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, forcedOn, ("forced-only", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> forcedOn("forced-only", AtomicString::ConstructFromLiteral);
     return forcedOn;
 }
 
 const AtomicString& MediaControlsHost::alwaysOnKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, alwaysOn, ("always-on", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> alwaysOn("always-on", AtomicString::ConstructFromLiteral);
     return alwaysOn;
 }
 
@@ -230,12 +230,12 @@ String MediaControlsHost::externalDeviceDisplayName() const
 
 String MediaControlsHost::externalDeviceType() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, none, (ASCIILiteral("none")));
+    static NeverDestroyed<String> none(ASCIILiteral("none"));
     String type = none;
     
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, airplay, (ASCIILiteral("airplay")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, tvout, (ASCIILiteral("tvout")));
+    static NeverDestroyed<String> airplay(ASCIILiteral("airplay"));
+    static NeverDestroyed<String> tvout(ASCIILiteral("tvout"));
     
     MediaPlayer* player = m_mediaElement->player();
     if (!player) {
index 4e12543..829d1fb 100644 (file)
@@ -95,19 +95,19 @@ MediaSource::~MediaSource()
 
 const AtomicString& MediaSource::openKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, open, ("open", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> open("open", AtomicString::ConstructFromLiteral);
     return open;
 }
 
 const AtomicString& MediaSource::closedKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, closed, ("closed", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> closed("closed", AtomicString::ConstructFromLiteral);
     return closed;
 }
 
 const AtomicString& MediaSource::endedKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, ended, ("ended", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> ended("ended", AtomicString::ConstructFromLiteral);
     return ended;
 }
 
@@ -440,8 +440,8 @@ void MediaSource::endOfStream(const AtomicString& error, ExceptionCode& ec)
 
 void MediaSource::streamEndedWithError(const AtomicString& error, ExceptionCode& ec)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, network, ("network", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, decode, ("decode", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> network("network", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> decode("decode", AtomicString::ConstructFromLiteral);
 
     LOG(MediaSource, "MediaSource::streamEndedWithError(%p) : %s", this, error.string().ascii().data());
 
index aa8b052..5e14613 100644 (file)
@@ -66,7 +66,7 @@ static JSValue *jsValueWithAVMetadataItemInContext(AVMetadataItemType *, JSConte
 
 static String quickTimePluginReplacementScript()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, script, (QuickTimePluginReplacementJavaScript, sizeof(QuickTimePluginReplacementJavaScript)));
+    static NeverDestroyed<String> script(QuickTimePluginReplacementJavaScript, sizeof(QuickTimePluginReplacementJavaScript));
     return script;
 }
 
@@ -89,13 +89,13 @@ bool QuickTimePluginReplacement::supportsMimeType(const String& mimeType)
         "audio/x-m4r", "audio/x-mp3", "audio/x-mpeg", "audio/x-mpeg3", "audio/x-mpegurl", "audio/x-scpls", "audio/x-wav",
         "video/3gpp", "video/3gpp2", "video/mp4", "video/quicktime", "video/x-m4v"
     };
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<String>, typeHash, ());
-    if (!typeHash.size()) {
+    static NeverDestroyed<HashSet<String>> typeHash;
+    if (!typeHash.get().size()) {
         for (size_t i = 0; i < WTF_ARRAY_LENGTH(types); ++i)
-            typeHash.add(types[i]);
+            typeHash.get().add(types[i]);
     }
 
-    return typeHash.contains(mimeType);
+    return typeHash.get().contains(mimeType);
 }
 
 bool QuickTimePluginReplacement::supportsFileExtension(const String& extension)
@@ -105,13 +105,13 @@ bool QuickTimePluginReplacement::supportsFileExtension(const String& extension)
         "m3u8", "m4a", "m4b", "m4p", "m4r", "m4v", "mov", "mp3", "mp3", "mp4", "mpeg", "mpg", "mqv", "pls", "qt",
         "snd", "swa", "ts", "ulw", "wav"
     };
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<String>, extensionHash, ());
-    if (!extensionHash.size()) {
+    static NeverDestroyed<HashSet<String>> extensionHash;
+    if (!extensionHash.get().size()) {
         for (size_t i = 0; i < WTF_ARRAY_LENGTH(extensions); ++i)
-            extensionHash.add(extensions[i]);
+            extensionHash.get().add(extensions[i]);
     }
 
-    return extensionHash.contains(extension);
+    return extensionHash.get().contains(extension);
 }
 
 QuickTimePluginReplacement::QuickTimePluginReplacement(HTMLPlugInElement& plugin, const Vector<String>& paramNames, const Vector<String>& paramValues)
index 7fb13e8..7f17503 100644 (file)
@@ -34,6 +34,7 @@
 #include "SpeechSynthesisEvent.h"
 #include "SpeechSynthesisUtterance.h"
 #include <wtf/CurrentTime.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
     
@@ -192,8 +193,8 @@ void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance* utteranc
     
 void SpeechSynthesis::boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance, SpeechBoundary boundary, unsigned charIndex)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, wordBoundaryString, (ASCIILiteral("word")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, sentenceBoundaryString, (ASCIILiteral("sentence")));
+    static NeverDestroyed<const String> wordBoundaryString(ASCIILiteral("word"));
+    static NeverDestroyed<const String> sentenceBoundaryString(ASCIILiteral("sentence"));
 
     switch (boundary) {
     case SpeechWordBoundary:
index 91ba312..54acb7b 100644 (file)
@@ -184,8 +184,8 @@ static CSSPropertyInfo cssPropertyIDForJSCSSPropertyName(PropertyName propertyNa
 
     String stringForCache = String(propertyNameString);
     typedef HashMap<String, CSSPropertyInfo> CSSPropertyInfoMap;
-    DEPRECATED_DEFINE_STATIC_LOCAL(CSSPropertyInfoMap, propertyInfoCache, ());
-    propertyInfo = propertyInfoCache.get(stringForCache);
+    static NeverDestroyed<CSSPropertyInfoMap> propertyInfoCache;
+    propertyInfo = propertyInfoCache.get().get(stringForCache);
     if (propertyInfo.propertyID)
         return propertyInfo;
 
@@ -269,7 +269,7 @@ static CSSPropertyInfo cssPropertyIDForJSCSSPropertyName(PropertyName propertyNa
     if (propertyID) {
         propertyInfo.hadPixelOrPosPrefix = hadPixelOrPosPrefix;
         propertyInfo.propertyID = static_cast<CSSPropertyID>(propertyID);
-        propertyInfoCache.add(stringForCache, propertyInfo);
+        propertyInfoCache.get().add(stringForCache, propertyInfo);
     }
     return propertyInfo;
 }
index 44f64b6..faa88d2 100644 (file)
@@ -45,6 +45,7 @@
 #include <runtime/JSLock.h>
 #include <runtime/PropertyNameArray.h>
 #include <wtf/Assertions.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/StringExtras.h>
 #include <wtf/Vector.h>
@@ -56,7 +57,7 @@ namespace Bindings {
 
 static String& globalExceptionString()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, exceptionStr, ());
+    static NeverDestroyed<String> exceptionStr;
     return exceptionStr;
 }
 
index c5577b7..2834f69 100644 (file)
@@ -30,6 +30,7 @@
 #include "MediaQuery.h"
 #include "MediaQueryExp.h"
 #include "ScriptableDocumentParser.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringBuilder.h>
 
 namespace WebCore {
@@ -288,11 +289,11 @@ static void addResolutionWarningMessageToConsole(Document* document, const Strin
     ASSERT(document);
     ASSERT(value);
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, mediaQueryMessage, (ASCIILiteral("Consider using 'dppx' units instead of '%replacementUnits%', as in CSS '%replacementUnits%' means dots-per-CSS-%lengthUnit%, not dots-per-physical-%lengthUnit%, so does not correspond to the actual '%replacementUnits%' of a screen. In media query expression: ")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, mediaValueDPI, (ASCIILiteral("dpi")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, mediaValueDPCM, (ASCIILiteral("dpcm")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, lengthUnitInch, (ASCIILiteral("inch")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, lengthUnitCentimeter, (ASCIILiteral("centimeter")));
+    static NeverDestroyed<String> mediaQueryMessage(ASCIILiteral("Consider using 'dppx' units instead of '%replacementUnits%', as in CSS '%replacementUnits%' means dots-per-CSS-%lengthUnit%, not dots-per-physical-%lengthUnit%, so does not correspond to the actual '%replacementUnits%' of a screen. In media query expression: "));
+    static NeverDestroyed<String> mediaValueDPI(ASCIILiteral("dpi"));
+    static NeverDestroyed<String> mediaValueDPCM(ASCIILiteral("dpcm"));
+    static NeverDestroyed<String> lengthUnitInch(ASCIILiteral("inch"));
+    static NeverDestroyed<String> lengthUnitCentimeter(ASCIILiteral("centimeter"));
 
     String message;
     if (value->isDotsPerInch())
index 60c5d39..3e30149 100644 (file)
@@ -36,6 +36,7 @@
 #include "StyleRule.h"
 #include "StyleRuleImport.h"
 #include <wtf/Deque.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/Ref.h>
 
 namespace WebCore {
@@ -316,11 +317,11 @@ void StyleSheetContents::parseAuthorStyleSheet(const CachedCSSStyleSheet* cached
 
     if (m_parserContext.needsSiteSpecificQuirks && isStrictParserMode(m_parserContext.mode)) {
         // Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
-        DEPRECATED_DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, (ASCIILiteral("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n")));
+        static NeverDestroyed<const String> mediaWikiKHTMLFixesStyleSheet(ASCIILiteral("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
         // There are two variants of KHTMLFixes.css. One is equal to mediaWikiKHTMLFixesStyleSheet,
         // while the other lacks the second trailing newline.
-        if (baseURL().string().endsWith("/KHTMLFixes.css") && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
-            && sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.length() - 1)
+        if (baseURL().string().endsWith("/KHTMLFixes.css") && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.get().startsWith(sheetText)
+            && sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.get().length() - 1)
             clearRules();
     }
 }
index 31e5f31..f6de317 100644 (file)
@@ -36,6 +36,7 @@
 #include "MutationObserverInterestGroup.h"
 #include "MutationRecord.h"
 #include "StaticNodeList.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
@@ -43,7 +44,7 @@ namespace WebCore {
 typedef HashMap<ContainerNode*, ChildListMutationAccumulator*> AccumulatorMap;
 static AccumulatorMap& accumulatorMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AccumulatorMap, map, ());
+    static NeverDestroyed<AccumulatorMap> map;
     return map;
 }
 
index fe0bcc1..faf2db0 100644 (file)
@@ -53,6 +53,7 @@
 #include "SubframeLoader.h"
 #include "TextDocument.h"
 #include "XMLNames.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
@@ -88,7 +89,7 @@ static bool isSupportedSVG10Feature(const String& feature, const String& version
         return false;
 
     static bool initialized = false;
-    DEPRECATED_DEFINE_STATIC_LOCAL(FeatureSet, svgFeatures, ());
+    static NeverDestroyed<FeatureSet> svgFeatures;
     if (!initialized) {
 #if ENABLE(SVG_FONTS)
         addString(svgFeatures, "svg");
@@ -108,7 +109,7 @@ static bool isSupportedSVG10Feature(const String& feature, const String& version
         initialized = true;
     }
     return feature.startsWith("org.w3c.", false)
-        && svgFeatures.contains(feature.right(feature.length() - 8));
+        && svgFeatures.get().contains(feature.right(feature.length() - 8));
 }
 
 static bool isSupportedSVG11Feature(const String& feature, const String& version)
@@ -117,7 +118,7 @@ static bool isSupportedSVG11Feature(const String& feature, const String& version
         return false;
 
     static bool initialized = false;
-    DEPRECATED_DEFINE_STATIC_LOCAL(FeatureSet, svgFeatures, ());
+    static NeverDestroyed<FeatureSet> svgFeatures;
     if (!initialized) {
         // Sadly, we cannot claim to implement any of the SVG 1.1 generic feature sets
         // lack of Font and Filter support.
@@ -175,7 +176,7 @@ static bool isSupportedSVG11Feature(const String& feature, const String& version
         initialized = true;
     }
     return feature.startsWith("http://www.w3.org/tr/svg11/feature#", false)
-        && svgFeatures.contains(feature.right(feature.length() - 35));
+        && svgFeatures.get().contains(feature.right(feature.length() - 35));
 }
 
 DOMImplementation::DOMImplementation(Document& document)
index 3c0d35d..03f9113 100644 (file)
 #include <ctime>
 #include <inspector/ScriptCallStack.h>
 #include <wtf/CurrentTime.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/TemporaryChange.h>
 #include <wtf/text/StringBuffer.h>
 #include <yarr/RegularExpression.h>
@@ -1119,9 +1120,9 @@ RefPtr<Element> Document::createElementNS(const String& namespaceURI, const Stri
 
 String Document::readyState() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, loading, (ASCIILiteral("loading")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, interactive, (ASCIILiteral("interactive")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, complete, (ASCIILiteral("complete")));
+    static NeverDestroyed<const String> loading(ASCIILiteral("loading"));
+    static NeverDestroyed<const String> interactive(ASCIILiteral("interactive"));
+    static NeverDestroyed<const String> complete(ASCIILiteral("complete"));
 
     switch (m_readyState) {
     case Loading:
index cc495ab..43c3122 100644 (file)
@@ -89,6 +89,7 @@
 #include "markup.h"
 #include <wtf/BitVector.h>
 #include <wtf/CurrentTime.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/CString.h>
 
 namespace WebCore {
@@ -2928,21 +2929,21 @@ const AtomicString& Element::webkitRegionOverset() const
 {
     document().updateLayoutIgnorePendingStylesheets();
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, undefinedState, ("undefined", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> undefinedState("undefined", AtomicString::ConstructFromLiteral);
     if (!document().cssRegionsEnabled() || !renderNamedFlowFragment())
         return undefinedState;
 
     switch (regionOversetState()) {
     case RegionFit: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, fitState, ("fit", AtomicString::ConstructFromLiteral));
+        static NeverDestroyed<AtomicString> fitState("fit", AtomicString::ConstructFromLiteral);
         return fitState;
     }
     case RegionEmpty: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, emptyState, ("empty", AtomicString::ConstructFromLiteral));
+        static NeverDestroyed<AtomicString> emptyState("empty", AtomicString::ConstructFromLiteral);
         return emptyState;
     }
     case RegionOverset: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, overflowState, ("overset", AtomicString::ConstructFromLiteral));
+        static NeverDestroyed<AtomicString> overflowState("overset", AtomicString::ConstructFromLiteral);
         return overflowState;
     }
     case RegionUndefined:
index 341847f..d54c67f 100644 (file)
@@ -39,6 +39,7 @@
 #include "SVGNames.h"
 #include "SVGUseElement.h"
 #include "TouchEvent.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -213,8 +214,8 @@ void EventDispatcher::dispatchSimulatedClick(Element* element, Event* underlying
     if (element->isDisabledFormControl())
         return;
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<Element*>, elementsDispatchingSimulatedClicks, ());
-    if (!elementsDispatchingSimulatedClicks.add(element).isNewEntry)
+    static NeverDestroyed<HashSet<Element*>> elementsDispatchingSimulatedClicks;
+    if (!elementsDispatchingSimulatedClicks.get().add(element).isNewEntry)
         return;
 
     if (mouseEventOptions == SendMouseOverUpDownEvents)
@@ -230,7 +231,7 @@ void EventDispatcher::dispatchSimulatedClick(Element* element, Event* underlying
     // always send click
     dispatchEvent(element, SimulatedMouseEvent::create(eventNames().clickEvent, element->document().defaultView(), underlyingEvent, element));
 
-    elementsDispatchingSimulatedClicks.remove(element);
+    elementsDispatchingSimulatedClicks.get().remove(element);
 }
 
 static void callDefaultEventHandlersInTheBubblingOrder(Event& event, const EventPath& path)
index 4caf62f..41a2056 100644 (file)
@@ -30,6 +30,7 @@
 #include "ShadowRoot.h"
 #include "StyleSheetContents.h"
 #include "TextNodeTraversal.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringBuilder.h>
 
 namespace WebCore {
@@ -113,7 +114,7 @@ void InlineStyleSheetOwner::clearSheet()
 
 inline bool isValidCSSContentType(Element& element, const AtomicString& type)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, cssContentType, ("text/css", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> cssContentType("text/css", AtomicString::ConstructFromLiteral);
     if (type.isEmpty())
         return true;
     return element.isHTMLElement() ? equalIgnoringCase(type, cssContentType) : type == cssContentType;
index fc1708c..87fbbbd 100644 (file)
@@ -145,13 +145,13 @@ typedef HashSet<RefPtr<MutationObserver>> MutationObserverSet;
 
 static MutationObserverSet& activeMutationObservers()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(MutationObserverSet, activeObservers, ());
+    static NeverDestroyed<MutationObserverSet> activeObservers;
     return activeObservers;
 }
 
 static MutationObserverSet& suspendedMutationObservers()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(MutationObserverSet, suspendedObservers, ());
+    static NeverDestroyed<MutationObserverSet> suspendedObservers;
     return suspendedObservers;
 }
 
index 95fcec2..ce41a1c 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "CharacterData.h"
 #include "StaticNodeList.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
@@ -145,19 +146,19 @@ private:
 
 const AtomicString& ChildListRecord::type()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, childList, ("childList", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> childList("childList", AtomicString::ConstructFromLiteral);
     return childList;
 }
 
 const AtomicString& AttributesRecord::type()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, attributes, ("attributes", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> attributes("attributes", AtomicString::ConstructFromLiteral);
     return attributes;
 }
 
 const AtomicString& CharacterDataRecord::type()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, characterData, ("characterData", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> characterData("characterData", AtomicString::ConstructFromLiteral);
     return characterData;
 }
 
index b249241..cf9eac0 100644 (file)
@@ -37,14 +37,14 @@ namespace WebCore {
 
 const QualifiedName& pseudoElementTagName()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, name, (nullAtom, "<pseudo>", nullAtom));
+    static NeverDestroyed<QualifiedName> name(nullAtom, "<pseudo>", nullAtom);
     return name;
 }
 
 String PseudoElement::pseudoElementNameForEvents(PseudoId pseudoId)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, after, (ASCIILiteral("::after")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, before, (ASCIILiteral("::before")));
+    static NeverDestroyed<const String> after(ASCIILiteral("::after"));
+    static NeverDestroyed<const String> before(ASCIILiteral("::before"));
     switch (pseudoId) {
     case AFTER:
         return after;
index fd79bda..56e4ffb 100644 (file)
@@ -33,6 +33,7 @@
 #include "XMLNames.h"
 #include <wtf/Assertions.h>
 #include <wtf/HashSet.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StaticConstructors.h>
 #include <wtf/text/StringBuilder.h>
 
@@ -74,7 +75,7 @@ struct QNameComponentsTranslator {
 
 static inline QNameSet& qualifiedNameCache()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(QNameSet, nameCache, ());
+    static NeverDestroyed<QNameSet> nameCache;
     return nameCache;
 }
 
@@ -115,7 +116,7 @@ void QualifiedName::init()
 
 const QualifiedName& nullQName()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, nullName, (nullAtom, nullAtom, nullAtom));
+    static NeverDestroyed<QualifiedName> nullName(nullAtom, nullAtom, nullAtom);
     return nullName;
 }
 
index 63f593f..18791f2 100644 (file)
@@ -119,24 +119,24 @@ static bool isLegacySupportedJavaScriptLanguage(const String& language)
 
     // FIXME: This function is not HTML5 compliant. These belong in the MIME registry as "text/javascript<version>" entries.
     typedef HashSet<String, CaseFoldingHash> LanguageSet;
-    DEPRECATED_DEFINE_STATIC_LOCAL(LanguageSet, languages, ());
-    if (languages.isEmpty()) {
-        languages.add("javascript");
-        languages.add("javascript");
-        languages.add("javascript1.0");
-        languages.add("javascript1.1");
-        languages.add("javascript1.2");
-        languages.add("javascript1.3");
-        languages.add("javascript1.4");
-        languages.add("javascript1.5");
-        languages.add("javascript1.6");
-        languages.add("javascript1.7");
-        languages.add("livescript");
-        languages.add("ecmascript");
-        languages.add("jscript");
+    static NeverDestroyed<LanguageSet> languages;
+    if (languages.get().isEmpty()) {
+        languages.get().add("javascript");
+        languages.get().add("javascript");
+        languages.get().add("javascript1.0");
+        languages.get().add("javascript1.1");
+        languages.get().add("javascript1.2");
+        languages.get().add("javascript1.3");
+        languages.get().add("javascript1.4");
+        languages.get().add("javascript1.5");
+        languages.get().add("javascript1.6");
+        languages.get().add("javascript1.7");
+        languages.get().add("livescript");
+        languages.get().add("ecmascript");
+        languages.get().add("jscript");
     }
 
-    return languages.contains(language);
+    return languages.get().contains(language);
 }
 
 void ScriptElement::dispatchErrorEvent()
@@ -347,7 +347,7 @@ void ScriptElement::notifyFinished(CachedResource* resource)
 
     if (m_requestUsesAccessControl && !m_cachedScript->passesSameOriginPolicyCheck(*m_element.document().securityOrigin())) {
         dispatchErrorEvent();
-        DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Cross-origin script load denied by Cross-Origin Resource Sharing policy.")));
+        static NeverDestroyed<String> consoleMessage(ASCIILiteral("Cross-origin script load denied by Cross-Origin Resource Sharing policy."));
         m_element.document().addConsoleMessage(MessageSource::JS, MessageLevel::Error, consoleMessage);
         return;
     }
index 72e3ad4..7b89e0e 100644 (file)
@@ -48,6 +48,7 @@
 #include "TextNodeTraversal.h"
 #include "VisibleUnits.h"
 #include "htmlediting.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/StringBuilder.h>
 
@@ -62,7 +63,7 @@ static int toIdentifier(PassRefPtr<CSSValue> value)
 
 static String& styleSpanClassString()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, styleSpanClassString, ((AppleStyleSpanClass)));
+    static NeverDestroyed<String> styleSpanClassString(AppleStyleSpanClass);
     return styleSpanClassString;
 }
 
index f9682a4..c134063 100644 (file)
@@ -40,6 +40,7 @@
 #include "XLinkNames.h"
 #include "XMLNSNames.h"
 #include "XMLNames.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/unicode/CharacterNames.h>
 
 namespace WebCore {
@@ -259,8 +260,8 @@ bool MarkupAccumulator::shouldAddNamespaceElement(const Element& element)
     if (prefix.isEmpty())
         return !element.hasAttribute(xmlnsAtom);
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, xmlnsWithColon, (ASCIILiteral("xmlns:")));
-    return !element.hasAttribute(xmlnsWithColon + prefix);
+    static NeverDestroyed<String> xmlnsWithColon(ASCIILiteral("xmlns:"));
+    return !element.hasAttribute(xmlnsWithColon.get() + prefix);
 }
 
 bool MarkupAccumulator::shouldAddNamespaceAttribute(const Attribute& attribute, Namespaces& namespaces)
index 78972c7..eb410bc 100644 (file)
@@ -104,14 +104,14 @@ private:
 
 static bool isInterchangeNewlineNode(const Node *node)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, interchangeNewlineClassString, (AppleInterchangeNewline));
+    static NeverDestroyed<String> interchangeNewlineClassString(AppleInterchangeNewline);
     return node && node->hasTagName(brTag) && 
            static_cast<const Element *>(node)->getAttribute(classAttr) == interchangeNewlineClassString;
 }
 
 static bool isInterchangeConvertedSpaceSpan(const Node *node)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, convertedSpaceSpanClassString, (AppleConvertedSpace));
+    static NeverDestroyed<String> convertedSpaceSpanClassString(AppleConvertedSpace);
     return node->isHTMLElement() && 
            static_cast<const HTMLElement *>(node)->getAttribute(classAttr) == convertedSpaceSpanClassString;
 }
index 306f4b2..2d7ad1e 100644 (file)
@@ -428,7 +428,7 @@ bool isTableStructureNode(const Node *node)
 
 const String& nonBreakingSpaceString()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, nonBreakingSpaceString, (&noBreakSpace, 1));
+    static NeverDestroyed<String> nonBreakingSpaceString(&noBreakSpace, 1);
     return nonBreakingSpaceString;
 }
 
index 6d32656..c7ab575 100644 (file)
@@ -213,8 +213,8 @@ void StyledMarkupAccumulator::appendStyleNodeOpenTag(StringBuilder& out, StylePr
 
 const String& StyledMarkupAccumulator::styleNodeCloseTag(bool isBlock)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, divClose, (ASCIILiteral("</div>")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, styleSpanClose, (ASCIILiteral("</span>")));
+    static NeverDestroyed<const String> divClose(ASCIILiteral("</div>"));
+    static NeverDestroyed<const String> styleSpanClose(ASCIILiteral("</span>"));
     return isBlock ? divClose : styleSpanClose;
 }
 
@@ -577,7 +577,7 @@ static Node* highestAncestorToWrapMarkup(const Range* range, EAnnotateForInterch
 static String createMarkupInternal(Document& document, const Range& range, Vector<Node*>* nodes,
     EAnnotateForInterchange shouldAnnotate, bool convertBlocksToInlines, EAbsoluteURLs shouldResolveURLs)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, (ASCIILiteral("<br class=\"" AppleInterchangeNewline "\">")));
+    static NeverDestroyed<const String> interchangeNewlineString(ASCIILiteral("<br class=\"" AppleInterchangeNewline "\">"));
 
     bool collapsed = range.collapsed();
     if (collapsed)
index 6b033b0..0f4ce99 100644 (file)
@@ -35,6 +35,7 @@
 #include "File.h"
 #include "ScriptExecutionContext.h"
 #include "ThreadableBlobRegistry.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/CString.h>
 
 namespace WebCore {
@@ -61,11 +62,10 @@ void BlobURLRegistry::unregisterURL(const URL& url)
 
 URLRegistry& BlobURLRegistry::registry()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(BlobURLRegistry, instance, ());
+    static NeverDestroyed<BlobURLRegistry> instance;
     return instance;
 }
 
-
 Blob::Blob(UninitializedContructor)
 {
 }
index a32a0b7..adb0e06 100644 (file)
@@ -34,6 +34,7 @@
 #include "RenderElement.h"
 #include "ScriptController.h"
 #include "ShadowRoot.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -58,7 +59,7 @@ void BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent(Event*)
 
 void BaseChooserOnlyDateAndTimeInputType::createShadowSubtree()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, valueContainerPseudo, ("-webkit-date-and-time-value", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> valueContainerPseudo("-webkit-date-and-time-value", AtomicString::ConstructFromLiteral);
 
     Ref<HTMLDivElement> valueContainer = HTMLDivElement::create(element().document());
     valueContainer->setPseudo(valueContainerPseudo);
index b1e829d..b34f7d8 100644 (file)
@@ -35,6 +35,7 @@
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "InputTypeNames.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -61,7 +62,7 @@ DateComponents::Type DateInputType::dateType() const
 
 StepRange DateInputType::createStepRange(AnyStepHandling anyStepHandling) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (dateDefaultStep, dateDefaultStepBase, dateStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger));
+    static NeverDestroyed<const StepRange::StepDescription> stepDescription(dateDefaultStep, dateDefaultStepBase, dateStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger);
 
     const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), 0);
     const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumDate()));
index b2efe85..b294514 100644 (file)
@@ -36,6 +36,7 @@
 #include "HTMLNames.h"
 #include "InputTypeNames.h"
 #include <wtf/CurrentTime.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -62,7 +63,7 @@ Decimal DateTimeInputType::defaultValueForStepUp() const
 
 StepRange DateTimeInputType::createStepRange(AnyStepHandling anyStepHandling) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (dateTimeDefaultStep, dateTimeDefaultStepBase, dateTimeStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger));
+    static NeverDestroyed<const StepRange::StepDescription> stepDescription(dateTimeDefaultStep, dateTimeDefaultStepBase, dateTimeStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger);
 
     const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), 0);
     const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumDateTime()));
index 4a438f3..821c811 100644 (file)
@@ -35,6 +35,7 @@
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "InputTypeNames.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -68,7 +69,7 @@ void DateTimeLocalInputType::setValueAsDate(double value, ExceptionCode& ec) con
 
 StepRange DateTimeLocalInputType::createStepRange(AnyStepHandling anyStepHandling) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (dateTimeLocalDefaultStep, dateTimeLocalDefaultStepBase, dateTimeLocalStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger));
+    static NeverDestroyed<const StepRange::StepDescription> stepDescription(dateTimeLocalDefaultStep, dateTimeLocalDefaultStepBase, dateTimeLocalStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger);
 
     const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), 0);
     const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumDateTime()));
index dae1782..e6e0194 100644 (file)
@@ -28,6 +28,7 @@
 #include "HTMLParserIdioms.h"
 #include "InputTypeNames.h"
 #include "LocalizedStrings.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringBuilder.h>
 #include <yarr/RegularExpression.h>
 
@@ -44,10 +45,10 @@ static bool isValidEmailAddress(const String& address)
     if (!addressLength)
         return false;
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(const JSC::Yarr::RegularExpression, regExp, (emailPattern, TextCaseInsensitive));
+    static NeverDestroyed<const JSC::Yarr::RegularExpression> regExp(emailPattern, TextCaseInsensitive);
 
     int matchLength;
-    int matchOffset = regExp.match(address, 0, &matchLength);
+    int matchOffset = regExp.get().match(address, 0, &matchLength);
 
     return !matchOffset && matchLength == addressLength;
 }
index b0f3a92..cdc7b10 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "HTMLFormElement.h"
 #include "HTMLInputElement.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringBuilder.h>
 
 namespace WebCore {
@@ -333,7 +334,7 @@ AtomicString FormKeyGenerator::formKey(const HTMLFormControlElementWithState& co
 {
     HTMLFormElement* form = ownerFormForState(control);
     if (!form) {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, formKeyForNoOwner, ("No owner", AtomicString::ConstructFromLiteral));
+        static NeverDestroyed<AtomicString> formKeyForNoOwner("No owner", AtomicString::ConstructFromLiteral);
         return formKeyForNoOwner;
     }
     FormToKeyMap::const_iterator it = m_formToKeyMap.find(form);
@@ -386,7 +387,7 @@ static String formStateSignature()
     // In the legacy version of serialized state, the first item was a name
     // attribute value of a form control. The following string literal should
     // contain some characters which are rarely used for name attribute values.
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, signature, (ASCIILiteral("\n\r?% WebKit serialized form state version 8 \n\r=&")));
+    static NeverDestroyed<String> signature(ASCIILiteral("\n\r?% WebKit serialized form state version 8 \n\r=&"));
     return signature;
 }
 
index 9eaecfd..419a4aa 100644 (file)
@@ -619,7 +619,7 @@ typedef HashMap<const HTMLAnchorElement*, RefPtr<Element>> RootEditableElementMa
 
 static RootEditableElementMap& rootEditableElementMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(RootEditableElementMap, map, ());
+    static NeverDestroyed<RootEditableElementMap> map;
     return map;
 }
 
index 2e73ded..df8e834 100644 (file)
@@ -65,15 +65,15 @@ const AtomicString& HTMLButtonElement::formControlType() const
 {
     switch (m_type) {
         case SUBMIT: {
-            DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, submit, ("submit", AtomicString::ConstructFromLiteral));
+            static NeverDestroyed<const AtomicString> submit("submit", AtomicString::ConstructFromLiteral);
             return submit;
         }
         case BUTTON: {
-            DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, button, ("button", AtomicString::ConstructFromLiteral));
+            static NeverDestroyed<const AtomicString> button("button", AtomicString::ConstructFromLiteral);
             return button;
         }
         case RESET: {
-            DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, reset, ("reset", AtomicString::ConstructFromLiteral));
+            static NeverDestroyed<const AtomicString> reset("reset", AtomicString::ConstructFromLiteral);
             return reset;
         }
     }
index 9162afc..d087bb2 100644 (file)
@@ -146,7 +146,7 @@ bool HTMLFieldSetElement::supportsFocus() const
 
 const AtomicString& HTMLFieldSetElement::formControlType() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> fieldset("fieldset", AtomicString::ConstructFromLiteral);
     return fieldset;
 }
 
index 01fa700..96671f3 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "HTMLElement.h"
 #include <wtf/HashCountedSet.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -87,7 +88,7 @@ public:
 private:
     static HashCountedSet<ContainerNode*>& disabledSubtreeRoots()
     {
-        DEPRECATED_DEFINE_STATIC_LOCAL(HashCountedSet<ContainerNode*>, nodes, ());
+        static NeverDestroyed<HashCountedSet<ContainerNode*>> nodes;
         return nodes;
     }
 
index aa091fb..8944aab 100644 (file)
@@ -34,6 +34,7 @@
 #include "SSLKeyGenerator.h"
 #include "ShadowRoot.h"
 #include "Text.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 
 using namespace WebCore;
@@ -53,7 +54,7 @@ protected:
     KeygenSelectElement(Document& document)
         : HTMLSelectElement(selectTag, document, 0)
     {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-keygen-select", AtomicString::ConstructFromLiteral));
+        static NeverDestroyed<AtomicString> pseudoId("-webkit-keygen-select", AtomicString::ConstructFromLiteral);
         setPseudo(pseudoId);
     }
 
@@ -112,7 +113,7 @@ bool HTMLKeygenElement::appendFormData(FormDataList& encoded_values, bool)
 
 const AtomicString& HTMLKeygenElement::formControlType() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, keygen, ("keygen", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> keygen("keygen", AtomicString::ConstructFromLiteral);
     return keygen;
 }
 
index b583223..1c49ea3 100644 (file)
@@ -62,7 +62,7 @@ using namespace HTMLNames;
 
 static LinkEventSender& linkLoadEventSender()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(LinkEventSender, sharedLoadEventSender, (eventNames().loadEvent));
+    static NeverDestroyed<LinkEventSender> sharedLoadEventSender(eventNames().loadEvent);
     return sharedLoadEventSender;
 }
 
index 690691c..f053ace 100644 (file)
@@ -205,7 +205,7 @@ using namespace HTMLNames;
 typedef HashMap<Document*, HashSet<HTMLMediaElement*>> DocumentElementSetMap;
 static DocumentElementSetMap& documentToElementSetMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DocumentElementSetMap, map, ());
+    static NeverDestroyed<DocumentElementSetMap> map;
     return map;
 }
 
index aba001b..c456e43 100644 (file)
@@ -404,8 +404,8 @@ void HTMLObjectElement::renderFallbackContent()
 // FIXME: This should be removed, all callers are almost certainly wrong.
 static bool isRecognizedTagName(const QualifiedName& tagName)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, tagList, ());
-    if (tagList.isEmpty()) {
+    static NeverDestroyed<HashSet<AtomicStringImpl*>> tagList;
+    if (tagList.get().isEmpty()) {
         auto* tags = HTMLNames::getHTMLTags();
         for (size_t i = 0; i < HTMLNames::HTMLTagsCount; i++) {
             if (*tags[i] == bgsoundTag
@@ -420,10 +420,10 @@ static bool isRecognizedTagName(const QualifiedName& tagName)
                 // because that changes how we parse documents.
                 continue;
             }
-            tagList.add(tags[i]->localName().impl());
+            tagList.get().add(tags[i]->localName().impl());
         }
     }
-    return tagList.contains(tagName.localName().impl());
+    return tagList.get().contains(tagName.localName().impl());
 }
 
 void HTMLObjectElement::updateDocNamedItem()
index e0bd8cf..8622681 100644 (file)
@@ -64,7 +64,7 @@ bool HTMLOptGroupElement::isFocusable() const
 
 const AtomicString& HTMLOptGroupElement::formControlType() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, optgroup, ("optgroup", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> optgroup("optgroup", AtomicString::ConstructFromLiteral);
     return optgroup;
 }
 
index 2f6ba7b..edda4fd 100644 (file)
@@ -34,6 +34,7 @@
 #include "ExceptionCodePlaceholder.h"
 #include "HTMLFormElement.h"
 #include "HTMLNames.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -54,7 +55,7 @@ Ref<HTMLOutputElement> HTMLOutputElement::create(const QualifiedName& tagName, D
 
 const AtomicString& HTMLOutputElement::formControlType() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, output, ("output", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> output("output", AtomicString::ConstructFromLiteral);
     return output;
 }
 
index 01175d9..57a532e 100644 (file)
@@ -336,7 +336,7 @@ static void registrar(const ReplacementPlugin&);
 
 static Vector<ReplacementPlugin*>& registeredPluginReplacements()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Vector<ReplacementPlugin*>, registeredReplacements, ());
+    static NeverDestroyed<Vector<ReplacementPlugin*>> registeredReplacements;
     static bool enginesQueried = false;
     
     if (enginesQueried)
index 05a1475..2665817 100644 (file)
@@ -74,29 +74,29 @@ static const auto removeSnapshotTimerDelay = std::chrono::milliseconds { 1500 };
 
 static const String titleText(Page* page, String mimeType)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(MimeTypeToLocalizedStringMap, mimeTypeToLabelTitleMap, ());
-    String titleText = mimeTypeToLabelTitleMap.get(mimeType);
+    static NeverDestroyed<MimeTypeToLocalizedStringMap> mimeTypeToLabelTitleMap;
+    String titleText = mimeTypeToLabelTitleMap.get().get(mimeType);
     if (!titleText.isEmpty())
         return titleText;
 
     titleText = page->chrome().client().plugInStartLabelTitle(mimeType);
     if (titleText.isEmpty())
         titleText = snapshottedPlugInLabelTitle();
-    mimeTypeToLabelTitleMap.set(mimeType, titleText);
+    mimeTypeToLabelTitleMap.get().set(mimeType, titleText);
     return titleText;
 };
 
 static const String subtitleText(Page* page, String mimeType)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(MimeTypeToLocalizedStringMap, mimeTypeToLabelSubtitleMap, ());
-    String subtitleText = mimeTypeToLabelSubtitleMap.get(mimeType);
+    static NeverDestroyed<MimeTypeToLocalizedStringMap> mimeTypeToLabelSubtitleMap;
+    String subtitleText = mimeTypeToLabelSubtitleMap.get().get(mimeType);
     if (!subtitleText.isEmpty())
         return subtitleText;
 
     subtitleText = page->chrome().client().plugInStartLabelSubtitle(mimeType);
     if (subtitleText.isEmpty())
         subtitleText = snapshottedPlugInLabelSubtitle();
-    mimeTypeToLabelSubtitleMap.set(mimeType, subtitleText);
+    mimeTypeToLabelSubtitleMap.get().set(mimeType, subtitleText);
     return subtitleText;
 };
 
@@ -408,11 +408,11 @@ void HTMLPlugInImageElement::didAddUserAgentShadowRoot(ShadowRoot* root)
 
 bool HTMLPlugInImageElement::partOfSnapshotOverlay(const Node* node) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, selector, (".snapshot-overlay", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> selector(".snapshot-overlay", AtomicString::ConstructFromLiteral);
     ShadowRoot* shadow = userAgentShadowRoot();
     if (!shadow)
         return false;
-    RefPtr<Element> snapshotLabel = shadow->querySelector(selector, ASSERT_NO_EXCEPTION);
+    RefPtr<Element> snapshotLabel = shadow->querySelector(selector.get(), ASSERT_NO_EXCEPTION);
     return node && snapshotLabel && (node == snapshotLabel.get() || node->isDescendantOf(snapshotLabel.get()));
 }
 
index 573047f..aeded12 100644 (file)
@@ -97,8 +97,8 @@ void HTMLSelectElement::didRecalcStyle(Style::Change styleChange)
 
 const AtomicString& HTMLSelectElement::formControlType() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, selectMultiple, ("select-multiple", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, selectOne, ("select-one", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> selectMultiple("select-multiple", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> selectOne("select-one", AtomicString::ConstructFromLiteral);
     return m_multiple ? selectMultiple : selectOne;
 }
 
index aceded4..51c6f6a 100644 (file)
@@ -40,7 +40,7 @@ using namespace HTMLNames;
 
 static StyleEventSender& styleLoadEventSender()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(StyleEventSender, sharedLoadEventSender, (eventNames().loadEvent));
+    static NeverDestroyed<StyleEventSender> sharedLoadEventSender(eventNames().loadEvent);
     return sharedLoadEventSender;
 }
 
index 789437c..2c8ce4f 100644 (file)
@@ -115,7 +115,7 @@ void HTMLTextAreaElement::didAddUserAgentShadowRoot(ShadowRoot* root)
 
 const AtomicString& HTMLTextAreaElement::formControlType() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, textarea, ("textarea", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> textarea("textarea", AtomicString::ConstructFromLiteral);
     return textarea;
 }
 
index d7f0737..0963720 100644 (file)
@@ -375,9 +375,9 @@ int HTMLTextFormControlElement::computeSelectionEnd() const
 
 static const AtomicString& directionString(TextFieldSelectionDirection direction)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, none, ("none", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, forward, ("forward", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, backward, ("backward", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> none("none", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> forward("forward", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> backward("backward", AtomicString::ConstructFromLiteral);
 
     switch (direction) {
     case SelectionHasNoDirection:
index 1310ce9..beb105d 100644 (file)
@@ -33,6 +33,7 @@
 #include "InputTypeNames.h"
 #include "MouseEvent.h"
 #include "RenderImage.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -64,10 +65,10 @@ bool ImageInputType::appendFormData(FormDataList& encoding, bool) const
         return true;
     }
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, dotXString, (ASCIILiteral(".x")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, dotYString, (ASCIILiteral(".y")));
-    encoding.appendData(name + dotXString, m_clickLocation.x());
-    encoding.appendData(name + dotYString, m_clickLocation.y());
+    static NeverDestroyed<String> dotXString(ASCIILiteral(".x"));
+    static NeverDestroyed<String> dotYString(ASCIILiteral(".y"));
+    encoding.appendData(name + dotXString.get(), m_clickLocation.x());
+    encoding.appendData(name + dotYString.get(), m_clickLocation.y());
 
     if (!element().value().isEmpty())
         encoding.appendData(name, element().value());
index ac0896a..4387618 100644 (file)
@@ -22,6 +22,8 @@
 #include "config.h"
 #include "InputTypeNames.h"
 
+#include <wtf/NeverDestroyed.h>
+
 namespace WebCore {
 
 namespace InputTypeNames {
@@ -31,139 +33,139 @@ namespace InputTypeNames {
 
 const AtomicString& button()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("button", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("button", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& checkbox()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("checkbox", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("checkbox", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& color()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("color", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("color", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& date()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("date", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("date", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& datetime()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("datetime", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("datetime", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& datetimelocal()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("datetime-local", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("datetime-local", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& email()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("email", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("email", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& file()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("file", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("file", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& hidden()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("hidden", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("hidden", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& image()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("image", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("image", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& month()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("month", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("month", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& number()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("number", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("number", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& password()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("password", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("password", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& radio()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("radio", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("radio", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& range()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("range", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("range", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& reset()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("reset", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("reset", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& search()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("search", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("search", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& submit()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("submit", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("submit", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& telephone()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("tel", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("tel", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& text()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("text", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("text", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& time()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("time", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("time", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& url()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("url", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("url", AtomicString::ConstructFromLiteral);
     return name;
 }
 
 const AtomicString& week()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, name, ("week", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> name("week", AtomicString::ConstructFromLiteral);
     return name;
 }
 
index dbb02ab..47a95b9 100644 (file)
@@ -290,19 +290,19 @@ void MediaController::setMuted(bool flag)
 
 static const AtomicString& playbackStateWaiting()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, waiting, ("waiting", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> waiting("waiting", AtomicString::ConstructFromLiteral);
     return waiting;
 }
 
 static const AtomicString& playbackStatePlaying()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, playing, ("playing", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> playing("playing", AtomicString::ConstructFromLiteral);
     return playing;
 }
 
 static const AtomicString& playbackStateEnded()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, ended, ("ended", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> ended("ended", AtomicString::ConstructFromLiteral);
     return ended;
 }
 
index 4729872..60c3168 100644 (file)
@@ -38,6 +38,7 @@
 #include <wtf/CurrentTime.h>
 #include <wtf/DateMath.h>
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -90,7 +91,7 @@ Decimal MonthInputType::defaultValueForStepUp() const
 
 StepRange MonthInputType::createStepRange(AnyStepHandling anyStepHandling) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (monthDefaultStep, monthDefaultStepBase, monthStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger));
+    static NeverDestroyed<const StepRange::StepDescription> stepDescription(monthDefaultStep, monthDefaultStepBase, monthStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger);
 
     const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(monthDefaultStepBase));
     const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumMonth()));
index fd35bb8..f6604e8 100644 (file)
@@ -152,7 +152,7 @@ bool NumberInputType::typeMismatch() const
 
 StepRange NumberInputType::createStepRange(AnyStepHandling anyStepHandling) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (numberDefaultStep, numberDefaultStepBase, numberStepScaleFactor));
+    static NeverDestroyed<const StepRange::StepDescription> stepDescription(numberDefaultStep, numberDefaultStepBase, numberStepScaleFactor);
     const Decimal stepBase = parseToDecimalForNumberType(element().fastGetAttribute(minAttr), numberDefaultStepBase);
     // FIXME: We should use numeric_limits<double>::max for number input type.
     const Decimal floatMax = Decimal::fromDouble(std::numeric_limits<float>::max());
index 7971c02..9998bc6 100644 (file)
@@ -46,6 +46,7 @@
 #include "SliderThumbElement.h"
 #include <limits>
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 
 #if ENABLE(TOUCH_EVENTS)
 #include "Touch.h"
@@ -113,7 +114,7 @@ bool RangeInputType::supportsRequired() const
 
 StepRange RangeInputType::createStepRange(AnyStepHandling anyStepHandling) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (rangeDefaultStep, rangeDefaultStepBase, rangeStepScaleFactor));
+    static NeverDestroyed<const StepRange::StepDescription> stepDescription(rangeDefaultStep, rangeDefaultStepBase, rangeStepScaleFactor);
 
     const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), rangeDefaultMinimum);
     const Decimal maximum = ensureMaximum(parseToNumber(element().fastGetAttribute(maxAttr), rangeDefaultMaximum), minimum, rangeDefaultMaximum);
index c47718a..ebf31d4 100644 (file)
@@ -24,6 +24,7 @@
 #include "HTMLNames.h"
 #include "HTMLParserIdioms.h"
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -65,13 +66,13 @@ StepRange::StepRange(const Decimal& stepBase, const Decimal& minimum, const Deci
 Decimal StepRange::acceptableError() const
 {
     // FIXME: We should use DBL_MANT_DIG instead of FLT_MANT_DIG regarding to HTML5 specification.
-    DEPRECATED_DEFINE_STATIC_LOCAL(const Decimal, twoPowerOfFloatMantissaBits, (Decimal::Positive, 0, UINT64_C(1) << FLT_MANT_DIG));
+    static NeverDestroyed<const Decimal> twoPowerOfFloatMantissaBits(Decimal::Positive, 0, UINT64_C(1) << FLT_MANT_DIG);
     return m_stepDescription.stepValueShouldBe == StepValueShouldBeReal ? m_step / twoPowerOfFloatMantissaBits : Decimal(0);
 }
 
 Decimal StepRange::alignValueForStep(const Decimal& currentValue, const Decimal& newValue) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const Decimal, tenPowerOf21, (Decimal::Positive, 21, 1));
+    static NeverDestroyed<const Decimal> tenPowerOf21(Decimal::Positive, 21, 1);
     if (newValue >= tenPowerOf21)
         return newValue;
 
@@ -150,7 +151,7 @@ bool StepRange::stepMismatch(const Decimal& valueForCheck) const
     // Decimal's fractional part size is DBL_MAN_DIG-bit. If the current value
     // is greater than step*2^DBL_MANT_DIG, the following computation for
     // remainder makes no sense.
-    DEPRECATED_DEFINE_STATIC_LOCAL(const Decimal, twoPowerOfDoubleMantissaBits, (Decimal::Positive, 0, UINT64_C(1) << DBL_MANT_DIG));
+    static NeverDestroyed<const Decimal> twoPowerOfDoubleMantissaBits(Decimal::Positive, 0, UINT64_C(1) << DBL_MANT_DIG);
     if (value / twoPowerOfDoubleMantissaBits > m_step)
         return false;
     // The computation follows HTML5 4.10.7.2.10 `The step attribute' :
index c090419..74b14af 100644 (file)
@@ -38,6 +38,7 @@
 #include <wtf/CurrentTime.h>
 #include <wtf/DateMath.h>
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -77,7 +78,7 @@ Decimal TimeInputType::defaultValueForStepUp() const
 
 StepRange TimeInputType::createStepRange(AnyStepHandling anyStepHandling) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (timeDefaultStep, timeDefaultStepBase, timeStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger));
+    static NeverDestroyed<const StepRange::StepDescription> stepDescription(timeDefaultStep, timeDefaultStepBase, timeStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger);
 
     const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), 0);
     const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumTime()));
index 84ca988..23b90cd 100644 (file)
@@ -35,6 +35,7 @@
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "InputTypeNames.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -56,7 +57,7 @@ DateComponents::Type WeekInputType::dateType() const
 
 StepRange WeekInputType::createStepRange(AnyStepHandling anyStepHandling) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (weekDefaultStep, weekDefaultStepBase, weekStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger));
+    static NeverDestroyed<const StepRange::StepDescription> stepDescription(weekDefaultStep, weekDefaultStepBase, weekStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger);
 
     const Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), weekDefaultStepBase);
     const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumWeek()));
index 65427a1..a60337e 100644 (file)
@@ -58,6 +58,7 @@
 
 #include <wtf/CheckedArithmetic.h>
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringBuilder.h>
 
 #if USE(CG)
@@ -1959,7 +1960,7 @@ RefPtr<ImageData> CanvasRenderingContext2D::webkitGetImageDataHD(float sx, float
 RefPtr<ImageData> CanvasRenderingContext2D::getImageData(ImageBuffer::CoordinateSystem coordinateSystem, float sx, float sy, float sw, float sh, ExceptionCode& ec) const
 {
     if (!canvas()->originClean()) {
-        DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Unable to get image data from canvas because the canvas has been tainted by cross-origin data.")));
+        static NeverDestroyed<String> consoleMessage(ASCIILiteral("Unable to get image data from canvas because the canvas has been tainted by cross-origin data."));
         canvas()->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, consoleMessage);
         ec = SECURITY_ERR;
         return nullptr;
index d9ae12a..a191f15 100644 (file)
@@ -43,6 +43,7 @@
 #include "XLinkNames.h"
 #include <wtf/ASCIICType.h>
 #include <wtf/MainThread.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -273,7 +274,7 @@ void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate)
 
     String httpBodyAsString;
     if (DocumentLoader* documentLoader = document->frame()->loader().documentLoader()) {
-        DEPRECATED_DEFINE_STATIC_LOCAL(String, XSSProtectionHeader, (ASCIILiteral("X-XSS-Protection")));
+        static NeverDestroyed<String> XSSProtectionHeader(ASCIILiteral("X-XSS-Protection"));
         String headerValue = documentLoader->response().httpHeaderField(XSSProtectionHeader);
         String errorDetails;
         unsigned errorPosition = 0;
@@ -523,7 +524,7 @@ bool XSSAuditor::filterButtonToken(const FilterTokenRequest& request)
 
 bool XSSAuditor::eraseDangerousAttributesIfInjected(const FilterTokenRequest& request)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, safeJavaScriptURL, (ASCIILiteral("javascript:void(0)")));
+    static NeverDestroyed<String> safeJavaScriptURL(ASCIILiteral("javascript:void(0)"));
 
     bool didBlockScript = false;
     for (size_t i = 0; i < request.token.attributes().size(); ++i) {
@@ -538,7 +539,7 @@ bool XSSAuditor::eraseDangerousAttributesIfInjected(const FilterTokenRequest& re
             continue;
         request.token.eraseValueOfAttribute(i);
         if (valueContainsJavaScriptURL)
-            request.token.appendToAttributeValue(i, safeJavaScriptURL);
+            request.token.appendToAttributeValue(i, safeJavaScriptURL.get());
         didBlockScript = true;
     }
     return didBlockScript;
index 079bc0f..f7a3c78 100644 (file)
@@ -721,7 +721,7 @@ void MediaControlClosedCaptionsTrackListElement::defaultEventHandler(Event* even
 void MediaControlClosedCaptionsTrackListElement::updateDisplay()
 {
 #if ENABLE(VIDEO_TRACK)
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, selectedClassValue, ("selected", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> selectedClassValue("selected", AtomicString::ConstructFromLiteral);
 
     if (!mediaController()->hasClosedCaptions())
         return;
@@ -1038,7 +1038,7 @@ Ref<MediaControlTimeRemainingDisplayElement> MediaControlTimeRemainingDisplayEle
 
 static const AtomicString& getMediaControlTimeRemainingDisplayElementShadowPseudoId()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-time-remaining-display", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> id("-webkit-media-controls-time-remaining-display", AtomicString::ConstructFromLiteral);
     return id;
 }
 
@@ -1057,7 +1057,7 @@ Ref<MediaControlCurrentTimeDisplayElement> MediaControlCurrentTimeDisplayElement
 
 static const AtomicString& getMediaControlCurrentTimeDisplayElementShadowPseudoId()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-current-time-display", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> id("-webkit-media-controls-current-time-display", AtomicString::ConstructFromLiteral);
     return id;
 }
 
index 1645b82..8082ce2 100644 (file)
@@ -63,7 +63,7 @@ bool MeterShadowElement::rendererIsNeeded(const RenderStyle& style)
 MeterInnerElement::MeterInnerElement(Document& document)
     : MeterShadowElement(document)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-meter-inner-element", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> pseudoId("-webkit-meter-inner-element", AtomicString::ConstructFromLiteral);
     setPseudo(pseudoId);
 }
 
@@ -80,9 +80,9 @@ RenderPtr<RenderElement> MeterInnerElement::createElementRenderer(Ref<RenderStyl
 
 const AtomicString& MeterValueElement::valuePseudoId() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, optimumPseudoId, ("-webkit-meter-optimum-value", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, suboptimumPseudoId, ("-webkit-meter-suboptimum-value", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, evenLessGoodPseudoId, ("-webkit-meter-even-less-good-value", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> optimumPseudoId("-webkit-meter-optimum-value", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> suboptimumPseudoId("-webkit-meter-suboptimum-value", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> evenLessGoodPseudoId("-webkit-meter-even-less-good-value", AtomicString::ConstructFromLiteral);
 
     HTMLMeterElement* meter = meterElement();
     if (!meter)
index 4f9b304..7706b1d 100644 (file)
@@ -34,6 +34,7 @@
 #if ENABLE(METER_ELEMENT)
 #include "HTMLDivElement.h"
 #include <wtf/Forward.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -75,7 +76,7 @@ private:
     MeterBarElement(Document& document)
         : MeterShadowElement(document)
     {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-meter-bar", AtomicString::ConstructFromLiteral));
+        static NeverDestroyed<AtomicString> pseudoId("-webkit-meter-bar", AtomicString::ConstructFromLiteral);
         setPseudo(pseudoId);
     }
 };
index d48351e..cd5f162 100644 (file)
@@ -575,13 +575,13 @@ HTMLInputElement* SliderThumbElement::hostInput() const
 
 static const AtomicString& sliderThumbShadowPseudoId()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, sliderThumb, ("-webkit-slider-thumb", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> sliderThumb("-webkit-slider-thumb", AtomicString::ConstructFromLiteral);
     return sliderThumb;
 }
 
 static const AtomicString& mediaSliderThumbShadowPseudoId()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderThumb, ("-webkit-media-slider-thumb", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> mediaSliderThumb("-webkit-media-slider-thumb", AtomicString::ConstructFromLiteral);
     return mediaSliderThumb;
 }
 
@@ -641,8 +641,8 @@ const AtomicString& SliderContainerElement::shadowPseudoId() const
     // that value depends on the style, which means the style needs to be computed twice to get
     // a correct value: once to get the Input's appearance, then a second time to style the shadow tree correctly.
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-media-slider-container", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-container", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> mediaSliderContainer("-webkit-media-slider-container", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> sliderContainer("-webkit-slider-container", AtomicString::ConstructFromLiteral);
 
     if (!is<HTMLInputElement>(*shadowHost()))
         return sliderContainer;
index 8732925..a42e105 100644 (file)
 #include "AudioTrackList.h"
 #include "Event.h"
 #include "HTMLMediaElement.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
 const AtomicString& AudioTrack::alternativeKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, alternative, ("alternative", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> alternative("alternative", AtomicString::ConstructFromLiteral);
     return alternative;
 }
 
 const AtomicString& AudioTrack::descriptionKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, description, ("description", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> description("description", AtomicString::ConstructFromLiteral);
     return description;
 }
 
 const AtomicString& AudioTrack::mainKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, main, ("main", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> main("main", AtomicString::ConstructFromLiteral);
     return main;
 }
 
 const AtomicString& AudioTrack::mainDescKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, mainDesc, ("main-desc", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> mainDesc("main-desc", AtomicString::ConstructFromLiteral);
     return mainDesc;
 }
 
 const AtomicString& AudioTrack::translationKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, translation, ("translation", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> translation("translation", AtomicString::ConstructFromLiteral);
     return translation;
 }
 
 const AtomicString& AudioTrack::commentaryKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, commentary, ("commentary", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> commentary("commentary", AtomicString::ConstructFromLiteral);
     return commentary;
 }
 
index 0d9a2b6..729f520 100644 (file)
@@ -49,55 +49,55 @@ static const int invalidTrackIndex = -1;
 
 const AtomicString& TextTrack::subtitlesKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, subtitles, ("subtitles", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> subtitles("subtitles", AtomicString::ConstructFromLiteral);
     return subtitles;
 }
 
 const AtomicString& TextTrack::captionsKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, captions, ("captions", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> captions("captions", AtomicString::ConstructFromLiteral);
     return captions;
 }
 
 const AtomicString& TextTrack::descriptionsKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, descriptions, ("descriptions", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> descriptions("descriptions", AtomicString::ConstructFromLiteral);
     return descriptions;
 }
 
 const AtomicString& TextTrack::chaptersKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, chapters, ("chapters", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> chapters("chapters", AtomicString::ConstructFromLiteral);
     return chapters;
 }
 
 const AtomicString& TextTrack::metadataKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, metadata, ("metadata", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> metadata("metadata", AtomicString::ConstructFromLiteral);
     return metadata;
 }
     
 const AtomicString& TextTrack::forcedKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, forced, ("forced", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> forced("forced", AtomicString::ConstructFromLiteral);
     return forced;
 }
 
 const AtomicString& TextTrack::disabledKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, open, ("disabled", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> open("disabled", AtomicString::ConstructFromLiteral);
     return open;
 }
 
 const AtomicString& TextTrack::hiddenKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, closed, ("hidden", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> closed("hidden", AtomicString::ConstructFromLiteral);
     return closed;
 }
 
 const AtomicString& TextTrack::showingKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, ended, ("showing", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> ended("showing", AtomicString::ConstructFromLiteral);
     return ended;
 }
 
index 64e6fd2..7e5923c 100644 (file)
@@ -37,6 +37,7 @@
 #include "EventTarget.h"
 #include "HTMLElement.h"
 #include <wtf/MediaTime.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -50,7 +51,7 @@ public:
 
     static const AtomicString& cueShadowPseudoId()
     {
-        DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, cue, ("cue", AtomicString::ConstructFromLiteral));
+        static NeverDestroyed<const AtomicString> cue("cue", AtomicString::ConstructFromLiteral);
         return cue;
     }
 
index 7ac8661..0230f43 100644 (file)
@@ -72,31 +72,31 @@ COMPILE_ASSERT(WTF_ARRAY_LENGTH(displayAlignmentMap) == VTTCue::NumberOfAlignmen
 
 static const String& startKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, start, (ASCIILiteral("start")));
+    static NeverDestroyed<const String> start(ASCIILiteral("start"));
     return start;
 }
 
 static const String& middleKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, middle, (ASCIILiteral("middle")));
+    static NeverDestroyed<const String> middle(ASCIILiteral("middle"));
     return middle;
 }
 
 static const String& endKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, end, (ASCIILiteral("end")));
+    static NeverDestroyed<const String> end(ASCIILiteral("end"));
     return end;
 }
 
 static const String& leftKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, left, ("left"));
+    static NeverDestroyed<const String> left("left");
     return left;
 }
 
 static const String& rightKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, right, ("right"));
+    static NeverDestroyed<const String> right("right");
     return right;
 }
 
@@ -107,13 +107,13 @@ static const String& horizontalKeyword()
 
 static const String& verticalGrowingLeftKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, verticalrl, (ASCIILiteral("rl")));
+    static NeverDestroyed<const String> verticalrl(ASCIILiteral("rl"));
     return verticalrl;
 }
 
 static const String& verticalGrowingRightKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, verticallr, (ASCIILiteral("lr")));
+    static NeverDestroyed<const String> verticallr(ASCIILiteral("lr"));
     return verticallr;
 }
 
@@ -225,7 +225,7 @@ void VTTCueBox::applyCSSProperties(const IntSize& videoSize)
 
 const AtomicString& VTTCueBox::vttCueBoxShadowPseudoId()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, trackDisplayBoxShadowPseudoId, ("-webkit-media-text-track-display", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> trackDisplayBoxShadowPseudoId("-webkit-media-text-track-display", AtomicString::ConstructFromLiteral);
     return trackDisplayBoxShadowPseudoId;
 }
 
@@ -238,7 +238,7 @@ RenderPtr<RenderElement> VTTCueBox::createElementRenderer(Ref<RenderStyle>&& sty
 
 const AtomicString& VTTCue::cueBackdropShadowPseudoId()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, cueBackdropShadowPseudoId, ("-webkit-media-text-track-display-backdrop", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> cueBackdropShadowPseudoId("-webkit-media-text-track-display-backdrop", AtomicString::ConstructFromLiteral);
     return cueBackdropShadowPseudoId;
 }
 
@@ -597,7 +597,7 @@ static bool isCueParagraphSeparator(UChar character)
 
 void VTTCue::determineTextDirection()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, rtTag, (ASCIILiteral("rt")));
+    static NeverDestroyed<const String> rtTag(ASCIILiteral("rt"));
     createWebVTTNodeTree();
     if (!m_webVTTNodeTree)
         return;
@@ -741,7 +741,7 @@ void VTTCue::calculateDisplayParameters()
     
 void VTTCue::markFutureAndPastNodes(ContainerNode* root, const MediaTime& previousTimestamp, const MediaTime& movieTime)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, timestampTag, (ASCIILiteral("timestamp")));
+    static NeverDestroyed<const String> timestampTag(ASCIILiteral("timestamp"));
     
     bool isPastNode = true;
     MediaTime currentTimestamp = previousTimestamp;
index 8579868..9411f75 100644 (file)
@@ -188,7 +188,7 @@ void VTTRegion::setViewportAnchorY(double value, ExceptionCode& ec)
 
 const AtomicString VTTRegion::scroll() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, upScrollValueKeyword, ("up", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> upScrollValueKeyword("up", AtomicString::ConstructFromLiteral);
 
     if (m_scroll)
         return upScrollValueKeyword;
@@ -198,7 +198,7 @@ const AtomicString VTTRegion::scroll() const
 
 void VTTRegion::setScroll(const AtomicString& value, ExceptionCode& ec)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, upScrollValueKeyword, ("up", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> upScrollValueKeyword("up", AtomicString::ConstructFromLiteral);
 
     if (value != emptyString() && value != upScrollValueKeyword) {
         ec = SYNTAX_ERR;
@@ -268,7 +268,7 @@ static inline bool parsedEntireRun(const VTTScanner& input, const VTTScanner::Ru
 
 void VTTRegion::parseSettingValue(RegionSetting setting, VTTScanner& input)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, scrollUpValueKeyword, ("up", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> scrollUpValueKeyword("up", AtomicString::ConstructFromLiteral);
 
     VTTScanner::Run valueRun = input.collectUntil<isHTMLSpace<UChar>>();
 
@@ -312,7 +312,7 @@ void VTTRegion::parseSettingValue(RegionSetting setting, VTTScanner& input)
         break;
     }
     case Scroll:
-        if (input.scanRun(valueRun, scrollUpValueKeyword))
+        if (input.scanRun(valueRun, scrollUpValueKeyword.get()))
             m_scroll = true;
         else
             LOG(Media, "VTTRegion::parseSettingValue, invalid Scroll");
@@ -326,7 +326,7 @@ void VTTRegion::parseSettingValue(RegionSetting setting, VTTScanner& input)
 
 const AtomicString& VTTRegion::textTrackCueContainerScrollingClass()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, trackRegionCueContainerScrollingClass, ("scrolling", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> trackRegionCueContainerScrollingClass("scrolling", AtomicString::ConstructFromLiteral);
 
     return trackRegionCueContainerScrollingClass;
 }
index 974e497..7340938 100644 (file)
@@ -47,37 +47,37 @@ namespace WebCore {
 
 const AtomicString& VideoTrack::alternativeKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, alternative, ("alternative", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> alternative("alternative", AtomicString::ConstructFromLiteral);
     return alternative;
 }
 
 const AtomicString& VideoTrack::captionsKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, captions, ("captions", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> captions("captions", AtomicString::ConstructFromLiteral);
     return captions;
 }
 
 const AtomicString& VideoTrack::mainKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, captions, ("main", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> captions("main", AtomicString::ConstructFromLiteral);
     return captions;
 }
 
 const AtomicString& VideoTrack::signKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, sign, ("sign", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> sign("sign", AtomicString::ConstructFromLiteral);
     return sign;
 }
 
 const AtomicString& VideoTrack::subtitlesKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, subtitles, ("subtitles", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> subtitles("subtitles", AtomicString::ConstructFromLiteral);
     return subtitles;
 }
 
 const AtomicString& VideoTrack::commentaryKeyword()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, commentary, ("commentary", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> commentary("commentary", AtomicString::ConstructFromLiteral);
     return commentary;
 }
 
index a3c0366..1f610f5 100644 (file)
@@ -36,14 +36,14 @@ namespace WebCore {
 
 static const QualifiedName& nodeTypeToTagName(WebVTTNodeType nodeType)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, cTag, (nullAtom, "c", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, vTag, (nullAtom, "v", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, langTag, (nullAtom, "lang", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, bTag, (nullAtom, "b", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, uTag, (nullAtom, "u", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, iTag, (nullAtom, "i", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, rubyTag, (nullAtom, "ruby", nullAtom));
-    DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, rtTag, (nullAtom, "rt", nullAtom));
+    static NeverDestroyed<QualifiedName> cTag(nullAtom, "c", nullAtom);
+    static NeverDestroyed<QualifiedName> vTag(nullAtom, "v", nullAtom);
+    static NeverDestroyed<QualifiedName> langTag(nullAtom, "lang", nullAtom);
+    static NeverDestroyed<QualifiedName> bTag(nullAtom, "b", nullAtom);
+    static NeverDestroyed<QualifiedName> uTag(nullAtom, "u", nullAtom);
+    static NeverDestroyed<QualifiedName> iTag(nullAtom, "i", nullAtom);
+    static NeverDestroyed<QualifiedName> rubyTag(nullAtom, "ruby", nullAtom);
+    static NeverDestroyed<QualifiedName> rtTag(nullAtom, "rt", nullAtom);
     switch (nodeType) {
     case WebVTTNodeTypeClass:
         return cTag;
index 89d3d2c..5efdc15 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(VIDEO_TRACK)
 
 #include "HTMLElement.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -62,13 +63,13 @@ public:
 
     static const QualifiedName& voiceAttributeName()
     {
-        DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, voiceAttr, (nullAtom, "voice", nullAtom));
+        static NeverDestroyed<QualifiedName> voiceAttr(nullAtom, "voice", nullAtom);
         return voiceAttr;
     }
     
     static const QualifiedName& langAttributeName()
     {
-        DEPRECATED_DEFINE_STATIC_LOCAL(QualifiedName, voiceAttr, (nullAtom, "lang", nullAtom));
+        static NeverDestroyed<QualifiedName> voiceAttr(nullAtom, "lang", nullAtom);
         return voiceAttr;
     }
 
index 1922010..9eb159f 100644 (file)
@@ -261,7 +261,7 @@ bool WebVTTParser::hasRequiredFileIdentifier(const String& line)
 void WebVTTParser::collectMetadataHeader(const String& line)
 {
     // WebVTT header parsing (WebVTT parser algorithm step 12)
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, regionHeaderName, ("Region", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> regionHeaderName("Region", AtomicString::ConstructFromLiteral);
 
     // Step 12.4 If line contains the character ":" (A U+003A COLON), then set metadata's
     // name to the substring of line before the first ":" character and
index 11e5249..e9b32aa 100644 (file)
@@ -79,10 +79,10 @@ enum ForcePseudoClassFlags {
 
 static unsigned computePseudoClassMask(const InspectorArray& pseudoClassArray)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, active, (ASCIILiteral("active")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, hover, (ASCIILiteral("hover")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, focus, (ASCIILiteral("focus")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, visited, (ASCIILiteral("visited")));
+    static NeverDestroyed<String> active(ASCIILiteral("active"));
+    static NeverDestroyed<String> hover(ASCIILiteral("hover"));
+    static NeverDestroyed<String> focus(ASCIILiteral("focus"));
+    static NeverDestroyed<String> visited(ASCIILiteral("visited"));
     if (!pseudoClassArray.length())
         return PseudoClassNone;
 
index 5ce8c26..d660226 100644 (file)
@@ -230,8 +230,8 @@ void InspectorPageAgent::resourceContent(ErrorString& errorString, Frame* frame,
 //static
 String InspectorPageAgent::sourceMapURLForResource(CachedResource* cachedResource)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeader, (ASCIILiteral("SourceMap")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeaderDeprecated, (ASCIILiteral("X-SourceMap")));
+    static NeverDestroyed<String> sourceMapHTTPHeader(ASCIILiteral("SourceMap"));
+    static NeverDestroyed<String> sourceMapHTTPHeaderDeprecated(ASCIILiteral("X-SourceMap"));
 
     if (!cachedResource)
         return String();
index 4183330..4761e71 100644 (file)
@@ -880,7 +880,7 @@ static Ref<Inspector::Protocol::CSS::CSSSelector> buildObjectForSelectorHelper(c
 
 static Ref<Inspector::Protocol::Array<Inspector::Protocol::CSS::CSSSelector>> selectorsFromSource(const CSSRuleSourceData* sourceData, const String& sheetText, const CSSSelectorList& selectorList, Element* element)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(JSC::Yarr::RegularExpression, comment, ("/\\*[^]*?\\*/", TextCaseSensitive, JSC::Yarr::MultilineEnabled));
+    static NeverDestroyed<JSC::Yarr::RegularExpression> comment("/\\*[^]*?\\*/", TextCaseSensitive, JSC::Yarr::MultilineEnabled);
 
     auto result = Inspector::Protocol::Array<Inspector::Protocol::CSS::CSSSelector>::create();
     const CSSSelector* selector = selectorList.first();
index f1adf1d..200ebfe 100644 (file)
@@ -46,6 +46,7 @@
 #include <inspector/ScriptCallStack.h>
 #include <inspector/ScriptCallStackFactory.h>
 #include <profiler/Profile.h>
+#include <wtf/NeverDestroyed.h>
 
 using namespace Inspector;
 
@@ -73,8 +74,8 @@ void PageDebuggerAgent::disable(bool isBeingDestroyed)
 
 String PageDebuggerAgent::sourceMapURLForScript(const Script& script)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeader, (ASCIILiteral("SourceMap")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeaderDeprecated, (ASCIILiteral("X-SourceMap")));
+    static NeverDestroyed<String> sourceMapHTTPHeader(ASCIILiteral("SourceMap"));
+    static NeverDestroyed<String> sourceMapHTTPHeaderDeprecated(ASCIILiteral("X-SourceMap"));
 
     if (!script.url.isEmpty()) {
         CachedResource* resource = m_pageAgent->cachedResource(&m_page.mainFrame(), URL(ParsedURLString, script.url));
index ed17fa9..28ef07f 100644 (file)
@@ -289,7 +289,7 @@ void ImageLoader::notifyFinished(CachedResource* resource)
         m_hasPendingErrorEvent = true;
         errorEventSender().dispatchEventSoon(*this);
 
-        DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Cross-origin image load denied by Cross-Origin Resource Sharing policy.")));
+        static NeverDestroyed<String> consoleMessage(ASCIILiteral("Cross-origin image load denied by Cross-Origin Resource Sharing policy."));
         element().document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, consoleMessage);
 
         ASSERT(!m_hasPendingLoadEvent);
index 40e9ad5..6da1083 100644 (file)
@@ -114,7 +114,7 @@ void TextTrackLoader::deprecatedDidReceiveCachedResource(CachedResource* resourc
 
 void TextTrackLoader::corsPolicyPreventedLoad()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Cross-origin text track load denied by Cross-Origin Resource Sharing policy.")));
+    static NeverDestroyed<String> consoleMessage(ASCIILiteral("Cross-origin text track load denied by Cross-Origin Resource Sharing policy."));
     Document* document = downcast<Document>(m_scriptExecutionContext);
     document->addConsoleMessage(MessageSource::Security, MessageLevel::Error, consoleMessage);
     m_state = Failed;
index 5ad57ec..a05da8c 100644 (file)
@@ -29,6 +29,7 @@
 #include "CachedResourceLoader.h"
 #include "Document.h"
 #include "Element.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -87,7 +88,7 @@ const AtomicString& CachedResourceRequest::initiatorName() const
     if (!m_initiatorName.isEmpty())
         return m_initiatorName;
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, defaultName, ("resource", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> defaultName("resource", AtomicString::ConstructFromLiteral);
     return defaultName;
 }
 
index fef38d7..2b643b5 100644 (file)
@@ -40,6 +40,7 @@
 #include "SuddenTermination.h"
 #include <wtf/AutodrainedPool.h>
 #include <wtf/MainThread.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 
 // For methods that are meant to support API from the main thread - should not be called internally
@@ -879,8 +880,8 @@ String IconDatabase::databasePath() const
 
 String IconDatabase::defaultDatabaseFilename()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, defaultDatabaseFilename, (ASCIILiteral("WebpageIcons.db")));
-    return defaultDatabaseFilename.isolatedCopy();
+    static NeverDestroyed<String> defaultDatabaseFilename(ASCIILiteral("WebpageIcons.db"));
+    return defaultDatabaseFilename.get().isolatedCopy();
 }
 
 // Unlike getOrCreatePageURLRecord(), getOrCreateIconRecord() does not mark the icon as "interested in import"
index a974cd8..163ebb6 100644 (file)
@@ -40,6 +40,7 @@
 #include "UserStyleSheetTypes.h"
 #include <runtime/JSCellInlines.h>
 #include <runtime/StructureInlines.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -284,7 +285,7 @@ void CaptionUserPreferences::setCaptionsStyleSheetOverride(const String& overrid
 void CaptionUserPreferences::updateCaptionStyleSheetOveride()
 {
     // Identify our override style sheet with a unique URL - a new scheme and a UUID.
-    DEPRECATED_DEFINE_STATIC_LOCAL(URL, captionsStyleSheetURL, (ParsedURLString, "user-captions-override:01F6AF12-C3B0-4F70-AF5E-A3E00234DC23"));
+    static NeverDestroyed<URL> captionsStyleSheetURL(ParsedURLString, "user-captions-override:01F6AF12-C3B0-4F70-AF5E-A3E00234DC23");
 
     auto& pages = m_pageGroup.pages();
     for (auto& page : pages) {
index 6a1e9b7..72cab1a 100644 (file)
@@ -41,6 +41,7 @@
 #include "TextTrackList.h"
 #include "UserStyleSheetTypes.h"
 #include "VTTCue.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
@@ -246,7 +247,7 @@ String CaptionUserPreferencesMediaAF::captionsBackgroundCSS() const
 {
     // This default value must be the same as the one specified in mediaControls.css for -webkit-media-text-track-past-nodes
     // and webkit-media-text-track-future-nodes.
-    DEPRECATED_DEFINE_STATIC_LOCAL(Color, defaultBackgroundColor, (Color(0, 0, 0, 0.8 * 255)));
+    static NeverDestroyed<Color> defaultBackgroundColor(0, 0, 0, 0.8 * 255);
 
     MACaptionAppearanceBehavior behavior;
 
@@ -349,10 +350,10 @@ String CaptionUserPreferencesMediaAF::colorPropertyCSS(CSSPropertyID id, const C
 
 String CaptionUserPreferencesMediaAF::captionsTextEdgeCSS() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, edgeStyleRaised, (" -.05em -.05em 0 ", String::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, edgeStyleDepressed, (" .05em .05em 0 ", String::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, edgeStyleDropShadow, (" .075em .075em 0 ", String::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, edgeStyleUniform, (" .03em ", String::ConstructFromLiteral));
+    static NeverDestroyed<const String> edgeStyleRaised(ASCIILiteral(" -.05em -.05em 0 "));
+    static NeverDestroyed<const String> edgeStyleDepressed(ASCIILiteral(" .05em .05em 0 "));
+    static NeverDestroyed<const String> edgeStyleDropShadow(ASCIILiteral(" .075em .075em 0 "));
+    static NeverDestroyed<const String> edgeStyleUniform(ASCIILiteral(" .03em "));
 
     bool unused;
     Color color = captionsTextColor(unused);
index c46118d..059bb4a 100644 (file)
@@ -47,6 +47,7 @@
 #include <inspector/ScriptCallStack.h>
 #include <inspector/ScriptCallStackFactory.h>
 #include <wtf/HashSet.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/TextPosition.h>
 
 using namespace Inspector;
@@ -994,7 +995,7 @@ bool CSPDirectiveList::checkSourceAndReportViolation(SourceListDirective* direct
 
 bool CSPDirectiveList::allowJavaScriptURLs(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus reportingStatus) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to execute JavaScript URL because it violates the following Content Security Policy directive: ")));
+    static NeverDestroyed<String> consoleMessage(ASCIILiteral("Refused to execute JavaScript URL because it violates the following Content Security Policy directive: "));
     return reportingStatus == ContentSecurityPolicy::ReportingStatus::SendReport ?
         checkInlineAndReportViolation(operativeDirective(m_scriptSrc.get()), consoleMessage, contextURL, contextLine, true)
         : (m_reportOnly || checkInline(operativeDirective(m_scriptSrc.get())));
@@ -1002,7 +1003,7 @@ bool CSPDirectiveList::allowJavaScriptURLs(const String& contextURL, const WTF::
 
 bool CSPDirectiveList::allowInlineEventHandlers(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus reportingStatus) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to execute inline event handler because it violates the following Content Security Policy directive: ")));
+    static NeverDestroyed<String> consoleMessage(ASCIILiteral("Refused to execute inline event handler because it violates the following Content Security Policy directive: "));
     return reportingStatus == ContentSecurityPolicy::ReportingStatus::SendReport ?
         checkInlineAndReportViolation(operativeDirective(m_scriptSrc.get()), consoleMessage, contextURL, contextLine, true)
         : (m_reportOnly || checkInline(operativeDirective(m_scriptSrc.get())));
@@ -1010,7 +1011,7 @@ bool CSPDirectiveList::allowInlineEventHandlers(const String& contextURL, const
 
 bool CSPDirectiveList::allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus reportingStatus) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to execute inline script because it violates the following Content Security Policy directive: ")));
+    static NeverDestroyed<String> consoleMessage(ASCIILiteral("Refused to execute inline script because it violates the following Content Security Policy directive: "));
     return reportingStatus == ContentSecurityPolicy::ReportingStatus::SendReport ?
         checkInlineAndReportViolation(operativeDirective(m_scriptSrc.get()), consoleMessage, contextURL, contextLine, true) :
         (m_reportOnly || checkInline(operativeDirective(m_scriptSrc.get())));
@@ -1018,7 +1019,7 @@ bool CSPDirectiveList::allowInlineScript(const String& contextURL, const WTF::Or
 
 bool CSPDirectiveList::allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus reportingStatus) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to apply inline style because it violates the following Content Security Policy directive: ")));
+    static NeverDestroyed<String> consoleMessage(ASCIILiteral("Refused to apply inline style because it violates the following Content Security Policy directive: "));
     return reportingStatus == ContentSecurityPolicy::ReportingStatus::SendReport ?
         checkInlineAndReportViolation(operativeDirective(m_styleSrc.get()), consoleMessage, contextURL, contextLine, false) :
         (m_reportOnly || checkInline(operativeDirective(m_styleSrc.get())));
@@ -1026,7 +1027,7 @@ bool CSPDirectiveList::allowInlineStyle(const String& contextURL, const WTF::Ord
 
 bool CSPDirectiveList::allowEval(JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to evaluate script because it violates the following Content Security Policy directive: ")));
+    static NeverDestroyed<String> consoleMessage(ASCIILiteral("Refused to evaluate script because it violates the following Content Security Policy directive: "));
     return reportingStatus == ContentSecurityPolicy::ReportingStatus::SendReport ?
         checkEvalAndReportViolation(operativeDirective(m_scriptSrc.get()), consoleMessage, String(), WTF::OrdinalNumber::beforeFirst(), state) :
         (m_reportOnly || checkEval(operativeDirective(m_scriptSrc.get())));
@@ -1676,12 +1677,12 @@ void ContentSecurityPolicy::reportViolation(const String& directiveText, const S
 
 void ContentSecurityPolicy::reportUnsupportedDirective(const String& name) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, allow, (ASCIILiteral("allow")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, options, (ASCIILiteral("options")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, policyURI, (ASCIILiteral("policy-uri")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, allowMessage, (ASCIILiteral("The 'allow' directive has been replaced with 'default-src'. Please use that directive instead, as 'allow' has no effect.")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, optionsMessage, (ASCIILiteral("The 'options' directive has been replaced with 'unsafe-inline' and 'unsafe-eval' source expressions for the 'script-src' and 'style-src' directives. Please use those directives instead, as 'options' has no effect.")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, policyURIMessage, (ASCIILiteral("The 'policy-uri' directive has been removed from the specification. Please specify a complete policy via the Content-Security-Policy header.")));
+    static NeverDestroyed<String> allow(ASCIILiteral("allow"));
+    static NeverDestroyed<String> options(ASCIILiteral("options"));
+    static NeverDestroyed<String> policyURI(ASCIILiteral("policy-uri"));
+    static NeverDestroyed<String> allowMessage(ASCIILiteral("The 'allow' directive has been replaced with 'default-src'. Please use that directive instead, as 'allow' has no effect."));
+    static NeverDestroyed<String> optionsMessage(ASCIILiteral("The 'options' directive has been replaced with 'unsafe-inline' and 'unsafe-eval' source expressions for the 'script-src' and 'style-src' directives. Please use those directives instead, as 'options' has no effect."));
+    static NeverDestroyed<String> policyURIMessage(ASCIILiteral("The 'policy-uri' directive has been removed from the specification. Please specify a complete policy via the Content-Security-Policy header."));
 
     String message;
     if (equalIgnoringCase(name, allow))
index 99a9f5a..862b902 100644 (file)
 #include <wtf/CurrentTime.h>
 #include <wtf/MainThread.h>
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/Ref.h>
 #include <wtf/text/Base64.h>
 #include <wtf/text/WTFString.h>
@@ -185,13 +186,13 @@ typedef HashCountedSet<DOMWindow*> DOMWindowSet;
 
 static DOMWindowSet& windowsWithUnloadEventListeners()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DOMWindowSet, windowsWithUnloadEventListeners, ());
+    static NeverDestroyed<DOMWindowSet> windowsWithUnloadEventListeners;
     return windowsWithUnloadEventListeners;
 }
 
 static DOMWindowSet& windowsWithBeforeUnloadEventListeners()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DOMWindowSet, windowsWithBeforeUnloadEventListeners, ());
+    static NeverDestroyed<DOMWindowSet> windowsWithBeforeUnloadEventListeners;
     return windowsWithBeforeUnloadEventListeners;
 }
 
index 1ce7b54..9182d3d 100644 (file)
@@ -96,6 +96,7 @@
 #include "WindowsKeyboardCodes.h"
 #include <wtf/Assertions.h>
 #include <wtf/CurrentTime.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/TemporaryChange.h>
 #include <wtf/WeakPtr.h>
@@ -401,7 +402,7 @@ EventHandler::~EventHandler()
 #if ENABLE(DRAG_SUPPORT)
 DragState& EventHandler::dragState()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(DragState, state, ());
+    static NeverDestroyed<DragState> state;
     return state;
 }
 #endif // ENABLE(DRAG_SUPPORT)
@@ -3076,10 +3077,10 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
 
 static FocusDirection focusDirectionForKey(const AtomicString& keyIdentifier)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, Down, ("Down", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, Up, ("Up", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, Left, ("Left", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, Right, ("Right", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> Down("Down", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> Up("Up", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> Left("Left", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> Right("Right", AtomicString::ConstructFromLiteral);
 
     FocusDirection retVal = FocusDirectionNone;
 
index b763368..740e9f1 100644 (file)
@@ -306,7 +306,7 @@ static JSC::Yarr::RegularExpression createRegExpForLabels(const Vector<String>&
     // REVIEW- version of this call in FrameMac.mm caches based on the NSArray ptrs being
     // the same across calls.  We can't do that.
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(JSC::Yarr::RegularExpression, wordRegExp, ("\\w", TextCaseSensitive));
+    static NeverDestroyed<JSC::Yarr::RegularExpression> wordRegExp("\\w", TextCaseSensitive);
     StringBuilder pattern;
     pattern.append('(');
     unsigned int numLabels = labels.size();
@@ -317,8 +317,8 @@ static JSC::Yarr::RegularExpression createRegExpForLabels(const Vector<String>&
         bool startsWithWordChar = false;
         bool endsWithWordChar = false;
         if (label.length()) {
-            startsWithWordChar = wordRegExp.match(label.substring(0, 1)) >= 0;
-            endsWithWordChar = wordRegExp.match(label.substring(label.length() - 1, 1)) >= 0;
+            startsWithWordChar = wordRegExp.get().match(label.substring(0, 1)) >= 0;
+            endsWithWordChar = wordRegExp.get().match(label.substring(label.length() - 1, 1)) >= 0;
         }
 
         if (i)
index 0f5e2be..0be2e1f 100644 (file)
@@ -28,6 +28,7 @@
 #include "NavigatorBase.h"
 
 #include "NetworkStateNotifier.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/WTFString.h>
 
 #if OS(LINUX)
@@ -93,7 +94,7 @@ String NavigatorBase::platform() const
     if (!String(WEBCORE_NAVIGATOR_PLATFORM).isEmpty())
         return WEBCORE_NAVIGATOR_PLATFORM;
     struct utsname osname;
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, platformName, (uname(&osname) >= 0 ? String(osname.sysname) + String(" ") + String(osname.machine) : emptyString()));
+    static NeverDestroyed<String> platformName(uname(&osname) >= 0 ? String(osname.sysname) + String(" ") + String(osname.machine) : emptyString());
     return platformName;
 #else
     return WEBCORE_NAVIGATOR_PLATFORM;
index f6ccc14..7450c06 100644 (file)
 #include "config.h"
 #include "PageVisibilityState.h"
 
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
 String pageVisibilityStateString(PageVisibilityState state)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, visible, (ASCIILiteral("visible")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, hidden, (ASCIILiteral("hidden")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, prerender, (ASCIILiteral("prerender")));
+    static NeverDestroyed<const String> visible(ASCIILiteral("visible"));
+    static NeverDestroyed<const String> hidden(ASCIILiteral("hidden"));
+    static NeverDestroyed<const String> prerender(ASCIILiteral("prerender"));
 
     switch (state) {
     case PageVisibilityStateVisible:
index e39814b..3bd3200 100644 (file)
@@ -34,6 +34,7 @@
 #include "OriginAccessEntry.h"
 #include "SecurityOrigin.h"
 #include <memory>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringHash.h>
 
 namespace WebCore {
@@ -45,7 +46,7 @@ typedef HashMap<String, std::unique_ptr<OriginAccessWhiteList>> OriginAccessMap;
 
 static OriginAccessMap& originAccessMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(OriginAccessMap, originAccessMap, ());
+    static NeverDestroyed<OriginAccessMap> originAccessMap;
     return originAccessMap;
 }
 
index 2ea18ec..6569cdc 100644 (file)
@@ -27,6 +27,7 @@
 #include "UserContentURLPattern.h"
 
 #include "URL.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
@@ -62,7 +63,7 @@ bool UserContentURLPattern::matchesPatterns(const URL& url, const Vector<String>
 
 bool UserContentURLPattern::parse(const String& pattern)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, schemeSeparator, (ASCIILiteral("://")));
+    static NeverDestroyed<const String> schemeSeparator(ASCIILiteral("://"));
 
     size_t schemeEndPos = pattern.find(schemeSeparator);
     if (schemeEndPos == notFound)
@@ -70,7 +71,7 @@ bool UserContentURLPattern::parse(const String& pattern)
 
     m_scheme = pattern.left(schemeEndPos);
 
-    unsigned hostStartPos = schemeEndPos + schemeSeparator.length();
+    unsigned hostStartPos = schemeEndPos + schemeSeparator.get().length();
     if (hostStartPos >= pattern.length())
         return false;
 
index 787f0a0..47451c5 100644 (file)
@@ -53,6 +53,7 @@
 #include <algorithm>
 #include <memory>
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/PointerComparison.h>
 #include <wtf/RefCounted.h>
@@ -645,19 +646,18 @@ static inline size_t shadowListLength(const ShadowData* shadow)
 
 static inline const ShadowData* shadowForBlending(const ShadowData* srcShadow, const ShadowData* otherShadow)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(ShadowData, defaultShadowData, (IntPoint(), 0, 0, Normal, false, Color::transparent));
-    DEPRECATED_DEFINE_STATIC_LOCAL(ShadowData, defaultInsetShadowData, (IntPoint(), 0, 0, Inset, false, Color::transparent));
-
-    DEPRECATED_DEFINE_STATIC_LOCAL(ShadowData, defaultWebKitBoxShadowData, (IntPoint(), 0, 0, Normal, true, Color::transparent));
-    DEPRECATED_DEFINE_STATIC_LOCAL(ShadowData, defaultInsetWebKitBoxShadowData, (IntPoint(), 0, 0, Inset, true, Color::transparent));
+    static NeverDestroyed<ShadowData> defaultShadowData(IntPoint(), 0, 0, Normal, false, Color::transparent);
+    static NeverDestroyed<ShadowData> defaultInsetShadowData(IntPoint(), 0, 0, Inset, false, Color::transparent);
+    static NeverDestroyed<ShadowData> defaultWebKitBoxShadowData(IntPoint(), 0, 0, Normal, true, Color::transparent);
+    static NeverDestroyed<ShadowData> defaultInsetWebKitBoxShadowData(IntPoint(), 0, 0, Inset, true, Color::transparent);
 
     if (srcShadow)
         return srcShadow;
 
     if (otherShadow->style() == Inset)
-        return otherShadow->isWebkitBoxShadow() ? &defaultInsetWebKitBoxShadowData : &defaultInsetShadowData;
+        return otherShadow->isWebkitBoxShadow() ? &defaultInsetWebKitBoxShadowData.get() : &defaultInsetShadowData.get();
 
-    return otherShadow->isWebkitBoxShadow() ? &defaultWebKitBoxShadowData : &defaultShadowData;
+    return otherShadow->isWebkitBoxShadow() ? &defaultWebKitBoxShadowData.get() : &defaultShadowData.get();
 }
 
 class PropertyWrapperShadow : public AnimationPropertyWrapperBase {
index b822256..6551d68 100644 (file)
@@ -37,6 +37,7 @@
 #include "Logging.h"
 #include "RenderElement.h"
 #include "RenderStyle.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/CString.h>
 
 namespace WebCore {
@@ -221,7 +222,7 @@ void CompositeAnimation::updateKeyframeAnimations(RenderElement* renderer, Rende
         // Toss the animation order map.
         m_keyframeAnimationOrderMap.clear();
 
-        DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, none, ("none", AtomicString::ConstructFromLiteral));
+        static NeverDestroyed<const AtomicString> none("none", AtomicString::ConstructFromLiteral);
         
         // Now mark any still active animations as active and add any new animations.
         if (targetStyle->animations()) {
index 93593ad..60a619a 100644 (file)
@@ -29,6 +29,7 @@
 #include "Image.h"
 #include "IntRect.h"
 #include <wtf/Assertions.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -189,259 +190,259 @@ PlatformCursor Cursor::platformCursor() const
 
 const Cursor& pointerCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Pointer));
+    static NeverDestroyed<Cursor> c(Cursor::Pointer);
     return c;
 }
 
 const Cursor& crossCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Cross));
+    static NeverDestroyed<Cursor> c(Cursor::Cross);
     return c;
 }
 
 const Cursor& handCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Hand));
+    static NeverDestroyed<Cursor> c(Cursor::Hand);
     return c;
 }
 
 const Cursor& moveCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Move));
+    static NeverDestroyed<Cursor> c(Cursor::Move);
     return c;
 }
 
 const Cursor& verticalTextCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::VerticalText));
+    static NeverDestroyed<Cursor> c(Cursor::VerticalText);
     return c;
 }
 
 const Cursor& cellCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Cell));
+    static NeverDestroyed<Cursor> c(Cursor::Cell);
     return c;
 }
 
 const Cursor& contextMenuCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::ContextMenu));
+    static NeverDestroyed<Cursor> c(Cursor::ContextMenu);
     return c;
 }
 
 const Cursor& aliasCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Alias));
+    static NeverDestroyed<Cursor> c(Cursor::Alias);
     return c;
 }
 
 const Cursor& zoomInCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::ZoomIn));
+    static NeverDestroyed<Cursor> c(Cursor::ZoomIn);
     return c;
 }
 
 const Cursor& zoomOutCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::ZoomOut));
+    static NeverDestroyed<Cursor> c(Cursor::ZoomOut);
     return c;
 }
 
 const Cursor& copyCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Copy));
+    static NeverDestroyed<Cursor> c(Cursor::Copy);
     return c;
 }
 
 const Cursor& noneCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::None));
+    static NeverDestroyed<Cursor> c(Cursor::None);
     return c;
 }
 
 const Cursor& progressCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Progress));
+    static NeverDestroyed<Cursor> c(Cursor::Progress);
     return c;
 }
 
 const Cursor& noDropCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NoDrop));
+    static NeverDestroyed<Cursor> c(Cursor::NoDrop);
     return c;
 }
 
 const Cursor& notAllowedCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NotAllowed));
+    static NeverDestroyed<Cursor> c(Cursor::NotAllowed);
     return c;
 }
 
 const Cursor& iBeamCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::IBeam));
+    static NeverDestroyed<Cursor> c(Cursor::IBeam);
     return c;
 }
 
 const Cursor& waitCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Wait));
+    static NeverDestroyed<Cursor> c(Cursor::Wait);
     return c;
 }
 
 const Cursor& helpCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Help));
+    static NeverDestroyed<Cursor> c(Cursor::Help);
     return c;
 }
 
 const Cursor& eastResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::EastResize));
+    static NeverDestroyed<Cursor> c(Cursor::EastResize);
     return c;
 }
 
 const Cursor& northResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthResize));
+    static NeverDestroyed<Cursor> c(Cursor::NorthResize);
     return c;
 }
 
 const Cursor& northEastResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthEastResize));
+    static NeverDestroyed<Cursor> c(Cursor::NorthEastResize);
     return c;
 }
 
 const Cursor& northWestResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthWestResize));
+    static NeverDestroyed<Cursor> c(Cursor::NorthWestResize);
     return c;
 }
 
 const Cursor& southResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthResize));
+    static NeverDestroyed<Cursor> c(Cursor::SouthResize);
     return c;
 }
 
 const Cursor& southEastResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthEastResize));
+    static NeverDestroyed<Cursor> c(Cursor::SouthEastResize);
     return c;
 }
 
 const Cursor& southWestResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthWestResize));
+    static NeverDestroyed<Cursor> c(Cursor::SouthWestResize);
     return c;
 }
 
 const Cursor& westResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::WestResize));
+    static NeverDestroyed<Cursor> c(Cursor::WestResize);
     return c;
 }
 
 const Cursor& northSouthResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthSouthResize));
+    static NeverDestroyed<Cursor> c(Cursor::NorthSouthResize);
     return c;
 }
 
 const Cursor& eastWestResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::EastWestResize));
+    static NeverDestroyed<Cursor> c(Cursor::EastWestResize);
     return c;
 }
 
 const Cursor& northEastSouthWestResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthEastSouthWestResize));
+    static NeverDestroyed<Cursor> c(Cursor::NorthEastSouthWestResize);
     return c;
 }
 
 const Cursor& northWestSouthEastResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthWestSouthEastResize));
+    static NeverDestroyed<Cursor> c(Cursor::NorthWestSouthEastResize);
     return c;
 }
 
 const Cursor& columnResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::ColumnResize));
+    static NeverDestroyed<Cursor> c(Cursor::ColumnResize);
     return c;
 }
 
 const Cursor& rowResizeCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::RowResize));
+    static NeverDestroyed<Cursor> c(Cursor::RowResize);
     return c;
 }
 
 const Cursor& middlePanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::MiddlePanning));
+    static NeverDestroyed<Cursor> c(Cursor::MiddlePanning);
     return c;
 }
     
 const Cursor& eastPanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::EastPanning));
+    static NeverDestroyed<Cursor> c(Cursor::EastPanning);
     return c;
 }
     
 const Cursor& northPanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthPanning));
+    static NeverDestroyed<Cursor> c(Cursor::NorthPanning);
     return c;
 }
     
 const Cursor& northEastPanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthEastPanning));
+    static NeverDestroyed<Cursor> c(Cursor::NorthEastPanning);
     return c;
 }
     
 const Cursor& northWestPanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthWestPanning));
+    static NeverDestroyed<Cursor> c(Cursor::NorthWestPanning);
     return c;
 }
     
 const Cursor& southPanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthPanning));
+    static NeverDestroyed<Cursor> c(Cursor::SouthPanning);
     return c;
 }
     
 const Cursor& southEastPanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthEastPanning));
+    static NeverDestroyed<Cursor> c(Cursor::SouthEastPanning);
     return c;
 }
     
 const Cursor& southWestPanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthWestPanning));
+    static NeverDestroyed<Cursor> c(Cursor::SouthWestPanning);
     return c;
 }
     
 const Cursor& westPanningCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::WestPanning));
+    static NeverDestroyed<Cursor> c(Cursor::WestPanning);
     return c;
 }
 
 const Cursor& grabCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Grab));
+    static NeverDestroyed<Cursor> c(Cursor::Grab);
     return c;
 }
 
 const Cursor& grabbingCursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Grabbing));
+    static NeverDestroyed<Cursor> c(Cursor::Grabbing);
     return c;
 }
 
index 58917ff..65578d0 100644 (file)
@@ -73,7 +73,7 @@ String defaultLanguage()
 
 static Vector<String>& preferredLanguagesOverride()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Vector<String>, override, ());
+    static NeverDestroyed<Vector<String>> override;
     return override;
 }
 
index 93d2e90..7951fb0 100644 (file)
@@ -31,6 +31,7 @@
 #include "NotImplemented.h"
 #include "TextBreakIterator.h"
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/unicode/CharacterNames.h>
 
 #if USE(CF)
@@ -79,11 +80,11 @@ static String truncatedStringForLookupMenuItem(const String& original)
 
     // Truncate the string if it's too long. This is in consistency with AppKit.
     unsigned maxNumberOfGraphemeClustersInLookupMenuItem = 24;
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, ellipsis, (&horizontalEllipsis, 1));
+    static NeverDestroyed<String> ellipsis(&horizontalEllipsis, 1);
 
     String trimmed = original.stripWhiteSpace();
     unsigned numberOfCharacters = numCharactersInGraphemeClusters(trimmed, maxNumberOfGraphemeClustersInLookupMenuItem);
-    return numberOfCharacters == trimmed.length() ? trimmed : trimmed.left(numberOfCharacters) + ellipsis;
+    return numberOfCharacters == trimmed.length() ? trimmed : trimmed.left(numberOfCharacters) + ellipsis.get();
 }
 #endif
 
index 127cc5a..620f1c3 100644 (file)
@@ -31,6 +31,7 @@
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/MainThread.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/StringHash.h>
 
@@ -352,16 +353,16 @@ static void initializeSupportedNonImageMimeTypes()
 
 static MediaMIMETypeMap& mediaMIMETypeMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(MediaMIMETypeMap, mediaMIMETypeForExtensionMap, ());
+    static NeverDestroyed<MediaMIMETypeMap> mediaMIMETypeForExtensionMap;
 
-    if (!mediaMIMETypeForExtensionMap.isEmpty())
+    if (!mediaMIMETypeForExtensionMap.get().isEmpty())
         return mediaMIMETypeForExtensionMap;
 
     const unsigned numPairs = sizeof(commonMediaTypes) / sizeof(commonMediaTypes[0]);
     for (unsigned ndx = 0; ndx < numPairs; ++ndx) {
 
-        if (mediaMIMETypeForExtensionMap.contains(commonMediaTypes[ndx].extension))
-            mediaMIMETypeForExtensionMap.get(commonMediaTypes[ndx].extension)->append(commonMediaTypes[ndx].type);
+        if (mediaMIMETypeForExtensionMap.get().contains(commonMediaTypes[ndx].extension))
+            mediaMIMETypeForExtensionMap.get().get(commonMediaTypes[ndx].extension)->append(commonMediaTypes[ndx].type);
         else {
             Vector<String>* synonyms = new Vector<String>;
 
@@ -371,7 +372,7 @@ static MediaMIMETypeMap& mediaMIMETypeMap()
             if (!systemType.isEmpty() && commonMediaTypes[ndx].type != systemType)
                 synonyms->append(systemType);
             synonyms->append(commonMediaTypes[ndx].type);
-            mediaMIMETypeForExtensionMap.add(commonMediaTypes[ndx].extension, synonyms);
+            mediaMIMETypeForExtensionMap.get().add(commonMediaTypes[ndx].extension, synonyms);
         }
     }
 
@@ -642,7 +643,7 @@ HashSet<String>& MIMETypeRegistry::getUnsupportedTextMIMETypes()
 
 const String& defaultMIMEType()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const String, defaultMIMEType, (ASCIILiteral("application/octet-stream")));
+    static NeverDestroyed<const String> defaultMIMEType(ASCIILiteral("application/octet-stream"));
     return defaultMIMEType;
 }
 
index a8b0a11..b646516 100644 (file)
@@ -36,12 +36,12 @@ namespace WebCore {
 
 static URLSchemesMap& localURLSchemes()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, localSchemes, ());
+    static NeverDestroyed<URLSchemesMap> localSchemes;
 
-    if (localSchemes.isEmpty()) {
-        localSchemes.add("file");
+    if (localSchemes.get().isEmpty()) {
+        localSchemes.get().add("file");
 #if PLATFORM(COCOA)
-        localSchemes.add("applewebdata");
+        localSchemes.get().add("applewebdata");
 #endif
     }
 
@@ -50,21 +50,21 @@ static URLSchemesMap& localURLSchemes()
 
 static URLSchemesMap& displayIsolatedURLSchemes()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, displayIsolatedSchemes, ());
+    static NeverDestroyed<URLSchemesMap> displayIsolatedSchemes;
     return displayIsolatedSchemes;
 }
 
 static URLSchemesMap& secureSchemes()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, secureSchemes, ());
+    static NeverDestroyed<URLSchemesMap> secureSchemes;
 
-    if (secureSchemes.isEmpty()) {
-        secureSchemes.add("https");
-        secureSchemes.add("about");
-        secureSchemes.add("data");
-        secureSchemes.add("wss");
+    if (secureSchemes.get().isEmpty()) {
+        secureSchemes.get().add("https");
+        secureSchemes.get().add("about");
+        secureSchemes.get().add("data");
+        secureSchemes.get().add("wss");
 #if USE(QUICK_LOOK)
-        secureSchemes.add(QLPreviewProtocol());
+        secureSchemes.get().add(QLPreviewProtocol());
 #endif
     }
 
@@ -73,14 +73,14 @@ static URLSchemesMap& secureSchemes()
 
 static URLSchemesMap& schemesWithUniqueOrigins()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, schemesWithUniqueOrigins, ());
+    static NeverDestroyed<URLSchemesMap> schemesWithUniqueOrigins;
 
-    if (schemesWithUniqueOrigins.isEmpty()) {
-        schemesWithUniqueOrigins.add("about");
-        schemesWithUniqueOrigins.add("javascript");
+    if (schemesWithUniqueOrigins.get().isEmpty()) {
+        schemesWithUniqueOrigins.get().add("about");
+        schemesWithUniqueOrigins.get().add("javascript");
         // This is a willful violation of HTML5.
         // See https://bugs.webkit.org/show_bug.cgi?id=11885
-        schemesWithUniqueOrigins.add("data");
+        schemesWithUniqueOrigins.get().add("data");
     }
 
     return schemesWithUniqueOrigins;
@@ -88,26 +88,26 @@ static URLSchemesMap& schemesWithUniqueOrigins()
 
 static URLSchemesMap& emptyDocumentSchemes()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, emptyDocumentSchemes, ());
+    static NeverDestroyed<URLSchemesMap> emptyDocumentSchemes;
 
-    if (emptyDocumentSchemes.isEmpty())
-        emptyDocumentSchemes.add("about");
+    if (emptyDocumentSchemes.get().isEmpty())
+        emptyDocumentSchemes.get().add("about");
 
     return emptyDocumentSchemes;
 }
 
 static HashSet<String>& schemesForbiddenFromDomainRelaxation()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<String>, schemes, ());
+    static NeverDestroyed<HashSet<String>> schemes;
     return schemes;
 }
 
 static URLSchemesMap& canDisplayOnlyIfCanRequestSchemes()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, canDisplayOnlyIfCanRequestSchemes, ());
+    static NeverDestroyed<URLSchemesMap> canDisplayOnlyIfCanRequestSchemes;
 
-    if (canDisplayOnlyIfCanRequestSchemes.isEmpty()) {
-        canDisplayOnlyIfCanRequestSchemes.add("blob");
+    if (canDisplayOnlyIfCanRequestSchemes.get().isEmpty()) {
+        canDisplayOnlyIfCanRequestSchemes.get().add("blob");
     }
 
     return canDisplayOnlyIfCanRequestSchemes;
@@ -115,7 +115,7 @@ static URLSchemesMap& canDisplayOnlyIfCanRequestSchemes()
 
 static URLSchemesMap& notAllowingJavascriptURLsSchemes()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, notAllowingJavascriptURLsSchemes, ());
+    static NeverDestroyed<URLSchemesMap> notAllowingJavascriptURLsSchemes;
     return notAllowingJavascriptURLsSchemes;
 }
 
@@ -142,24 +142,24 @@ const URLSchemesMap& SchemeRegistry::localSchemes()
 
 static URLSchemesMap& schemesAllowingLocalStorageAccessInPrivateBrowsing()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, schemesAllowingLocalStorageAccessInPrivateBrowsing, ());
+    static NeverDestroyed<URLSchemesMap> schemesAllowingLocalStorageAccessInPrivateBrowsing;
     return schemesAllowingLocalStorageAccessInPrivateBrowsing;
 }
 
 static URLSchemesMap& schemesAllowingDatabaseAccessInPrivateBrowsing()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, schemesAllowingDatabaseAccessInPrivateBrowsing, ());
+    static NeverDestroyed<URLSchemesMap> schemesAllowingDatabaseAccessInPrivateBrowsing;
     return schemesAllowingDatabaseAccessInPrivateBrowsing;
 }
 
 static URLSchemesMap& CORSEnabledSchemes()
 {
     // FIXME: http://bugs.webkit.org/show_bug.cgi?id=77160
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, CORSEnabledSchemes, ());
+    static NeverDestroyed<URLSchemesMap> CORSEnabledSchemes;
 
-    if (CORSEnabledSchemes.isEmpty()) {
-        CORSEnabledSchemes.add("http");
-        CORSEnabledSchemes.add("https");
+    if (CORSEnabledSchemes.get().isEmpty()) {
+        CORSEnabledSchemes.get().add("http");
+        CORSEnabledSchemes.get().add("https");
     }
 
     return CORSEnabledSchemes;
@@ -167,7 +167,7 @@ static URLSchemesMap& CORSEnabledSchemes()
 
 static URLSchemesMap& ContentSecurityPolicyBypassingSchemes()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URLSchemesMap, schemes, ());
+    static NeverDestroyed<URLSchemesMap> schemes;
     return schemes;
 }
 
index d737e2d..438f368 100644 (file)
 
 #include "ScrollbarThemeMock.h"
 #include "Settings.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
 ScrollbarTheme& ScrollbarTheme::theme()
 {
     if (Settings::mockScrollbarsEnabled()) {
-        DEPRECATED_DEFINE_STATIC_LOCAL(ScrollbarThemeMock, mockTheme, ());
+        static NeverDestroyed<ScrollbarThemeMock> mockTheme;
         return mockTheme;
     }
     return nativeTheme();
index 4d1c77a..889b746 100644 (file)
@@ -1981,7 +1981,7 @@ bool protocolIsInHTTPFamily(const String& url)
 
 const URL& blankURL()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(URL, staticBlankURL, (ParsedURLString, "about:blank"));
+    static NeverDestroyed<URL> staticBlankURL(ParsedURLString, "about:blank");
     return staticBlankURL;
 }
 
index d6770a4..1206168 100644 (file)
@@ -22,6 +22,8 @@
 #include "config.h"
 #include "Animation.h"
 
+#include <wtf/NeverDestroyed.h>
+
 namespace WebCore {
 
 Animation::Animation()
@@ -160,7 +162,7 @@ bool Animation::animationsMatch(const Animation& other, bool matchPlayStates) co
 
 const String& Animation::initialName()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, initialValue, (ASCIILiteral("none")));
+    static NeverDestroyed<String> initialValue(ASCIILiteral("none"));
     return initialValue;
 }
 
index ae95502..3c2daca 100644 (file)
 #if USE(AUDIO_SESSION)
 
 #include "NotImplemented.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
 AudioSession& AudioSession::sharedSession()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AudioSession, session, ());
+    static NeverDestroyed<AudioSession> session;
     return session;
 }
 
index d1f5246..0bb4e6b 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <memory>
 #include <wtf/HashSet.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/Noncopyable.h>
 
 namespace WebCore {
@@ -67,6 +68,7 @@ public:
     void setPreferredBufferSize(size_t);
 
 private:
+    friend class NeverDestroyed<AudioSession>;
     AudioSession();
     ~AudioSession();
 
index af992fb..ea33efc 100644 (file)
@@ -40,6 +40,7 @@
 #include "HRTFPanner.h"
 #include <algorithm>
 #include <math.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -68,18 +69,18 @@ const float ResponseSampleRate = 44100;
 static AudioBus* getConcatenatedImpulseResponsesForSubject(const String& subjectName)
 {
     typedef HashMap<String, AudioBus*> AudioBusMap;
-    DEPRECATED_DEFINE_STATIC_LOCAL(AudioBusMap, audioBusMap, ());
+    static NeverDestroyed<AudioBusMap> audioBusMap;
 
     AudioBus* bus;
-    AudioBusMap::iterator iterator = audioBusMap.find(subjectName);
-    if (iterator == audioBusMap.end()) {
+    AudioBusMap::iterator iterator = audioBusMap.get().find(subjectName);
+    if (iterator == audioBusMap.get().end()) {
         RefPtr<AudioBus> concatenatedImpulseResponses = AudioBus::loadPlatformResource(subjectName.utf8().data(), ResponseSampleRate);
         ASSERT(concatenatedImpulseResponses);
         if (!concatenatedImpulseResponses)
             return 0;
 
         bus = concatenatedImpulseResponses.release().leakRef();
-        audioBusMap.set(subjectName, bus);
+        audioBusMap.get().set(subjectName, bus);
     } else
         bus = iterator->value;
 
index 9d8d1e1..addb524 100644 (file)
@@ -42,6 +42,7 @@
 #include <AudioToolbox/AudioServices.h>
 #include <WebCore/RuntimeApplicationChecksIOS.h>
 #include <wtf/HashSet.h>
+#include <wtf/NeverDestroyed.h>
 
 SOFT_LINK_FRAMEWORK(AudioToolbox)
 SOFT_LINK(AudioToolbox, AudioComponentFindNext, AudioComponent, (AudioComponent inComponent, const AudioComponentDescription *inDesc), (inComponent, inDesc))
@@ -62,7 +63,7 @@ const int kPreferredBufferSize = 256;
 typedef HashSet<AudioDestinationIOS*> AudioDestinationSet;
 static AudioDestinationSet& audioDestinations()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AudioDestinationSet, audioDestinationSet, ());
+    static NeverDestroyed<AudioDestinationSet> audioDestinationSet;
     return audioDestinationSet;
 }
 
index e3ea86a..b7bcb14 100644 (file)
@@ -34,6 +34,7 @@
 #include "RotateTransformOperation.h"
 #include "TextStream.h"
 #include <wtf/HashMap.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
@@ -47,7 +48,7 @@ namespace WebCore {
 typedef HashMap<const GraphicsLayer*, Vector<FloatRect>> RepaintMap;
 static RepaintMap& repaintRectMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(RepaintMap, map, ());
+    static NeverDestroyed<RepaintMap> map;
     return map;
 }
 
index 835dea0..2ace73c 100644 (file)
@@ -30,6 +30,7 @@
 #include "GraphicsContext.h"
 #include "IntRect.h"
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -88,8 +89,8 @@ FloatSize ImageBuffer::sizeForDestinationSize(FloatSize size) const
 
 void ImageBuffer::transformColorSpace(ColorSpace srcColorSpace, ColorSpace dstColorSpace)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Vector<int>, deviceRgbLUT, ());
-    DEPRECATED_DEFINE_STATIC_LOCAL(Vector<int>, linearRgbLUT, ());
+    static NeverDestroyed<Vector<int>> deviceRgbLUT;
+    static NeverDestroyed<Vector<int>> linearRgbLUT;
 
     if (srcColorSpace == dstColorSpace)
         return;
@@ -100,27 +101,27 @@ void ImageBuffer::transformColorSpace(ColorSpace srcColorSpace, ColorSpace dstCo
         return;
 
     if (dstColorSpace == ColorSpaceLinearRGB) {
-        if (linearRgbLUT.isEmpty()) {
+        if (linearRgbLUT.get().isEmpty()) {
             for (unsigned i = 0; i < 256; i++) {
                 float color = i  / 255.0f;
                 color = (color <= 0.04045f ? color / 12.92f : pow((color + 0.055f) / 1.055f, 2.4f));
                 color = std::max(0.0f, color);
                 color = std::min(1.0f, color);
-                linearRgbLUT.append(static_cast<int>(round(color * 255)));
+                linearRgbLUT.get().append(static_cast<int>(round(color * 255)));
             }
         }
-        platformTransformColorSpace(linearRgbLUT);
+        platformTransformColorSpace(linearRgbLUT.get());
     } else if (dstColorSpace == ColorSpaceDeviceRGB) {
-        if (deviceRgbLUT.isEmpty()) {
+        if (deviceRgbLUT.get().isEmpty()) {
             for (unsigned i = 0; i < 256; i++) {
                 float color = i / 255.0f;
                 color = (powf(color, 1.0f / 2.4f) * 1.055f) - 0.055f;
                 color = std::max(0.0f, color);
                 color = std::min(1.0f, color);
-                deviceRgbLUT.append(static_cast<int>(round(color * 255)));
+                deviceRgbLUT.get().append(static_cast<int>(round(color * 255)));
             }
         }
-        platformTransformColorSpace(deviceRgbLUT);
+        platformTransformColorSpace(deviceRgbLUT.get());
     }
 }
 #endif // USE(CG)
index 21d80ae..fbf9e27 100644 (file)
@@ -235,19 +235,19 @@ static void addMediaEngine(CreateMediaEnginePlayer constructor, MediaEngineSuppo
 
 static const AtomicString& applicationOctetStream()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, applicationOctetStream, ("application/octet-stream", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> applicationOctetStream("application/octet-stream", AtomicString::ConstructFromLiteral);
     return applicationOctetStream;
 }
 
 static const AtomicString& textPlain()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, textPlain, ("text/plain", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> textPlain("text/plain", AtomicString::ConstructFromLiteral);
     return textPlain;
 }
 
 static const AtomicString& codecs()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, codecs, ("codecs", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> codecs("codecs", AtomicString::ConstructFromLiteral);
     return codecs;
 }
 
index 7c0c070..898d65b 100644 (file)
@@ -36,6 +36,7 @@
 #include "ImageBuffer.h"
 #include "Timer.h"
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/Noncopyable.h>
 
 namespace WebCore {
@@ -155,7 +156,7 @@ private:
 
 ScratchBuffer& ScratchBuffer::singleton()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(ScratchBuffer, scratchBuffer, ());
+    static NeverDestroyed<ScratchBuffer> scratchBuffer;
     return scratchBuffer;
 }
 
index 1fac704..3d6ce72 100644 (file)
@@ -392,7 +392,7 @@ static const char *boolString(bool val)
 typedef HashMap<MediaPlayer*, MediaPlayerPrivateAVFoundationObjC*> PlayerToPrivateMapType;
 static PlayerToPrivateMapType& playerToPrivateMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(PlayerToPrivateMapType, map, ());
+    static NeverDestroyed<PlayerToPrivateMapType> map;
     return map;
 };
 #endif
index 724893b..6140256 100644 (file)
@@ -24,6 +24,7 @@
 #include "Filter.h"
 #include "GraphicsContext.h"
 #include "TextStream.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/WTFString.h>
 
@@ -36,7 +37,7 @@ Ref<SourceAlpha> SourceAlpha::create(FilterEffect& sourceEffect)
 
 const AtomicString& SourceAlpha::effectName()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, s_effectName, ("SourceAlpha", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> s_effectName("SourceAlpha", AtomicString::ConstructFromLiteral);
     return s_effectName;
 }
 
index 61bb1b8..2313b03 100644 (file)
@@ -23,6 +23,7 @@
 #include "Filter.h"
 #include "GraphicsContext.h"
 #include "TextStream.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/WTFString.h>
 
@@ -35,7 +36,7 @@ Ref<SourceGraphic> SourceGraphic::create(Filter& filter)
 
 const AtomicString& SourceGraphic::effectName()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, s_effectName, ("SourceGraphic", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> s_effectName("SourceGraphic", AtomicString::ConstructFromLiteral);
     return s_effectName;
 }
 
index 080a912..2100e27 100644 (file)
@@ -43,6 +43,7 @@
 #import "WebCoreSystemInterface.h"
 #import <QTKit/QTKit.h>
 #import <objc/runtime.h>
+#import <wtf/NeverDestroyed.h>
 
 SOFT_LINK_FRAMEWORK(QTKit)
 
@@ -1271,7 +1272,7 @@ static void addFileTypesToCache(NSArray * fileTypes, HashSet<String> &cache)
 
 static HashSet<String> mimeCommonTypesCache()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<String>, cache, ());
+    static NeverDestroyed<HashSet<String>> cache;
     static bool typeListInitialized = false;
 
     if (!typeListInitialized) {
@@ -1285,7 +1286,7 @@ static HashSet<String> mimeCommonTypesCache()
 
 static HashSet<String> mimeModernTypesCache()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<String>, cache, ());
+    static NeverDestroyed<HashSet<String>> cache;
     static bool typeListInitialized = false;
     
     if (!typeListInitialized) {
index f96bfaf..c9f0e22 100644 (file)
 #include "config.h"
 #include "Cursor.h"
 
+#include <wtf/NeverDestroyed.h>
+
 namespace WebCore {
 
 static const Cursor& cursor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const Cursor, cursor, ());
+    static NeverDestroyed<const Cursor> cursor;
     return cursor;
 }
 
index 231aeb6..0005e3a 100644 (file)
@@ -37,6 +37,7 @@
 #include "WAKWindow.h"
 #include <algorithm>
 #include <functional>
+#include <wtf/NeverDestroyed.h>
 
 #if __has_include(<WebKitAdditions/LayerBackingStoreAdditions.mm>)
 #import <WebKitAdditions/LayerBackingStoreAdditions.mm>
index de7b4e0..5c3663f 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "MemoryPressureHandler.h"
 #include "TileController.h"
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -79,7 +80,7 @@ void TileControllerMemoryHandler::trimUnparentedTilesToTarget(int target)
 
 TileControllerMemoryHandler& tileControllerMemoryHandler()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(TileControllerMemoryHandler, staticTileControllerMemoryHandler, ());
+    static NeverDestroyed<TileControllerMemoryHandler> staticTileControllerMemoryHandler;
     return staticTileControllerMemoryHandler;
 }
 
index da2fef8..1323395 100644 (file)
@@ -27,6 +27,7 @@
 #define TileControllerMemoryHandlerIOS_h
 
 #include <wtf/ListHashSet.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -35,6 +36,7 @@ class TileController;
 class TileControllerMemoryHandler {
 public:
     friend TileControllerMemoryHandler& tileControllerMemoryHandler();
+    friend class NeverDestroyed<TileControllerMemoryHandler>;
 
     void removeTileController(TileController*);
     void tileControllerGainedUnparentedTiles(TileController*);
index be0dc15..1b5c85e 100644 (file)
@@ -31,6 +31,7 @@
 #import <CoreLocation/CoreLocation.h>
 #import <objc/objc-runtime.h>
 #import <wtf/MathExtras.h>
+#import <wtf/NeverDestroyed.h>
 #import <wtf/PassRefPtr.h>
 #import <wtf/RetainPtr.h>
 
@@ -68,8 +69,8 @@ static const double kGravity = 9.80665;
 
 + (WebCoreMotionManager *)sharedManager
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(RetainPtr<WebCoreMotionManager>, sharedMotionManager, ([[WebCoreMotionManager alloc] init]));
-    return sharedMotionManager.get();
+    static NeverDestroyed<RetainPtr<WebCoreMotionManager>> sharedMotionManager([[WebCoreMotionManager alloc] init]);
+    return sharedMotionManager.get().get();
 }
 
 - (id)init
index 09fb829..e3ad3fb 100644 (file)
@@ -156,8 +156,8 @@ void WebVideoFullscreenModelVideoElement::updateForEventName(const WTF::AtomicSt
         String localizedDeviceName;
 
         if (m_videoElement->mediaControlsHost()) {
-            DEPRECATED_DEFINE_STATIC_LOCAL(String, airplay, (ASCIILiteral("airplay")));
-            DEPRECATED_DEFINE_STATIC_LOCAL(String, tvout, (ASCIILiteral("tvout")));
+            static NeverDestroyed<String> airplay(ASCIILiteral("airplay"));
+            static NeverDestroyed<String> tvout(ASCIILiteral("tvout"));
             
             String type = m_videoElement->mediaControlsHost()->externalDeviceType();
             if (type == airplay)
index 0fb8ae9..063d75c 100644 (file)
@@ -31,6 +31,7 @@
 #include "JSDOMBinding.h"
 #include "WebCoreThread.h"
 #include <wtf/HashMap.h>
+#include <wtf/NeverDestroyed.h>
 
 WKContentChange _WKContentChange                    = WKContentNoChange;
 bool            _WKObservingContentChanges          = false;
@@ -77,8 +78,8 @@ static HashMap<void *, void *> * WebThreadGetObservedContentModifiers()
 {
     ASSERT(WebThreadIsLockedOrDisabled());
     typedef HashMap<void *, void *> VoidVoidMap;
-    DEPRECATED_DEFINE_STATIC_LOCAL(VoidVoidMap, observedContentModifiers, ());
-    return &observedContentModifiers;
+    static NeverDestroyed<VoidVoidMap> observedContentModifiers;
+    return &observedContentModifiers.get();
 }
 
 int WebThreadCountOfObservedContentModifiers(void)
index 416d5dd..f6fcca0 100644 (file)
@@ -38,6 +38,7 @@
 #import "ResourceResponse.h"
 #import "StringTruncator.h"
 #import "TextRun.h"
+#import <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -160,7 +161,7 @@ const float DragLinkUrlFontSize = 10;
 static FontCascade& fontFromNSFont(NSFont *font)
 {
     static NSFont *currentFont;
-    DEPRECATED_DEFINE_STATIC_LOCAL(FontCascade, currentRenderer, ());
+    static NeverDestroyed<FontCascade> currentRenderer;
     
     if ([font isEqual:currentFont])
         return currentRenderer;
@@ -168,7 +169,7 @@ static FontCascade& fontFromNSFont(NSFont *font)
         CFRelease(currentFont);
     currentFont = font;
     CFRetain(currentFont);
-    currentRenderer = FontCascade(FontPlatformData(toCTFont(font), [font pointSize]));
+    currentRenderer.get() = FontCascade(FontPlatformData(toCTFont(font), [font pointSize]));
     return currentRenderer;
 }
 
index a8e6a11..8cd973c 100644 (file)
@@ -35,6 +35,7 @@
 #import "ScrollView.h"
 #import "WebCoreSystemInterface.h"
 #import <Carbon/Carbon.h>
+#import <wtf/NeverDestroyed.h>
 #import <wtf/StdLibExtras.h>
 
 static NSRect focusRingClipRect;
@@ -132,8 +133,8 @@ enum {
 
 Theme* platformTheme()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(ThemeMac, themeMac, ());
-    return &themeMac;
+    static NeverDestroyed<ThemeMac> themeMac;
+    return &themeMac.get();
 }
 
 // Helper functions used by a bunch of different control parts.
index 3686452..c284add 100644 (file)
@@ -27,6 +27,7 @@
 #import "ThreadCheck.h"
 
 #import <wtf/HashSet.h>
+#import <wtf/NeverDestroyed.h>
 #import <wtf/StdLibExtras.h>
 #include <wtf/text/StringHash.h>
 
@@ -98,12 +99,12 @@ void WebCoreReportThreadViolation(const char* function, WebCore::ThreadViolation
     if (round >= MaximumThreadViolationRound)
         return;
 
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<String>, loggedFunctions, ());
+    static NeverDestroyed<HashSet<String>> loggedFunctions;
     switch (threadViolationBehavior[round]) {
         case NoThreadCheck:
             break;
         case LogOnFirstThreadViolation:
-            if (loggedFunctions.add(function).isNewEntry) {
+            if (loggedFunctions.get().add(function).isNewEntry) {
                 NSLog(@"WebKit Threading Violation - %s called from secondary thread", function);
                 NSLog(@"Additional threading violations for this function will not be logged.");
             }
index b8e44cb..796c1d3 100644 (file)
@@ -32,6 +32,7 @@
 #include "MediaStreamTrackSourcesRequestClient.h"
 #include "RealtimeMediaSource.h"
 #include "RealtimeMediaSourceSupportedConstraints.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/text/WTFString.h>
 
@@ -53,6 +54,7 @@ private:
 };
 
 class AVCaptureDeviceManager final : public CaptureDeviceManager {
+    friend class NeverDestroyed<AVCaptureDeviceManager>;
 public:
     virtual Vector<CaptureDeviceInfo>& captureDeviceList() override;
 
index 57d2160..73c318e 100644 (file)
@@ -209,7 +209,7 @@ bool AVCaptureDeviceManager::isAvailable()
 
 AVCaptureDeviceManager& AVCaptureDeviceManager::singleton()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AVCaptureDeviceManager, manager, ());
+    static NeverDestroyed<AVCaptureDeviceManager> manager;
     return manager;
 }
 
index b49d1f6..63c8eeb 100644 (file)
@@ -44,7 +44,7 @@ namespace WebCore {
 RealtimeMediaSourceCenter& RealtimeMediaSourceCenter::platformCenter()
 {
     ASSERT(isMainThread());
-    DEPRECATED_DEFINE_STATIC_LOCAL(RealtimeMediaSourceCenterMac, center, ());
+    static NeverDestroyed<RealtimeMediaSourceCenterMac> center;
     return center;
 }
 
index aec045c..3102803 100644 (file)
@@ -31,6 +31,7 @@
 #include <runtime/ArrayBuffer.h>
 #include <runtime/DataView.h>
 #include <runtime/Int8Array.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringBuilder.h>
 
 namespace WebCore {
@@ -76,7 +77,7 @@ MockTrackBox::MockTrackBox(ArrayBuffer* data)
 
 const String& MockTrackBox::type()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, trak, (ASCIILiteral("trak")));
+    static NeverDestroyed<String> trak(ASCIILiteral("trak"));
     return trak;
 }
 
@@ -105,7 +106,7 @@ MockInitializationBox::MockInitializationBox(ArrayBuffer* data)
 
 const String& MockInitializationBox::type()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, init, (ASCIILiteral("init")));
+    static NeverDestroyed<String> init(ASCIILiteral("init"));
     return init;
 }
 
@@ -133,7 +134,7 @@ MockSampleBox::MockSampleBox(ArrayBuffer* data)
 
 const String& MockSampleBox::type()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, smpl, (ASCIILiteral("smpl")));
+    static NeverDestroyed<String> smpl(ASCIILiteral("smpl"));
     return smpl;
 }
 
index 77a71e3..5d300d0 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "ContentSecurityPolicy.h"
 #include <wtf/DateMath.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
@@ -365,14 +366,14 @@ void findCharsetInMediaType(const String& mediaType, unsigned int& charsetPos, u
 
 ContentSecurityPolicy::ReflectedXSSDisposition parseXSSProtectionHeader(const String& header, String& failureReason, unsigned& failurePosition, String& reportURL)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, failureReasonInvalidToggle, (ASCIILiteral("expected 0 or 1")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, failureReasonInvalidSeparator, (ASCIILiteral("expected semicolon")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, failureReasonInvalidEquals, (ASCIILiteral("expected equals sign")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, failureReasonInvalidMode, (ASCIILiteral("invalid mode directive")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, failureReasonInvalidReport, (ASCIILiteral("invalid report directive")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, failureReasonDuplicateMode, (ASCIILiteral("duplicate mode directive")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, failureReasonDuplicateReport, (ASCIILiteral("duplicate report directive")));
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, failureReasonInvalidDirective, (ASCIILiteral("unrecognized directive")));
+    static NeverDestroyed<String> failureReasonInvalidToggle(ASCIILiteral("expected 0 or 1"));
+    static NeverDestroyed<String> failureReasonInvalidSeparator(ASCIILiteral("expected semicolon"));
+    static NeverDestroyed<String> failureReasonInvalidEquals(ASCIILiteral("expected equals sign"));
+    static NeverDestroyed<String> failureReasonInvalidMode(ASCIILiteral("invalid mode directive"));
+    static NeverDestroyed<String> failureReasonInvalidReport(ASCIILiteral("invalid report directive"));
+    static NeverDestroyed<String> failureReasonDuplicateMode(ASCIILiteral("duplicate mode directive"));
+    static NeverDestroyed<String> failureReasonDuplicateReport(ASCIILiteral("duplicate report directive"));
+    static NeverDestroyed<String> failureReasonInvalidDirective(ASCIILiteral("unrecognized directive"));
 
     unsigned pos = 0;
 
index 5a3dd38..0a0a34e 100644 (file)
@@ -34,6 +34,7 @@
 #include "Timer.h"
 #include <algorithm>
 #include <wtf/MainThread.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/CString.h>
 
 namespace WebCore {
@@ -48,7 +49,7 @@ static BuiltinResourceHandleConstructorMap& builtinResourceHandleConstructorMap(
 #else
     ASSERT(isMainThread());
 #endif
-    DEPRECATED_DEFINE_STATIC_LOCAL(BuiltinResourceHandleConstructorMap, map, ());
+    static NeverDestroyed<BuiltinResourceHandleConstructorMap> map;
     return map;
 }
 
@@ -61,7 +62,7 @@ typedef HashMap<AtomicString, ResourceHandle::BuiltinSynchronousLoader> BuiltinR
 static BuiltinResourceHandleSynchronousLoaderMap& builtinResourceHandleSynchronousLoaderMap()
 {
     ASSERT(isMainThread());
-    DEPRECATED_DEFINE_STATIC_LOCAL(BuiltinResourceHandleSynchronousLoaderMap, map, ());
+    static NeverDestroyed<BuiltinResourceHandleSynchronousLoaderMap> map;
     return map;
 }
 
index ec75ede..51390f6 100644 (file)
@@ -48,6 +48,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <wtf/HashMap.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/Ref.h>
 #include <wtf/Threading.h>
 #include <wtf/text/Base64.h>
@@ -83,14 +84,14 @@ namespace WebCore {
 
 static HashSet<String>& allowsAnyHTTPSCertificateHosts()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<String>, hosts, ());
+    static NeverDestroyed<HashSet<String>> hosts;
     return hosts;
 }
 
 static HashMap<String, RetainPtr<CFDataRef>>& clientCerts()
 {
     typedef HashMap<String, RetainPtr<CFDataRef>> CertsMap;
-    DEPRECATED_DEFINE_STATIC_LOCAL(CertsMap, certs, ());
+    static NeverDestroyed<CertsMap> certs;
     return certs;
 }
 
index 9a53ca6..d892e9f 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef AtomicStringKeyedMRUCache_h
 #define AtomicStringKeyedMRUCache_h
 
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/AtomicString.h>
 
 namespace WebCore {
@@ -36,7 +37,7 @@ public:
     T get(const AtomicString& key)
     {
         if (key.isNull()) {
-            DEPRECATED_DEFINE_STATIC_LOCAL(T, valueForNull, (createValueForNullKey()));
+            static NeverDestroyed<T> valueForNull(createValueForNullKey());
             return valueForNull;
         }
 
index 40b8be9..60b2e7c 100644 (file)
@@ -55,7 +55,7 @@ RetainPtr<CFLocaleRef> AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::create
 
 static AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>& cfLocaleCache()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>, cache, ());
+    static NeverDestroyed<AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>> cache;
     return cache;
 }
 
index 74e0572..b28a179 100644 (file)
@@ -1660,8 +1660,8 @@ RenderBlock* RenderBlock::blockElementContinuation() const
     
 static ContinuationOutlineTableMap* continuationOutlineTable()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(ContinuationOutlineTableMap, table, ());
-    return &table;
+    static NeverDestroyed<ContinuationOutlineTableMap> table;
+    return &table.get();
 }
 
 void RenderBlock::addContinuationWithOutline(RenderInline* flow)
index c745639..403ca7e 100644 (file)
@@ -50,7 +50,7 @@ static CounterNode* makeCounterNode(RenderElement&, const AtomicString& identifi
 
 static CounterMaps& counterMaps()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(CounterMaps, staticCounterMaps, ());
+    static NeverDestroyed<CounterMaps> staticCounterMaps;
     return staticCounterMaps;
 }
 
index d93b3ed..afcdb77 100644 (file)
@@ -987,8 +987,8 @@ void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
             continue;
 
         const UChar ellipsisAndSpace[2] = { horizontalEllipsis, ' ' };
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, ellipsisAndSpaceStr, (ellipsisAndSpace, 2));
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsis, 1));
+        static NeverDestroyed<AtomicString> ellipsisAndSpaceStr(ellipsisAndSpace, 2);
+        static NeverDestroyed<AtomicString> ellipsisStr(&horizontalEllipsis, 1);
         const RenderStyle& lineStyle = numVisibleLines == 1 ? firstLineStyle() : style();
         const FontCascade& font = lineStyle.fontCascade();
 
index 251b0ee..ea37977 100644 (file)
@@ -3633,12 +3633,12 @@ void RenderLayer::drawPlatformResizerImage(GraphicsContext& context, const Layou
     RefPtr<Image> resizeCornerImage;
     FloatSize cornerResizerSize;
     if (renderer().document().deviceScaleFactor() >= 2) {
-        DEPRECATED_DEFINE_STATIC_LOCAL(Image*, resizeCornerImageHiRes, (Image::loadPlatformResource("textAreaResizeCorner@2x").leakRef()));
+        static NeverDestroyed<Image*> resizeCornerImageHiRes(Image::loadPlatformResource("textAreaResizeCorner@2x").leakRef());
         resizeCornerImage = resizeCornerImageHiRes;
         cornerResizerSize = resizeCornerImage->size();
         cornerResizerSize.scale(0.5f);
     } else {
-        DEPRECATED_DEFINE_STATIC_LOCAL(Image*, resizeCornerImageLoRes, (Image::loadPlatformResource("textAreaResizeCorner").leakRef()));
+        static NeverDestroyed<Image*> resizeCornerImageLoRes(Image::loadPlatformResource("textAreaResizeCorner").leakRef());
         resizeCornerImage = resizeCornerImageLoRes;
         cornerResizerSize = resizeCornerImage->size();
     }
index 54fea0c..1692ddc 100644 (file)
 #include "config.h"
 #include "RenderScrollbarTheme.h"
 #include "RenderScrollbar.h"
+#include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
 
 RenderScrollbarTheme* RenderScrollbarTheme::renderScrollbarTheme()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(RenderScrollbarTheme, theme, ());
-    return &theme;
+    static NeverDestroyed<RenderScrollbarTheme> theme;
+    return &theme.get();
 }
 
 void RenderScrollbarTheme::buttonSizesAlongTrackAxis(Scrollbar& scrollbar, int& beforeSize, int& afterSize)
index c68bc8c..3ab9ac5 100644 (file)
@@ -68,7 +68,7 @@ using namespace HTMLNames;
 
 static Color& customFocusRingColor()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Color, color, ());
+    static NeverDestroyed<Color> color;
     return color;
 }
 
index e494713..924ea33 100644 (file)
@@ -46,7 +46,7 @@ unsigned WidgetHierarchyUpdatesSuspensionScope::s_widgetHierarchyUpdateSuspendCo
 
 WidgetHierarchyUpdatesSuspensionScope::WidgetToParentMap& WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(WidgetToParentMap, map, ());
+    static NeverDestroyed<WidgetToParentMap> map;
     return map;
 }
 
index 912aa5c..39564a7 100644 (file)
@@ -35,6 +35,7 @@
 #include "LayoutSize.h"
 #include "Shape.h"
 #include <wtf/HashMap.h>
+#include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
 
@@ -130,7 +131,7 @@ private:
     typedef HashMap<const RenderBox*, std::unique_ptr<ShapeOutsideInfo>> InfoMap;
     static InfoMap& infoMap()
     {
-        DEPRECATED_DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ());
+        static NeverDestroyed<InfoMap> staticInfoMap;
         return staticInfoMap;
     }
 
index 658ded5..0bd9a89 100644 (file)
@@ -1248,8 +1248,8 @@ const AtomicString& RenderStyle::hyphenString() const
         return hyphenationString;
 
     // FIXME: This should depend on locale.
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, hyphenMinusString, (&hyphenMinus, 1));
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, hyphenString, (&hyphen, 1));
+    static NeverDestroyed<AtomicString> hyphenMinusString(&hyphenMinus, 1);
+    static NeverDestroyed<AtomicString> hyphenString(&hyphen, 1);
     return fontCascade().primaryFont().glyphForCharacter(hyphen) ? hyphenString : hyphenMinusString;
 }
 
@@ -1261,28 +1261,28 @@ const AtomicString& RenderStyle::textEmphasisMarkString() const
     case TextEmphasisMarkCustom:
         return textEmphasisCustomMark();
     case TextEmphasisMarkDot: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, filledDotString, (&bullet, 1));
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, openDotString, (&whiteBullet, 1));
+        static NeverDestroyed<AtomicString> filledDotString(&bullet, 1);
+        static NeverDestroyed<AtomicString> openDotString(&whiteBullet, 1);
         return textEmphasisFill() == TextEmphasisFillFilled ? filledDotString : openDotString;
     }
     case TextEmphasisMarkCircle: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, filledCircleString, (&blackCircle, 1));
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, openCircleString, (&whiteCircle, 1));
+        static NeverDestroyed<AtomicString> filledCircleString(&blackCircle, 1);
+        static NeverDestroyed<AtomicString> openCircleString(&whiteCircle, 1);
         return textEmphasisFill() == TextEmphasisFillFilled ? filledCircleString : openCircleString;
     }
     case TextEmphasisMarkDoubleCircle: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, filledDoubleCircleString, (&fisheye, 1));
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, openDoubleCircleString, (&bullseye, 1));
+        static NeverDestroyed<AtomicString> filledDoubleCircleString(&fisheye, 1);
+        static NeverDestroyed<AtomicString> openDoubleCircleString(&bullseye, 1);
         return textEmphasisFill() == TextEmphasisFillFilled ? filledDoubleCircleString : openDoubleCircleString;
     }
     case TextEmphasisMarkTriangle: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, filledTriangleString, (&blackUpPointingTriangle, 1));
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, openTriangleString, (&whiteUpPointingTriangle, 1));
+        static NeverDestroyed<AtomicString> filledTriangleString(&blackUpPointingTriangle, 1);
+        static NeverDestroyed<AtomicString> openTriangleString(&whiteUpPointingTriangle, 1);
         return textEmphasisFill() == TextEmphasisFillFilled ? filledTriangleString : openTriangleString;
     }
     case TextEmphasisMarkSesame: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, filledSesameString, (&sesameDot, 1));
-        DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, openSesameString, (&whiteSesameDot, 1));
+        static NeverDestroyed<AtomicString> filledSesameString(&sesameDot, 1);
+        static NeverDestroyed<AtomicString> openSesameString(&whiteSesameDot, 1);
         return textEmphasisFill() == TextEmphasisFillFilled ? filledSesameString : openSesameString;
     }
     case TextEmphasisMarkAuto:
@@ -1297,13 +1297,13 @@ const AtomicString& RenderStyle::textEmphasisMarkString() const
 #if ENABLE(DASHBOARD_SUPPORT)
 const Vector<StyleDashboardRegion>& RenderStyle::initialDashboardRegions()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Vector<StyleDashboardRegion>, emptyList, ());
+    static NeverDestroyed<Vector<StyleDashboardRegion>> emptyList;
     return emptyList;
 }
 
 const Vector<StyleDashboardRegion>& RenderStyle::noneDashboardRegions()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Vector<StyleDashboardRegion>, noneList, ());
+    static NeverDestroyed<Vector<StyleDashboardRegion>> noneList;
     static bool noneListInitialized = false;
 
     if (!noneListInitialized) {
@@ -1314,7 +1314,7 @@ const Vector<StyleDashboardRegion>& RenderStyle::noneDashboardRegions()
         region.offset.bottom() = Length();
         region.offset.left() = Length();
         region.type = StyleDashboardRegion::None;
-        noneList.append(region);
+        noneList.get().append(region);
         noneListInitialized = true;
     }
     return noneList;
index 6585c6e..ed49ab5 100644 (file)
@@ -70,6 +70,7 @@
 #include "UnicodeBidi.h"
 #include <memory>
 #include <wtf/Forward.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/RefCounted.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/Vector.h>
@@ -2008,7 +2009,7 @@ public:
     static unsigned short initialColumnCount() { return 1; }
     static ColumnFill initialColumnFill() { return ColumnFillBalance; }
     static ColumnSpan initialColumnSpan() { return ColumnSpanNone; }
-    static const TransformOperations& initialTransform() { DEPRECATED_DEFINE_STATIC_LOCAL(TransformOperations, ops, ()); return ops; }
+    static const TransformOperations& initialTransform() { static NeverDestroyed<TransformOperations> ops; return ops; }
     static Length initialTransformOriginX() { return Length(50.0f, Percent); }
     static Length initialTransformOriginY() { return Length(50.0f, Percent); }
     static EPointerEvents initialPointerEvents() { return PE_AUTO; }
@@ -2114,9 +2115,9 @@ public:
     static const Vector<StyleDashboardRegion>& initialDashboardRegions();
     static const Vector<StyleDashboardRegion>& noneDashboardRegions();
 #endif
-    static const FilterOperations& initialFilter() { DEPRECATED_DEFINE_STATIC_LOCAL(FilterOperations, ops, ()); return ops; }
+    static const FilterOperations& initialFilter() { static NeverDestroyed<FilterOperations> ops; return ops; }
 #if ENABLE(FILTERS_LEVEL_2)
-    static const FilterOperations& initialBackdropFilter() { DEPRECATED_DEFINE_STATIC_LOCAL(FilterOperations, ops, ()); return ops; }
+    static const FilterOperations& initialBackdropFilter() { static NeverDestroyed<FilterOperations> ops; return ops; }
 #endif
 #if ENABLE(CSS_COMPOSITING)
     static BlendMode initialBlendMode() { return BlendModeNormal; }
index 3be1d7b..ec2e287 100644 (file)
@@ -131,15 +131,15 @@ bool RenderSVGPath::shouldStrokeZeroLengthSubpath() const
 
 Path* RenderSVGPath::zeroLengthLinecapPath(const FloatPoint& linecapPosition) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Path, tempPath, ());
+    static NeverDestroyed<Path> tempPath;
 
-    tempPath.clear();
+    tempPath.get().clear();
     if (style().svgStyle().capStyle() == SquareCap)
-        tempPath.addRect(zeroLengthSubpathRect(linecapPosition, this->strokeWidth()));
+        tempPath.get().addRect(zeroLengthSubpathRect(linecapPosition, this->strokeWidth()));
     else
-        tempPath.addEllipse(zeroLengthSubpathRect(linecapPosition, this->strokeWidth()));
+        tempPath.get().addEllipse(zeroLengthSubpathRect(linecapPosition, this->strokeWidth()));
 
-    return &tempPath;
+    return &tempPath.get();
 }
 
 FloatRect RenderSVGPath::zeroLengthSubpathRect(const FloatPoint& linecapPosition, float strokeWidth) const
index 8228583..8a1ff5e 100644 (file)
@@ -187,12 +187,12 @@ void RenderSVGShape::layout()
 
 Path* RenderSVGShape::nonScalingStrokePath(const Path* path, const AffineTransform& strokeTransform) const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(Path, tempPath, ());
+    static NeverDestroyed<Path> tempPath;
 
-    tempPath = *path;
-    tempPath.transform(strokeTransform);
+    tempPath.get() = *path;
+    tempPath.get().transform(strokeTransform);
 
-    return &tempPath;
+    return &tempPath.get();
 }
 
 bool RenderSVGShape::setupNonScalingStrokeContext(AffineTransform& strokeTransform, GraphicsContextStateSaver& stateSaver)
index 8bc0a99..537fef9 100644 (file)
@@ -206,7 +206,7 @@ void SVGRenderingContext::prepareToRenderSVGContent(RenderElement& renderer, Pai
 
 static AffineTransform& currentContentTransformation()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AffineTransform, s_currentContentTransformation, ());
+    static NeverDestroyed<AffineTransform> s_currentContentTransformation;
     return s_currentContentTransformation;
 }
 
index e68ce38..2e1f2ab 100644 (file)
@@ -45,44 +45,44 @@ SVGResources::SVGResources()
 
 static HashSet<AtomicString>& clipperFilterMaskerTags()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ());
-    if (s_tagList.isEmpty()) {
+    static NeverDestroyed<HashSet<AtomicString>> s_tagList;
+    if (s_tagList.get().isEmpty()) {
         // "container elements": http://www.w3.org/TR/SVG11/intro.html#TermContainerElement
         // "graphics elements" : http://www.w3.org/TR/SVG11/intro.html#TermGraphicsElement
-        s_tagList.add(SVGNames::aTag.localName());
-        s_tagList.add(SVGNames::circleTag.localName());
-        s_tagList.add(SVGNames::ellipseTag.localName());
-        s_tagList.add(SVGNames::glyphTag.localName());
-        s_tagList.add(SVGNames::gTag.localName());
-        s_tagList.add(SVGNames::imageTag.localName());
-        s_tagList.add(SVGNames::lineTag.localName());
-        s_tagList.add(SVGNames::markerTag.localName());
-        s_tagList.add(SVGNames::maskTag.localName());
-        s_tagList.add(SVGNames::missing_glyphTag.localName());
-        s_tagList.add(SVGNames::pathTag.localName());
-        s_tagList.add(SVGNames::polygonTag.localName());
-        s_tagList.add(SVGNames::polylineTag.localName());
-        s_tagList.add(SVGNames::rectTag.localName());
-        s_tagList.add(SVGNames::svgTag.localName());
-        s_tagList.add(SVGNames::textTag.localName());
-        s_tagList.add(SVGNames::useTag.localName());
+        s_tagList.get().add(SVGNames::aTag.localName());
+        s_tagList.get().add(SVGNames::circleTag.localName());
+        s_tagList.get().add(SVGNames::ellipseTag.localName());
+        s_tagList.get().add(SVGNames::glyphTag.localName());
+        s_tagList.get().add(SVGNames::gTag.localName());
+        s_tagList.get().add(SVGNames::imageTag.localName());
+        s_tagList.get().add(SVGNames::lineTag.localName());
+        s_tagList.get().add(SVGNames::markerTag.localName());
+        s_tagList.get().add(SVGNames::maskTag.localName());
+        s_tagList.get().add(SVGNames::missing_glyphTag.localName());
+        s_tagList.get().add(SVGNames::pathTag.localName());
+        s_tagList.get().add(SVGNames::polygonTag.localName());
+        s_tagList.get().add(SVGNames::polylineTag.localName());
+        s_tagList.get().add(SVGNames::rectTag.localName());
+        s_tagList.get().add(SVGNames::svgTag.localName());
+        s_tagList.get().add(SVGNames::textTag.localName());
+        s_tagList.get().add(SVGNames::useTag.localName());
 
         // Not listed in the definitions is the clipPath element, the SVG spec says though:
         // The "clipPath" element or any of its children can specify property "clip-path".
         // So we have to add clipPathTag here, otherwhise clip-path on clipPath will fail.
         // (Already mailed SVG WG, waiting for a solution)
-        s_tagList.add(SVGNames::clipPathTag.localName());
+        s_tagList.get().add(SVGNames::clipPathTag.localName());
 
         // Not listed in the definitions are the text content elements, though filter/clipper/masker on tspan/text/.. is allowed.
         // (Already mailed SVG WG, waiting for a solution)
-        s_tagList.add(SVGNames::altGlyphTag.localName());
-        s_tagList.add(SVGNames::textPathTag.localName());
-        s_tagList.add(SVGNames::trefTag.localName());
-        s_tagList.add(SVGNames::tspanTag.localName());
+        s_tagList.get().add(SVGNames::altGlyphTag.localName());
+        s_tagList.get().add(SVGNames::textPathTag.localName());
+        s_tagList.get().add(SVGNames::trefTag.localName());
+        s_tagList.get().add(SVGNames::tspanTag.localName());
 
         // Not listed in the definitions is the foreignObject element, but clip-path
         // is a supported attribute.
-        s_tagList.add(SVGNames::foreignObjectTag.localName());
+        s_tagList.get().add(SVGNames::foreignObjectTag.localName());
 
         // Elements that we ignore, as it doesn't make any sense.
         // defs, pattern, switch (FIXME: Mail SVG WG about these)
@@ -94,12 +94,12 @@ static HashSet<AtomicString>& clipperFilterMaskerTags()
 
 static HashSet<AtomicString>& markerTags()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ());
-    if (s_tagList.isEmpty()) {
-        s_tagList.add(SVGNames::lineTag.localName());
-        s_tagList.add(SVGNames::pathTag.localName());
-        s_tagList.add(SVGNames::polygonTag.localName());
-        s_tagList.add(SVGNames::polylineTag.localName());
+    static NeverDestroyed<HashSet<AtomicString>> s_tagList;
+    if (s_tagList.get().isEmpty()) {
+        s_tagList.get().add(SVGNames::lineTag.localName());
+        s_tagList.get().add(SVGNames::pathTag.localName());
+        s_tagList.get().add(SVGNames::polygonTag.localName());
+        s_tagList.get().add(SVGNames::polylineTag.localName());
     }
 
     return s_tagList;
@@ -107,20 +107,20 @@ static HashSet<AtomicString>& markerTags()
 
 static HashSet<AtomicString>& fillAndStrokeTags()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ());
-    if (s_tagList.isEmpty()) {
-        s_tagList.add(SVGNames::altGlyphTag.localName());
-        s_tagList.add(SVGNames::circleTag.localName());
-        s_tagList.add(SVGNames::ellipseTag.localName());
-        s_tagList.add(SVGNames::lineTag.localName());
-        s_tagList.add(SVGNames::pathTag.localName());
-        s_tagList.add(SVGNames::polygonTag.localName());
-        s_tagList.add(SVGNames::polylineTag.localName());
-        s_tagList.add(SVGNames::rectTag.localName());
-        s_tagList.add(SVGNames::textTag.localName());
-        s_tagList.add(SVGNames::textPathTag.localName());
-        s_tagList.add(SVGNames::trefTag.localName());
-        s_tagList.add(SVGNames::tspanTag.localName());
+    static NeverDestroyed<HashSet<AtomicString>> s_tagList;
+    if (s_tagList.get().isEmpty()) {
+        s_tagList.get().add(SVGNames::altGlyphTag.localName());
+        s_tagList.get().add(SVGNames::circleTag.localName());
+        s_tagList.get().add(SVGNames::ellipseTag.localName());
+        s_tagList.get().add(SVGNames::lineTag.localName());
+        s_tagList.get().add(SVGNames::pathTag.localName());
+        s_tagList.get().add(SVGNames::polygonTag.localName());
+        s_tagList.get().add(SVGNames::polylineTag.localName());
+        s_tagList.get().add(SVGNames::rectTag.localName());
+        s_tagList.get().add(SVGNames::textTag.localName());
+        s_tagList.get().add(SVGNames::textPathTag.localName());
+        s_tagList.get().add(SVGNames::trefTag.localName());
+        s_tagList.get().add(SVGNames::tspanTag.localName());
     }
 
     return s_tagList;
@@ -128,12 +128,12 @@ static HashSet<AtomicString>& fillAndStrokeTags()
 
 static HashSet<AtomicString>& chainableResourceTags()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ());
-    if (s_tagList.isEmpty()) {
-        s_tagList.add(SVGNames::linearGradientTag.localName());
-        s_tagList.add(SVGNames::filterTag.localName());
-        s_tagList.add(SVGNames::patternTag.localName());
-        s_tagList.add(SVGNames::radialGradientTag.localName());
+    static NeverDestroyed<HashSet<AtomicString>> s_tagList;
+    if (s_tagList.get().isEmpty()) {
+        s_tagList.get().add(SVGNames::linearGradientTag.localName());
+        s_tagList.get().add(SVGNames::filterTag.localName());
+        s_tagList.get().add(SVGNames::patternTag.localName());
+        s_tagList.get().add(SVGNames::radialGradientTag.localName());
     }
 
     return s_tagList;
index 588f277..9a694da 100644 (file)
@@ -25,6 +25,7 @@
 #include "ExceptionCode.h"
 #include "SVGParserUtilities.h"
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringView.h>
 
 namespace WebCore {
@@ -112,16 +113,16 @@ String SVGAngle::valueAsString() const
 {
     switch (m_unitType) {
     case SVG_ANGLETYPE_DEG: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(String, degString, (ASCIILiteral("deg")));
-        return String::number(m_valueInSpecifiedUnits) + degString;
+        static NeverDestroyed<String> degString(ASCIILiteral("deg"));
+        return String::number(m_valueInSpecifiedUnits) + degString.get();
     }
     case SVG_ANGLETYPE_RAD: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(String, radString, (ASCIILiteral("rad")));
-        return String::number(m_valueInSpecifiedUnits) + radString;
+        static NeverDestroyed<String> radString(ASCIILiteral("rad"));
+        return String::number(m_valueInSpecifiedUnits) + radString.get();
     }
     case SVG_ANGLETYPE_GRAD: {
-        DEPRECATED_DEFINE_STATIC_LOCAL(String, gradString, (ASCIILiteral("grad")));
-        return String::number(m_valueInSpecifiedUnits) + gradString;
+        static NeverDestroyed<String> gradString(ASCIILiteral("grad"));
+        return String::number(m_valueInSpecifiedUnits) + gradString.get();
     }
     case SVG_ANGLETYPE_UNSPECIFIED:
     case SVG_ANGLETYPE_UNKNOWN:
index d4492ad..0fb6d2b 100644 (file)
@@ -39,7 +39,7 @@ Ref<SVGAnimateColorElement> SVGAnimateColorElement::create(const QualifiedName&
 
 static bool attributeValueIsCurrentColor(const String& value)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, currentColor, ("currentColor", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> currentColor("currentColor", AtomicString::ConstructFromLiteral);
     return value == currentColor;
 }
 
index 496c2f3..79c04e8 100644 (file)
@@ -108,8 +108,8 @@ void SVGAnimateMotionElement::parseAttribute(const QualifiedName& name, const At
     
 SVGAnimateMotionElement::RotateMode SVGAnimateMotionElement::rotateMode() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, autoVal, ("auto", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, autoReverse, ("auto-reverse", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> autoVal("auto", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> autoReverse("auto-reverse", AtomicString::ConstructFromLiteral);
     const AtomicString& rotate = getAttribute(SVGNames::rotateAttr);
     if (rotate == autoVal)
         return RotateAuto;
index 34628ad..eb1243e 100644 (file)
@@ -286,10 +286,10 @@ void SVGAnimationElement::updateAnimationMode()
 
 void SVGAnimationElement::setCalcMode(const AtomicString& calcMode)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, discrete, ("discrete", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, linear, ("linear", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, paced, ("paced", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, spline, ("spline", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> discrete("discrete", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> linear("linear", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> paced("paced", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> spline("spline", AtomicString::ConstructFromLiteral);
     if (calcMode == discrete)
         setCalcMode(CalcModeDiscrete);
     else if (calcMode == linear)
@@ -304,8 +304,8 @@ void SVGAnimationElement::setCalcMode(const AtomicString& calcMode)
 
 void SVGAnimationElement::setAttributeType(const AtomicString& attributeType)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, css, ("CSS", AtomicString::ConstructFromLiteral));
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, xml, ("XML", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> css("CSS", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<const AtomicString> xml("XML", AtomicString::ConstructFromLiteral);
     if (attributeType == css)
         m_attributeType = AttributeTypeCSS;
     else if (attributeType == xml)
@@ -332,14 +332,14 @@ String SVGAnimationElement::fromValue() const
 
 bool SVGAnimationElement::isAdditive() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> sum("sum", AtomicString::ConstructFromLiteral);
     const AtomicString& value = fastGetAttribute(SVGNames::additiveAttr);
     return value == sum || animationMode() == ByAnimation;
 }
 
 bool SVGAnimationElement::isAccumulated() const
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> sum("sum", AtomicString::ConstructFromLiteral);
     const AtomicString& value = fastGetAttribute(SVGNames::accumulateAttr);
     return value == sum && animationMode() != ToAnimation;
 }
@@ -656,7 +656,7 @@ void SVGAnimationElement::adjustForInheritance(SVGElement* targetElement, const
 
 static bool inheritsFromProperty(SVGElement*, const QualifiedName& attributeName, const String& value)
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, inherit, ("inherit", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<const AtomicString> inherit("inherit", AtomicString::ConstructFromLiteral);
     
     if (value.isEmpty() || value != inherit)
         return false;
index 1faea53..ddf9264 100644 (file)
@@ -75,25 +75,25 @@ Ref<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(const Qualifi
 
 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGKernelUnitLengthX", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
 const AtomicString& SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthY", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGKernelUnitLengthY", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
 const AtomicString& SVGFEConvolveMatrixElement::orderXIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGOrderX", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGOrderX", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
 const AtomicString& SVGFEConvolveMatrixElement::orderYIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGOrderY", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGOrderY", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
index ba2a3d4..12fa0bb 100644 (file)
@@ -63,13 +63,13 @@ Ref<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(const Quali
 
 const AtomicString& SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGKernelUnitLengthX", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
 const AtomicString& SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthY", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGKernelUnitLengthY", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
index aee08dd..f93dacd 100644 (file)
@@ -62,13 +62,13 @@ Ref<SVGFEDropShadowElement> SVGFEDropShadowElement::create(const QualifiedName&
 
 const AtomicString& SVGFEDropShadowElement::stdDeviationXIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGStdDeviationX", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGStdDeviationX", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
 const AtomicString& SVGFEDropShadowElement::stdDeviationYIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGStdDeviationY", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGStdDeviationY", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
index 22c178b..7b21de8 100644 (file)
@@ -57,13 +57,13 @@ Ref<SVGFEGaussianBlurElement> SVGFEGaussianBlurElement::create(const QualifiedNa
 
 const AtomicString& SVGFEGaussianBlurElement::stdDeviationXIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGStdDeviationX", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGStdDeviationX", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
 const AtomicString& SVGFEGaussianBlurElement::stdDeviationYIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGStdDeviationY", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGStdDeviationY", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
index 59f07d2..3370e18 100644 (file)
@@ -56,13 +56,13 @@ Ref<SVGFEMorphologyElement> SVGFEMorphologyElement::create(const QualifiedName&
 
 const AtomicString& SVGFEMorphologyElement::radiusXIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGRadiusX", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGRadiusX", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }
 
 const AtomicString& SVGFEMorphologyElement::radiusYIdentifier()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGRadiusY", AtomicString::ConstructFromLiteral));
+    static NeverDestroyed<AtomicString> s_identifier("SVGRadiusY", AtomicString::ConstructFromLiteral);
     return s_identifier;
 }