summaryrefslogtreecommitdiffstats
path: root/webkit/port/bindings/scripts/CodeGeneratorV8.pm
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/port/bindings/scripts/CodeGeneratorV8.pm')
-rw-r--r--webkit/port/bindings/scripts/CodeGeneratorV8.pm44
1 files changed, 22 insertions, 22 deletions
diff --git a/webkit/port/bindings/scripts/CodeGeneratorV8.pm b/webkit/port/bindings/scripts/CodeGeneratorV8.pm
index 99e447c..87353ca 100644
--- a/webkit/port/bindings/scripts/CodeGeneratorV8.pm
+++ b/webkit/port/bindings/scripts/CodeGeneratorV8.pm
@@ -224,7 +224,6 @@ sub GetImplementationFileName
{
my $iface = shift;
return "HTMLCollection.h" if $iface eq "UndetectableHTMLCollection";
- return "HTMLInputElement.h" if $iface eq "HTMLSelectionInputElement";
return "Event.h" if $iface eq "DOMTimeStamp";
return "NamedAttrMap.h" if $iface eq "NamedNodeMap";
return "NameNodeList.h" if $iface eq "NodeList";
@@ -240,7 +239,7 @@ sub GenerateHeader
my $interfaceName = $dataNode->name;
my $className = "V8$interfaceName";
- my $implClassName = GetImplementationClassName($interfaceName);
+ my $implClassName = $interfaceName;
# Copy contents of parent classes except the first parent or if it is
# EventTarget.
@@ -426,11 +425,12 @@ sub GenerateNormalAttrGetter
my $isPodType = $codeGenerator->IsPodType($implClassName);
my $skipContext = 0;
+
if ($isPodType) {
$implClassName = GetNativeType($implClassName);
$implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
}
-
+
# Special case: SVGZoomEvent's attributes are all read-only
if ($implClassName eq "SVGZoomEvent") {
$attrIsPodType = 0;
@@ -830,7 +830,7 @@ sub GenerateImplementation
my $dataNode = shift;
my $interfaceName = $dataNode->name;
my $className = "V8$interfaceName";
- my $implClassName = GetImplementationClassName($interfaceName);
+ my $implClassName = $interfaceName;
my $classIndex = uc($codeGenerator->StripModule($interfaceName));
my $hasLegacyParent = $dataNode->extendedAttributes->{"LegacyParent"};
@@ -867,7 +867,8 @@ sub GenerateImplementation
my $hasConstructors = 0;
# Generate property accessors for attributes.
- foreach my $attribute (@{$dataNode->attributes}) {
+ for ($index = 0; $index < @{$dataNode->attributes}; $index++) {
+ $attribute = @{$dataNode->attributes}[$index];
$attrName = $attribute->signature->name;
$attrType = $attribute->signature->type;
@@ -876,6 +877,18 @@ sub GenerateImplementation
$hasConstructors = 1;
next;
}
+
+ # Make EventListeners always custom.
+ # TODO(mbelshe): make the perl code capable of generating the
+ # event setters/getters. For now, WebKit has started removing the
+ # [Custom] attribute, so just automatically insert it to avoid forking
+ # other files. This should be okay because we can't generate stubs
+ # for any event getter/setters anyway.
+ if ($attrType eq "EventListener") {
+ $attribute->signature->extendedAttributes->{"Custom"} = 1;
+ $implIncludes{"v8_custom.h"} = 1;
+ next;
+ }
# Do not generate accessor if this is a custom attribute. The
# call will be forwarded to a hand-written accessor
@@ -884,7 +897,7 @@ sub GenerateImplementation
$implIncludes{"v8_custom.h"} = 1;
next;
}
-
+
# Generate the accessor.
if ($attribute->signature->extendedAttributes->{"CustomGetter"}) {
$implIncludes{"v8_custom.h"} = 1;
@@ -1374,21 +1387,10 @@ sub GetClassName
{
my $type = shift;
return "HTMLCollection" if $type eq "UndetectableHTMLCollection";
- return "HTMLInputElement" if $type eq "HTMLSelectionInputElement";
return $type;
}
-sub GetImplementationClassName
-{
- my $type = shift;
-
- return "HTMLInputElement" if $type eq "HTMLSelectionInputElement";
-
- return $type;
-}
-
-
sub GetNativeTypeFromSignature
{
my $signature = shift;
@@ -1484,9 +1486,6 @@ sub GetNativeType
return "String" if $type eq "DOMUserData"; # temporary hack, TODO
# temporary hack
- $type = GetImplementationClassName($type);
-
- # temporary hack
return "RefPtr<NodeFilter>" if $type eq "NodeFilter";
return "RefPtr<${type}>" if IsRefPtrType($type) and not $isParameter;
@@ -1511,6 +1510,7 @@ my %typeCanFailConversion = (
"HTMLOptionElement" => 0,
"Node" => 0,
"NodeFilter" => 0,
+ "MessagePort" => 0,
"NSResolver" => 0,
"Range" => 0,
"SQLResultSet" => 0,
@@ -1615,7 +1615,7 @@ sub JSValueToNative
} else {
# TODO: Temporary to avoid Window name conflict.
my $classIndex = uc($type);
- my $implClassName = GetImplementationClassName(${type});
+ my $implClassName = ${type};
$implIncludes{"V8$type.h"} = 1;
@@ -1777,7 +1777,7 @@ sub NativeToJSValue
}
# V8 specific.
- my $implClassName = GetImplementationClassName($type);
+ my $implClassName = $type;
AddIncludesForType($type);
# $implIncludes{GetImplementationFileName($type)} = 1 unless AvoidInclusionOfType($type);