Diff
Modified: trunk/Source/WebCore/ChangeLog (104007 => 104008)
--- trunk/Source/WebCore/ChangeLog 2012-01-04 05:28:46 UTC (rev 104007)
+++ trunk/Source/WebCore/ChangeLog 2012-01-04 05:40:45 UTC (rev 104008)
@@ -1,3 +1,21 @@
+2012-01-03 Kentaro Hara <[email protected]>
+
+ Remove temporary code that we've inserted to implement the [Supplemental] IDL incrementally
+ https://bugs.webkit.org/show_bug.cgi?id=75510
+
+ Reviewed by Adam Barth.
+
+ Now all build systems support the [Supplemental] IDL. This patch removes all
+ temporary code that we've inserted to implement the [Supplemental] IDL.
+
+ No tests. No change in behavior. Confirm that all builds pass.
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateHeader):
+ * bindings/scripts/generate-bindings.pl:
+ * page/DOMWindow.idl: Removed all attributes with a temporal [Supplemented] IDL.
+
2012-01-03 Karl Koscher <[email protected]>
Give embedders a chance to handle postMessage calls
Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (104007 => 104008)
--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp 2012-01-04 05:28:46 UTC (rev 104007)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp 2012-01-04 05:40:45 UTC (rev 104008)
@@ -504,44 +504,6 @@
}
#endif
-// FIXME(haraken): This method will be removed, after all build systems support
-// the [Supplemental] IDL and use settingsForWindowWebAudio() in JSDOMWindowWebAudioCustom.cpp
-// and settingsForWindowWebSocket() in JSDOMWindowWebSocketCustom.cpp (See bug 74599)
-#if ENABLE(WEB_AUDIO) || ENABLE(WEB_SOCKETS)
-static Settings* settingsForWindow(const JSDOMWindow* window)
-{
- ASSERT(window);
- if (Frame* frame = window->impl()->frame())
- return frame->settings();
- return 0;
-}
-#endif
-
-// FIXME(haraken): This method will be removed, after all build systems support
-// the [Supplemental] IDL and use webkitAudioContext() in JSDOMWindowWebAudioCustom.cpp.
-// (See bug 74599)
-#if ENABLE(WEB_AUDIO)
-JSValue JSDOMWindow::webkitAudioContext(ExecState* exec) const
-{
- Settings* settings = settingsForWindow(this);
- if (settings && settings->webAudioEnabled())
- return getDOMConstructor<JSAudioContextConstructor>(exec, this);
- return jsUndefined();
-}
-#endif
-
-// FIXME(haraken): This method will be removed, after all build systems support
-// the [Supplemental] IDL and use webSocket() in JSDOMWindowWebSocketCustom.cpp.
-// (See bug 74599)
-#if ENABLE(WEB_SOCKETS)
-JSValue JSDOMWindow::webSocket(ExecState* exec) const
-{
- if (!settingsForWindow(this))
- return jsUndefined();
- return getDOMConstructor<JSWebSocketConstructor>(exec, this);
-}
-#endif
-
// Custom functions
JSValue JSDOMWindow::open(ExecState* exec)
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (104007 => 104008)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-01-04 05:28:46 UTC (rev 104007)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-01-04 05:40:45 UTC (rev 104008)
@@ -910,23 +910,9 @@
} elsif (($attribute->signature->extendedAttributes->{"CustomGetter"} || $attribute->signature->extendedAttributes->{"JSCCustomGetter"})) {
my $methodName = $codeGenerator->WK_lcfirst($attribute->signature->name);
if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) {
- # FIXME(haraken): This is a temporal hack to enable the [Supplemental] IDL
- # on all build systems incrementally. This hack is going to be removed after all build
- # systems support the [Supplemental] IDL. (See bug 74599)
- if ($methodName eq "webSocket" or $methodName eq "webkitAudioContext") {
- push(@headerContent, " JSC::JSValue " . $methodName . "(JSC::ExecState*) const;\n");
- }
-
push(@headerContent, " JSC::JSValue " . $methodName . "(" . $interfaceName . "*, JSC::ExecState*) const;\n");
} else {
push(@headerContent, " JSC::JSValue " . $methodName . "(JSC::ExecState*) const;\n");
-
- # FIXME(haraken): This is a temporal hack to enable the [Supplemental] IDL
- # on all build systems incrementally. This hack is going to be removed after all build
- # systems support the [Supplemental] IDL. (See bug 74599)
- if ($methodName eq "webSocket" or $methodName eq "webkitAudioContext") {
- push(@headerContent, " JSC::JSValue " . $methodName . "(" . $interfaceName . "*, JSC::ExecState*) const;\n");
- }
}
} elsif (($attribute->signature->extendedAttributes->{"CustomSetter"} || $attribute->signature->extendedAttributes->{"JSCCustomSetter"})) {
if ($attribute->type !~ /^readonly/) {
Modified: trunk/Source/WebCore/bindings/scripts/generate-bindings.pl (104007 => 104008)
--- trunk/Source/WebCore/bindings/scripts/generate-bindings.pl 2012-01-04 05:28:46 UTC (rev 104007)
+++ trunk/Source/WebCore/bindings/scripts/generate-bindings.pl 2012-01-04 05:40:45 UTC (rev 104008)
@@ -130,79 +130,6 @@
my $targetParser = IDLParser->new(!$verbose);
my $targetDocument = $targetParser->Parse($targetIdlFile, $defines, $preprocessor);
-# FIXME(haraken): Remove this if-else statement.
-# This if-else statement is temporary and will be removed
-# after build scripts for all platforms support [Supplemental] IDL.
-# The motivation for the [Supplemented] IDL is as follows:
-#
-# In order to support the [Supplemental] IDL, we need to
-# (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
-# (2) and run generate-bindings.pl with the supplemental_dependency.tmp.
-#
-# This build flow requires a change on the following build scripts,
-# but changing all the build scripts all at once without any regression is too difficult:
-#
-# - DerivedSources.make
-# - DerivedSources.pri
-# - GNUmakefile.am
-# - PlatformBlackBerry.cmake
-# - UseJSC.cmake
-# - UseV8.cmake
-# - WebCore.vcproj/MigrateScripts
-# - WebCore.vcproj/WebCore.vcproj
-# - bindings/gobject/GNUmakefile.am
-# - WebCore.gyp/WebCore.gyp
-#
-# Thus, we are planning to change the build scripts one by one, which implies that
-# we need to allow the temporary state in which some build scripts support [Supplemental] IDL
-# but others do not. To accomplish this, we introduce a temporal IDL, [Supplemented].
-# The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
-# in another IDL file somewhere, like this:
-#
-# DOMWindowWebAudio.idl:
-# interface [
-# Supplemental=DOMWindow
-# ] DOMWindowWebAudio {
-# attribute attr1;
-# attribute attr2;
-# };
-#
-# DOMWindow.idl:
-# interface [
-# ] DOMWindow {
-# attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [SupplementalL.
-# attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [SupplementalL.
-# attribute attr3;
-# attribute attr4;
-# };
-#
-# Assuming these IDL files, the below code is doing the following logic:
-#
-# - If a given build script supports the [Supplemental] IDL (i.e. --supplementalDependencyFile is specified),
-# we ignore all attributes with the [Supplemented] IDL.
-# - Otherwise (i.e. --supplementalDependencyFile is not specified),
-# we treat all attributes with the [Supplemented] IDL as normal attributes
-# and instead ignore all attributes with the [Supplemental] IDL
-# (i.e. we generate nothing from the idl file with the [Supplemental] IDL).
-if ($supplementalDependencyFile) {
- foreach my $dataNode (@{$targetDocument->classes}) {
- my @nonSupplementedAttributes;
- foreach my $attribute (@{$dataNode->attributes}) {
- if (!$attribute->signature->extendedAttributes->{"Supplemented"}) {
- push(@nonSupplementedAttributes, $attribute);
- }
- }
- $dataNode->attributes(\@nonSupplementedAttributes);
- }
-} else {
- foreach my $dataNode (@{$targetDocument->classes}) {
- if ($dataNode->extendedAttributes->{"Supplemental"}) {
- exit 0;
- }
- }
-}
-# Temporary if-else statement until here.
-
foreach my $idlFile (@supplementedIdlFiles) {
next if $idlFile eq $targetIdlFile;
Modified: trunk/Source/WebCore/page/DOMWindow.idl (104007 => 104008)
--- trunk/Source/WebCore/page/DOMWindow.idl 2012-01-04 05:28:46 UTC (rev 104007)
+++ trunk/Source/WebCore/page/DOMWindow.idl 2012-01-04 05:40:45 UTC (rev 104008)
@@ -523,9 +523,6 @@
attribute Float64ArrayConstructor Float64Array; // Usable with new operator
attribute DataViewConstructor DataView; // Usable with new operator
- attribute [Supplemented, JSCCustomGetter, Conditional=WEB_AUDIO, EnabledAtRuntime] AudioContextConstructor webkitAudioContext; // Usable with new operator
- attribute [Supplemented, Conditional=WEB_AUDIO] AudioPannerNodeConstructor webkitAudioPannerNode; // Needed for panning model constants
-
// Event Constructors
attribute EventConstructor Event;
attribute BeforeLoadEventConstructor BeforeLoadEvent;
@@ -551,10 +548,7 @@
attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] DeviceMotionEventConstructor DeviceMotionEvent;
attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] DeviceOrientationEventConstructor DeviceOrientationEvent;
attribute [Conditional=TOUCH_EVENTS] TouchEventConstructor TouchEvent;
- attribute [Supplemented, Conditional=WEB_SOCKETS] CloseEventConstructor CloseEvent;
attribute StorageEventConstructor StorageEvent;
- attribute [Supplemented, Conditional=WEB_AUDIO] AudioProcessingEventConstructor AudioProcessingEvent;
- attribute [Supplemented, Conditional=WEB_AUDIO] OfflineAudioCompletionEventConstructor OfflineAudioCompletionEvent;
attribute [Conditional=INPUT_SPEECH] SpeechInputEventConstructor SpeechInputEvent;
attribute [Conditional=MEDIA_STREAM] MediaStreamEventConstructor MediaStreamEvent;
attribute [Conditional=WEBGL] WebGLContextEventConstructor WebGLContextEvent;
@@ -606,10 +600,6 @@
attribute [JSCCustomGetter, EnabledAtRuntime] SharedWorkerConstructor SharedWorker; // Usable with the new operator
#endif
-#if defined(ENABLE_WEB_SOCKETS) && ENABLE_WEB_SOCKETS
- attribute [Supplemented, JSCCustomGetter, EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
-#endif
-
#if defined(ENABLE_VIDEO_TRACK) && ENABLE_VIDEO_TRACK
attribute [EnabledAtRuntime=webkitVideoTrack] HTMLTrackElementConstructor HTMLTrackElement;
attribute [EnabledAtRuntime=webkitVideoTrack] TextTrackConstructor TextTrack;