Remove custom code for webkitAudioContext global constructor getter
authorch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 May 2013 22:57:29 +0000 (22:57 +0000)
committerch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 May 2013 22:57:29 +0000 (22:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=116530

Reviewed by Geoffrey Garen.

Source/WebCore:

Get rid of custom code for webkitAudioContext global constructor getter. The
global DOMWindow attribute is now automatically generated by leveraging support
for [EnabledAtRuntime] extended attribute and the existing methods in
RuntimeEnabledFeatures class.

No new tests, no behavior change.

* GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
* Modules/webaudio/AudioContext.idl:
Remove [NoInterfaceObject] extended attribute so that the global constructor is
automatically generated instead of automatically added. Add [EnabledAtRuntime]
extended attribute since this global constructor can be disabled at runtime and
so that we can getter rid of the [CustomGetter] for the corresponding global
constructor. Use [InterfaceName] extended attribute so that the interface name
matches the global constructor on DOMWindow (webkitAudioContext).

* Target.pri: Remove JSDOMWindowWebAudioCustom.*.
* UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.exp.in: Export additional symbol.
* WebCore.order: Export additional symbol.
* WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
* bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
* bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
bindings generator now.
* page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
generated.
* page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
in RuntimeEnabledFeatures now.

Source/WebKit/efl:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::setWebAudioEnabled):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_priv_new):
* ewk/ewk_view.h: Remove public API to toggle Web Audio support as it is no longer
a view specific feature.

Source/WebKit/gtk:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):

Source/WebKit/mac:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/qt:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):

Source/WebKit/win:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Update EFL's DumpRenderTree to use DumpRenderTreeSupport to toggle
WebAudio feature instead of public ewk_view API since that API was
removed.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/efl/TestRunnerEfl.cpp:
(TestRunner::overridePreference):

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

35 files changed:
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/webaudio/AudioContext.idl
Source/WebCore/Target.pri
Source/WebCore/UseJSC.cmake
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.order
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSDOMWindowWebAudioCustom.cpp [deleted file]
Source/WebCore/page/DOMWindow.idl
Source/WebCore/page/Settings.in
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Source/WebKit/efl/ewk/ewk_view.cpp
Source/WebKit/efl/ewk/ewk_view.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/Api/qwebsettings.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
Tools/DumpRenderTree/efl/TestRunnerEfl.cpp

index 18af9a0..3ddfcde 100644 (file)
@@ -1,3 +1,45 @@
+2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Remove custom code for webkitAudioContext global constructor getter
+        https://bugs.webkit.org/show_bug.cgi?id=116530
+
+        Reviewed by Geoffrey Garen.
+
+        Get rid of custom code for webkitAudioContext global constructor getter. The
+        global DOMWindow attribute is now automatically generated by leveraging support
+        for [EnabledAtRuntime] extended attribute and the existing methods in
+        RuntimeEnabledFeatures class.
+
+        No new tests, no behavior change.
+
+        * GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
+        * Modules/webaudio/AudioContext.idl:
+        Remove [NoInterfaceObject] extended attribute so that the global constructor is
+        automatically generated instead of automatically added. Add [EnabledAtRuntime]
+        extended attribute since this global constructor can be disabled at runtime and
+        so that we can getter rid of the [CustomGetter] for the corresponding global
+        constructor. Use [InterfaceName] extended attribute so that the interface name
+        matches the global constructor on DOMWindow (webkitAudioContext).
+
+        * Target.pri: Remove JSDOMWindowWebAudioCustom.*.
+        * UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
+        * WebCore.exp.in: Export additional symbol.
+        * WebCore.order: Export additional symbol.
+        * WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
+        * WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
+        * WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
+        * bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
+        * bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
+        the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
+        bindings generator now.
+        * page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
+        generated.
+        * page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
+        in RuntimeEnabledFeatures now.
+
 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
 
         [AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
index 9c33ed0..5947fb5 100644 (file)
@@ -2393,7 +2393,6 @@ webcore_sources += \
        Source/WebCore/bindings/js/JSDOMWindowCustom.h \
        Source/WebCore/bindings/js/JSDOMWindowShell.cpp \
        Source/WebCore/bindings/js/JSDOMWindowShell.h \
-       Source/WebCore/bindings/js/JSDOMWindowWebAudioCustom.cpp \
        Source/WebCore/bindings/js/JSDOMWrapper.cpp \
        Source/WebCore/bindings/js/JSDOMWrapper.h \
        Source/WebCore/bindings/js/JSDataViewCustom.cpp \
index 111add8..5db3401 100644 (file)
  */
 
 [
-    NoInterfaceObject,
+    EnabledAtRuntime,
     Conditional=WEB_AUDIO,
     ActiveDOMObject,
     CustomConstructor,
-    EventTarget
+    EventTarget,
+    InterfaceName=webkitAudioContext
 ] interface AudioContext {
     // All rendered audio ultimately connects to destination, which represents the audio hardware.
     readonly attribute AudioDestinationNode destination;
index 4df78d4..3f531ed 100644 (file)
@@ -113,7 +113,6 @@ SOURCES += \
      bindings/js/JSDOMWindowBase.cpp \
      bindings/js/JSDOMWindowCustom.cpp \
      bindings/js/JSDOMWindowShell.cpp \
-     bindings/js/JSDOMWindowWebAudioCustom.cpp \
      bindings/js/JSDOMWrapper.cpp \
      bindings/js/JSDataViewCustom.cpp \
      bindings/js/JSDeviceMotionEventCustom.cpp \
@@ -3480,7 +3479,6 @@ enable?(WEB_AUDIO) {
         bindings/js/JSAudioBufferSourceNodeCustom.cpp \
         bindings/js/JSAudioContextCustom.cpp \
         bindings/js/JSBiquadFilterNodeCustom.cpp \
-        bindings/js/JSDOMWindowWebAudioCustom.cpp \
         bindings/js/JSOscillatorNodeCustom.cpp \
         bindings/js/JSPannerNodeCustom.cpp \
         Modules/webaudio/AsyncAudioDecoder.cpp \
index 79b1e88..aa4f910 100644 (file)
@@ -65,7 +65,6 @@ list(APPEND WebCore_SOURCES
     bindings/js/JSDOMWindowBase.cpp
     bindings/js/JSDOMWindowCustom.cpp
     bindings/js/JSDOMWindowShell.cpp
-    bindings/js/JSDOMWindowWebAudioCustom.cpp
     bindings/js/JSDOMWrapper.cpp
     bindings/js/JSDeviceMotionEventCustom.cpp
     bindings/js/JSDeviceOrientationEventCustom.cpp
index 50b4f0f..ac4403d 100644 (file)
@@ -2675,6 +2675,10 @@ __ZN7WebCore22RuntimeEnabledFeatures37isAuthorShadowDOMForAnyElementEnabledE
 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ShadowRootE
 #endif
 
+#if ENABLE(WEB_AUDIO)
+__ZN7WebCore22RuntimeEnabledFeatures17isWebAudioEnabledE
+#endif
+
 #if ENABLE(DIALOG_ELEMENT)
 __ZN7WebCore22RuntimeEnabledFeatures22isDialogElementEnabledE
 #endif
index e336bbe..7fa3184 100644 (file)
@@ -40818,6 +40818,7 @@ __ZN7WebCore23PlatformInstrumentation8m_clientE
 __ZN7WebCore21RenderLayerFilterInfo11s_filterMapE
 __ZN7WebCore23RenderSVGResourceMasker14s_resourceTypeE
 __ZN7WebCore15ResourceRequest23s_httpPipeliningEnabledE
+__ZN7WebCore22RuntimeEnabledFeatures17isWebAudioEnabledE
 __ZN7WebCore22RuntimeEnabledFeatures22isCSSExclusionsEnabledE
 __ZN7WebCore22RuntimeEnabledFeatures40isLangAttributeAwareFormControlUIEnabledE
 __ZN7WebCore8Settings33gDefaultDOMTimerAlignmentIntervalE
index 71895af..7f6c9fc 100755 (executable)
                                        >
                                </File>
                                <File
-                                       RelativePath="..\bindings\js\JSDOMWindowWebAudioCustom.cpp"
-                                       >
-                                       <FileConfiguration
-                                               Name="Debug|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Debug_Cairo_CFLite|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Release_Cairo_CFLite|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Debug_All|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                                       <FileConfiguration
-                                               Name="Production|Win32"
-                                               ExcludedFromBuild="true"
-                                               >
-                                               <Tool
-                                                       Name="VCCLCompilerTool"
-                                               />
-                                       </FileConfiguration>
-                               </File>
-                               <File
                                        RelativePath="..\bindings\js\JSDOMWrapper.cpp"
                                        >
                                        <FileConfiguration
index 5b632a3..835c571 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="..\bindings\js\JSDOMWindowWebAudioCustom.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
-    </ClCompile>
     <ClCompile Include="..\bindings\js\JSDOMWrapper.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
index 3158e07..864f4ae 100644 (file)
     <ClCompile Include="..\bindings\js\JSDOMWindowShell.cpp">
       <Filter>bindings\js</Filter>
     </ClCompile>
-    <ClCompile Include="..\bindings\js\JSDOMWindowWebAudioCustom.cpp">
-      <Filter>bindings\js</Filter>
-    </ClCompile>
     <ClCompile Include="..\bindings\js\JSDOMWrapper.cpp">
       <Filter>bindings\js</Filter>
     </ClCompile>
index debcb32..5765a1f 100644 (file)
                A7F5D94F1384F02D00A29A87 /* NodeRenderingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7F5D94D1384F02D00A29A87 /* NodeRenderingContext.cpp */; };
                A7F5D9501384F02D00A29A87 /* NodeRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F5D94E1384F02D00A29A87 /* NodeRenderingContext.h */; };
                A80A38FE0E50CC8200A25EBC /* PatternCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80A38FD0E50CC8200A25EBC /* PatternCG.cpp */; };
-               A80A9423149F225E00989291 /* JSDOMWindowWebAudioCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80A9422149F225E00989291 /* JSDOMWindowWebAudioCustom.cpp */; };
                A80D67080E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h in Headers */ = {isa = PBXBuildFile; fileRef = A80D67070E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h */; };
                A80E6CE40A1989CA007FB8C5 /* CSSValueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CBA0A1989CA007FB8C5 /* CSSValueList.cpp */; };
                A80E6CE60A1989CA007FB8C5 /* CSSPrimitiveValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CBC0A1989CA007FB8C5 /* CSSPrimitiveValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A7F73ED9169AD7AA00CBAA4B /* DOMShadowRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMShadowRoot.h; sourceTree = "<group>"; };
                A7F73EDA169AD7AA00CBAA4B /* DOMShadowRoot.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMShadowRoot.mm; sourceTree = "<group>"; };
                A80A38FD0E50CC8200A25EBC /* PatternCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PatternCG.cpp; sourceTree = "<group>"; };
-               A80A9422149F225E00989291 /* JSDOMWindowWebAudioCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowWebAudioCustom.cpp; sourceTree = "<group>"; };
                A80D67070E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextPlatformPrivateCG.h; sourceTree = "<group>"; };
                A80E6CBA0A1989CA007FB8C5 /* CSSValueList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSValueList.cpp; sourceTree = "<group>"; };
                A80E6CBC0A1989CA007FB8C5 /* CSSPrimitiveValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSPrimitiveValue.h; sourceTree = "<group>"; };
                                14E0BC55136148A8002AD12E /* JSDOMTokenListCustom.cpp */,
                                BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */,
                                652FBBBB0DE27CB60001D386 /* JSDOMWindowCustom.h */,
-                               A80A9422149F225E00989291 /* JSDOMWindowWebAudioCustom.cpp */,
                                BC2ED5540C6B9BD300920BFF /* JSElementCustom.cpp */,
                                BCEFAF4D0C317E6900FA81F6 /* JSEventCustom.cpp */,
                                2E7582ED12764F260062628B /* JSFileReaderCustom.cpp */,
                                BC6932730D7E293900AE44D1 /* JSDOMWindowBase.cpp in Sources */,
                                BCD9C2620C17AA67005C90A2 /* JSDOMWindowCustom.cpp in Sources */,
                                BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp in Sources */,
-                               A80A9423149F225E00989291 /* JSDOMWindowWebAudioCustom.cpp in Sources */,
                                CDDE691F171DFAD000A44D89 /* JSAudioBufferCustom.cpp in Sources */,
                                FD7868B9136B999200D403DF /* JSDynamicsCompressorNode.cpp in Sources */,
                                65DF31F909D1CC60000BE325 /* JSElement.cpp in Sources */,
index 8337397..43e29ad 100644 (file)
@@ -145,7 +145,7 @@ public:
 #endif
 
 #if ENABLE(WEB_AUDIO)
-    static void setWebkitAudioContextEnabled(bool isEnabled) { isWebAudioEnabled = isEnabled; }
+    static void setWebAudioEnabled(bool isEnabled) { isWebAudioEnabled = isEnabled; }
     static bool webkitAudioContextEnabled() { return isWebAudioEnabled; }
     static bool webkitOfflineAudioContextEnabled() { return isWebAudioEnabled; }
 #endif
index 5936f6e..c6bbf3b 100644 (file)
@@ -69,7 +69,6 @@
 #include "JSDOMWindowBase.cpp"
 #include "JSDOMWindowCustom.cpp"
 #include "JSDOMWindowShell.cpp"
-#include "JSDOMWindowWebAudioCustom.cpp"
 #include "JSDOMWrapper.cpp"
 #include "JSDataViewCustom.cpp"
 #include "JSDedicatedWorkerContextCustom.cpp"
diff --git a/Source/WebCore/bindings/js/JSDOMWindowWebAudioCustom.cpp b/Source/WebCore/bindings/js/JSDOMWindowWebAudioCustom.cpp
deleted file mode 100644 (file)
index 013140e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2011 Google 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
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "JSDOMWindowCustom.h"
-
-#if ENABLE(WEB_AUDIO)
-#include "Frame.h"
-#include "JSAudioContext.h"
-#include "Settings.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-static Settings* settingsForWindowWebAudio(const JSDOMWindow* window)
-{
-    ASSERT(window);
-    if (Frame* frame = window->impl()->frame())
-        return frame->settings();
-    return 0;
-}
-
-JSValue JSDOMWindow::webkitAudioContext(ExecState* exec) const
-{
-    Settings* settings = settingsForWindowWebAudio(this);
-    if (settings && settings->webAudioEnabled())
-        return getDOMConstructor<JSAudioContextConstructor>(exec, this);
-    return jsUndefined();
-}
-
-} // namespace WebCore
-
-#endif
index 9aa0470..2bdd05d 100644 (file)
     [Conditional=INDEXED_DATABASE] attribute IDBObjectStoreConstructor webkitIDBObjectStore;
     [Conditional=INDEXED_DATABASE] attribute IDBRequestConstructor webkitIDBRequest;
     [Conditional=INDEXED_DATABASE] attribute IDBTransactionConstructor webkitIDBTransaction;
-
-    // Constructors whose name does not match the interface name.
-    [Conditional=WEB_AUDIO, CustomGetter] attribute AudioContextConstructor webkitAudioContext;
-
 #endif // defined(LANGUAGE_JAVASCRIPT)
 };
index 6685568..1f34b01 100644 (file)
@@ -115,7 +115,6 @@ privilegedWebGLExtensionsEnabled initial=false
 accelerated2dCanvasEnabled initial=false
 antialiased2dCanvasEnabled initial=true
 loadDeferringEnabled initial=true
-webAudioEnabled initial=false
 paginateDuringLayoutEnabled initial=false
 fullScreenEnabled initial=false, conditional=FULLSCREEN_API
 asynchronousSpellCheckingEnabled initial=false
index c4b4e5e..8c62696 100644 (file)
@@ -1,3 +1,21 @@
+2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Remove custom code for webkitAudioContext global constructor getter
+        https://bugs.webkit.org/show_bug.cgi?id=116530
+
+        Reviewed by Geoffrey Garen.
+
+        Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.
+
+        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+        (DumpRenderTreeSupportEfl::setWebAudioEnabled):
+        * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+        * ewk/ewk_view.cpp:
+        (_Ewk_View_Private_Data):
+        (_ewk_view_priv_new):
+        * ewk/ewk_view.h: Remove public API to toggle Web Audio support as it is no longer
+        a view specific feature.
+
 2013-05-19  Anders Carlsson  <andersca@apple.com>
 
         Remove ChromeClient::webView()
index 224a4b7..7490ac7 100644 (file)
@@ -324,6 +324,15 @@ void DumpRenderTreeSupportEfl::setSeamlessIFramesEnabled(bool enabled)
 #endif
 }
 
+void DumpRenderTreeSupportEfl::setWebAudioEnabled(bool enabled)
+{
+#if ENABLE(WEB_AUDIO)
+    WebCore::RuntimeEnabledFeatures::setWebAudioEnabled(enabled);
+#else
+    UNUSED_PARAM(enabled);
+#endif
+}
+
 bool DumpRenderTreeSupportEfl::isCommandEnabled(const Evas_Object* ewkView, const char* name)
 {
     DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page, false);
index 311d9a0..dc61ea6 100644 (file)
@@ -81,6 +81,7 @@ public:
     static void setCSSGridLayoutEnabled(const Evas_Object* ewkView, bool enabled);
     static void setCSSRegionsEnabled(const Evas_Object* ewkView, bool enabled);
     static void setSeamlessIFramesEnabled(bool);
+    static void setWebAudioEnabled(bool);
 
     static void forceLayout(Evas_Object* ewkFrame);
     static void setTracksRepaints(Evas_Object* ewkFrame, bool enabled);
index 7be32db..e01f40e 100644 (file)
@@ -342,9 +342,6 @@ struct _Ewk_View_Private_Data {
         bool offlineAppCache : 1;
         bool pageCache : 1;
         bool enableXSSAuditor : 1;
-#if ENABLE(WEB_AUDIO)
-        bool webAudio : 1;
-#endif
         bool webGLEnabled : 1;
         bool tabsToLinks : 1;
         struct {
@@ -844,7 +841,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
     priv->pageSettings->setUsesPageCache(true);
     priv->pageSettings->setUsesEncodingDetector(false);
 #if ENABLE(WEB_AUDIO)
-    priv->pageSettings->setWebAudioEnabled(false);
+    WebCore::RuntimeEnabledFeatures::setWebAudioEnabled(false);
 #endif
     priv->pageSettings->setWebGLEnabled(true);
     priv->pageSettings->setXSSAuditorEnabled(true);
@@ -920,9 +917,6 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
     priv->settings.tabsToLinks = true;
 
     priv->settings.userAgent = ewk_settings_default_user_agent_get();
-#if ENABLE(WEB_AUDIO)
-    priv->settings.webAudio = priv->pageSettings->webAudioEnabled();
-#endif
 
     // Since there's no scale separated from zooming in webkit-efl, this functionality of
     // viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl,
@@ -4681,35 +4675,6 @@ void ewk_view_mark_for_sync(Evas_Object* ewkView)
 }
 #endif
 
-Eina_Bool ewk_view_setting_web_audio_get(const Evas_Object* ewkView)
-{
-#if ENABLE(WEB_AUDIO)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
-    return priv->settings.webAudio;
-#else
-    UNUSED_PARAM(ewkView);
-    return false;
-#endif
-}
-
-Eina_Bool ewk_view_setting_web_audio_set(Evas_Object* ewkView, Eina_Bool enable)
-{
-#if ENABLE(WEB_AUDIO)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
-    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
-    if (priv->settings.webAudio != enable) {
-        priv->pageSettings->setWebAudioEnabled(enable);
-        priv->settings.webAudio = enable;
-    }
-    return true;
-#else
-    UNUSED_PARAM(ewkView);
-    UNUSED_PARAM(enable);
-    return false;
-#endif
-}
-
 void ewk_view_cursor_set(Evas_Object* ewkView, const WebCore::Cursor& cursor)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
index 276e2ad..949bf48 100644 (file)
@@ -2685,27 +2685,6 @@ EAPI Eina_Bool ewk_view_setting_should_display_text_descriptions_get(const Evas_
 EAPI void ewk_view_setting_should_display_text_descriptions_set(Evas_Object *o, Eina_Bool enable);
 
 /**
- * Queries if the web audio feature of HTML5 is enabled.
- *
- * @param o view object to query if the web audio feature is enabled
- *
- * @return @c EINA_TRUE if web audio is enabled,
- *         @c EINA_FALSE if not or on failure
- */
-EAPI Eina_Bool    ewk_view_setting_web_audio_get(const Evas_Object *o);
-
-/**
- * Enables/disables the web audio feature of HTML5.
- *
- * @param o view object to set the web audio
- * @param enable @c EINA_TRUE to enable the web audio feature,
- *        @c EINA_FALSE to disable
- *
- * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
- */
-EAPI Eina_Bool    ewk_view_setting_web_audio_set(Evas_Object *o, Eina_Bool enable);
-
-/**
  * Show the inspector to debug a web page.
  *
  * The following signals are emiited.
index fa82a7c..6955a3c 100644 (file)
@@ -1,3 +1,16 @@
+2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Remove custom code for webkitAudioContext global constructor getter
+        https://bugs.webkit.org/show_bug.cgi?id=116530
+
+        Reviewed by Geoffrey Garen.
+
+        Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_update_settings):
+        (webkit_web_view_settings_notify):
+
 2013-05-19  Anders Carlsson  <andersca@apple.com>
 
         Remove ChromeClient::webView()
index c395c30..fed8919 100644 (file)
@@ -3572,7 +3572,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
 #endif
 
 #if ENABLE(WEB_AUDIO)
-    coreSettings->setWebAudioEnabled(settingsPrivate->enableWebAudio);
+    WebCore::RuntimeEnabledFeatures::setWebAudioEnabled(settingsPrivate->enableWebAudio);
 #endif
 
 #if ENABLE(SMOOTH_SCROLLING)
@@ -3718,7 +3718,7 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
 
 #if ENABLE(WEB_AUDIO)
     else if (name == g_intern_string("enable-webaudio"))
-        settings->setWebAudioEnabled(g_value_get_boolean(&value));
+        RuntimeEnabledFeatures::setWebAudioEnabled(g_value_get_boolean(&value));
 #endif
 
 #if ENABLE(SMOOTH_SCROLLING)
index 34407fe..20266e9 100644 (file)
@@ -1,3 +1,15 @@
+2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Remove custom code for webkitAudioContext global constructor getter
+        https://bugs.webkit.org/show_bug.cgi?id=116530
+
+        Reviewed by Geoffrey Garen.
+
+        Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.
+
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2013-05-23  Anders Carlsson  <andersca@apple.com>
 
         Crash in convertMainResourceLoadToDownload when downloading file by option-return
index 6d63c8c..0c5f9f3 100644 (file)
@@ -1495,7 +1495,6 @@ static bool needsSelfRetainWhileLoadingQuirk()
     settings->setCanvasUsesAcceleratedDrawing([preferences canvasUsesAcceleratedDrawing]);    
     settings->setShowDebugBorders([preferences showDebugBorders]);
     settings->setShowRepaintCounter([preferences showRepaintCounter]);
-    settings->setWebAudioEnabled([preferences webAudioEnabled]);
     settings->setWebGLEnabled([preferences webGLEnabled]);
     settings->setAccelerated2dCanvasEnabled([preferences accelerated2dCanvasEnabled]);
     settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
@@ -1507,6 +1506,9 @@ static bool needsSelfRetainWhileLoadingQuirk()
 #endif
     RuntimeEnabledFeatures::setCSSRegionsEnabled([preferences cssRegionsEnabled]);
     RuntimeEnabledFeatures::setCSSCompositingEnabled([preferences cssCompositingEnabled]);
+#if ENABLE(WEB_AUDIO)
+    RuntimeEnabledFeatures::setWebAudioEnabled([preferences webAudioEnabled]);
+#endif
 #if ENABLE(IFRAME_SEAMLESS)
     RuntimeEnabledFeatures::setSeamlessIFramesEnabled([preferences seamlessIFramesEnabled]);
 #endif
index 7344bae..e8b79e9 100644 (file)
@@ -175,7 +175,7 @@ void QWebSettingsPrivate::apply()
 #endif
 #if ENABLE(WEB_AUDIO)
         value = attributes.value(QWebSettings::WebAudioEnabled, global->attributes.value(QWebSettings::WebAudioEnabled));
-        settings->setWebAudioEnabled(value);
+        WebCore::RuntimeEnabledFeatures::setWebAudioEnabled(value);
 #endif
 
         value = attributes.value(QWebSettings::CSSRegionsEnabled,
index 50823c8..a9e658b 100644 (file)
@@ -1,3 +1,15 @@
+2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Remove custom code for webkitAudioContext global constructor getter
+        https://bugs.webkit.org/show_bug.cgi?id=116530
+
+        Reviewed by Geoffrey Garen.
+
+        Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.
+
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply):
+
 2013-05-19  Anders Carlsson  <andersca@apple.com>
 
         Remove ChromeClient::webView()
index 1b6c724..4d9b447 100644 (file)
@@ -1,3 +1,15 @@
+2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Remove custom code for webkitAudioContext global constructor getter
+        https://bugs.webkit.org/show_bug.cgi?id=116530
+
+        Reviewed by Geoffrey Garen.
+
+        Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.
+
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2013-05-24  Anders Carlsson  <andersca@apple.com>
 
         Remove unused code to read/write history
index 6c579a7..12c2642 100644 (file)
@@ -4909,7 +4909,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
     settings->setShowRepaintCounter(enabled);
 
 #if ENABLE(WEB_AUDIO)
-    settings->setWebAudioEnabled(true);
+    RuntimeEnabledFeatures::setWebAudioEnabled(true);
 #endif // ENABLE(WEB_AUDIO)
 
 #if ENABLE(WEBGL)
index e268d12..7310660 100644 (file)
@@ -1,3 +1,17 @@
+2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Remove custom code for webkitAudioContext global constructor getter
+        https://bugs.webkit.org/show_bug.cgi?id=116530
+
+        Reviewed by Geoffrey Garen.
+
+        Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support.
+
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
 2013-05-24  Thomas Deniau  <deniau@apple.com>
 
         Add more lines to the context during Dictionary lookups
index 7b52397..de0d3bf 100644 (file)
@@ -206,6 +206,11 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
         RuntimeEnabledFeatures::setCSSCompositingEnabled(enabled);
 #endif
 
+#if ENABLE(WEB_AUDIO)
+    if (preference == "WebKitWebAudioEnabled")
+        RuntimeEnabledFeatures::setWebAudioEnabled(enabled);
+#endif
+
     // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
 #define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \
     macro(WebKitAcceleratedCompositingEnabled, AcceleratedCompositingEnabled, acceleratedCompositingEnabled) \
@@ -220,7 +225,6 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
     macro(WebKitPageCacheSupportsPluginsPreferenceKey, PageCacheSupportsPlugins, pageCacheSupportsPlugins) \
     macro(WebKitPluginsEnabled, PluginsEnabled, pluginsEnabled) \
     macro(WebKitUsesPageCachePreferenceKey, UsesPageCache, usesPageCache) \
-    macro(WebKitWebAudioEnabled, WebAudioEnabled, webAudioEnabled) \
     macro(WebKitWebGLEnabled, WebGLEnabled, webGLEnabled) \
     macro(WebKitXSSAuditorEnabled, XSSAuditorEnabled, xssAuditorEnabled) \
     macro(WebKitShouldRespectImageOrientation, ShouldRespectImageOrientation, shouldRespectImageOrientation) \
index 04e8fc2..2d385d5 100644 (file)
@@ -2489,7 +2489,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
 #endif
 
 #if ENABLE(WEB_AUDIO)
-    settings->setWebAudioEnabled(store.getBoolValueForKey(WebPreferencesKey::webAudioEnabledKey()));
+    RuntimeEnabledFeatures::setWebAudioEnabled(store.getBoolValueForKey(WebPreferencesKey::webAudioEnabledKey()));
 #endif
 
     settings->setApplicationChromeMode(store.getBoolValueForKey(WebPreferencesKey::applicationChromeModeKey()));
index 9ce14d1..9e0187a 100644 (file)
@@ -1,3 +1,19 @@
+2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Remove custom code for webkitAudioContext global constructor getter
+        https://bugs.webkit.org/show_bug.cgi?id=116530
+
+        Reviewed by Geoffrey Garen.
+
+        Update EFL's DumpRenderTree to use DumpRenderTreeSupport to toggle
+        WebAudio feature instead of public ewk_view API since that API was
+        removed.
+
+        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+        (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+        * DumpRenderTree/efl/TestRunnerEfl.cpp:
+        (TestRunner::overridePreference):
+
 2013-05-24  Bem Jones-Bey  <bjonesbe@adobe.com>
 
         Make team.html have each contributor's area of expertise
index 91280c2..8c0786a 100644 (file)
@@ -284,7 +284,6 @@ void DumpRenderTreeChrome::resetDefaultsToConsistentValues()
     ewk_view_setting_enable_hyperlink_auditing_set(mainView(), EINA_FALSE);
     ewk_view_setting_include_links_in_focus_chain_set(mainView(), EINA_FALSE);
     ewk_view_setting_scripts_can_access_clipboard_set(mainView(), EINA_TRUE);
-    ewk_view_setting_web_audio_set(mainView(), EINA_FALSE);
     ewk_view_setting_allow_universal_access_from_file_urls_set(mainView(), EINA_TRUE);
     ewk_view_setting_allow_file_access_from_file_urls_set(mainView(), EINA_TRUE);
     ewk_view_setting_resizable_textareas_set(mainView(), EINA_TRUE);
@@ -325,6 +324,7 @@ void DumpRenderTreeChrome::resetDefaultsToConsistentValues()
     DumpRenderTreeSupportEfl::setShouldTrackVisitedLinks(false);
     DumpRenderTreeSupportEfl::setTracksRepaints(mainFrame(), false);
     DumpRenderTreeSupportEfl::setSeamlessIFramesEnabled(true);
+    DumpRenderTreeSupportEfl::setWebAudioEnabled(false);
 
     // Reset capacities for the memory cache for dead objects.
     static const unsigned cacheTotalCapacity =  8192 * 1024;
index cdab8a3..b31df4f 100644 (file)
@@ -661,7 +661,7 @@ void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
     else if (equals(key, "WebKitCSSRegionsEnabled"))
         DumpRenderTreeSupportEfl::setCSSRegionsEnabled(browser->mainView(), toBool(value));
     else if (equals(key, "WebKitWebAudioEnabled"))
-        ewk_view_setting_web_audio_set(browser->mainView(), toBool(value));
+        DumpRenderTreeSupportEfl::setWebAudioEnabled(toBool(value));
     else if (equals(key, "WebKitDisplayImagesKey"))
         ewk_view_setting_auto_load_images_set(browser->mainView(), toBool(value));
     else