https://bugs.webkit.org/show_bug.cgi?id=121883
Windows is experiencing crashes when client programs (such as
DumpRenderTree) attemp to change settings on the RuntimeEnabledFeatures
object. The inlined static accessor methods are not accessing
memory safely (when compiled by Visual Studio) resulting in
crashes.
Reviewed by Jer Noble.
* WebCore.exp.in: Remove static accessors for RuntimeEnabledFeatures.
* bindings/generic/RuntimeEnabledFeatures.cpp: Switch methods to
conform to a singleton pattern.
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::sharedRuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::fileSystemEnabled):
(WebCore::RuntimeEnabledFeatures::javaScriptI18NAPIEnabled):
(WebCore::RuntimeEnabledFeatures::audioEnabled):
(WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled):
(WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled):
(WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled):
(WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled):
(WebCore::RuntimeEnabledFeatures::mediaControllerEnabled):
(WebCore::RuntimeEnabledFeatures::mediaErrorEnabled):
(WebCore::RuntimeEnabledFeatures::timeRangesEnabled):
(WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled):
(WebCore::RuntimeEnabledFeatures::webSocketEnabled):
(WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
(WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
* bindings/generic/RuntimeEnabledFeatures.h: Ditto.
(WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
(WebCore::RuntimeEnabledFeatures::localStorageEnabled):
(WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
(WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled):
(WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
(WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
(WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled):
(WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled):
(WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
(WebCore::RuntimeEnabledFeatures::geolocationEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitIndexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::webkitIndexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
(WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
(WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled):
(WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled):
(WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
(WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
(WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
(WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
(WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled):
(WebCore::RuntimeEnabledFeatures::cssCompositingEnabled):
(WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
(WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitFullScreenAPIEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitFullScreenAPIEnabled):
(WebCore::RuntimeEnabledFeatures::webkitRequestFullScreenEnabled):
(WebCore::RuntimeEnabledFeatures::webkitIsFullScreenEnabled):
(WebCore::RuntimeEnabledFeatures::webkitFullScreenKeyboardInputAllowedEnabled):
(WebCore::RuntimeEnabledFeatures::webkitCurrentFullScreenElementEnabled):
(WebCore::RuntimeEnabledFeatures::webkitCancelFullScreenEnabled):
(WebCore::RuntimeEnabledFeatures::webkitFullscreenEnabledEnabled):
(WebCore::RuntimeEnabledFeatures::webkitFullscreenElementEnabled):
(WebCore::RuntimeEnabledFeatures::webkitExitFullscreenEnabled):
(WebCore::RuntimeEnabledFeatures::webkitRequestFullscreenEnabled):
(WebCore::RuntimeEnabledFeatures::touchEnabled):
(WebCore::RuntimeEnabledFeatures::setTouchEnabled):
(WebCore::RuntimeEnabledFeatures::setDeviceMotionEnabled):
(WebCore::RuntimeEnabledFeatures::deviceMotionEnabled):
(WebCore::RuntimeEnabledFeatures::deviceMotionEventEnabled):
(WebCore::RuntimeEnabledFeatures::ondevicemotionEnabled):
(WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
(WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
(WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
(WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
(WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
(WebCore::RuntimeEnabledFeatures::speechInputEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled):
(WebCore::RuntimeEnabledFeatures::setScriptedSpeechEnabled):
(WebCore::RuntimeEnabledFeatures::scriptedSpeechEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionErrorEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarEnabled):
(WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarListEnabled):
(WebCore::RuntimeEnabledFeatures::setFileSystemEnabled):
(WebCore::RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled):
(WebCore::RuntimeEnabledFeatures::mediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled):
(WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::setLegacyCSSVendorPrefixesEnabled):
(WebCore::RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
(WebCore::RuntimeEnabledFeatures::quotaEnabled):
(WebCore::RuntimeEnabledFeatures::setQuotaEnabled):
(WebCore::RuntimeEnabledFeatures::mediaSourceEnabled):
(WebCore::RuntimeEnabledFeatures::setMediaSourceEnabled):
(WebCore::RuntimeEnabledFeatures::encryptedMediaEnabled):
(WebCore::RuntimeEnabledFeatures::setEncryptedMediaEnabled):
(WebCore::RuntimeEnabledFeatures::webkitVideoTrackEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitVideoTrackEnabled):
(WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
(WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
(WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
(WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
(WebCore::RuntimeEnabledFeatures::customDOMElementsEnabled):
(WebCore::RuntimeEnabledFeatures::setCustomDOMElements):
(WebCore::RuntimeEnabledFeatures::styleScopedEnabled):
(WebCore::RuntimeEnabledFeatures::setStyleScopedEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled):
(WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled):
(WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled):
(WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
(WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
(WebCore::RuntimeEnabledFeatures::seamlessIFramesEnabled):
(WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled):
(WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
(WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::getCSSPropertyNamePrefix): Use singleton accessors.
(WebCore::cssPropertyIDForJSCSSPropertyName): Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(GetRuntimeEnableFunctionName): Generate singleton version of
accessors.
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::fontLoaded): Use singleton accessors.
(WebCore::CSSFontFace::getFontData): Ditto.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Ditto.
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID): Ditto.
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::fontLoaded): Ditto.
* css/StyleResolver.h:
(WebCore::StyleResolver::ensureScopeResolver): Ditto.
* dom/Document.cpp:
(WebCore::Document::cssRegionsEnabled): Ditto.
(WebCore::Document::cssCompositingEnabled):
(WebCore::Document::shouldDisplaySeamlesslyWithParent):
(WebCore::Document::getCachedLocale):
* dom/Element.cpp:
(WebCore::Element::createShadowRoot): Ditto.
* dom/Position.cpp:
(WebCore::Position::Position): Ditto.
(WebCore::Position::findParent):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getSelection): Ditto.
* dom/make_names.pl:
(printConstructorInterior): Generate singleton version of accessors.
(printWrapperFunctions): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isSpeechEnabled): Use singleton accessors.
(WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
(WebCore::HTMLMediaElement::scheduleDelayedAction):
(WebCore::HTMLMediaElement::loadTimerFired):
(WebCore::HTMLMediaElement::prepareForLoad):
(WebCore::HTMLMediaElement::loadInternal):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::playbackProgressTimerFired):
(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
(WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
(WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack):
(WebCore::HTMLMediaElement::addAudioTrack):
(WebCore::HTMLMediaElement::addTextTrack):
(WebCore::HTMLMediaElement::addVideoTrack):
(WebCore::HTMLMediaElement::removeAudioTrack):
(WebCore::HTMLMediaElement::removeTextTrack):
(WebCore::HTMLMediaElement::removeVideoTrack):
(WebCore::HTMLMediaElement::audioTracks):
(WebCore::HTMLMediaElement::textTracks):
(WebCore::HTMLMediaElement::videoTracks):
(WebCore::HTMLMediaElement::didAddTextTrack):
(WebCore::HTMLMediaElement::didRemoveTextTrack):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::userCancelledLoad):
(WebCore::HTMLMediaElement::hasClosedCaptions):
(WebCore::HTMLMediaElement::setClosedCaptionsVisible):
(WebCore::HTMLMediaElement::configureTextTrackDisplay):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute): Ditto.
(WebCore::HTMLStyleElement::scopedAttributeChanged):
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
(WebCore::HTMLStyleElement::scoped):
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::parseAttribute): Ditto.
(WebCore::HTMLTrackElement::scheduleLoad):
(WebCore::HTMLTrackElement::canLoadUrl):
* html/InputType.cpp:
(WebCore::createInputTypeFactoryMap): Ditto.
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Ditto.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Ditto.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): Ditto.
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShadowDOMEnabled):
(WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled):
(WebCore::InternalSettings::setStyleScopedEnabled):
(WebCore::InternalSettings::setCSSExclusionsEnabled):
(WebCore::InternalSettings::setCSSShapesEnabled):
(WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
../WebKit: [Windows] Refactor RuntimeEnabledFeatures as a Singleton
https://bugs.webkit.org/show_bug.cgi?id=121883
Reviewed by Jer Noble.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Expose singleton accessor for DLL clients.
../WebKit/blackberry: Refactor RuntimeEnabledFeatures as a Singleton.
https://bugs.webkit.org/show_bug.cgi?id=121883.
Reviewed by Jer Noble.
* WebKitSupport/DumpRenderTreeSupport.cpp:
(DumpRenderTreeSupport::setStyleScopedEnabled): use
singleton accessor.
../WebKit/efl: Refactor RuntimeEnabledFeatures as a Singleton.
https://bugs.webkit.org/show_bug.cgi?id=121883.
Reviewed by Jer Noble.
* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::setCSSRegionsEnabled): Use singleton.
(DumpRenderTreeSupportEfl::setSeamlessIFramesEnabled): Ditto.
* ewk/ewk_settings.cpp:
(ewk_settings_shadow_dom_enable_get): Ditto.
(ewk_settings_shadow_dom_enable_set):
* ewk/ewk_view.cpp:
(_ewk_view_priv_new): Ditto.
../WebKit/gtk: Refactor RuntimeEnabledFeatures as a Singleton.
https://bugs.webkit.org/show_bug.cgi?id=121883.
Reviewed by Jer Noble.
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setCSSRegionsEnabled): Use singleton.
(DumpRenderTreeSupportGtk::setExperimentalContentSecurityPolicyFeaturesEnabled):
(DumpRenderTreeSupportGtk::setSeamlessIFramesEnabled):
(DumpRenderTreeSupportGtk::setShadowDOMEnabled):
(DumpRenderTreeSupportGtk::setStyleScopedEnabled):
* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings): Ditto.
../WebKit/mac: Refactor RuntimeEnabledFeatures as a Singleton.
https://bugs.webkit.org/show_bug.cgi?id=121883.
Reviewed by Jer Noble.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Use singleton accessor.
(-[WebView _setDashboardBehavior:to:]): Ditto.
../WebKit/qt: Refactor RuntimeEnabledFeatures as a Singleton.
https://bugs.webkit.org/show_bug.cgi?id=121883.
Reviewed by Jer Noble.
* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply): Use singleton accessor.
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::setSeamlessIFramesEnabled): Ditto.
../WebKit/win: [Windows] Refactor RuntimeEnabledFeatures as a Singleton.
https://bugs.webkit.org/show_bug.cgi?id=121883
Reviewed by Jer Noble.
* WebView.cpp:
(WebView::notifyPreferencesChanged): Use singleton accessor
../WebKit2: Refactor RuntimeEnabledFeatures as a Singleton.
https://bugs.webkit.org/show_bug.cgi?id=121883.
Reviewed by Jer Noble.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Use
Singleton accessor.
(WebKit::InjectedBundle::setShadowDOMEnabled):
(WebKit::InjectedBundle::setCSSRegionsEnabled):
(WebKit::InjectedBundle::setCSSCompositingEnabled):
(WebKit::InjectedBundle::setSeamlessIFramesEnabled):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Ditto.
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156424
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-09-25 Brent Fulgham <bfulgham@apple.com>
+
+ [Windows] Refactor RuntimeEnabledFeatures as a Singleton
+ https://bugs.webkit.org/show_bug.cgi?id=121883
+
+ Windows is experiencing crashes when client programs (such as
+ DumpRenderTree) attemp to change settings on the RuntimeEnabledFeatures
+ object. The inlined static accessor methods are not accessing
+ memory safely (when compiled by Visual Studio) resulting in
+ crashes.
+
+ Reviewed by Jer Noble.
+
+ * WebCore.exp.in: Remove static accessors for RuntimeEnabledFeatures.
+ * bindings/generic/RuntimeEnabledFeatures.cpp: Switch methods to
+ conform to a singleton pattern.
+ (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
+ (WebCore::RuntimeEnabledFeatures::sharedRuntimeEnabledFeatures):
+ (WebCore::RuntimeEnabledFeatures::fileSystemEnabled):
+ (WebCore::RuntimeEnabledFeatures::javaScriptI18NAPIEnabled):
+ (WebCore::RuntimeEnabledFeatures::audioEnabled):
+ (WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::mediaControllerEnabled):
+ (WebCore::RuntimeEnabledFeatures::mediaErrorEnabled):
+ (WebCore::RuntimeEnabledFeatures::timeRangesEnabled):
+ (WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled):
+ (WebCore::RuntimeEnabledFeatures::webSocketEnabled):
+ (WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
+ (WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
+ * bindings/generic/RuntimeEnabledFeatures.h: Ditto.
+ (WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::localStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled):
+ (WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
+ (WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
+ (WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled):
+ (WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled):
+ (WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
+ (WebCore::RuntimeEnabledFeatures::geolocationEnabled):
+ (WebCore::RuntimeEnabledFeatures::setWebkitIndexedDBEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitIndexedDBEnabled):
+ (WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
+ (WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
+ (WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
+ (WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled):
+ (WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled):
+ (WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
+ (WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
+ (WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
+ (WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
+ (WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled):
+ (WebCore::RuntimeEnabledFeatures::cssCompositingEnabled):
+ (WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
+ (WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitFullScreenAPIEnabled):
+ (WebCore::RuntimeEnabledFeatures::setWebkitFullScreenAPIEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitRequestFullScreenEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitIsFullScreenEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitFullScreenKeyboardInputAllowedEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitCurrentFullScreenElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitCancelFullScreenEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitFullscreenEnabledEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitFullscreenElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitExitFullscreenEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitRequestFullscreenEnabled):
+ (WebCore::RuntimeEnabledFeatures::touchEnabled):
+ (WebCore::RuntimeEnabledFeatures::setTouchEnabled):
+ (WebCore::RuntimeEnabledFeatures::setDeviceMotionEnabled):
+ (WebCore::RuntimeEnabledFeatures::deviceMotionEnabled):
+ (WebCore::RuntimeEnabledFeatures::deviceMotionEventEnabled):
+ (WebCore::RuntimeEnabledFeatures::ondevicemotionEnabled):
+ (WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
+ (WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
+ (WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
+ (WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
+ (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
+ (WebCore::RuntimeEnabledFeatures::speechInputEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled):
+ (WebCore::RuntimeEnabledFeatures::setScriptedSpeechEnabled):
+ (WebCore::RuntimeEnabledFeatures::scriptedSpeechEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionErrorEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarListEnabled):
+ (WebCore::RuntimeEnabledFeatures::setFileSystemEnabled):
+ (WebCore::RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled):
+ (WebCore::RuntimeEnabledFeatures::mediaStreamEnabled):
+ (WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
+ (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
+ (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
+ (WebCore::RuntimeEnabledFeatures::setLegacyCSSVendorPrefixesEnabled):
+ (WebCore::RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled):
+ (WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
+ (WebCore::RuntimeEnabledFeatures::quotaEnabled):
+ (WebCore::RuntimeEnabledFeatures::setQuotaEnabled):
+ (WebCore::RuntimeEnabledFeatures::mediaSourceEnabled):
+ (WebCore::RuntimeEnabledFeatures::setMediaSourceEnabled):
+ (WebCore::RuntimeEnabledFeatures::encryptedMediaEnabled):
+ (WebCore::RuntimeEnabledFeatures::setEncryptedMediaEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitVideoTrackEnabled):
+ (WebCore::RuntimeEnabledFeatures::setWebkitVideoTrackEnabled):
+ (WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
+ (WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
+ (WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::customDOMElementsEnabled):
+ (WebCore::RuntimeEnabledFeatures::setCustomDOMElements):
+ (WebCore::RuntimeEnabledFeatures::styleScopedEnabled):
+ (WebCore::RuntimeEnabledFeatures::setStyleScopedEnabled):
+ (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled):
+ (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled):
+ (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled):
+ (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled):
+ (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled):
+ (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled):
+ (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled):
+ (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled):
+ (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled):
+ (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled):
+ (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled):
+ (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled):
+ (WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
+ (WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
+ (WebCore::RuntimeEnabledFeatures::seamlessIFramesEnabled):
+ (WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled):
+ (WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
+ (WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
+ * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+ (WebCore::getCSSPropertyNamePrefix): Use singleton accessors.
+ (WebCore::cssPropertyIDForJSCSSPropertyName): Ditto.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GetRuntimeEnableFunctionName): Generate singleton version of
+ accessors.
+ * css/CSSFontFace.cpp:
+ (WebCore::CSSFontFace::fontLoaded): Use singleton accessors.
+ (WebCore::CSSFontFace::getFontData): Ditto.
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::addFontFaceRule): Ditto.
+ * css/CSSParser.cpp:
+ (WebCore::isSimpleLengthPropertyID): Ditto.
+ (WebCore::isValidKeywordPropertyAndValue):
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::rewriteSpecifiers):
+ * css/CSSSegmentedFontFace.cpp:
+ (WebCore::CSSSegmentedFontFace::fontLoaded): Ditto.
+ * css/StyleResolver.h:
+ (WebCore::StyleResolver::ensureScopeResolver): Ditto.
+ * dom/Document.cpp:
+ (WebCore::Document::cssRegionsEnabled): Ditto.
+ (WebCore::Document::cssCompositingEnabled):
+ (WebCore::Document::shouldDisplaySeamlesslyWithParent):
+ (WebCore::Document::getCachedLocale):
+ * dom/Element.cpp:
+ (WebCore::Element::createShadowRoot): Ditto.
+ * dom/Position.cpp:
+ (WebCore::Position::Position): Ditto.
+ (WebCore::Position::findParent):
+ * dom/TreeScope.cpp:
+ (WebCore::TreeScope::getSelection): Ditto.
+ * dom/make_names.pl:
+ (printConstructorInterior): Generate singleton version of accessors.
+ (printWrapperFunctions): Ditto.
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::isSpeechEnabled): Use singleton accessors.
+ (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
+ (WebCore::HTMLMediaElement::scheduleDelayedAction):
+ (WebCore::HTMLMediaElement::loadTimerFired):
+ (WebCore::HTMLMediaElement::prepareForLoad):
+ (WebCore::HTMLMediaElement::loadInternal):
+ (WebCore::HTMLMediaElement::setReadyState):
+ (WebCore::HTMLMediaElement::playbackProgressTimerFired):
+ (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
+ (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
+ (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack):
+ (WebCore::HTMLMediaElement::addAudioTrack):
+ (WebCore::HTMLMediaElement::addTextTrack):
+ (WebCore::HTMLMediaElement::addVideoTrack):
+ (WebCore::HTMLMediaElement::removeAudioTrack):
+ (WebCore::HTMLMediaElement::removeTextTrack):
+ (WebCore::HTMLMediaElement::removeVideoTrack):
+ (WebCore::HTMLMediaElement::audioTracks):
+ (WebCore::HTMLMediaElement::textTracks):
+ (WebCore::HTMLMediaElement::videoTracks):
+ (WebCore::HTMLMediaElement::didAddTextTrack):
+ (WebCore::HTMLMediaElement::didRemoveTextTrack):
+ (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
+ (WebCore::HTMLMediaElement::userCancelledLoad):
+ (WebCore::HTMLMediaElement::hasClosedCaptions):
+ (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
+ (WebCore::HTMLMediaElement::configureTextTrackDisplay):
+ * html/HTMLStyleElement.cpp:
+ (WebCore::HTMLStyleElement::parseAttribute): Ditto.
+ (WebCore::HTMLStyleElement::scopedAttributeChanged):
+ (WebCore::HTMLStyleElement::unregisterWithScopingNode):
+ (WebCore::HTMLStyleElement::scoped):
+ * html/HTMLTrackElement.cpp:
+ (WebCore::HTMLTrackElement::parseAttribute): Ditto.
+ (WebCore::HTMLTrackElement::scheduleLoad):
+ (WebCore::HTMLTrackElement::canLoadUrl):
+ * html/InputType.cpp:
+ (WebCore::createInputTypeFactoryMap): Ditto.
+ * page/ContentSecurityPolicy.cpp:
+ (WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Ditto.
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::addEventListener): Ditto.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::performPostLayoutTasks): Ditto.
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::Backup::Backup): Ditto.
+ (WebCore::InternalSettings::Backup::restoreTo):
+ (WebCore::InternalSettings::setShadowDOMEnabled):
+ (WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled):
+ (WebCore::InternalSettings::setStyleScopedEnabled):
+ (WebCore::InternalSettings::setCSSExclusionsEnabled):
+ (WebCore::InternalSettings::setCSSShapesEnabled):
+ (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
+
2013-09-25 Andreas Kling <akling@apple.com>
Unreviewed build fix for IDBDatabase.
__ZN7WebCore21setPlatformStrategiesEPNS_18PlatformStrategiesE
__ZN7WebCore22HTMLPlugInImageElement24restartSnapshottedPlugInEv
__ZN7WebCore22HTMLPlugInImageElement29setIsPrimarySnapshottedPlugInEb
-__ZN7WebCore22RuntimeEnabledFeatures23isCSSCompositingEnabledE
-__ZN7WebCore22RuntimeEnabledFeatures22isCSSExclusionsEnabledE
-__ZN7WebCore22RuntimeEnabledFeatures18isCSSShapesEnabledE
-__ZN7WebCore22RuntimeEnabledFeatures40isLangAttributeAwareFormControlUIEnabledE
+__ZN7WebCore22RuntimeEnabledFeatures14sharedFeaturesEv
__ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv
__ZN7WebCore22StorageEventDispatcher34dispatchLocalStorageEventsToFramesERNS_9PageGroupERKN3WTF6VectorINS3_6RefPtrINS_5FrameEEELm0ENS3_15CrashOnOverflowEEERKNS3_6StringESE_SE_SE_PNS_14SecurityOriginE
__ZN7WebCore22URLWithUserTypedStringEP8NSStringP5NSURL
#endif
#if ENABLE(SHADOW_DOM)
-__ZN7WebCore22RuntimeEnabledFeatures18isShadowDOMEnabledE
-__ZN7WebCore22RuntimeEnabledFeatures37isAuthorShadowDOMForAnyElementEnabledE
__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ShadowRootE
#endif
__ZN7WebCore12WorkerThread17workerThreadCountEv
#endif
-#if ENABLE(CSS_REGIONS)
-__ZN7WebCore22RuntimeEnabledFeatures19isCSSRegionsEnabledE
-#endif
-
-#if ENABLE(IFRAME_SEAMLESS)
-__ZN7WebCore22RuntimeEnabledFeatures25areSeamlessIFramesEnabledE
-#endif
-
-#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
-__ZN7WebCore22RuntimeEnabledFeatures32isLegacyCSSVendorPrefixesEnabledE
-#endif
-
#if ENABLE(ENCRYPTED_MEDIA_V2)
__ZN7WebCore3CDM18registerCDMFactoryEPFN3WTF10PassOwnPtrINS_19CDMPrivateInterfaceEEEPS0_EPFbRKNS1_6StringEEPFbSA_SA_E
#endif
/*
* Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
#include "MediaPlayer.h"
#include "SharedWorkerRepository.h"
#include "WebSocket.h"
+#include <wtf/NeverDestroyed.h>
#if ENABLE(FILE_SYSTEM)
#include "AsyncFileSystem.h"
namespace WebCore {
-bool RuntimeEnabledFeatures::isLocalStorageEnabled = true;
-bool RuntimeEnabledFeatures::isSessionStorageEnabled = true;
-bool RuntimeEnabledFeatures::isWebkitNotificationsEnabled = false;
-bool RuntimeEnabledFeatures::isApplicationCacheEnabled = true;
-bool RuntimeEnabledFeatures::isDataTransferItemsEnabled = true;
-bool RuntimeEnabledFeatures::isGeolocationEnabled = true;
-bool RuntimeEnabledFeatures::isIndexedDBEnabled = false;
-bool RuntimeEnabledFeatures::isTouchEnabled = true;
-bool RuntimeEnabledFeatures::isDeviceMotionEnabled = true;
-bool RuntimeEnabledFeatures::isDeviceOrientationEnabled = true;
-bool RuntimeEnabledFeatures::isSpeechInputEnabled = true;
-bool RuntimeEnabledFeatures::isCanvasPathEnabled = false;
-bool RuntimeEnabledFeatures::isCSSExclusionsEnabled = true;
-bool RuntimeEnabledFeatures::isCSSShapesEnabled = true;
-bool RuntimeEnabledFeatures::isCSSRegionsEnabled = false;
-bool RuntimeEnabledFeatures::isCSSCompositingEnabled = false;
-bool RuntimeEnabledFeatures::isLangAttributeAwareFormControlUIEnabled = false;
-
+RuntimeEnabledFeatures::RuntimeEnabledFeatures()
+ : m_isLocalStorageEnabled(true)
+ , m_isSessionStorageEnabled(true)
+ , m_isWebkitNotificationsEnabled(false)
+ , m_isApplicationCacheEnabled(true)
+ , m_isDataTransferItemsEnabled(true)
+ , m_isGeolocationEnabled(true)
+ , m_isIndexedDBEnabled(false)
+ , m_isTouchEnabled(true)
+ , m_isDeviceMotionEnabled(true)
+ , m_isDeviceOrientationEnabled(true)
+ , m_isSpeechInputEnabled(true)
+ , m_isCanvasPathEnabled(false)
+ , m_isCSSExclusionsEnabled(true)
+ , m_isCSSShapesEnabled(true)
+ , m_isCSSRegionsEnabled(false)
+ , m_isCSSCompositingEnabled(false)
+ , m_isLangAttributeAwareFormControlUIEnabled(false)
#if ENABLE(SCRIPTED_SPEECH)
-bool RuntimeEnabledFeatures::isScriptedSpeechEnabled = false;
+ , m_isScriptedSpeechEnabled(false)
#endif
-
#if ENABLE(MEDIA_STREAM)
-bool RuntimeEnabledFeatures::isMediaStreamEnabled = true;
-bool RuntimeEnabledFeatures::isPeerConnectionEnabled = true;
+ , m_isMediaStreamEnabled(true)
+ , m_isPeerConnectionEnabled(true)
#endif
-
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
-bool RuntimeEnabledFeatures::isLegacyCSSVendorPrefixesEnabled = false;
+ , m_isLegacyCSSVendorPrefixesEnabled(false)
#endif
-
#if ENABLE(GAMEPAD)
-bool RuntimeEnabledFeatures::isGamepadEnabled = false;
+ , m_isGamepadEnabled(false)
#endif
-
#if ENABLE(FILE_SYSTEM)
-bool RuntimeEnabledFeatures::isFileSystemEnabled = false;
+ , m_isFileSystemEnabled(false)
+#endif
+#if ENABLE(JAVASCRIPT_I18N_API)
+ , m_isJavaScriptI18NAPIEnabled(false)
+#endif
+#if ENABLE(QUOTA)
+ , m_isQuotaEnabled(false)
+#endif
+#if ENABLE(FULLSCREEN_API)
+ , m_isFullScreenAPIEnabled(true)
+#endif
+#if ENABLE(MEDIA_SOURCE)
+ , m_isMediaSourceEnabled(false)
+#endif
+#if ENABLE(VIDEO_TRACK)
+#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(BLACKBERRY) || PLATFORM(WIN) || PLATFORM(QT)
+ , m_isVideoTrackEnabled(true)
+#else
+ , m_isVideoTrackEnabled(false)
+#endif
+#endif
+#if ENABLE(ENCRYPTED_MEDIA)
+ , m_isEncryptedMediaEnabled(false)
+#endif
+#if ENABLE(SHADOW_DOM)
+ , m_isShadowDOMEnabled(false)
+ , m_isAuthorShadowDOMForAnyElementEnabled(false)
+#endif
+#if ENABLE(CUSTOM_ELEMENTS)
+ , m_isCustomDOMElementsEnabled(false)
+#endif
+#if ENABLE(STYLE_SCOPED)
+ , m_isStyleScopedEnabled(false)
+#endif
+#if ENABLE(INPUT_TYPE_DATE)
+ , m_isInputTypeDateEnabled(true)
+#endif
+#if ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE)
+ , m_isInputTypeDateTimeEnabled(false)
+#endif
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+ , m_isInputTypeDateTimeLocalEnabled(true)
+#endif
+#if ENABLE(INPUT_TYPE_MONTH)
+ , m_isInputTypeMonthEnabled(true)
+#endif
+#if ENABLE(INPUT_TYPE_TIME)
+ , m_isInputTypeTimeEnabled(true)
+#endif
+#if ENABLE(INPUT_TYPE_WEEK)
+ , m_isInputTypeWeekEnabled(true)
+#endif
+#if ENABLE(CSP_NEXT)
+ , m_areExperimentalContentSecurityPolicyFeaturesEnabled(false)
+#endif
+#if ENABLE(IFRAME_SEAMLESS)
+ , m_areSeamlessIFramesEnabled(false)
+#endif
+#if ENABLE(FONT_LOAD_EVENTS)
+ , m_isFontLoadEventsEnabled(false)
+#endif
+{
+}
+
+RuntimeEnabledFeatures& RuntimeEnabledFeatures::sharedFeatures()
+{
+ static NeverDestroyed<RuntimeEnabledFeatures> runtimeEnabledFeatures;
+ return runtimeEnabledFeatures;
+}
+
+#if ENABLE(FILE_SYSTEM)
bool RuntimeEnabledFeatures::fileSystemEnabled()
{
- return isFileSystemEnabled && AsyncFileSystem::isAvailable();
+ return m_isFileSystemEnabled && AsyncFileSystem::isAvailable();
}
#endif
#if ENABLE(JAVASCRIPT_I18N_API)
-bool RuntimeEnabledFeatures::isJavaScriptI18NAPIEnabled = false;
-
bool RuntimeEnabledFeatures::javaScriptI18NAPIEnabled()
{
- return isJavaScriptI18NAPIEnabled;
+ return m_isJavaScriptI18NAPIEnabled;
}
#endif
#if ENABLE(VIDEO)
-
-bool RuntimeEnabledFeatures::audioEnabled()
+bool RuntimeEnabledFeatures::audioEnabled() const
{
return MediaPlayer::isAvailable();
}
-bool RuntimeEnabledFeatures::htmlMediaElementEnabled()
+bool RuntimeEnabledFeatures::htmlMediaElementEnabled() const
{
return MediaPlayer::isAvailable();
}
-bool RuntimeEnabledFeatures::htmlAudioElementEnabled()
+bool RuntimeEnabledFeatures::htmlAudioElementEnabled() const
{
return MediaPlayer::isAvailable();
}
-bool RuntimeEnabledFeatures::htmlVideoElementEnabled()
+bool RuntimeEnabledFeatures::htmlVideoElementEnabled() const
{
return MediaPlayer::isAvailable();
}
-bool RuntimeEnabledFeatures::htmlSourceElementEnabled()
+bool RuntimeEnabledFeatures::htmlSourceElementEnabled() const
{
return MediaPlayer::isAvailable();
}
-bool RuntimeEnabledFeatures::mediaControllerEnabled()
+bool RuntimeEnabledFeatures::mediaControllerEnabled() const
{
return MediaPlayer::isAvailable();
}
-bool RuntimeEnabledFeatures::mediaErrorEnabled()
+bool RuntimeEnabledFeatures::mediaErrorEnabled() const
{
return MediaPlayer::isAvailable();
}
-bool RuntimeEnabledFeatures::timeRangesEnabled()
+bool RuntimeEnabledFeatures::timeRangesEnabled() const
{
return MediaPlayer::isAvailable();
}
-
#endif
#if ENABLE(SHARED_WORKERS)
-bool RuntimeEnabledFeatures::sharedWorkerEnabled()
+bool RuntimeEnabledFeatures::sharedWorkerEnabled() const
{
return SharedWorkerRepository::isAvailable();
}
#endif
#if ENABLE(WEB_SOCKETS)
-bool RuntimeEnabledFeatures::webSocketEnabled()
+bool RuntimeEnabledFeatures::webSocketEnabled() const
{
return WebSocket::isAvailable();
}
#endif
#if ENABLE(SQL_DATABASE)
-bool RuntimeEnabledFeatures::openDatabaseEnabled()
+bool RuntimeEnabledFeatures::openDatabaseEnabled() const
{
return DatabaseManager::manager().isAvailable();
}
-bool RuntimeEnabledFeatures::openDatabaseSyncEnabled()
+bool RuntimeEnabledFeatures::openDatabaseSyncEnabled() const
{
return DatabaseManager::manager().isAvailable();
}
#endif
-#if ENABLE(QUOTA)
-bool RuntimeEnabledFeatures::isQuotaEnabled = false;
-#endif
-
-#if ENABLE(FULLSCREEN_API)
-bool RuntimeEnabledFeatures::isFullScreenAPIEnabled = true;
-#endif
-
-#if ENABLE(MEDIA_SOURCE)
-bool RuntimeEnabledFeatures::isMediaSourceEnabled = false;
-#endif
-
-#if ENABLE(VIDEO_TRACK)
-#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(BLACKBERRY) || PLATFORM(WIN) || PLATFORM(QT)
- bool RuntimeEnabledFeatures::isVideoTrackEnabled = true;
-#else
- bool RuntimeEnabledFeatures::isVideoTrackEnabled = false;
-#endif
-#endif
-
-#if ENABLE(ENCRYPTED_MEDIA)
-bool RuntimeEnabledFeatures::isEncryptedMediaEnabled = false;
-#endif
-
-#if ENABLE(SHADOW_DOM)
-bool RuntimeEnabledFeatures::isShadowDOMEnabled = false;
-
-bool RuntimeEnabledFeatures::isAuthorShadowDOMForAnyElementEnabled = false;
-#endif
-
-#if ENABLE(CUSTOM_ELEMENTS)
-bool RuntimeEnabledFeatures::isCustomDOMElementsEnabled = false;
-#endif
-
-#if ENABLE(STYLE_SCOPED)
-bool RuntimeEnabledFeatures::isStyleScopedEnabled = false;
-#endif
-
-#if ENABLE(INPUT_TYPE_DATE)
-bool RuntimeEnabledFeatures::isInputTypeDateEnabled = true;
-#endif
-
-#if ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE)
-bool RuntimeEnabledFeatures::isInputTypeDateTimeEnabled = false;
-#endif
-
-#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
-bool RuntimeEnabledFeatures::isInputTypeDateTimeLocalEnabled = true;
-#endif
-
-#if ENABLE(INPUT_TYPE_MONTH)
-bool RuntimeEnabledFeatures::isInputTypeMonthEnabled = true;
-#endif
-
-#if ENABLE(INPUT_TYPE_TIME)
-bool RuntimeEnabledFeatures::isInputTypeTimeEnabled = true;
-#endif
-
-#if ENABLE(INPUT_TYPE_WEEK)
-bool RuntimeEnabledFeatures::isInputTypeWeekEnabled = true;
-#endif
-
-#if ENABLE(CSP_NEXT)
-bool RuntimeEnabledFeatures::areExperimentalContentSecurityPolicyFeaturesEnabled = false;
-#endif
-
-#if ENABLE(IFRAME_SEAMLESS)
-bool RuntimeEnabledFeatures::areSeamlessIFramesEnabled = false;
-#endif
-
-#if ENABLE(FONT_LOAD_EVENTS)
-bool RuntimeEnabledFeatures::isFontLoadEventsEnabled = false;
-#endif
-
} // namespace WebCore
/*
* Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
#define RuntimeEnabledFeatures_h
#include "PlatformExportMacros.h"
+#include <wtf/NeverDestroyed.h>
namespace WebCore {
// generation to work properly.
class RuntimeEnabledFeatures {
+ WTF_MAKE_NONCOPYABLE(RuntimeEnabledFeatures);
public:
- static void setLocalStorageEnabled(bool isEnabled) { isLocalStorageEnabled = isEnabled; }
- static bool localStorageEnabled() { return isLocalStorageEnabled; }
+ void setLocalStorageEnabled(bool isEnabled) { m_isLocalStorageEnabled = isEnabled; }
+ bool localStorageEnabled() const { return m_isLocalStorageEnabled; }
- static void setSessionStorageEnabled(bool isEnabled) { isSessionStorageEnabled = isEnabled; }
- static bool sessionStorageEnabled() { return isSessionStorageEnabled; }
+ void setSessionStorageEnabled(bool isEnabled) { m_isSessionStorageEnabled = isEnabled; }
+ bool sessionStorageEnabled() const { return m_isSessionStorageEnabled; }
- static void setWebkitNotificationsEnabled(bool isEnabled) { isWebkitNotificationsEnabled = isEnabled; }
- static bool webkitNotificationsEnabled() { return isWebkitNotificationsEnabled; }
+ void setWebkitNotificationsEnabled(bool isEnabled) { m_isWebkitNotificationsEnabled = isEnabled; }
+ bool webkitNotificationsEnabled() const { return m_isWebkitNotificationsEnabled; }
- static void setApplicationCacheEnabled(bool isEnabled) { isApplicationCacheEnabled = isEnabled; }
- static bool applicationCacheEnabled() { return isApplicationCacheEnabled; }
+ void setApplicationCacheEnabled(bool isEnabled) { m_isApplicationCacheEnabled = isEnabled; }
+ bool applicationCacheEnabled() const { return m_isApplicationCacheEnabled; }
- static void setDataTransferItemsEnabled(bool isEnabled) { isDataTransferItemsEnabled = isEnabled; }
- static bool dataTransferItemsEnabled() { return isDataTransferItemsEnabled; }
+ void setDataTransferItemsEnabled(bool isEnabled) { m_isDataTransferItemsEnabled = isEnabled; }
+ bool dataTransferItemsEnabled() const { return m_isDataTransferItemsEnabled; }
- static void setGeolocationEnabled(bool isEnabled) { isGeolocationEnabled = isEnabled; }
- static bool geolocationEnabled() { return isGeolocationEnabled; }
+ void setGeolocationEnabled(bool isEnabled) { m_isGeolocationEnabled = isEnabled; }
+ bool geolocationEnabled() const { return m_isGeolocationEnabled; }
- static void setWebkitIndexedDBEnabled(bool isEnabled) { isIndexedDBEnabled = isEnabled; }
- static bool webkitIndexedDBEnabled() { return isIndexedDBEnabled; }
- static bool indexedDBEnabled() { return isIndexedDBEnabled; }
+ void setWebkitIndexedDBEnabled(bool isEnabled) { m_isIndexedDBEnabled = isEnabled; }
+ bool webkitIndexedDBEnabled() const { return m_isIndexedDBEnabled; }
+ bool indexedDBEnabled() const { return m_isIndexedDBEnabled; }
#if ENABLE(CANVAS_PATH)
- static void setCanvasPathEnabled(bool isEnabled) { isCanvasPathEnabled = isEnabled; }
- static bool canvasPathEnabled() { return isCanvasPathEnabled; }
+ void setCanvasPathEnabled(bool isEnabled) { m_isCanvasPathEnabled = isEnabled; }
+ bool canvasPathEnabled() const { return m_isCanvasPathEnabled; }
#else
- static void setCanvasPathEnabled(bool) { }
- static bool canvasPathEnabled() { return false; }
+ void setCanvasPathEnabled(bool) { }
+ bool canvasPathEnabled() const { return false; }
#endif
#if ENABLE(CSS_EXCLUSIONS)
- static void setCSSExclusionsEnabled(bool isEnabled) { isCSSExclusionsEnabled = isEnabled; }
- static bool cssExclusionsEnabled() { return isCSSExclusionsEnabled; }
+ void setCSSExclusionsEnabled(bool isEnabled) { m_isCSSExclusionsEnabled = isEnabled; }
+ bool cssExclusionsEnabled() const { return m_isCSSExclusionsEnabled; }
#else
- static void setCSSExclusionsEnabled(bool) { }
- static bool cssExclusionsEnabled() { return false; }
+ void setCSSExclusionsEnabled(bool) { }
+ bool cssExclusionsEnabled() const { return false; }
#endif
#if ENABLE(CSS_SHAPES)
- static void setCSSShapesEnabled(bool isEnabled) { isCSSShapesEnabled = isEnabled; }
- static bool cssShapesEnabled() { return isCSSShapesEnabled; }
+ void setCSSShapesEnabled(bool isEnabled) { m_isCSSShapesEnabled = isEnabled; }
+ bool cssShapesEnabled() const { return m_isCSSShapesEnabled; }
#else
- static void setCSSShapesEnabled(bool) { }
- static bool cssShapesEnabled() { return false; }
+ void setCSSShapesEnabled(bool) { }
+ bool cssShapesEnabled() const { return false; }
#endif
#if ENABLE(CSS_REGIONS)
- static void setCSSRegionsEnabled(bool isEnabled) { isCSSRegionsEnabled = isEnabled; }
- static bool cssRegionsEnabled() { return isCSSRegionsEnabled; }
+ void setCSSRegionsEnabled(bool isEnabled) { m_isCSSRegionsEnabled = isEnabled; }
+ bool cssRegionsEnabled() const { return m_isCSSRegionsEnabled; }
#else
- static void setCSSRegionsEnabled(bool) { }
- static bool cssRegionsEnabled() { return false; }
+ void setCSSRegionsEnabled(bool) { }
+ bool cssRegionsEnabled() const { return false; }
#endif
- static void setCSSCompositingEnabled(bool isEnabled) { isCSSCompositingEnabled = isEnabled; }
- static bool cssCompositingEnabled() { return isCSSCompositingEnabled; }
+ void setCSSCompositingEnabled(bool isEnabled) { m_isCSSCompositingEnabled = isEnabled; }
+ bool cssCompositingEnabled() const { return m_isCSSCompositingEnabled; }
#if ENABLE(FONT_LOAD_EVENTS)
- static void setFontLoadEventsEnabled(bool isEnabled) { isFontLoadEventsEnabled = isEnabled; }
- static bool fontLoadEventsEnabled() { return isFontLoadEventsEnabled; }
+ void setFontLoadEventsEnabled(bool isEnabled) { m_isFontLoadEventsEnabled = isEnabled; }
+ bool fontLoadEventsEnabled() const { return m_isFontLoadEventsEnabled; }
#else
- static void setFontLoadEventsEnabled(bool) { }
- static bool fontLoadEventsEnabled() { return false; }
+ void setFontLoadEventsEnabled(bool) { }
+ bool fontLoadEventsEnabled() { return false; }
#endif
#if ENABLE(FULLSCREEN_API)
// Mozilla version
- static bool webkitFullScreenAPIEnabled() { return isFullScreenAPIEnabled; }
- static void setWebkitFullScreenAPIEnabled(bool isEnabled) { isFullScreenAPIEnabled = isEnabled; }
- static bool webkitRequestFullScreenEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitIsFullScreenEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitFullScreenKeyboardInputAllowedEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitCurrentFullScreenElementEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitCancelFullScreenEnabled() { return isFullScreenAPIEnabled; }
+ bool webkitFullScreenAPIEnabled() const { return m_isFullScreenAPIEnabled; }
+ void setWebkitFullScreenAPIEnabled(bool isEnabled) { m_isFullScreenAPIEnabled = isEnabled; }
+ bool webkitRequestFullScreenEnabled() const { return m_isFullScreenAPIEnabled; }
+ bool webkitIsFullScreenEnabled() const { return m_isFullScreenAPIEnabled; }
+ bool webkitFullScreenKeyboardInputAllowedEnabled() const { return m_isFullScreenAPIEnabled; }
+ bool webkitCurrentFullScreenElementEnabled() const { return m_isFullScreenAPIEnabled; }
+ bool webkitCancelFullScreenEnabled() const { return m_isFullScreenAPIEnabled; }
// W3C version
- static bool webkitFullscreenEnabledEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitFullscreenElementEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitExitFullscreenEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitRequestFullscreenEnabled() { return isFullScreenAPIEnabled; }
+ bool webkitFullscreenEnabledEnabled() const { return m_isFullScreenAPIEnabled; }
+ bool webkitFullscreenElementEnabled() const { return m_isFullScreenAPIEnabled; }
+ bool webkitExitFullscreenEnabled() const { return m_isFullScreenAPIEnabled; }
+ bool webkitRequestFullscreenEnabled() const { return m_isFullScreenAPIEnabled; }
#endif
#if ENABLE(VIDEO)
- static bool audioEnabled();
- static bool htmlMediaElementEnabled();
- static bool htmlAudioElementEnabled();
- static bool htmlVideoElementEnabled();
- static bool htmlSourceElementEnabled();
- static bool mediaControllerEnabled();
- static bool mediaErrorEnabled();
- static bool timeRangesEnabled();
+ bool audioEnabled() const;
+ bool htmlMediaElementEnabled() const;
+ bool htmlAudioElementEnabled() const;
+ bool htmlVideoElementEnabled() const;
+ bool htmlSourceElementEnabled() const;
+ bool mediaControllerEnabled() const;
+ bool mediaErrorEnabled() const;
+ bool timeRangesEnabled() const;
#endif
#if ENABLE(SHARED_WORKERS)
- static bool sharedWorkerEnabled();
+ bool sharedWorkerEnabled() const;
#endif
#if ENABLE(WEB_SOCKETS)
- static bool webSocketEnabled();
+ bool webSocketEnabled() const;
#endif
#if ENABLE(SQL_DATABASE)
- static bool openDatabaseEnabled();
- static bool openDatabaseSyncEnabled();
+ bool openDatabaseEnabled() const;
+ bool openDatabaseSyncEnabled() const;
#endif
#if ENABLE(TOUCH_EVENTS)
- static bool touchEnabled() { return isTouchEnabled; }
- static void setTouchEnabled(bool isEnabled) { isTouchEnabled = isEnabled; }
+ bool touchEnabled() const { return m_isTouchEnabled; }
+ void setTouchEnabled(bool isEnabled) { m_isTouchEnabled = isEnabled; }
#endif
- static void setDeviceMotionEnabled(bool isEnabled) { isDeviceMotionEnabled = isEnabled; }
- static bool deviceMotionEnabled() { return isDeviceMotionEnabled; }
- static bool deviceMotionEventEnabled() { return isDeviceMotionEnabled; }
- static bool ondevicemotionEnabled() { return isDeviceMotionEnabled; }
+ void setDeviceMotionEnabled(bool isEnabled) { m_isDeviceMotionEnabled = isEnabled; }
+ bool deviceMotionEnabled() const { return m_isDeviceMotionEnabled; }
+ bool deviceMotionEventEnabled() const { return m_isDeviceMotionEnabled; }
+ bool ondevicemotionEnabled() const { return m_isDeviceMotionEnabled; }
- static void setDeviceOrientationEnabled(bool isEnabled) { isDeviceOrientationEnabled = isEnabled; }
- static bool deviceOrientationEnabled() { return isDeviceOrientationEnabled; }
- static bool deviceOrientationEventEnabled() { return isDeviceOrientationEnabled; }
- static bool ondeviceorientationEnabled() { return isDeviceOrientationEnabled; }
+ void setDeviceOrientationEnabled(bool isEnabled) { m_isDeviceOrientationEnabled = isEnabled; }
+ bool deviceOrientationEnabled() const { return m_isDeviceOrientationEnabled; }
+ bool deviceOrientationEventEnabled() const { return m_isDeviceOrientationEnabled; }
+ bool ondeviceorientationEnabled() const { return m_isDeviceOrientationEnabled; }
- static void setSpeechInputEnabled(bool isEnabled) { isSpeechInputEnabled = isEnabled; }
- static bool speechInputEnabled() { return isSpeechInputEnabled; }
- static bool webkitSpeechEnabled() { return isSpeechInputEnabled; }
- static bool webkitGrammarEnabled() { return isSpeechInputEnabled; }
+ void setSpeechInputEnabled(bool isEnabled) { m_isSpeechInputEnabled = isEnabled; }
+ bool speechInputEnabled() const { return m_isSpeechInputEnabled; }
+ bool webkitSpeechEnabled() const { return m_isSpeechInputEnabled; }
+ bool webkitGrammarEnabled() const { return m_isSpeechInputEnabled; }
#if ENABLE(SCRIPTED_SPEECH)
- static void setScriptedSpeechEnabled(bool isEnabled) { isScriptedSpeechEnabled = isEnabled; }
- static bool scriptedSpeechEnabled() { return isScriptedSpeechEnabled; }
- static bool webkitSpeechRecognitionEnabled() { return isScriptedSpeechEnabled; }
- static bool webkitSpeechRecognitionErrorEnabled() { return isScriptedSpeechEnabled; }
- static bool webkitSpeechRecognitionEventEnabled() { return isScriptedSpeechEnabled; }
- static bool webkitSpeechGrammarEnabled() { return isScriptedSpeechEnabled; }
- static bool webkitSpeechGrammarListEnabled() { return isScriptedSpeechEnabled; }
+ void setScriptedSpeechEnabled(bool isEnabled) { m_isScriptedSpeechEnabled = isEnabled; }
+ bool scriptedSpeechEnabled() const { return m_isScriptedSpeechEnabled; }
+ bool webkitSpeechRecognitionEnabled() const { return m_isScriptedSpeechEnabled; }
+ bool webkitSpeechRecognitionErrorEnabled() const { return m_isScriptedSpeechEnabled; }
+ bool webkitSpeechRecognitionEventEnabled() const { return m_isScriptedSpeechEnabled; }
+ bool webkitSpeechGrammarEnabled() const { return m_isScriptedSpeechEnabled; }
+ bool webkitSpeechGrammarListEnabled() const { return m_isScriptedSpeechEnabled; }
#endif
#if ENABLE(FILE_SYSTEM)
- static bool fileSystemEnabled();
- static void setFileSystemEnabled(bool isEnabled) { isFileSystemEnabled = isEnabled; }
+ bool fileSystemEnabled() const;
+ void setFileSystemEnabled(bool isEnabled) { m_isFileSystemEnabled = isEnabled; }
#endif
#if ENABLE(JAVASCRIPT_I18N_API)
- static bool javaScriptI18NAPIEnabled();
- static void setJavaScriptI18NAPIEnabled(bool isEnabled) { isJavaScriptI18NAPIEnabled = isEnabled; }
+ bool javaScriptI18NAPIEnabled() const;
+ void setJavaScriptI18NAPIEnabled(bool isEnabled) { m_isJavaScriptI18NAPIEnabled = isEnabled; }
#endif
#if ENABLE(MEDIA_STREAM)
- static bool mediaStreamEnabled() { return isMediaStreamEnabled; }
- static void setMediaStreamEnabled(bool isEnabled) { isMediaStreamEnabled = isEnabled; }
- static bool webkitGetUserMediaEnabled() { return isMediaStreamEnabled; }
- static bool webkitMediaStreamEnabled() { return isMediaStreamEnabled; }
+ bool mediaStreamEnabled() const { return m_isMediaStreamEnabled; }
+ void setMediaStreamEnabled(bool isEnabled) { m_isMediaStreamEnabled = isEnabled; }
+ bool webkitGetUserMediaEnabled() const { return m_isMediaStreamEnabled; }
+ bool webkitMediaStreamEnabled() const { return m_isMediaStreamEnabled; }
- static bool peerConnectionEnabled() { return isMediaStreamEnabled && isPeerConnectionEnabled; }
- static void setPeerConnectionEnabled(bool isEnabled) { isPeerConnectionEnabled = isEnabled; }
- static bool webkitRTCPeerConnectionEnabled() { return peerConnectionEnabled(); }
+ bool peerConnectionEnabled() const { return m_isMediaStreamEnabled && m_isPeerConnectionEnabled; }
+ void setPeerConnectionEnabled(bool isEnabled) { m_isPeerConnectionEnabled = isEnabled; }
+ bool webkitRTCPeerConnectionEnabled() const { return peerConnectionEnabled(); }
#endif
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
- static void setLegacyCSSVendorPrefixesEnabled(bool isEnabled) { isLegacyCSSVendorPrefixesEnabled = isEnabled; }
- static bool legacyCSSVendorPrefixesEnabled() { return isLegacyCSSVendorPrefixesEnabled; }
+ void setLegacyCSSVendorPrefixesEnabled(bool isEnabled) { m_isLegacyCSSVendorPrefixesEnabled = isEnabled; }
+ bool legacyCSSVendorPrefixesEnabled() const { return m_isLegacyCSSVendorPrefixesEnabled; }
#endif
#if ENABLE(GAMEPAD)
- static void setWebkitGetGamepadsEnabled(bool isEnabled) { isGamepadEnabled = isEnabled; }
- static bool webkitGetGamepadsEnabled() { return isGamepadEnabled; }
+ void setWebkitGetGamepadsEnabled(bool isEnabled) { m_isGamepadEnabled = isEnabled; }
+ bool webkitGetGamepadsEnabled() const { return m_isGamepadEnabled; }
#endif
#if ENABLE(QUOTA)
- static bool quotaEnabled() { return isQuotaEnabled; }
- static void setQuotaEnabled(bool isEnabled) { isQuotaEnabled = isEnabled; }
+ bool quotaEnabled() const { return m_isQuotaEnabled; }
+ void setQuotaEnabled(bool isEnabled) { m_isQuotaEnabled = isEnabled; }
#endif
#if ENABLE(MEDIA_SOURCE)
- static bool mediaSourceEnabled() { return isMediaSourceEnabled; }
- static void setMediaSourceEnabled(bool isEnabled) { isMediaSourceEnabled = isEnabled; }
+ bool mediaSourceEnabled() const { return m_isMediaSourceEnabled; }
+ void setMediaSourceEnabled(bool isEnabled) { m_isMediaSourceEnabled = isEnabled; }
#endif
#if ENABLE(ENCRYPTED_MEDIA)
- static bool encryptedMediaEnabled() { return isEncryptedMediaEnabled; }
- static void setEncryptedMediaEnabled(bool isEnabled) { isEncryptedMediaEnabled = isEnabled; }
+ bool encryptedMediaEnabled() const { return m_isEncryptedMediaEnabled; }
+ void setEncryptedMediaEnabled(bool isEnabled) { m_isEncryptedMediaEnabled = isEnabled; }
#endif
#if ENABLE(VIDEO_TRACK)
- static bool webkitVideoTrackEnabled() { return isVideoTrackEnabled; }
- static void setWebkitVideoTrackEnabled(bool isEnabled) { isVideoTrackEnabled = isEnabled; }
+ bool webkitVideoTrackEnabled() const { return m_isVideoTrackEnabled; }
+ void setWebkitVideoTrackEnabled(bool isEnabled) { m_isVideoTrackEnabled = isEnabled; }
#endif
#if ENABLE(SHADOW_DOM)
- static bool shadowDOMEnabled() { return isShadowDOMEnabled; }
- static void setShadowDOMEnabled(bool isEnabled) { isShadowDOMEnabled = isEnabled; }
+ bool shadowDOMEnabled() const { return m_isShadowDOMEnabled; }
+ void setShadowDOMEnabled(bool isEnabled) { m_isShadowDOMEnabled = isEnabled; }
- static bool authorShadowDOMForAnyElementEnabled() { return isAuthorShadowDOMForAnyElementEnabled; }
- static void setAuthorShadowDOMForAnyElementEnabled(bool isEnabled) { isAuthorShadowDOMForAnyElementEnabled = isEnabled; }
+ bool authorShadowDOMForAnyElementEnabled() const { return m_isAuthorShadowDOMForAnyElementEnabled; }
+ void setAuthorShadowDOMForAnyElementEnabled(bool isEnabled) { m_isAuthorShadowDOMForAnyElementEnabled = isEnabled; }
#endif
#if ENABLE(CUSTOM_ELEMENTS)
- static bool customDOMElementsEnabled() { return isCustomDOMElementsEnabled; }
- static void setCustomDOMElements(bool isEnabled) { isCustomDOMElementsEnabled = isEnabled; }
+ bool customDOMElementsEnabled() const { return m_isCustomDOMElementsEnabled; }
+ void setCustomDOMElements(bool isEnabled) { m_isCustomDOMElementsEnabled = isEnabled; }
#endif
#if ENABLE(STYLE_SCOPED)
- static bool styleScopedEnabled() { return isStyleScopedEnabled; }
- static void setStyleScopedEnabled(bool isEnabled) { isStyleScopedEnabled = isEnabled; }
+ bool styleScopedEnabled() const { return m_isStyleScopedEnabled; }
+ void setStyleScopedEnabled(bool isEnabled) { m_isStyleScopedEnabled = isEnabled; }
#endif
#if ENABLE(INPUT_TYPE_DATE)
- static bool inputTypeDateEnabled() { return isInputTypeDateEnabled; }
- static void setInputTypeDateEnabled(bool isEnabled) { isInputTypeDateEnabled = isEnabled; }
+ bool inputTypeDateEnabled() const { return m_isInputTypeDateEnabled; }
+ void setInputTypeDateEnabled(bool isEnabled) { m_isInputTypeDateEnabled = isEnabled; }
#endif
#if ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE)
- static bool inputTypeDateTimeEnabled() { return isInputTypeDateTimeEnabled; }
- static void setInputTypeDateTimeEnabled(bool isEnabled) { isInputTypeDateTimeEnabled = isEnabled; }
+ bool inputTypeDateTimeEnabled() const { return m_isInputTypeDateTimeEnabled; }
+ void setInputTypeDateTimeEnabled(bool isEnabled) { m_isInputTypeDateTimeEnabled = isEnabled; }
#endif
#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
- static bool inputTypeDateTimeLocalEnabled() { return isInputTypeDateTimeLocalEnabled; }
- static void setInputTypeDateTimeLocalEnabled(bool isEnabled) { isInputTypeDateTimeLocalEnabled = isEnabled; }
+ bool inputTypeDateTimeLocalEnabled() const { return m_isInputTypeDateTimeLocalEnabled; }
+ void setInputTypeDateTimeLocalEnabled(bool isEnabled) { m_isInputTypeDateTimeLocalEnabled = isEnabled; }
#endif
#if ENABLE(INPUT_TYPE_MONTH)
- static bool inputTypeMonthEnabled() { return isInputTypeMonthEnabled; }
- static void setInputTypeMonthEnabled(bool isEnabled) { isInputTypeMonthEnabled = isEnabled; }
+ bool inputTypeMonthEnabled() const { return m_isInputTypeMonthEnabled; }
+ void setInputTypeMonthEnabled(bool isEnabled) { m_isInputTypeMonthEnabled = isEnabled; }
#endif
#if ENABLE(INPUT_TYPE_TIME)
- static bool inputTypeTimeEnabled() { return isInputTypeTimeEnabled; }
- static void setInputTypeTimeEnabled(bool isEnabled) { isInputTypeTimeEnabled = isEnabled; }
+ bool inputTypeTimeEnabled() const { return m_isInputTypeTimeEnabled; }
+ void setInputTypeTimeEnabled(bool isEnabled) { m_isInputTypeTimeEnabled = isEnabled; }
#endif
#if ENABLE(INPUT_TYPE_WEEK)
- static bool inputTypeWeekEnabled() { return isInputTypeWeekEnabled; }
- static void setInputTypeWeekEnabled(bool isEnabled) { isInputTypeWeekEnabled = isEnabled; }
+ bool inputTypeWeekEnabled() const { return m_isInputTypeWeekEnabled; }
+ void setInputTypeWeekEnabled(bool isEnabled) { m_isInputTypeWeekEnabled = isEnabled; }
#endif
#if ENABLE(CSP_NEXT)
- static bool experimentalContentSecurityPolicyFeaturesEnabled() { return areExperimentalContentSecurityPolicyFeaturesEnabled; }
- static void setExperimentalContentSecurityPolicyFeaturesEnabled(bool isEnabled) { areExperimentalContentSecurityPolicyFeaturesEnabled = isEnabled; }
+ bool experimentalContentSecurityPolicyFeaturesEnabled() const { return m_areExperimentalContentSecurityPolicyFeaturesEnabled; }
+ void setExperimentalContentSecurityPolicyFeaturesEnabled(bool isEnabled) { m_areExperimentalContentSecurityPolicyFeaturesEnabled = isEnabled; }
#endif
#if ENABLE(IFRAME_SEAMLESS)
- static bool seamlessIFramesEnabled() { return areSeamlessIFramesEnabled; }
- static void setSeamlessIFramesEnabled(bool isEnabled) { areSeamlessIFramesEnabled = isEnabled; }
+ bool seamlessIFramesEnabled() const { return m_areSeamlessIFramesEnabled; }
+ void setSeamlessIFramesEnabled(bool isEnabled) { m_areSeamlessIFramesEnabled = isEnabled; }
#endif
- static bool langAttributeAwareFormControlUIEnabled() { return isLangAttributeAwareFormControlUIEnabled; }
+ bool langAttributeAwareFormControlUIEnabled() const { return m_isLangAttributeAwareFormControlUIEnabled; }
// The lang attribute support is incomplete and should only be turned on for tests.
- static void setLangAttributeAwareFormControlUIEnabled(bool isEnabled) { isLangAttributeAwareFormControlUIEnabled = isEnabled; }
+ void setLangAttributeAwareFormControlUIEnabled(bool isEnabled) { m_isLangAttributeAwareFormControlUIEnabled = isEnabled; }
+
+ static RuntimeEnabledFeatures& sharedFeatures();
private:
// Never instantiate.
- RuntimeEnabledFeatures() { }
-
- static bool isLocalStorageEnabled;
- static bool isSessionStorageEnabled;
- static bool isWebkitNotificationsEnabled;
- static bool isApplicationCacheEnabled;
- static bool isDataTransferItemsEnabled;
- static bool isGeolocationEnabled;
- static bool isIndexedDBEnabled;
- static bool isTouchEnabled;
- static bool isDeviceMotionEnabled;
- static bool isDeviceOrientationEnabled;
- static bool isSpeechInputEnabled;
- static bool isCanvasPathEnabled;
- static bool isCSSExclusionsEnabled;
- static bool isCSSShapesEnabled;
- static bool isCSSRegionsEnabled;
- static bool isCSSCompositingEnabled;
- WEBCORE_TESTING static bool isLangAttributeAwareFormControlUIEnabled;
+ RuntimeEnabledFeatures();
+
+ bool m_isLocalStorageEnabled;
+ bool m_isSessionStorageEnabled;
+ bool m_isWebkitNotificationsEnabled;
+ bool m_isApplicationCacheEnabled;
+ bool m_isDataTransferItemsEnabled;
+ bool m_isGeolocationEnabled;
+ bool m_isIndexedDBEnabled;
+ bool m_isTouchEnabled;
+ bool m_isDeviceMotionEnabled;
+ bool m_isDeviceOrientationEnabled;
+ bool m_isSpeechInputEnabled;
+ bool m_isCanvasPathEnabled;
+ bool m_isCSSExclusionsEnabled;
+ bool m_isCSSShapesEnabled;
+ bool m_isCSSRegionsEnabled;
+ bool m_isCSSCompositingEnabled;
+ bool m_isLangAttributeAwareFormControlUIEnabled;
#if ENABLE(SCRIPTED_SPEECH)
- static bool isScriptedSpeechEnabled;
+ bool m_isScriptedSpeechEnabled;
#endif
#if ENABLE(FILE_SYSTEM)
- static bool isFileSystemEnabled;
+ bool m_isFileSystemEnabled;
#endif
#if ENABLE(JAVASCRIPT_I18N_API)
- static bool isJavaScriptI18NAPIEnabled;
+ bool m_isJavaScriptI18NAPIEnabled;
#endif
#if ENABLE(MEDIA_STREAM)
- static bool isMediaStreamEnabled;
- static bool isPeerConnectionEnabled;
+ bool m_isMediaStreamEnabled;
+ bool m_isPeerConnectionEnabled;
#endif
#if ENABLE(GAMEPAD)
- static bool isGamepadEnabled;
+ bool m_isGamepadEnabled;
#endif
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
- static bool isLegacyCSSVendorPrefixesEnabled;
+ bool m_isLegacyCSSVendorPrefixesEnabled;
#endif
#if ENABLE(QUOTA)
- static bool isQuotaEnabled;
+ bool m_isQuotaEnabled;
#endif
#if ENABLE(FULLSCREEN_API)
- static bool isFullScreenAPIEnabled;
+ bool m_isFullScreenAPIEnabled;
#endif
#if ENABLE(MEDIA_SOURCE)
- static bool isMediaSourceEnabled;
+ bool m_isMediaSourceEnabled;
#endif
#if ENABLE(ENCRYPTED_MEDIA)
- static bool isEncryptedMediaEnabled;
+ bool m_isEncryptedMediaEnabled;
#endif
#if ENABLE(VIDEO_TRACK)
- static bool isVideoTrackEnabled;
+ bool m_isVideoTrackEnabled;
#endif
#if ENABLE(SHADOW_DOM)
- static bool isShadowDOMEnabled;
-
- static bool isAuthorShadowDOMForAnyElementEnabled;
+ bool m_isShadowDOMEnabled;
+ bool m_isAuthorShadowDOMForAnyElementEnabled;
#endif
#if ENABLE(CUSTOM_ELEMENTS)
- static bool isCustomDOMElementsEnabled;
+ bool m_isCustomDOMElementsEnabled;
#endif
#if ENABLE(STYLE_SCOPED)
- static bool isStyleScopedEnabled;
+ bool m_isStyleScopedEnabled;
#endif
#if ENABLE(INPUT_TYPE_DATE)
- static bool isInputTypeDateEnabled;
+ bool m_isInputTypeDateEnabled;
#endif
#if ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE)
- static bool isInputTypeDateTimeEnabled;
+ bool m_isInputTypeDateTimeEnabled;
#endif
#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
- static bool isInputTypeDateTimeLocalEnabled;
+ bool m_isInputTypeDateTimeLocalEnabled;
#endif
#if ENABLE(INPUT_TYPE_MONTH)
- static bool isInputTypeMonthEnabled;
+ bool m_isInputTypeMonthEnabled;
#endif
#if ENABLE(INPUT_TYPE_TIME)
- static bool isInputTypeTimeEnabled;
+ bool m_isInputTypeTimeEnabled;
#endif
#if ENABLE(INPUT_TYPE_WEEK)
- static bool isInputTypeWeekEnabled;
+ bool m_isInputTypeWeekEnabled;
#endif
#if ENABLE(CSP_NEXT)
- static bool areExperimentalContentSecurityPolicyFeaturesEnabled;
+ bool m_areExperimentalContentSecurityPolicyFeaturesEnabled;
#endif
#if ENABLE(IFRAME_SEAMLESS)
- static bool areSeamlessIFramesEnabled;
+ bool m_areSeamlessIFramesEnabled;
#endif
#if ENABLE(FONT_LOAD_EVENTS)
- static bool isFontLoadEventsEnabled;
+ bool m_isFontLoadEventsEnabled;
#endif
+#ifndef CLASS_IF_GCC
+#if COMPILER(GCC)
+#define CLASS_IF_GCC class
+#else
+#define CLASS_IF_GCC
+#endif
+#endif
+ friend CLASS_IF_GCC NeverDestroyed<RuntimeEnabledFeatures>;
};
} // namespace WebCore
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
switch (firstChar) {
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
case 'a':
- if (RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled() && matchesCSSPropertyNamePrefix(propertyName, "apple"))
+ if (RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled() && matchesCSSPropertyNamePrefix(propertyName, "apple"))
return PropertyNamePrefixApple;
break;
#endif
break;
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
case 'k':
- if (RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled() && matchesCSSPropertyNamePrefix(propertyName, "khtml"))
+ if (RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled() && matchesCSSPropertyNamePrefix(propertyName, "khtml"))
return PropertyNamePrefixKHTML;
break;
#endif
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
case PropertyNamePrefixApple:
case PropertyNamePrefixKHTML:
- ASSERT(RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled());
+ ASSERT(RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled());
writeWebKitPrefix(bufferPtr);
i += 5;
break;
# Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
# Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org>
# Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
-# Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
# Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
# Copyright (C) Research In Motion Limited 2010. All rights reserved.
# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
{
my $signature = shift;
- # If a parameter is given (e.g. "EnabledAtRuntime=FeatureName") return the RuntimeEnabledFeatures::{FeatureName}Enabled() method.
- return "RuntimeEnabledFeatures::" . ToMethodName($signature->extendedAttributes->{"EnabledAtRuntime"}) . "Enabled" if ($signature->extendedAttributes->{"EnabledAtRuntime"} && $signature->extendedAttributes->{"EnabledAtRuntime"} ne "VALUE_IS_MISSING");
+ # If a parameter is given (e.g. "EnabledAtRuntime=FeatureName") return the RuntimeEnabledFeatures::sharedFeatures().{FeatureName}Enabled() method.
+ return "RuntimeEnabledFeatures::sharedFeatures()." . ToMethodName($signature->extendedAttributes->{"EnabledAtRuntime"}) . "Enabled" if ($signature->extendedAttributes->{"EnabledAtRuntime"} && $signature->extendedAttributes->{"EnabledAtRuntime"} ne "VALUE_IS_MISSING");
- # Otherwise return a function named RuntimeEnabledFeatures::{methodName}Enabled().
- return "RuntimeEnabledFeatures::" . ToMethodName($signature->name) . "Enabled";
+ # Otherwise return a function named RuntimeEnabledFeatures::sharedFeatures().{methodName}Enabled().
+ return "RuntimeEnabledFeatures::sharedFeatures()." . ToMethodName($signature->name) . "Enabled";
}
sub GenerateImplementation
/*
- * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2011, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
fontSelector->fontLoaded();
#if ENABLE(FONT_LOAD_EVENTS)
- if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && m_loadState == Loading) {
+ if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled() && m_loadState == Loading) {
if (source->ensureFontData())
notifyFontLoader(Loaded);
else if (!isValid())
(*it)->fontLoaded(this);
#if ENABLE(FONT_LOAD_EVENTS)
- if (RuntimeEnabledFeatures::fontLoadEventsEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled())
notifyLoadingDone();
#endif
}
CSSFontSelector* fontSelector = (*m_segmentedFontFaces.begin())->fontSelector();
#if ENABLE(FONT_LOAD_EVENTS)
- if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && m_loadState == NotLoaded)
+ if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled() && m_loadState == NotLoaded)
notifyFontLoader(Loading);
#endif
if (RefPtr<SimpleFontData> result = m_sources[i]->getFontData(fontDescription, syntheticBold, syntheticItalic, fontSelector)) {
m_activeSource = m_sources[i].get();
#if ENABLE(FONT_LOAD_EVENTS)
- if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && m_loadState == Loading && m_sources[i]->isLoaded()) {
+ if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled() && m_loadState == Loading && m_sources[i]->isLoaded()) {
notifyFontLoader(Loaded);
notifyLoadingDone();
}
}
#if ENABLE(FONT_LOAD_EVENTS)
- if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && m_loadState == Loading) {
+ if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled() && m_loadState == Loading) {
notifyFontLoader(Error);
notifyLoadingDone();
}
/*
- * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2011, 2013 Apple Inc. All rights reserved.
* (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
*
* Redistribution and use in source and binary forms, with or without
RefPtr<CSSFontFaceRule> rule;
#if ENABLE(FONT_LOAD_EVENTS)
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=112116 - This CSSFontFaceRule has no parent.
- if (RuntimeEnabledFeatures::fontLoadEventsEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled())
rule = static_pointer_cast<CSSFontFaceRule>(fontFaceRule->createCSSOMWrapper());
#endif
fontFace = CSSFontFace::create(static_cast<FontTraitsMask>(traitsMask), rule);
/*
* Copyright (C) 2003 Lars Knoll (knoll@kde.org)
* Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
* Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
* Copyright (C) 2008 Eric Seidel <eric@webkit.org>
* Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
case CSSPropertyWebkitShapeMargin:
case CSSPropertyWebkitShapePadding:
acceptsNegativeNumbers = false;
- return RuntimeEnabledFeatures::cssShapesEnabled();
+ return RuntimeEnabledFeatures::sharedFeatures().cssShapesEnabled();
#endif
case CSSPropertyBottom:
case CSSPropertyLeft:
break;
#if ENABLE(CSS_EXCLUSIONS)
case CSSPropertyWebkitWrapFlow:
- if (!RuntimeEnabledFeatures::cssExclusionsEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().cssExclusionsEnabled())
return false;
if (valueID == CSSValueAuto || valueID == CSSValueBoth || valueID == CSSValueStart || valueID == CSSValueEnd || valueID == CSSValueMaximum || valueID == CSSValueClear)
return true;
break;
case CSSPropertyWebkitWrapThrough:
- if (!RuntimeEnabledFeatures::cssExclusionsEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().cssExclusionsEnabled())
return false;
if (valueID == CSSValueWrap || valueID == CSSValueNone)
return true;
#if ENABLE(CSS_SHAPES)
case CSSPropertyWebkitShapeInside:
case CSSPropertyWebkitShapeOutside:
- if (!RuntimeEnabledFeatures::cssShapesEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().cssShapesEnabled())
return false;
if (id == CSSValueAuto)
validPrimitive = true;
break;
case CSSPropertyWebkitShapeMargin:
case CSSPropertyWebkitShapePadding:
- validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && validUnit(value, FLength | FNonNeg));
+ validPrimitive = (RuntimeEnabledFeatures::sharedFeatures().cssShapesEnabled() && !id && validUnit(value, FLength | FNonNeg));
break;
#endif
#if ENABLE(CSS_IMAGE_ORIENTATION)
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
// If the prefix is -apple- or -khtml-, change it to -webkit-.
// This makes the string one character longer.
- if (RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled()
+ if (RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled()
&& (hasPrefix(buffer, length, "-apple-") || hasPrefix(buffer, length, "-khtml-"))) {
memmove(buffer + 7, buffer + 6, length + 1 - 6);
memcpy(buffer, "-webkit", 7);
/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
pruneTable();
#if ENABLE(FONT_LOAD_EVENTS)
- if (RuntimeEnabledFeatures::fontLoadEventsEnabled() && !isLoading()) {
+ if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled() && !isLoading()) {
Vector<RefPtr<LoadFontCallback> > callbacks;
m_callbacks.swap(callbacks);
for (size_t index = 0; index < callbacks.size(); ++index) {
{
#if ENABLE(STYLE_SCOPED)
#if ENABLE(SHADOW_DOM)
- ASSERT(RuntimeEnabledFeatures::shadowDOMEnabled() || RuntimeEnabledFeatures::styleScopedEnabled());
+ ASSERT(RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled() || RuntimeEnabledFeatures::sharedFeatures().styleScopedEnabled());
#else
- ASSERT(RuntimeEnabledFeatures::styleScopedEnabled());
+ ASSERT(RuntimeEnabledFeatures::sharedFeatures().styleScopedEnabled());
#endif
#else
- ASSERT(RuntimeEnabledFeatures::shadowDOMEnabled());
+ ASSERT(RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled());
#endif
if (!m_scopeResolver)
m_scopeResolver = adoptPtr(new StyleScopeResolver());
bool Document::cssRegionsEnabled() const
{
- return RuntimeEnabledFeatures::cssRegionsEnabled();
+ return RuntimeEnabledFeatures::sharedFeatures().cssRegionsEnabled();
}
bool Document::cssCompositingEnabled() const
{
- return RuntimeEnabledFeatures::cssCompositingEnabled();
+ return RuntimeEnabledFeatures::sharedFeatures().cssCompositingEnabled();
}
bool Document::cssGridLayoutEnabled() const
bool Document::shouldDisplaySeamlesslyWithParent() const
{
#if ENABLE(IFRAME_SEAMLESS)
- if (!RuntimeEnabledFeatures::seamlessIFramesEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().seamlessIFramesEnabled())
return false;
HTMLFrameOwnerElement* ownerElement = this->ownerElement();
if (!ownerElement)
Locale& Document::getCachedLocale(const AtomicString& locale)
{
AtomicString localeKey = locale;
- if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled())
+ if (locale.isEmpty() || !RuntimeEnabledFeatures::sharedFeatures().langAttributeAwareFormControlUIEnabled())
localeKey = defaultLanguage();
LocaleIdentifierToLocaleMap::AddResult result = m_localeCache.add(localeKey, nullptr);
if (result.isNewEntry)
ensureUserAgentShadowRoot();
#if ENABLE(SHADOW_DOM)
- if (RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled()) {
+ if (RuntimeEnabledFeatures::sharedFeatures().authorShadowDOMForAnyElementEnabled()) {
addShadowRoot(ShadowRoot::create(document(), ShadowRoot::AuthorShadowRoot));
return shadowRoot();
}
/*
- * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
, m_isLegacyEditingPosition(true)
{
#if ENABLE(SHADOW_DOM)
- ASSERT((m_anchorNode && RuntimeEnabledFeatures::shadowDOMEnabled()) || !m_anchorNode || !m_anchorNode->isShadowRoot() || m_anchorNode == containerNode());
+ ASSERT((m_anchorNode && RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled()) || !m_anchorNode || !m_anchorNode->isShadowRoot() || m_anchorNode == containerNode());
#else
ASSERT(!m_anchorNode || !m_anchorNode->isShadowRoot() || m_anchorNode == containerNode());
#endif
, m_isLegacyEditingPosition(false)
{
#if ENABLE(SHADOW_DOM)
- ASSERT((m_anchorNode && RuntimeEnabledFeatures::shadowDOMEnabled()) || !m_anchorNode || !m_anchorNode->isShadowRoot() || m_anchorNode == containerNode());
+ ASSERT((m_anchorNode && RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled()) || !m_anchorNode || !m_anchorNode->isShadowRoot() || m_anchorNode == containerNode());
#else
ASSERT(!m_anchorNode || !m_anchorNode->isShadowRoot() || m_anchorNode == containerNode());
#endif
, m_isLegacyEditingPosition(false)
{
#if ENABLE(SHADOW_DOM)
- ASSERT((m_anchorNode && RuntimeEnabledFeatures::shadowDOMEnabled())
+ ASSERT((m_anchorNode && RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled())
|| !m_anchorNode || !editingIgnoresContent(m_anchorNode.get()) || !m_anchorNode->isShadowRoot());
#else
ASSERT(!m_anchorNode || !editingIgnoresContent(m_anchorNode.get()) || !m_anchorNode->isShadowRoot());
// FIXME: See http://web.ug/82697
#if ENABLE(SHADOW_DOM)
- if (RuntimeEnabledFeatures::shadowDOMEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled())
return node->parentNode();
#endif
// as a container. It is now enabled only if runtime Shadow DOM feature is enabled.
// See https://bugs.webkit.org/show_bug.cgi?id=82697
#if ENABLE(SHADOW_DOM)
- if (RuntimeEnabledFeatures::shadowDOMEnabled()) {
+ if (RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled()) {
m_selection = DOMSelection::create(this);
return m_selection.get();
}
my $runtimeConditional = $enabledTags{$tagName}{runtimeConditional};
if ($runtimeConditional) {
print F <<END
- if (!RuntimeEnabledFeatures::${runtimeConditional}Enabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().${runtimeConditional}Enabled())
return 0;
END
;
print F <<END
static JSDOMWrapper* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{namespace}Element> element)
{
- if (!RuntimeEnabledFeatures::${runtimeConditional}Enabled()) {
+ if (!RuntimeEnabledFeatures::sharedFeatures().${runtimeConditional}Enabled()) {
ASSERT(!element || element->is$parameters{fallbackInterfaceName}());
return CREATE_DOM_WRAPPER(exec, globalObject, $parameters{fallbackJSInterfaceName}, element.get());
}
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Apple Inc. All rights reserved.
* (C) 2006 Alexey Proskuryakov (ap@nypop.com)
* Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
* Copyright (C) 2010 Google Inc. All rights reserved.
bool HTMLInputElement::isSpeechEnabled() const
{
// FIXME: Add support for RANGE, EMAIL, URL, COLOR and DATE/TIME input types.
- return m_inputType->shouldRespectSpeechAttribute() && RuntimeEnabledFeatures::speechInputEnabled() && hasAttribute(webkitspeechAttr);
+ return m_inputType->shouldRespectSpeechAttribute() && RuntimeEnabledFeatures::sharedFeatures().speechInputEnabled() && hasAttribute(webkitspeechAttr);
}
#endif
parameters.minimum = minimum();
parameters.maximum = maximum();
parameters.required = isRequired();
- if (!RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().langAttributeAwareFormControlUIEnabled())
parameters.locale = defaultLanguage();
else {
AtomicString computedLocale = computeInheritedLanguage();
#endif
#if ENABLE(VIDEO_TRACK)
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
auto trackDescendants = descendantsOfType<HTMLTrackElement>(this);
}
#if ENABLE(VIDEO_TRACK)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled() && (actionType & ConfigureTextTracks))
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled() && (actionType & ConfigureTextTracks))
setFlags(m_pendingActionFlags, ConfigureTextTracks);
#endif
Ref<HTMLMediaElement> protect(*this); // loadNextSourceChild may fire 'beforeload', which can make arbitrary DOM mutations.
#if ENABLE(VIDEO_TRACK)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled() && (m_pendingActionFlags & ConfigureTextTracks))
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled() && (m_pendingActionFlags & ConfigureTextTracks))
configureTextTracks();
#endif
}
#if USE(PLATFORM_TEXT_TRACK_MENU)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled() && (m_pendingActionFlags & TextTrackChangesNotification))
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled() && (m_pendingActionFlags & TextTrackChangesNotification))
notifyMediaPlayerOfTextTrackChanges();
#endif
scheduleEvent(eventNames().emptiedEvent);
updateMediaController();
#if ENABLE(VIDEO_TRACK)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
updateActiveTextTrackCues(0);
#endif
}
// HTMLMediaElement::textTracksAreReady will need "... the text tracks whose mode was not in the
// disabled state when the element's resource selection algorithm last started".
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled()) {
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled()) {
m_textTracksWhenResourceSelectionBegan.clear();
if (m_textTracks) {
for (unsigned i = 0; i < m_textTracks->length(); ++i) {
ReadyState newState = static_cast<ReadyState>(state);
#if ENABLE(VIDEO_TRACK)
- bool tracksAreReady = !RuntimeEnabledFeatures::webkitVideoTrackEnabled() || textTracksAreReady();
+ bool tracksAreReady = !RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled() || textTracksAreReady();
if (newState == oldState && m_tracksAreReady == tracksAreReady)
return;
updatePlayState();
updateMediaController();
#if ENABLE(VIDEO_TRACK)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
updateActiveTextTrackCues(currentTime());
#endif
}
mediaControls()->playbackProgressed();
#if ENABLE(VIDEO_TRACK)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
updateActiveTextTrackCues(currentTime());
#endif
}
void HTMLMediaElement::mediaPlayerDidAddAudioTrack(PassRefPtr<AudioTrackPrivate> prpTrack)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
addAudioTrack(AudioTrack::create(this, prpTrack));
void HTMLMediaElement::mediaPlayerDidAddTextTrack(PassRefPtr<InbandTextTrackPrivate> prpTrack)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
// 4.8.10.12.2 Sourcing in-band text tracks
void HTMLMediaElement::mediaPlayerDidAddVideoTrack(PassRefPtr<VideoTrackPrivate> prpTrack)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
addVideoTrack(VideoTrack::create(this, prpTrack));
void HTMLMediaElement::addAudioTrack(PassRefPtr<AudioTrack> track)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
audioTracks()->append(track);
void HTMLMediaElement::addTextTrack(PassRefPtr<TextTrack> track)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
textTracks()->append(track);
void HTMLMediaElement::addVideoTrack(PassRefPtr<VideoTrack> track)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
videoTracks()->append(track);
void HTMLMediaElement::removeAudioTrack(AudioTrack* track)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
m_audioTracks->remove(track);
void HTMLMediaElement::removeTextTrack(TextTrack* track)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
TrackDisplayUpdateScope scope(this);
void HTMLMediaElement::removeVideoTrack(VideoTrack* track)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
m_videoTracks->remove(track);
PassRefPtr<TextTrack> HTMLMediaElement::addTextTrack(const String& kind, const String& label, const String& language, ExceptionCode& ec)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return 0;
// 4.8.10.12.4 Text track API
AudioTrackList* HTMLMediaElement::audioTracks()
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return 0;
if (!m_audioTracks)
TextTrackList* HTMLMediaElement::textTracks()
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return 0;
if (!m_textTracks)
VideoTrackList* HTMLMediaElement::videoTracks()
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return 0;
if (!m_videoTracks)
{
ASSERT(trackElement->hasTagName(trackTag));
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
// 4.8.10.12.3 Sourcing out-of-band text tracks
{
ASSERT(trackElement->hasTagName(trackTag));
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
#if !LOG_DISABLED
LOG(Media, "HTMLMediaElement::mediaPlayerTimeChanged");
#if ENABLE(VIDEO_TRACK)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
updateActiveTextTrackCues(currentTime());
#endif
m_readyState = HAVE_NOTHING;
updateMediaController();
#if ENABLE(VIDEO_TRACK)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
updateActiveTextTrackCues(0);
#endif
}
return true;
#if ENABLE(VIDEO_TRACK)
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled() || !m_textTracks)
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled() || !m_textTracks)
return false;
for (unsigned i = 0; i < m_textTracks->length(); ++i) {
m_player->setClosedCaptionsVisible(closedCaptionVisible);
#if ENABLE(VIDEO_TRACK)
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled()) {
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled()) {
markCaptionAndSubtitleTracksAsUnconfigured(Immediately);
updateTextTrackDisplay();
}
mediaControls()->changedClosedCaptionsVisibility();
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled()) {
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled()) {
updateTextTrackDisplay();
updateActiveTextTrackCues(currentTime());
}
if (name == titleAttr && sheet())
sheet()->setTitle(value);
#if ENABLE(STYLE_SCOPED)
- else if (name == scopedAttr && RuntimeEnabledFeatures::styleScopedEnabled())
+ else if (name == scopedAttr && RuntimeEnabledFeatures::sharedFeatures().styleScopedEnabled())
scopedAttributeChanged(!value.isNull());
#endif
else if (name == mediaAttr) {
#if ENABLE(STYLE_SCOPED)
void HTMLStyleElement::scopedAttributeChanged(bool scoped)
{
- ASSERT(RuntimeEnabledFeatures::styleScopedEnabled());
+ ASSERT(RuntimeEnabledFeatures::sharedFeatures().styleScopedEnabled());
if (!inDocument())
return;
void HTMLStyleElement::unregisterWithScopingNode(ContainerNode* scope)
{
- ASSERT(m_scopedStyleRegistrationState != NotRegistered || !RuntimeEnabledFeatures::styleScopedEnabled());
+ ASSERT(m_scopedStyleRegistrationState != NotRegistered || !RuntimeEnabledFeatures::sharedFeatures().styleScopedEnabled());
if (!isRegisteredAsScoped())
return;
bool HTMLStyleElement::scoped() const
{
- return RuntimeEnabledFeatures::styleScopedEnabled() && fastHasAttribute(scopedAttr);
+ return RuntimeEnabledFeatures::sharedFeatures().styleScopedEnabled() && fastHasAttribute(scopedAttr);
}
void HTMLStyleElement::setScoped(bool scopedValue)
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
void HTMLTrackElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- if (RuntimeEnabledFeatures::webkitVideoTrackEnabled()) {
+ if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled()) {
if (name == srcAttr) {
if (!value.isEmpty())
scheduleLoad();
if (m_loadTimer.isActive())
return;
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return;
// 2. If the text track's text track mode is not set to one of hidden or showing, abort these steps.
bool HTMLTrackElement::canLoadUrl(const KURL& url)
{
- if (!RuntimeEnabledFeatures::webkitVideoTrackEnabled())
+ if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
return false;
HTMLMediaElement* parent = mediaElement();
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Apple Inc. All rights reserved.
* (C) 2006 Alexey Proskuryakov (ap@nypop.com)
* Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
* Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved.
map->add(InputTypeNames::color(), &ColorInputType::create);
#endif
#if ENABLE(INPUT_TYPE_DATE)
- if (RuntimeEnabledFeatures::inputTypeDateEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().inputTypeDateEnabled())
map->add(InputTypeNames::date(), &DateInputType::create);
#endif
#if ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE)
- if (RuntimeEnabledFeatures::inputTypeDateTimeEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().inputTypeDateTimeEnabled())
map->add(InputTypeNames::datetime(), &DateTimeInputType::create);
#endif
#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
- if (RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().inputTypeDateTimeLocalEnabled())
map->add(InputTypeNames::datetimelocal(), &DateTimeLocalInputType::create);
#endif
map->add(InputTypeNames::email(), &EmailInputType::create);
map->add(InputTypeNames::hidden(), &HiddenInputType::create);
map->add(InputTypeNames::image(), &ImageInputType::create);
#if ENABLE(INPUT_TYPE_MONTH)
- if (RuntimeEnabledFeatures::inputTypeMonthEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().inputTypeMonthEnabled())
map->add(InputTypeNames::month(), &MonthInputType::create);
#endif
map->add(InputTypeNames::number(), &NumberInputType::create);
map->add(InputTypeNames::submit(), &SubmitInputType::create);
map->add(InputTypeNames::telephone(), &TelephoneInputType::create);
#if ENABLE(INPUT_TYPE_TIME)
- if (RuntimeEnabledFeatures::inputTypeTimeEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().inputTypeTimeEnabled())
map->add(InputTypeNames::time(), &TimeInputType::create);
#endif
map->add(InputTypeNames::url(), &URLInputType::create);
#if ENABLE(INPUT_TYPE_WEEK)
- if (RuntimeEnabledFeatures::inputTypeWeekEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().inputTypeWeekEnabled())
map->add(InputTypeNames::week(), &WeekInputType::create);
#endif
// No need to register "text" because it is the default type.
/*
* Copyright (C) 2011 Google, Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
bool ContentSecurityPolicy::experimentalFeaturesEnabled() const
{
#if ENABLE(CSP_NEXT)
- return RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled();
+ return RuntimeEnabledFeatures::sharedFeatures().experimentalContentSecurityPolicyFeaturesEnabled();
#else
return false;
#endif
else if (eventType == eventNames().beforeunloadEvent && allowsBeforeUnloadListeners(this))
addBeforeUnloadEventListener(this);
#if ENABLE(DEVICE_ORIENTATION)
- else if (eventType == eventNames().devicemotionEvent && RuntimeEnabledFeatures::deviceMotionEnabled()) {
+ else if (eventType == eventNames().devicemotionEvent && RuntimeEnabledFeatures::sharedFeatures().deviceMotionEnabled()) {
if (DeviceMotionController* controller = DeviceMotionController::from(page()))
controller->addDeviceEventListener(this);
- } else if (eventType == eventNames().deviceorientationEvent && RuntimeEnabledFeatures::deviceOrientationEnabled()) {
+ } else if (eventType == eventNames().deviceorientationEvent && RuntimeEnabledFeatures::sharedFeatures().deviceOrientationEnabled()) {
if (DeviceOrientationController* controller = DeviceOrientationController::from(page()))
controller->addDeviceEventListener(this);
}
* 1999 Lars Knoll <knoll@kde.org>
* 1999 Antti Koivisto <koivisto@kde.org>
* 2000 Dirk Mueller <mueller@kde.org>
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserved.
* (C) 2006 Graham Dennis (graham.dennis@gmail.com)
* (C) 2006 Alexey Proskuryakov (ap@nypop.com)
* Copyright (C) 2009 Google Inc. All rights reserved.
frame().loader().didLayout(milestonesAchieved);
#if ENABLE(FONT_LOAD_EVENTS)
- if (RuntimeEnabledFeatures::fontLoadEventsEnabled())
+ if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled())
frame().document()->fontloader()->didLayout();
#endif
namespace WebCore {
InternalSettings::Backup::Backup(Settings& settings)
- : m_originalCSSExclusionsEnabled(RuntimeEnabledFeatures::cssExclusionsEnabled())
- , m_originalCSSShapesEnabled(RuntimeEnabledFeatures::cssShapesEnabled())
+ : m_originalCSSExclusionsEnabled(RuntimeEnabledFeatures::sharedFeatures().cssExclusionsEnabled())
+ , m_originalCSSShapesEnabled(RuntimeEnabledFeatures::sharedFeatures().cssShapesEnabled())
, m_originalCSSVariablesEnabled(settings.cssVariablesEnabled())
#if ENABLE(SHADOW_DOM)
- , m_originalShadowDOMEnabled(RuntimeEnabledFeatures::shadowDOMEnabled())
- , m_originalAuthorShadowDOMForAnyElementEnabled(RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled())
+ , m_originalShadowDOMEnabled(RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled())
+ , m_originalAuthorShadowDOMForAnyElementEnabled(RuntimeEnabledFeatures::sharedFeatures().authorShadowDOMForAnyElementEnabled())
#endif
#if ENABLE(STYLE_SCOPED)
- , m_originalStyleScoped(RuntimeEnabledFeatures::styleScopedEnabled())
+ , m_originalStyleScoped(RuntimeEnabledFeatures::sharedFeatures().styleScopedEnabled())
#endif
, m_originalEditingBehavior(settings.editingBehaviorType())
#if ENABLE(TEXT_AUTOSIZING)
, m_originalMediaTypeOverride(settings.mediaTypeOverride())
, m_originalCanvasUsesAcceleratedDrawing(settings.canvasUsesAcceleratedDrawing())
, m_originalMockScrollbarsEnabled(settings.mockScrollbarsEnabled())
- , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled())
+ , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::sharedFeatures().langAttributeAwareFormControlUIEnabled())
, m_imagesEnabled(settings.areImagesEnabled())
, m_minimumTimerInterval(settings.minDOMTimerInterval())
#if ENABLE(VIDEO_TRACK)
void InternalSettings::Backup::restoreTo(Settings& settings)
{
- RuntimeEnabledFeatures::setCSSExclusionsEnabled(m_originalCSSExclusionsEnabled);
- RuntimeEnabledFeatures::setCSSShapesEnabled(m_originalCSSShapesEnabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSExclusionsEnabled(m_originalCSSExclusionsEnabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSShapesEnabled(m_originalCSSShapesEnabled);
settings.setCSSVariablesEnabled(m_originalCSSVariablesEnabled);
#if ENABLE(SHADOW_DOM)
- RuntimeEnabledFeatures::setShadowDOMEnabled(m_originalShadowDOMEnabled);
- RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(m_originalAuthorShadowDOMForAnyElementEnabled);
+ RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(m_originalShadowDOMEnabled);
+ RuntimeEnabledFeatures::sharedFeatures().setAuthorShadowDOMForAnyElementEnabled(m_originalAuthorShadowDOMForAnyElementEnabled);
#endif
#if ENABLE(STYLE_SCOPED)
- RuntimeEnabledFeatures::setStyleScopedEnabled(m_originalStyleScoped);
+ RuntimeEnabledFeatures::sharedFeatures().setStyleScopedEnabled(m_originalStyleScoped);
#endif
settings.setEditingBehaviorType(m_originalEditingBehavior);
#if ENABLE(TEXT_AUTOSIZING)
settings.setMediaTypeOverride(m_originalMediaTypeOverride);
settings.setCanvasUsesAcceleratedDrawing(m_originalCanvasUsesAcceleratedDrawing);
settings.setMockScrollbarsEnabled(m_originalMockScrollbarsEnabled);
- RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(m_langAttributeAwareFormControlUIEnabled);
+ RuntimeEnabledFeatures::sharedFeatures().setLangAttributeAwareFormControlUIEnabled(m_langAttributeAwareFormControlUIEnabled);
settings.setImagesEnabled(m_imagesEnabled);
settings.setMinDOMTimerInterval(m_minimumTimerInterval);
#if ENABLE(VIDEO_TRACK)
}
#if ENABLE(SHADOW_DOM)
- RuntimeEnabledFeatures::setShadowDOMEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(enabled);
#else
// Even SHADOW_DOM is off, InternalSettings allows setShadowDOMEnabled(false) to
// have broader test coverage. But it cannot be setShadowDOMEnabled(true).
void InternalSettings::setAuthorShadowDOMForAnyElementEnabled(bool isEnabled)
{
#if ENABLE(SHADOW_DOM)
- RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(isEnabled);
+ RuntimeEnabledFeatures::sharedFeatures().setAuthorShadowDOMForAnyElementEnabled(isEnabled);
#else
UNUSED_PARAM(isEnabled);
#endif
void InternalSettings::setStyleScopedEnabled(bool enabled)
{
#if ENABLE(STYLE_SCOPED)
- RuntimeEnabledFeatures::setStyleScopedEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setStyleScopedEnabled(enabled);
#else
UNUSED_PARAM(enabled);
#endif
void InternalSettings::setCSSExclusionsEnabled(bool enabled, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
- RuntimeEnabledFeatures::setCSSExclusionsEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSExclusionsEnabled(enabled);
}
void InternalSettings::setCSSShapesEnabled(bool enabled, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
- RuntimeEnabledFeatures::setCSSShapesEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSShapesEnabled(enabled);
}
void InternalSettings::setCSSVariablesEnabled(bool enabled, ExceptionCode& ec)
void InternalSettings::setLangAttributeAwareFormControlUIEnabled(bool enabled)
{
- RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setLangAttributeAwareFormControlUIEnabled(enabled);
}
void InternalSettings::setImagesEnabled(bool enabled, ExceptionCode& ec)
+2013-09-24 Brent Fulgham <bfulgham@apple.com>
+
+ [Windows] Refactor RuntimeEnabledFeatures as a Singleton
+ https://bugs.webkit.org/show_bug.cgi?id=121883
+
+ Reviewed by Jer Noble.
+
+ * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
+ Expose singleton accessor for DLL clients.
+
2013-09-25 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix after r156408.
symbolWithPointer(?disconnectFrontend@InspectorController@WebCore@@QAEXXZ, ?disconnectFrontend@InspectorController@WebCore@@QEAAXXZ)
#endif
symbolWithPointer(?isActiveInsertionPoint@WebCore@@YA_NPBVNode@1@@Z, ?isActiveInsertionPoint@WebCore@@YA_NPEBVNode@1@@Z)
- ?isCSSExclusionsEnabled@RuntimeEnabledFeatures@WebCore@@0_NA
- ?isCSSShapesEnabled@RuntimeEnabledFeatures@WebCore@@0_NA
symbolWithPointer(?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z, ?isPreloaded@CachedResourceLoader@WebCore@@QEBA_NAEBVString@WTF@@@Z)
symbolWithPointer(?jsArray@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@V?$PassRefPtr@VDOMStringList@WebCore@@@WTF@@@Z, ?jsArray@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@V?$PassRefPtr@VDOMStringList@WebCore@@@WTF@@@Z)
symbolWithPointer(?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QBE_NXZ, ?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QEBA_NXZ)
symbolWithPointer(?setPseudo@Element@WebCore@@QAEXABVAtomicString@WTF@@@Z, ?setPseudo@Element@WebCore@@QEAAXAEBVAtomicString@WTF@@@Z)
symbolWithPointer(?setMediaTypeOverride@Settings@WebCore@@QAEXABVString@WTF@@@Z, ?setMediaTypeOverride@Settings@WebCore@@QEAAXAEBVString@WTF@@@Z)
symbolWithPointer(?settings@Document@WebCore@@QBEPAVSettings@2@XZ, ?settings@Document@WebCore@@QEBAPEAVSettings@2@XZ)
+ ?sharedFeatures@RuntimeEnabledFeatures@WebCore@@SAAAV12@XZ
symbolWithPointer(?substring@String@WTF@@QBE?AV12@II@Z, ?substring@String@WTF@@QEBA?AV12@II@Z)
symbolWithPointer(?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ, ?suggestedValue@HTMLInputElement@WebCore@@QEBAAEBVString@WTF@@XZ)
symbolWithPointer(?target@HistoryItem@WebCore@@QBEABVString@WTF@@XZ, ?target@HistoryItem@WebCore@@QEBAAEBVString@WTF@@XZ)
+2013-09-25 Brent Fulgham <bfulgham@apple.com>
+
+ Refactor RuntimeEnabledFeatures as a Singleton.
+ https://bugs.webkit.org/show_bug.cgi?id=121883.
+
+ Reviewed by Jer Noble.
+
+ * WebKitSupport/DumpRenderTreeSupport.cpp:
+ (DumpRenderTreeSupport::setStyleScopedEnabled): use
+ singleton accessor.
+
2013-09-23 Jacky Jiang <zhajiang@blackberry.com>
[BlackBerry] Poor rendering opening a Google map short link
/*
* Copyright (C) 2012 Research In Motion Limited. All rights reserved.
- * Copyright (C) 2012 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2012, 2013 Apple Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#if ENABLE(STYLE_SCOPED)
void DumpRenderTreeSupport::setStyleScopedEnabled(bool enabled)
{
- RuntimeEnabledFeatures::setStyleScopedEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setStyleScopedEnabled(enabled);
}
#endif
+2013-09-25 Brent Fulgham <bfulgham@apple.com>
+
+ Refactor RuntimeEnabledFeatures as a Singleton.
+ https://bugs.webkit.org/show_bug.cgi?id=121883.
+
+ Reviewed by Jer Noble.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setCSSRegionsEnabled): Use singleton.
+ (DumpRenderTreeSupportEfl::setSeamlessIFramesEnabled): Ditto.
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_shadow_dom_enable_get): Ditto.
+ (ewk_settings_shadow_dom_enable_set):
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new): Ditto.
+
2013-09-20 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Do not expose aria-help in ATK based platforms
Copyright (C) 2011 ProFUSION embedded systems
Copyright (C) 2011 Samsung Electronics
Copyright (C) 2012 Intel Corporation. All rights reserved.
+ Copyright (C) 2013 Apple Inc. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
{
DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
- WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(enabled);
}
void DumpRenderTreeSupportEfl::setSeamlessIFramesEnabled(bool enabled)
{
#if ENABLE(IFRAME_SEAMLESS)
- WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled(enabled);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setSeamlessIFramesEnabled(enabled);
#else
UNUSED_PARAM(enabled);
#endif
Copyright (C) 2009-2010 ProFUSION embedded systems
Copyright (C) 2009-2010 Samsung Electronics
Copyright (C) 2012 Intel Corporation
+ Copyright (C) 2013 Apple Inc. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
Eina_Bool ewk_settings_shadow_dom_enable_get()
{
#if ENABLE(SHADOW_DOM)
- return WebCore::RuntimeEnabledFeatures::shadowDOMEnabled();
+ return WebCore::RuntimeEnabledFeatures::sharedFeatures().shadowDOMEnabled();
#else
return false;
#endif
{
#if ENABLE(SHADOW_DOM)
enable = !!enable;
- WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled(enable);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(enable);
return true;
#else
UNUSED_PARAM(enable);
Copyright (C) 2009-2010 ProFUSION embedded systems
Copyright (C) 2009-2012 Samsung Electronics
Copyright (C) 2012 Intel Corporation
+ Copyright (C) 2013 Apple Inc. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
priv->pageSettings->setSansSerifFontFamily("sans");
priv->pageSettings->setStandardFontFamily("sans");
priv->pageSettings->setHyperlinkAuditingEnabled(false);
- WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(true);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(true);
#if ENABLE(IFRAME_SEAMLESS)
- WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled(true);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setSeamlessIFramesEnabled(true);
#endif
priv->pageSettings->setScriptEnabled(true);
priv->pageSettings->setPluginsEnabled(true);
+2013-09-25 Brent Fulgham <bfulgham@apple.com>
+
+ Refactor RuntimeEnabledFeatures as a Singleton.
+ https://bugs.webkit.org/show_bug.cgi?id=121883.
+
+ Reviewed by Jer Noble.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::setCSSRegionsEnabled): Use singleton.
+ (DumpRenderTreeSupportGtk::setExperimentalContentSecurityPolicyFeaturesEnabled):
+ (DumpRenderTreeSupportGtk::setSeamlessIFramesEnabled):
+ (DumpRenderTreeSupportGtk::setShadowDOMEnabled):
+ (DumpRenderTreeSupportGtk::setStyleScopedEnabled):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings): Ditto.
+
2013-09-24 Lorenzo Tilve <ltilve@igalia.com>
[GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
* Copyright (C) 2010 Joone Hur <joone@kldp.org>
* Copyright (C) 2009 Google Inc. All rights reserved.
* Copyright (C) 2011 Igalia S.L.
- * Copyright (C) 2012 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2012, 2013 Apple Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
void DumpRenderTreeSupportGtk::setCSSRegionsEnabled(WebKitWebView* webView, bool enabled)
{
- RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(enabled);
}
void DumpRenderTreeSupportGtk::setCSSCustomFilterEnabled(WebKitWebView* webView, bool enabled)
void DumpRenderTreeSupportGtk::setExperimentalContentSecurityPolicyFeaturesEnabled(bool enabled)
{
#if ENABLE(CSP_NEXT)
- RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setExperimentalContentSecurityPolicyFeaturesEnabled(enabled);
#endif
}
void DumpRenderTreeSupportGtk::setSeamlessIFramesEnabled(bool enabled)
{
#if ENABLE(IFRAME_SEAMLESS)
- RuntimeEnabledFeatures::setSeamlessIFramesEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setSeamlessIFramesEnabled(enabled);
#endif
}
void DumpRenderTreeSupportGtk::setShadowDOMEnabled(bool enabled)
{
#if ENABLE(SHADOW_DOM)
- RuntimeEnabledFeatures::setShadowDOMEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(enabled);
#endif
}
void DumpRenderTreeSupportGtk::setStyleScopedEnabled(bool enabled)
{
#if ENABLE(STYLE_SCOPED)
- RuntimeEnabledFeatures::setStyleScopedEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setStyleScopedEnabled(enabled);
#endif
}
* Copyright (C) 2009 Bobby Powers
* Copyright (C) 2010 Joone Hur <joone@kldp.org>
* Copyright (C) 2012 Igalia S.L.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#endif
#if ENABLE(MEDIA_STREAM)
- WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled(settingsPrivate->enableMediaStream);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setMediaStreamEnabled(settingsPrivate->enableMediaStream);
#endif
#if USE(ACCELERATED_COMPOSITING)
+2013-09-25 Brent Fulgham <bfulgham@apple.com>
+
+ Refactor RuntimeEnabledFeatures as a Singleton.
+ https://bugs.webkit.org/show_bug.cgi?id=121883.
+
+ Reviewed by Jer Noble.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]): Use singleton accessor.
+ (-[WebView _setDashboardBehavior:to:]): Ditto.
+
2013-09-25 Brady Eidson <beidson@apple.com>
FeatureDefine.xcconfig cleanup (They should all be identical).
/*
- * Copyright (C) 2005-2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2005-2013 Apple Inc. All rights reserved.
* Copyright (C) 2006 David Smith (catfish.man@gmail.com)
* Copyright (C) 2010 Igalia S.L
*
#if ENABLE(CSS_SHADERS)
settings.setCSSCustomFilterEnabled([preferences cssCustomFilterEnabled]);
#endif
- RuntimeEnabledFeatures::setCSSRegionsEnabled([preferences cssRegionsEnabled]);
- RuntimeEnabledFeatures::setCSSCompositingEnabled([preferences cssCompositingEnabled]);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled([preferences cssRegionsEnabled]);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSCompositingEnabled([preferences cssCompositingEnabled]);
#if ENABLE(WEB_AUDIO)
settings.setWebAudioEnabled([preferences webAudioEnabled]);
#endif
#if ENABLE(IFRAME_SEAMLESS)
- RuntimeEnabledFeatures::setSeamlessIFramesEnabled([preferences seamlessIFramesEnabled]);
+ RuntimeEnabledFeatures::sharedFeatures().setSeamlessIFramesEnabled([preferences seamlessIFramesEnabled]);
#endif
settings.setCSSGridLayoutEnabled([preferences cssGridLayoutEnabled]);
#if ENABLE(FULLSCREEN_API)
if (_private->page)
_private->page->settings().setUsesDashboardBackwardCompatibilityMode(flag);
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
- RuntimeEnabledFeatures::setLegacyCSSVendorPrefixesEnabled(flag);
+ RuntimeEnabledFeatures::sharedFeatures().setLegacyCSSVendorPrefixesEnabled(flag);
#endif
break;
}
/*
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ Copyright (C) 2013 Apple Inc. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
value = attributes.value(QWebSettings::CSSRegionsEnabled,
global->attributes.value(QWebSettings::CSSRegionsEnabled));
- WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(value);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(value);
value = attributes.value(QWebSettings::CSSCompositingEnabled,
global->attributes.value(QWebSettings::CSSCompositingEnabled));
- WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled(value);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setCSSCompositingEnabled(value);
value = attributes.value(QWebSettings::CSSGridLayoutEnabled,
global->attributes.value(QWebSettings::CSSGridLayoutEnabled));
settings->setCSSGridLayoutEnabled(value);
+2013-09-25 Brent Fulgham <bfulgham@apple.com>
+
+ Refactor RuntimeEnabledFeatures as a Singleton.
+ https://bugs.webkit.org/show_bug.cgi?id=121883.
+
+ Reviewed by Jer Noble.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply): Use singleton accessor.
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setSeamlessIFramesEnabled): Ditto.
+
2013-09-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Fix build with Qt 5.2 QtPosition module
Copyright (C) 2010 Robert Hogan <robert@roberthogan.net>
Copyright (C) 2008,2009,2010 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2007 Staikos Computing Services Inc.
- Copyright (C) 2007, 2012 Apple Inc.
+ Copyright (C) 2007, 2012, 2013 Apple Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
void DumpRenderTreeSupportQt::setSeamlessIFramesEnabled(bool enabled)
{
#if ENABLE(IFRAME_SEAMLESS)
- WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled(enabled);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setSeamlessIFramesEnabled(enabled);
#else
UNUSED_PARAM(enabled);
#endif
+2013-09-24 Brent Fulgham <bfulgham@apple.com>
+
+ [Windows] Refactor RuntimeEnabledFeatures as a Singleton.
+ https://bugs.webkit.org/show_bug.cgi?id=121883
+
+ Reviewed by Jer Noble.
+
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged): Use singleton accessor
+
2013-09-24 Roger Fong <roger_fong@apple.com>
[Windows] Overpanning occurs even when what is being panned isn't the main document.
hr = preferences->isCSSRegionsEnabled(&enabled);
if (FAILED(hr))
return hr;
- RuntimeEnabledFeatures::setCSSRegionsEnabled(!!enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(!!enabled);
hr = preferences->areSeamlessIFramesEnabled(&enabled);
if (FAILED(hr))
return hr;
- RuntimeEnabledFeatures::setSeamlessIFramesEnabled(!!enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setSeamlessIFramesEnabled(!!enabled);
hr = preferences->privateBrowsingEnabled(&enabled);
if (FAILED(hr))
+2013-09-25 Brent Fulgham <bfulgham@apple.com>
+
+ Refactor RuntimeEnabledFeatures as a Singleton.
+ https://bugs.webkit.org/show_bug.cgi?id=121883.
+
+ Reviewed by Jer Noble.
+
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Use
+ Singleton accessor.
+ (WebKit::InjectedBundle::setShadowDOMEnabled):
+ (WebKit::InjectedBundle::setCSSRegionsEnabled):
+ (WebKit::InjectedBundle::setCSSCompositingEnabled):
+ (WebKit::InjectedBundle::setSeamlessIFramesEnabled):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences): Ditto.
+ * WebProcess/qt/WebProcessQt.cpp:
+ (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
+
2013-09-25 Brady Eidson <beidson@apple.com>
FeatureDefine.xcconfig cleanup (They should all be identical).
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#if ENABLE(CSS_REGIONS)
if (preference == "WebKitCSSRegionsEnabled")
- RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(enabled);
#endif
#if ENABLE(CSS_COMPOSITING)
if (preference == "WebKitCSSCompositingEnabled")
- RuntimeEnabledFeatures::setCSSCompositingEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSCompositingEnabled(enabled);
#endif
// Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
void InjectedBundle::setShadowDOMEnabled(bool enabled)
{
#if ENABLE(SHADOW_DOM)
- RuntimeEnabledFeatures::setShadowDOMEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(enabled);
#else
UNUSED_PARAM(enabled);
#endif
void InjectedBundle::setCSSRegionsEnabled(bool enabled)
{
#if ENABLE(CSS_REGIONS)
- RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(enabled);
#else
UNUSED_PARAM(enabled);
#endif
void InjectedBundle::setCSSCompositingEnabled(bool enabled)
{
#if ENABLE(CSS_COMPOSITING)
- RuntimeEnabledFeatures::setCSSCompositingEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setCSSCompositingEnabled(enabled);
#else
UNUSED_PARAM(enabled);
#endif
void InjectedBundle::setSeamlessIFramesEnabled(bool enabled)
{
#if ENABLE(IFRAME_SEAMLESS)
- RuntimeEnabledFeatures::setSeamlessIFramesEnabled(enabled);
+ RuntimeEnabledFeatures::sharedFeatures().setSeamlessIFramesEnabled(enabled);
#else
UNUSED_PARAM(enabled);
#endif
settings.setShowTiledScrollingIndicator(store.getBoolValueForKey(WebPreferencesKey::tiledScrollingIndicatorVisibleKey()));
settings.setAggressiveTileRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::aggressiveTileRetentionEnabledKey()));
settings.setCSSCustomFilterEnabled(store.getBoolValueForKey(WebPreferencesKey::cssCustomFilterEnabledKey()));
- RuntimeEnabledFeatures::setCSSRegionsEnabled(store.getBoolValueForKey(WebPreferencesKey::cssRegionsEnabledKey()));
- RuntimeEnabledFeatures::setCSSCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::cssCompositingEnabledKey()));
+ RuntimeEnabledFeatures::sharedFeatures().setCSSRegionsEnabled(store.getBoolValueForKey(WebPreferencesKey::cssRegionsEnabledKey()));
+ RuntimeEnabledFeatures::sharedFeatures().setCSSCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::cssCompositingEnabledKey()));
settings.setCSSGridLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::cssGridLayoutEnabledKey()));
settings.setRegionBasedColumnsEnabled(store.getBoolValueForKey(WebPreferencesKey::regionBasedColumnsEnabledKey()));
settings.setWebGLEnabled(store.getBoolValueForKey(WebPreferencesKey::webGLEnabledKey()));
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
}
#endif
- WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled(false);
+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setSpeechInputEnabled(false);
// We'll only install the Qt builtin bundle if we don't have one given by the UI process.
// Currently only WTR provides its own bundle.