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

Unified Diff: third_party/WebKit/WebCore/bindings/scripts/CodeGeneratorJS.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/CodeGeneratorJS.pm
===================================================================
--- third_party/WebKit/WebCore/bindings/scripts/CodeGeneratorJS.pm (revision 9383)
+++ third_party/WebKit/WebCore/bindings/scripts/CodeGeneratorJS.pm (working copy)
@@ -386,6 +386,9 @@
push(@headerContentHeader, "#include <runtime/JSGlobalObject.h>\n");
push(@headerContentHeader, "#include <runtime/ObjectPrototype.h>\n");
}
+ if ($interfaceName eq "Node") {
+ push(@headerContentHeader, "#include \"EventTargetNode.h\"\n");
+ }
if ($dataNode->extendedAttributes->{"CustomCall"}) {
push(@headerContentHeader, "#include <runtime/CallData.h>\n");
@@ -633,6 +636,11 @@
} else {
push(@headerContent, "JSC::JSValuePtr toJS(JSC::ExecState*, $implType*);\n");
}
+
+ # Resolve ambiguity with EventTarget that otherwise exists.
+ if ($interfaceName eq "Node") {
+ push(@headerContent, "inline JSC::JSValuePtr toJS(JSC::ExecState* exec, EventTargetNode* node) { return toJS(exec, static_cast<Node*>(node)); }\n");
+ }
}
if (!$hasParent || $dataNode->extendedAttributes->{"GenerateNativeConverter"}) {
if ($podType) {
@@ -1549,6 +1557,7 @@
my %nativeType = (
"CompareHow" => "Range::CompareHow",
"DOMString" => "const UString&",
+ "EventTarget" => "EventTargetNode*",
"NodeFilter" => "RefPtr<NodeFilter>",
"SVGLength" => "SVGLength",
"SVGMatrix" => "TransformationMatrix",
@@ -1596,6 +1605,11 @@
return "$value.toString(exec)";
}
+ if ($type eq "EventTarget") {
+ $implIncludes{"JSEventTargetNode.h"} = 1;
+ return "toEventTargetNode($value)";
+ }
+
$implIncludes{"FloatPoint.h"} = 1 if $type eq "SVGPoint";
$implIncludes{"FloatRect.h"} = 1 if $type eq "SVGRect";
$implIncludes{"HTMLOptionElement.h"} = 1 if $type eq "HTMLOptionElement";

Powered by Google App Engine
This is Rietveld 408576698