Title: [99481] trunk/Source/WebCore
- Revision
- 99481
- Author
- [email protected]
- Date
- 2011-11-07 14:39:41 -0800 (Mon, 07 Nov 2011)
Log Message
Remove [CustomGetter] IDL from 'HTMLAudioElementConstructor' of V8
https://bugs.webkit.org/show_bug.cgi?id=71660
Reviewed by Adam Barth.
Currently, "new Audio()" uses a custom getter to get the template
of 'HTMLAudioElementConstructor'. However, this getter does not need to
be custom and can use a default getter 'DOMWindowInternal::DOMWindowConstructorGetter'.
Tests: fast/js/custom-constructors.html
media/audio-constructor.html
media/audio-constructor-src.html
media/audio-constructor-preload.html
media/audio-controls-do-not-fade-out.html
media/audio-controls-rendering.html
* bindings/v8/custom/V8DOMWindowCustom.cpp: Removed a custom getter.
* page/DOMWindow.idl: Removed [CustomGetter] IDL from 'HTMLAudioElementConstructor' of V8. Renamed 'HTMLAudioElementConstructor' to 'HTMLAudioElementConstructorConstructor' in order to make 'new Audio()' use the template of (not 'HTMLAudioElement' but) 'HTMLAudioElementConstructor'. Note that CodeGenerator*.pm strips /Constructor$/ from an IDL type.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): If an IDL type is 'XXXXConstructorConstructor', then we do not add a header file 'XXXXConstructor.h' to JSDOMWindow.cpp, because the NamedConstructor declaration is written in the header file of class XXXX 'XXXX.h'. Incidentally, the reason why CodeGeneratorV8.pm does not need a corresponding change is that V8 is still generating the NamedConstructor declaration in its dedicated header file 'XXXXConstructor.h'. This V8 issue will be fixed in the upcoming patch that implements [NamedConstructor] IDL in V8.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (99480 => 99481)
--- trunk/Source/WebCore/ChangeLog 2011-11-07 22:38:32 UTC (rev 99480)
+++ trunk/Source/WebCore/ChangeLog 2011-11-07 22:39:41 UTC (rev 99481)
@@ -1,3 +1,26 @@
+2011-11-07 Kentaro Hara <[email protected]>
+
+ Remove [CustomGetter] IDL from 'HTMLAudioElementConstructor' of V8
+ https://bugs.webkit.org/show_bug.cgi?id=71660
+
+ Reviewed by Adam Barth.
+
+ Currently, "new Audio()" uses a custom getter to get the template
+ of 'HTMLAudioElementConstructor'. However, this getter does not need to
+ be custom and can use a default getter 'DOMWindowInternal::DOMWindowConstructorGetter'.
+
+ Tests: fast/js/custom-constructors.html
+ media/audio-constructor.html
+ media/audio-constructor-src.html
+ media/audio-constructor-preload.html
+ media/audio-controls-do-not-fade-out.html
+ media/audio-controls-rendering.html
+
+ * bindings/v8/custom/V8DOMWindowCustom.cpp: Removed a custom getter.
+ * page/DOMWindow.idl: Removed [CustomGetter] IDL from 'HTMLAudioElementConstructor' of V8. Renamed 'HTMLAudioElementConstructor' to 'HTMLAudioElementConstructorConstructor' in order to make 'new Audio()' use the template of (not 'HTMLAudioElement' but) 'HTMLAudioElementConstructor'. Note that CodeGenerator*.pm strips /Constructor$/ from an IDL type.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation): If an IDL type is 'XXXXConstructorConstructor', then we do not add a header file 'XXXXConstructor.h' to JSDOMWindow.cpp, because the NamedConstructor declaration is written in the header file of class XXXX 'XXXX.h'. Incidentally, the reason why CodeGeneratorV8.pm does not need a corresponding change is that V8 is still generating the NamedConstructor declaration in its dedicated header file 'XXXXConstructor.h'. This V8 issue will be fixed in the upcoming patch that implements [NamedConstructor] IDL in V8.
+
2011-11-07 Robert Sesek <[email protected]>
[chromium] Update WebCore.gyp to not use WebKitLibraries in include_dirs
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (99480 => 99481)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2011-11-07 22:38:32 UTC (rev 99480)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2011-11-07 22:39:41 UTC (rev 99481)
@@ -1817,7 +1817,10 @@
} elsif ($attribute->signature->type =~ /Constructor$/) {
my $constructorType = $attribute->signature->type;
$constructorType =~ s/Constructor$//;
- if ($constructorType ne "DOMObject") {
+ # $constructorType ~= /Constructor$/ indicates that it is NamedConstructor.
+ # We do not generate the header file for NamedConstructor of class XXXX,
+ # since we generate the NamedConstructor declaration into the header file of class XXXX.
+ if ($constructorType ne "DOMObject" and $constructorType !~ /Constructor$/) {
AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{"Conditional"});
}
push(@implContent, " // Shadowing a built-in constructor\n");
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp (99480 => 99481)
--- trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp 2011-11-07 22:38:32 UTC (rev 99480)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp 2011-11-07 22:39:41 UTC (rev 99481)
@@ -56,7 +56,6 @@
#include "V8EventListener.h"
#include "V8GCForContextDispose.h"
#include "V8HiddenPropertyName.h"
-#include "V8HTMLAudioElementConstructor.h"
#include "V8HTMLCollection.h"
#include "V8HTMLImageElementConstructor.h"
#include "V8HTMLOptionElementConstructor.h"
@@ -227,16 +226,6 @@
info.This()->Set(name, value);
}
-#if ENABLE(VIDEO)
-
-v8::Handle<v8::Value> V8DOMWindow::AudioAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- DOMWindow* window = V8DOMWindow::toNative(info.Holder());
- return V8DOMWrapper::getConstructor(&V8HTMLAudioElementConstructor::info, window);
-}
-
-#endif
-
v8::Handle<v8::Value> V8DOMWindow::ImageAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
DOMWindow* window = V8DOMWindow::toNative(info.Holder());
Modified: trunk/Source/WebCore/page/DOMWindow.idl (99480 => 99481)
--- trunk/Source/WebCore/page/DOMWindow.idl 2011-11-07 22:38:32 UTC (rev 99480)
+++ trunk/Source/WebCore/page/DOMWindow.idl 2011-11-07 22:39:41 UTC (rev 99481)
@@ -627,7 +627,7 @@
attribute StorageConstructor Storage;
- attribute [CustomGetter, Conditional=VIDEO, EnabledAtRuntime] HTMLAudioElementConstructor Audio; // Usable with the new operator
+ attribute [JSCCustomGetter, Conditional=VIDEO, EnabledAtRuntime] HTMLAudioElementConstructorConstructor Audio; // Usable with the new operator
attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLAudioElementConstructor HTMLAudioElement;
attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLMediaElementConstructor HTMLMediaElement;
attribute [Conditional=VIDEO, EnabledAtRuntime] HTMLVideoElementConstructor HTMLVideoElement;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes