summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/scripts
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2009-08-19 14:09:30 +0100
committerAndrei Popescu <andreip@google.com>2009-08-19 14:09:30 +0100
commit058ccc7ba0a4d59b9f6e92808332aa9895425fc7 (patch)
tree276aad5a2bbc2fd7d65d21bfca42c9de88b3dd20 /WebCore/bindings/scripts
parent2796dd1bf3b4b01e7e1d96ea91bd3a212f647579 (diff)
downloadexternal_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.zip
external_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.tar.gz
external_webkit-058ccc7ba0a4d59b9f6e92808332aa9895425fc7.tar.bz2
Revert "Merge WebKit r47420"
This reverts commit d227fc870c7a697500a3c900c31baf05fb9a8524.
Diffstat (limited to 'WebCore/bindings/scripts')
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorJS.pm10
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorV8.pm48
2 files changed, 39 insertions, 19 deletions
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index f6de50e..1918aef 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -667,12 +667,6 @@ sub GenerateHeader
push(@headerContent,
" static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)\n" .
" {\n" .
- " return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType" . ($dataNode->extendedAttributes->{"CustomMarkFunction"} ? "" : ", JSC::HasDefaultMark") . "));\n" .
- " }\n");
- } elsif ($dataNode->extendedAttributes->{"CustomMarkFunction"}) {
- push(@headerContent,
- " static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)\n" .
- " {\n" .
" return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType));\n" .
" }\n");
}
@@ -1379,7 +1373,7 @@ sub GenerateImplementation
push(@implContent, " if (!castedThisObj)\n");
push(@implContent, " return throwError(exec, TypeError);\n");
} else {
- push(@implContent, " if (!thisValue.inherits(&${className}::s_info))\n");
+ push(@implContent, " if (!thisValue.isObject(&${className}::s_info))\n");
push(@implContent, " return throwError(exec, TypeError);\n");
push(@implContent, " $className* castedThisObj = static_cast<$className*>(asObject(thisValue));\n");
}
@@ -1543,7 +1537,7 @@ sub GenerateImplementation
push(@implContent, "{\n");
- push(@implContent, " return value.inherits(&${className}::s_info) ? " . ($podType ? "($podType) *" : "") . "static_cast<$className*>(asObject(value))->impl() : ");
+ push(@implContent, " return value.isObject(&${className}::s_info) ? " . ($podType ? "($podType) *" : "") . "static_cast<$className*>(asObject(value))->impl() : ");
if ($podType and $podType ne "float") {
push(@implContent, "$podType();\n}\n");
} else {
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 1eb3e85..439f368 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -975,24 +975,51 @@ sub GenerateBatchedAttributeData
$setter = "V8Custom::v8${customAccessor}AccessorSetter";
}
}
- } else {
- # Default Getter and Setter
- $getter = "${interfaceName}Internal::${attrName}AttrGetter";
- $setter = "${interfaceName}Internal::${attrName}AttrSetter";
- # Custom Setter
- if ($attrExt->{"CustomSetter"} || $attrExt->{"V8CustomSetter"} || $attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
+ # Custom Getter and Setter
+ } elsif ($attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
+ $getter = "V8Custom::v8${customAccessor}AccessorGetter";
+ if ($interfaceName eq "WorkerContext" and $attrName eq "self") {
+ $setter = "0";
+ $propAttr = "v8::ReadOnly";
+ } else {
$hasCustomSetter = 1;
$setter = "V8Custom::v8${customAccessor}AccessorSetter";
}
- # Custom Getter
- if ($attrExt->{"CustomGetter"} || $attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
- $getter = "V8Custom::v8${customAccessor}AccessorGetter";
+ # Custom Setter
+ } elsif ($attrExt->{"CustomSetter"} || $attrExt->{"V8CustomSetter"}) {
+ $hasCustomSetter = 1;
+ $getter = "${interfaceName}Internal::${attrName}AttrGetter";
+ $setter = "V8Custom::v8${customAccessor}AccessorSetter";
+
+ # Custom Getter
+ } elsif ($attrExt->{"CustomGetter"}) {
+ $getter = "V8Custom::v8${customAccessor}AccessorGetter";
+ $setter = "${interfaceName}Internal::${attrName}AttrSetter";
+
+ # Replaceable
+ } elsif ($attrExt->{"Replaceable"}) {
+ # Replaceable accessor is put on instance template with ReadOnly attribute.
+ $getter = "${interfaceName}Internal::${attrName}AttrGetter";
+ $setter = "0";
+
+ # Mark to avoid duplicate v8::ReadOnly flags in output.
+ $hasCustomSetter = 1;
+
+ # Handle the special case of window.top being marked upstream as Replaceable.
+ # FIXME: Investigate why [Replaceable] is not marked as ReadOnly
+ # upstream and reach parity.
+ if (!($interfaceName eq "DOMWindow" and $attrName eq "top")) {
+ $propAttr .= "|v8::ReadOnly";
}
+
+ # Normal
+ } else {
+ $getter = "${interfaceName}Internal::${attrName}AttrGetter";
+ $setter = "${interfaceName}Internal::${attrName}AttrSetter";
}
- # Replaceable
if ($attrExt->{"Replaceable"} && !$hasCustomSetter) {
$setter = "0";
$propAttr .= "|v8::ReadOnly";
@@ -1626,7 +1653,6 @@ sub IsRefPtrType
return 1 if $type eq "Plugin";
return 1 if $type eq "ProcessingInstruction";
return 1 if $type eq "Range";
- return 1 if $type eq "RGBColor";
return 1 if $type eq "Text";
return 1 if $type eq "TextMetrics";
return 1 if $type eq "TimeRanges";