diff options
Diffstat (limited to 'WebCore/bindings/scripts/CodeGeneratorV8.pm')
-rw-r--r-- | WebCore/bindings/scripts/CodeGeneratorV8.pm | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm index 4da8150..ebbcf8b 100644 --- a/WebCore/bindings/scripts/CodeGeneratorV8.pm +++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm @@ -172,7 +172,7 @@ sub AddIncludesForType if ($type eq "Plugin" or $type eq "PluginArray" or $type eq "MimeTypeArray") { # So we can get String -> AtomicString conversion for namedItem(). - $implIncludes{"AtomicString.h"} = 1; + $implIncludes{"wtf/text/AtomicString.h"} = 1; } } @@ -231,7 +231,7 @@ sub GenerateHeader my %headerInclues = (); $headerIncludes{"$podType.h"} = 1 if $podType and ($podType ne "double" and $podType ne "float" and $podType ne "RGBA32"); - $headerIncludes{"StringHash.h"} = 1; + $headerIncludes{"wtf/text/StringHash.h"} = 1; $headerIncludes{"WrapperTypeInfo.h"} = 1; my $headerClassInclude = GetHeaderClassInclude($implClassName); $headerIncludes{$headerClassInclude} = 1 if $headerClassInclude ne ""; @@ -275,6 +275,13 @@ END END } + if ($implClassName eq "HTMLDocument") { + push(@headerContent, <<END); + static v8::Local<v8::Object> WrapInShadowObject(v8::Local<v8::Object> wrapper, Node* impl); + static v8::Handle<v8::Value> GetNamedProperty(HTMLDocument* htmlDocument, const AtomicString& key); +END + } + my @enabledAtRuntime; foreach my $function (@{$dataNode->functions}) { my $name = $function->signature->name; @@ -362,9 +369,6 @@ sub GetInternalFields if (IsSubType($dataNode, "Document")) { push(@customInternalFields, "implementationIndex"); - if ($name eq "HTMLDocument") { - push(@customInternalFields, ("markerIndex", "shadowIndex")); - } } elsif ($name eq "DOMWindow") { push(@customInternalFields, "enteredIsolatedWorldIndex"); } @@ -401,7 +405,6 @@ END my %indexerSpecialCases = ( "Storage" => 1, "HTMLAppletElement" => 1, - "HTMLDocument" => 1, "HTMLEmbedElement" => 1, "HTMLObjectElement" => 1 ); @@ -428,6 +431,10 @@ sub GenerateHeaderNamedAndIndexedPropertyAccessors if ($interfaceName eq "HTMLSelectElement" || $interfaceName eq "HTMLAppletElement" || $interfaceName eq "HTMLEmbedElement" || $interfaceName eq "HTMLObjectElement") { $hasCustomNamedGetter = 1; } + if ($interfaceName eq "HTMLDocument") { + $hasCustomNamedGetter = 0; + $hasCustomIndexedGetter = 0; + } my $isIndexerSpecialCase = exists $indexerSpecialCases{$interfaceName}; if ($hasCustomIndexedGetter || $isIndexerSpecialCase) { @@ -456,7 +463,7 @@ END static v8::Handle<v8::Value> namedPropertySetter(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo&); END } - if ($hasCustomDeleters || $interfaceName eq "HTMLDocument") { + if ($hasCustomDeleters) { push(@headerContent, <<END); static v8::Handle<v8::Boolean> namedPropertyDeleter(v8::Local<v8::String>, const v8::AccessorInfo&); END @@ -1503,6 +1510,10 @@ sub GenerateImplementationNamedPropertyGetter $hasCustomGetter = 1; } + if ($interfaceName eq "HTMLDocument") { + $hasCustomGetter = 0; + } + my $hasGetter = $dataNode->extendedAttributes->{"HasNameGetter"} || $hasCustomGetter || $namedPropertyGetter; if (!$hasGetter) { return; @@ -1518,8 +1529,7 @@ END } my $hasSetter = $dataNode->extendedAttributes->{"DelegatingPutFunction"}; - # FIXME: Try to remove hard-coded HTMLDocument reference by aligning handling of document.all with JSC bindings. - my $hasDeleter = $dataNode->extendedAttributes->{"CustomDeleteProperty"} || $interfaceName eq "HTMLDocument"; + my $hasDeleter = $dataNode->extendedAttributes->{"CustomDeleteProperty"}; my $hasEnumerator = $dataNode->extendedAttributes->{"CustomGetPropertyNames"}; my $setOn = "Instance"; @@ -2004,6 +2014,11 @@ END instance->SetAccessCheckCallbacks(V8DOMWindow::namedSecurityCheck, V8DOMWindow::indexedSecurityCheck, v8::External::Wrap(&V8DOMWindow::info), false); END } + if ($interfaceName eq "HTMLDocument") { + push(@implContent, <<END); + desc->SetHiddenPrototype(true); +END + } if ($interfaceName eq "Location") { push(@implContent, <<END); |