Title: [104690] trunk/Source/WebCore
- Revision
- 104690
- Author
- [email protected]
- Date
- 2012-01-11 02:24:51 -0800 (Wed, 11 Jan 2012)
Log Message
ShouldSkipTypeInHeader() and ShouldSkipTypeInImplementation() should be the same
https://bugs.webkit.org/show_bug.cgi?id=76030
Reviewed by Adam Barth.
Because the attributes/methods that do not appear in the implementation
do not need to appear in the header.
Tests: bindings/scripts/test/TestCallback.idl
bindings/scripts/test/TestObj.idl
* bindings/scripts/CodeGeneratorCPP.pm:
(ShouldSkipType): Renamed from ShouldSkipTypeInImplementation().
(GenerateHeader): Replaced ShouldSkipTypeInImplementation() with ShouldSkipType(),
and replaced ShouldSkipTypeInHeader() with ShouldSkipType().
(GenerateImplementation): Ditto.
* bindings/scripts/test/CPP/WebDOMTestCallback.h: Updated the test result.
* bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (104689 => 104690)
--- trunk/Source/WebCore/ChangeLog 2012-01-11 10:14:44 UTC (rev 104689)
+++ trunk/Source/WebCore/ChangeLog 2012-01-11 10:24:51 UTC (rev 104690)
@@ -1,3 +1,24 @@
+2012-01-11 Kentaro Hara <[email protected]>
+
+ ShouldSkipTypeInHeader() and ShouldSkipTypeInImplementation() should be the same
+ https://bugs.webkit.org/show_bug.cgi?id=76030
+
+ Reviewed by Adam Barth.
+
+ Because the attributes/methods that do not appear in the implementation
+ do not need to appear in the header.
+
+ Tests: bindings/scripts/test/TestCallback.idl
+ bindings/scripts/test/TestObj.idl
+
+ * bindings/scripts/CodeGeneratorCPP.pm:
+ (ShouldSkipType): Renamed from ShouldSkipTypeInImplementation().
+ (GenerateHeader): Replaced ShouldSkipTypeInImplementation() with ShouldSkipType(),
+ and replaced ShouldSkipTypeInHeader() with ShouldSkipType().
+ (GenerateImplementation): Ditto.
+ * bindings/scripts/test/CPP/WebDOMTestCallback.h: Updated the test result.
+ * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
+
2012-01-11 Zoltan Herczeg <[email protected]>
Fix more style errors in CSSParser.cpp (followup patch)
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm (104689 => 104690)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm 2012-01-11 10:14:44 UTC (rev 104689)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm 2012-01-11 10:24:51 UTC (rev 104690)
@@ -192,7 +192,7 @@
return $parent;
}
-sub ShouldSkipTypeInImplementation
+sub ShouldSkipType
{
my $typeInfo = shift;
@@ -210,21 +210,6 @@
return 0;
}
-sub ShouldSkipTypeInHeader
-{
- my $typeInfo = shift;
-
- # FIXME: We currently ignore any attribute/function needing custom code
- return 1 if $typeInfo->signature->extendedAttributes->{"CustomArgumentHandling"}
- or $typeInfo->signature->extendedAttributes->{"CustomGetter"};
-
- # FIXME: We don't generate bindings for SVG related interfaces yet
- return 1 if $typeInfo->signature->name =~ /getSVGDocument/;
-
- return 1 if $typeInfo->signature->name =~ /Constructor/;
- return 0;
-}
-
sub GetCPPType
{
my $type = shift;
@@ -443,7 +428,7 @@
# - Add attribute getters/setters.
if ($numAttributes > 0) {
foreach my $attribute (@{$dataNode->attributes}) {
- next if ShouldSkipTypeInHeader($attribute);
+ next if ShouldSkipType($attribute);
my $attributeConditionalString = GenerateConditionalString($attribute->signature);
my $attributeName = $attribute->signature->name;
@@ -482,7 +467,7 @@
# - Add functions.
if ($numFunctions > 0) {
foreach my $function (@{$dataNode->functions}) {
- next if ShouldSkipTypeInHeader($function);
+ next if ShouldSkipType($function);
my $functionName = $function->signature->name;
my $returnType = GetCPPType($function->signature->type, 0);
@@ -694,7 +679,7 @@
# - Attributes
if ($numAttributes > 0) {
foreach my $attribute (@{$dataNode->attributes}) {
- next if ShouldSkipTypeInImplementation($attribute);
+ next if ShouldSkipType($attribute);
AddIncludesForType($attribute->signature->type);
my $idlType = $codeGenerator->StripModule($attribute->signature->type);
@@ -805,7 +790,7 @@
if ($numFunctions > 0) {
foreach my $function (@{$dataNode->functions}) {
# Treat PureInterface as Custom as well, since the WebCore versions will take a script context as well
- next if ShouldSkipTypeInImplementation($function) || $dataNode->extendedAttributes->{"PureInterface"};
+ next if ShouldSkipType($function) || $dataNode->extendedAttributes->{"PureInterface"};
AddIncludesForType($function->signature->type);
my $functionName = $function->signature->name;
Modified: trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h (104689 => 104690)
--- trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h 2012-01-11 10:14:44 UTC (rev 104689)
+++ trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h 2012-01-11 10:24:51 UTC (rev 104690)
@@ -35,8 +35,6 @@
class WebDOMClass1;
class WebDOMClass2;
class WebDOMClass3;
-class WebDOMClass5;
-class WebDOMClass6;
class WebDOMDOMStringList;
class WebDOMTestCallback : public WebDOMObject {
@@ -51,7 +49,6 @@
bool callbackWithClass1Param(const WebDOMClass1& class1Param);
bool callbackWithClass2Param(const WebDOMClass2& class2Param, const WebDOMString& strArg);
int callbackWithNonBoolReturnType(const WebDOMClass3& class3Param);
- int customCallback(const WebDOMClass5& class5Param, const WebDOMClass6& class6Param);
bool callbackWithStringList(const WebDOMDOMStringList& listParam);
WebCore::TestCallback* impl() const;
Modified: trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h (104689 => 104690)
--- trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2012-01-11 10:14:44 UTC (rev 104689)
+++ trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2012-01-11 10:24:51 UTC (rev 104690)
@@ -124,8 +124,6 @@
void setStringAttrWithGetterException(const WebDOMString&);
WebDOMString stringAttrWithSetterException() const;
void setStringAttrWithSetterException(const WebDOMString&);
- int customAttr() const;
- void setCustomAttr(int);
WebDOMString scriptStringAttr() const;
#if ENABLE(Condition1)
int conditionalAttr1() const;
@@ -174,8 +172,6 @@
void idbKey(const WebDOMIDBKey& key);
void optionsObject(const WebDOMOptionsObject& oo, const WebDOMOptionsObject& ooo);
void methodWithException();
- void customMethod();
- void customMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg);
void addEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture);
void removeEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture);
void withScriptStateVoid();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes