Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1575)

Unified Diff: third_party/WebKit/WebCore/bindings/scripts/CodeGeneratorCOM.pm

Issue 21165: Revert the merge. Mac build is mysteriously broken. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/WebCore/bindings/scripts/CodeGeneratorCOM.pm
===================================================================
--- third_party/WebKit/WebCore/bindings/scripts/CodeGeneratorCOM.pm (revision 9383)
+++ third_party/WebKit/WebCore/bindings/scripts/CodeGeneratorCOM.pm (working copy)
@@ -236,6 +236,7 @@
{
my ($dataNode) = @_;
return "I" . $TEMP_PREFIX . "DOMObject" if (@{$dataNode->parents} == 0);
+ return "I" . $TEMP_PREFIX . "DOMNode" if $codeGenerator->StripModule($dataNode->parents(0)) eq "EventTargetNode";
return GetInterfaceName($codeGenerator->StripModule($dataNode->parents(0)));
}
@@ -243,6 +244,7 @@
{
my ($dataNode) = @_;
return $TEMP_PREFIX . "DOMObject" if (@{$dataNode->parents} == 0);
+ return $TEMP_PREFIX . "DOMNode" if $codeGenerator->StripModule($dataNode->parents(0)) eq "EventTargetNode";
return GetClassName($codeGenerator->StripModule($dataNode->parents(0)));
}
@@ -314,6 +316,7 @@
}
# Special casing
+ $CPPImplementationWebCoreIncludes{"EventTargetNode.h"} = 1 if $type eq "Node";
$CPPImplementationWebCoreIncludes{"NameNodeList.h"} = 1 if $type eq "NodeList";
$CPPImplementationWebCoreIncludes{"CSSMutableStyleDeclaration.h"} = 1 if $type eq "CSSStyleDeclaration";
@@ -703,6 +706,7 @@
my $functionName = $function->signature->name;
my $returnIDLType = $function->signature->type;
my $noReturn = ($returnIDLType eq "void");
+ my $requiresEventTargetNodeCast = $function->signature->extendedAttributes->{"EventTargetNodeCast"};
my $raisesExceptions = @{$function->raisesExceptions};
AddIncludesForTypeInCPPImplementation($returnIDLType);
@@ -752,6 +756,9 @@
push(@parameterList, "ec") if $raisesExceptions;
my $implementationGetter = "impl${implementationClassWithoutNamespace}()";
+ if ($requiresEventTargetNodeCast) {
+ $implementationGetter = "WebCore::EventTargetNodeCast(${implementationGetter})";
+ }
my $callSigBegin = " ";
my $callSigMiddle = "${implementationGetter}->" . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterList) . ")";
@@ -794,6 +801,10 @@
}
push(@functionImplementation, " WebCore::ExceptionCode ec = 0;\n") if $raisesExceptions; # FIXME: CHECK EXCEPTION AND DO SOMETHING WITH IT
push(@functionImplementation, join("\n", @parameterInitialization) . (@parameterInitialization > 0 ? "\n" : ""));
+ if ($requiresEventTargetNodeCast) {
+ push(@functionImplementation, " if (!impl${implementationClassWithoutNamespace}()->isEventTargetNode())\n");
+ push(@functionImplementation, " return E_FAIL;\n");
+ }
push(@functionImplementation, $callSigBegin . $callSigMiddle . $callSigEnd . "\n");
push(@functionImplementation, " return S_OK;\n");
push(@functionImplementation, "}\n\n");

Powered by Google App Engine
This is Rietveld 408576698