Commit afeb95d4 authored by haraken@chromium.org's avatar haraken@chromium.org

Add the "CPP" prefix to CPP specific IDL attributes

https://bugs.webkit.org/show_bug.cgi?id=77707

Reviewed by Adam Barth.

This patch adds the "CPP" prefix to a CPP specific IDL attribute.
Specifically, this patch renames [PureInterface] to [CPPPureInterface]

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateHeader):
(GenerateImplementation):
* css/MediaQueryListListener.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/NodeFilter.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4362021b
2012-02-03 Kentaro Hara <haraken@chromium.org>
Add the "CPP" prefix to CPP specific IDL attributes
https://bugs.webkit.org/show_bug.cgi?id=77707
Reviewed by Adam Barth.
This patch adds the "CPP" prefix to a CPP specific IDL attribute.
Specifically, this patch renames [PureInterface] to [CPPPureInterface]
No tests. No change in behavior.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateHeader):
(GenerateImplementation):
* css/MediaQueryListListener.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/NodeFilter.idl:
2012-01-27 Alexander Pavlov <apavlov@chromium.org> 2012-01-27 Alexander Pavlov <apavlov@chromium.org>
Implement touch event emulation in the WebCore layer Implement touch event emulation in the WebCore layer
...@@ -481,7 +481,7 @@ sub GenerateHeader ...@@ -481,7 +481,7 @@ sub GenerateHeader
$parameterIndex++; $parameterIndex++;
} }
$functionSig .= ")"; $functionSig .= ")";
if ($dataNode->extendedAttributes->{"PureInterface"}) { if ($dataNode->extendedAttributes->{"CPPPureInterface"}) {
push(@interfaceFunctions, " virtual " . $functionSig . " = 0;\n"); push(@interfaceFunctions, " virtual " . $functionSig . " = 0;\n");
} }
my $functionDeclaration = $functionSig; my $functionDeclaration = $functionSig;
...@@ -513,9 +513,9 @@ sub GenerateHeader ...@@ -513,9 +513,9 @@ sub GenerateHeader
push(@headerContent, "};\n\n"); push(@headerContent, "};\n\n");
# for PureInterface classes also add the interface that the client code needs to # for CPPPureInterface classes also add the interface that the client code needs to
# implement # implement
if ($dataNode->extendedAttributes->{"PureInterface"}) { if ($dataNode->extendedAttributes->{"CPPPureInterface"}) {
push(@headerContent, "class WebUser$interfaceName {\n"); push(@headerContent, "class WebUser$interfaceName {\n");
push(@headerContent, "public:\n"); push(@headerContent, "public:\n");
push(@headerContent, " virtual void ref() = 0;\n"); push(@headerContent, " virtual void ref() = 0;\n");
...@@ -529,7 +529,7 @@ sub GenerateHeader ...@@ -529,7 +529,7 @@ sub GenerateHeader
my $namespace = GetNamespaceForClass($implClassName); my $namespace = GetNamespaceForClass($implClassName);
push(@headerContent, "$namespace" . "::$implClassName* toWebCore(const $className&);\n"); push(@headerContent, "$namespace" . "::$implClassName* toWebCore(const $className&);\n");
push(@headerContent, "$className toWebKit($namespace" . "::$implClassName*);\n"); push(@headerContent, "$className toWebKit($namespace" . "::$implClassName*);\n");
if ($dataNode->extendedAttributes->{"PureInterface"}) { if ($dataNode->extendedAttributes->{"CPPPureInterface"}) {
push(@headerContent, "$className toWebKit(WebUser$interfaceName*);\n"); push(@headerContent, "$className toWebKit(WebUser$interfaceName*);\n");
} }
push(@headerContent, "\n#endif\n"); push(@headerContent, "\n#endif\n");
...@@ -783,8 +783,8 @@ sub GenerateImplementation ...@@ -783,8 +783,8 @@ sub GenerateImplementation
# - Functions # - Functions
if ($numFunctions > 0) { if ($numFunctions > 0) {
foreach my $function (@{$dataNode->functions}) { foreach my $function (@{$dataNode->functions}) {
# Treat PureInterface as Custom as well, since the WebCore versions will take a script context as well # Treat CPPPureInterface as Custom as well, since the WebCore versions will take a script context as well
next if ShouldSkipType($function) || $dataNode->extendedAttributes->{"PureInterface"}; next if ShouldSkipType($function) || $dataNode->extendedAttributes->{"CPPPureInterface"};
AddIncludesForType($function->signature->type); AddIncludesForType($function->signature->type);
my $functionName = $function->signature->name; my $functionName = $function->signature->name;
......
...@@ -21,7 +21,7 @@ module view { ...@@ -21,7 +21,7 @@ module view {
interface [ interface [
NoStaticTables, NoStaticTables,
ObjCProtocol, ObjCProtocol,
PureInterface, CPPPureInterface,
OmitConstructor OmitConstructor
] MediaQueryListListener { ] MediaQueryListListener {
void queryChanged(in [Optional=CallWithDefaultValue] MediaQueryList list); void queryChanged(in [Optional=CallWithDefaultValue] MediaQueryList list);
......
...@@ -24,7 +24,7 @@ module events { ...@@ -24,7 +24,7 @@ module events {
interface [ interface [
NoStaticTables, NoStaticTables,
ObjCProtocol, ObjCProtocol,
PureInterface, CPPPureInterface,
OmitConstructor OmitConstructor
] EventListener { ] EventListener {
void handleEvent(in Event evt); void handleEvent(in Event evt);
......
...@@ -23,7 +23,7 @@ module events { ...@@ -23,7 +23,7 @@ module events {
// Introduced in DOM Level 2: // Introduced in DOM Level 2:
interface [ interface [
ObjCProtocol, ObjCProtocol,
PureInterface, CPPPureInterface,
OmitConstructor OmitConstructor
] EventTarget { ] EventTarget {
[OldStyleObjC] void addEventListener(in DOMString type, [OldStyleObjC] void addEventListener(in DOMString type,
......
...@@ -25,7 +25,7 @@ module traversal { ...@@ -25,7 +25,7 @@ module traversal {
CustomMarkFunction, CustomMarkFunction,
CustomNativeConverter, CustomNativeConverter,
ObjCProtocol, ObjCProtocol,
PureInterface CPPPureInterface
] NodeFilter { ] NodeFilter {
// Constants returned by acceptNode // Constants returned by acceptNode
const short FILTER_ACCEPT = 1; const short FILTER_ACCEPT = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment