Title: [127032] trunk/Source/WebCore
Revision
127032
Author
[email protected]
Date
2012-08-29 12:50:15 -0700 (Wed, 29 Aug 2012)

Log Message

run-bindings-tests failing on Apple Mountain Lion Testers.
https://bugs.webkit.org/show_bug.cgi?id=95354

Reviewed by Eric Seidel.

The binding tests were expecting incorrect results on Mac. The versions using the @property
syntax are correct for Leopard and above. CodeGeneratorObjC.pm was determining which syntax
to use based on the value of MACOSX_DEPLOYMENT_TARGET, which might not be set in the
environment the tests get run in but is correctly set by xcodebuild.

* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
Remove the code to support Tiger and earlier and the reliance on MACOSX_DEPLOYMENT_TARGET.
* bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
Update the expectations to expect the @property syntax (done with --reset-results).
* bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
Ditto.
* bindings/scripts/test/ObjC/DOMTestException.h:
Ditto.
* bindings/scripts/test/ObjC/DOMTestInterface.h:
Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.h:
Ditto.
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (127031 => 127032)


--- trunk/Source/WebCore/ChangeLog	2012-08-29 19:49:21 UTC (rev 127031)
+++ trunk/Source/WebCore/ChangeLog	2012-08-29 19:50:15 UTC (rev 127032)
@@ -1,3 +1,31 @@
+2012-08-29  Jessie Berlin  <[email protected]>
+
+        run-bindings-tests failing on Apple Mountain Lion Testers.
+        https://bugs.webkit.org/show_bug.cgi?id=95354
+
+        Reviewed by Eric Seidel.
+
+        The binding tests were expecting incorrect results on Mac. The versions using the @property
+        syntax are correct for Leopard and above. CodeGeneratorObjC.pm was determining which syntax
+        to use based on the value of MACOSX_DEPLOYMENT_TARGET, which might not be set in the
+        environment the tests get run in but is correctly set by xcodebuild.
+
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        (GenerateHeader):
+        Remove the code to support Tiger and earlier and the reliance on MACOSX_DEPLOYMENT_TARGET.
+        * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
+        Update the expectations to expect the @property syntax (done with --reset-results).
+        * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
+        Ditto.
+        * bindings/scripts/test/ObjC/DOMTestException.h:
+        Ditto.
+        * bindings/scripts/test/ObjC/DOMTestInterface.h:
+        Ditto.
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        Ditto.
+        * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
+        Ditto.
+
 2012-08-29  Vivek Galatage  <[email protected]>
 
         Web Inspector: Refactor InspectorFrontendClientLocal to remove ScriptState as member

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm (127031 => 127032)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2012-08-29 19:49:21 UTC (rev 127031)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2012-08-29 19:50:15 UTC (rev 127032)
@@ -78,8 +78,6 @@
                     "SVGStringList" => 1, "SVGTransform" => 1, "SVGTransformList" => 1, "SVGUnitTypes" => 1);
 
 # Constants
-my $buildingForTigerOrEarlier = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} <= 10.4;
-my $buildingForLeopardOrLater = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} >= 10.5;
 my $exceptionInit = "WebCore::ExceptionCode ec = 0;";
 my $jsContextSetter = "WebCore::JSMainThreadNullState state;";
 my $exceptionRaiseOnError = "WebCore::raiseOnDOMError(ec);";
@@ -817,8 +815,6 @@
                 $availabilityMacro = $publicInterfaces{$publicInterfaceKey};
             }
 
-            $availabilityMacro = "WEBKIT_OBJC_METHOD_ANNOTATION($availabilityMacro)" if length $availabilityMacro and $buildingForTigerOrEarlier;
-
             my $declarationSuffix = ";\n";
             $declarationSuffix = " $availabilityMacro;\n" if length $availabilityMacro;
 
@@ -841,34 +837,9 @@
                 $fatalError = 1;
             }
 
-            if ($buildingForLeopardOrLater) {
-                $property .= $declarationSuffix;
-                push(@headerAttributes, $property) if $public;
-                push(@privateHeaderAttributes, $property) unless $public;
-            } else {
-                my $attributeConditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
-                if ($attributeConditionalString) {
-                    push(@headerAttributes, "#if ${attributeConditionalString}\n") if $public;
-                    push(@privateHeaderAttributes, "#if ${attributeConditionalString}\n") unless $public;
-                }
-
-                # - GETTER
-                my $getter = "- (" . $attributeType . ")" . $attributeName . $declarationSuffix;
-                push(@headerAttributes, $getter) if $public;
-                push(@privateHeaderAttributes, $getter) unless $public;
-
-                # - SETTER
-                if (!$attributeIsReadonly) {
-                    my $setter = "- (void)$setterName(" . $attributeType . ")new" . ucfirst($attributeName) . $declarationSuffix;
-                    push(@headerAttributes, $setter) if $public;
-                    push(@privateHeaderAttributes, $setter) unless $public;
-                }
-
-                if ($attributeConditionalString) {
-                    push(@headerAttributes, "#endif\n") if $public;
-                    push(@privateHeaderAttributes, "#endif\n") unless $public;
-                }
-            }
+            $property .= $declarationSuffix;
+            push(@headerAttributes, $property) if $public;
+            push(@privateHeaderAttributes, $property) unless $public;
         }
 
         push(@headerContent, @headerAttributes) if @headerAttributes > 0;
@@ -928,8 +899,6 @@
                 $availabilityMacro = $publicInterfaces{$publicInterfaceKey};
             }
 
-            $availabilityMacro = "WEBKIT_OBJC_METHOD_ANNOTATION($availabilityMacro)" if length $availabilityMacro and $buildingForTigerOrEarlier;
-
             my $functionDeclaration = $functionSig;
             $functionDeclaration .= " " . $availabilityMacro if length $availabilityMacro;
             $functionDeclaration .= ";\n";
@@ -965,8 +934,6 @@
                     $availabilityMacro = $publicInterfaces{$publicInterfaceKey};
                 }
 
-                $availabilityMacro = "WEBKIT_OBJC_METHOD_ANNOTATION($availabilityMacro)" if $buildingForTigerOrEarlier;
-
                 $functionDeclaration = "$deprecatedFunctionSig $availabilityMacro;\n";
 
                 push(@deprecatedHeaderFunctions, $functionDeclaration);
@@ -987,7 +954,7 @@
         }
 
         if (@headerFunctions > 0) {
-            push(@headerContent, "\n") if $buildingForLeopardOrLater and @headerAttributes > 0;
+            push(@headerContent, "\n") if @headerAttributes > 0;
             push(@headerContent, @headerFunctions);
         }
     }
@@ -1022,7 +989,7 @@
         @privateHeaderContent = ();
         push(@privateHeaderContent, "\@interface $className (" . $className . "Private)\n");
         push(@privateHeaderContent, @privateHeaderAttributes) if @privateHeaderAttributes > 0;
-        push(@privateHeaderContent, "\n") if $buildingForLeopardOrLater and @privateHeaderAttributes > 0 and @privateHeaderFunctions > 0;
+        push(@privateHeaderContent, "\n") if @privateHeaderAttributes > 0 and @privateHeaderFunctions > 0;
         push(@privateHeaderContent, @privateHeaderFunctions) if @privateHeaderFunctions > 0;
         push(@privateHeaderContent, "\@end\n");
 

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h (127031 => 127032)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h	2012-08-29 19:49:21 UTC (rev 127031)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h	2012-08-29 19:50:15 UTC (rev 127032)
@@ -32,7 +32,8 @@
 @class NSString;
 
 @interface DOMTestActiveDOMObject : DOMObject
-- (int)excitingAttr;
+@property(readonly) int excitingAttr;
+
 - (void)excitingFunction:(DOMNode *)nextChild;
 - (void)postMessage:(NSString *)message;
 @end

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructor.h (127031 => 127032)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructor.h	2012-08-29 19:49:21 UTC (rev 127031)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructor.h	2012-08-29 19:50:15 UTC (rev 127032)
@@ -31,8 +31,8 @@
 @class NSString;
 
 @interface DOMTestEventConstructor : DOMObject
-- (NSString *)attr1;
-- (NSString *)attr2;
+@property(readonly, copy) NSString *attr1;
+@property(readonly, copy) NSString *attr2;
 @end
 
 #endif

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestException.h (127031 => 127032)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestException.h	2012-08-29 19:49:21 UTC (rev 127031)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestException.h	2012-08-29 19:50:15 UTC (rev 127032)
@@ -31,7 +31,7 @@
 @class NSString;
 
 @interface DOMTestException : DOMObject
-- (NSString *)name;
+@property(readonly, copy) NSString *name;
 @end
 
 #endif

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h (127031 => 127032)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h	2012-08-29 19:49:21 UTC (rev 127031)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h	2012-08-29 19:50:15 UTC (rev 127032)
@@ -43,22 +43,12 @@
 };
 
 @interface DOMTestInterface : DOMObject
+@property(readonly, copy) NSString *supplementalStr1;
+@property(copy) NSString *supplementalStr2;
+@property(copy) NSString *supplementalStr3;
+@property(retain) DOMNode *supplementalNode;
+
 #if ENABLE(Condition11) || ENABLE(Condition12)
-- (NSString *)supplementalStr1;
-#endif
-#if ENABLE(Condition11) || ENABLE(Condition12)
-- (NSString *)supplementalStr2;
-- (void)setSupplementalStr2:(NSString *)newSupplementalStr2;
-#endif
-#if ENABLE(Condition11) || ENABLE(Condition12)
-- (NSString *)supplementalStr3;
-- (void)setSupplementalStr3:(NSString *)newSupplementalStr3;
-#endif
-#if ENABLE(Condition11) || ENABLE(Condition12)
-- (DOMNode *)supplementalNode;
-- (void)setSupplementalNode:(DOMNode *)newSupplementalNode;
-#endif
-#if ENABLE(Condition11) || ENABLE(Condition12)
 - (void)supplementalMethod1;
 #endif
 #if ENABLE(Condition11) || ENABLE(Condition12)

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (127031 => 127032)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h	2012-08-29 19:49:21 UTC (rev 127031)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h	2012-08-29 19:50:15 UTC (rev 127032)
@@ -64,110 +64,56 @@
 };
 
 @interface DOMTestObj : DOMObject
-- (int)readOnlyLongAttr;
-- (NSString *)readOnlyStringAttr;
-- (DOMTestObj *)readOnlyTestObjAttr;
-- (short)shortAttr;
-- (void)setShortAttr:(short)newShortAttr;
-- (unsigned short)unsignedShortAttr;
-- (void)setUnsignedShortAttr:(unsigned short)newUnsignedShortAttr;
-- (long long)Attr;
-- (void)setAttr:(long long)newAttr;
-- (long long)longLongAttr;
-- (void)setLongLongAttr:(long long)newLongLongAttr;
-- (unsigned long long)unsignedLongLongAttr;
-- (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr;
-- (NSString *)stringAttr;
-- (void)setStringAttr:(NSString *)newStringAttr;
-- (DOMTestObj *)testObjAttr;
-- (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr;
-- (DOMTestObj *)XMLObjAttr;
-- (void)setXMLObjAttr:(DOMTestObj *)newXMLObjAttr;
-- (BOOL)create;
-- (void)setCreate:(BOOL)newCreate;
-- (NSString *)reflectedStringAttr;
-- (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
-- (int)reflectedIntegralAttr;
-- (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr;
-- (unsigned)reflectedUnsignedIntegralAttr;
-- (void)setReflectedUnsignedIntegralAttr:(unsigned)newReflectedUnsignedIntegralAttr;
-- (BOOL)reflectedBooleanAttr;
-- (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr;
-- (NSString *)reflectedURLAttr;
-- (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr;
-- (NSString *)reflectedStringAttr;
-- (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
-- (int)reflectedCustomIntegralAttr;
-- (void)setReflectedCustomIntegralAttr:(int)newReflectedCustomIntegralAttr;
-- (BOOL)reflectedCustomBooleanAttr;
-- (void)setReflectedCustomBooleanAttr:(BOOL)newReflectedCustomBooleanAttr;
-- (NSString *)reflectedCustomURLAttr;
-- (void)setReflectedCustomURLAttr:(NSString *)newReflectedCustomURLAttr;
-- (int)attrWithGetterException;
-- (void)setAttrWithGetterException:(int)newAttrWithGetterException;
-- (int)attrWithSetterException;
-- (void)setAttrWithSetterException:(int)newAttrWithSetterException;
-- (NSString *)stringAttrWithGetterException;
-- (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException;
-- (NSString *)stringAttrWithSetterException;
-- (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException;
-- (int)customAttr;
-- (void)setCustomAttr:(int)newCustomAttr;
-- (int)withScriptStateAttribute;
-- (void)setWithScriptStateAttribute:(int)newWithScriptStateAttribute;
-- (DOMTestObj *)withScriptExecutionContextAttribute;
-- (void)setWithScriptExecutionContextAttribute:(DOMTestObj *)newWithScriptExecutionContextAttribute;
-- (DOMTestObj *)withScriptStateAttributeRaises;
-- (void)setWithScriptStateAttributeRaises:(DOMTestObj *)newWithScriptStateAttributeRaises;
-- (DOMTestObj *)withScriptExecutionContextAttributeRaises;
-- (void)setWithScriptExecutionContextAttributeRaises:(DOMTestObj *)newWithScriptExecutionContextAttributeRaises;
-- (DOMTestObj *)withScriptExecutionContextAndScriptStateAttribute;
-- (void)setWithScriptExecutionContextAndScriptStateAttribute:(DOMTestObj *)newWithScriptExecutionContextAndScriptStateAttribute;
-- (DOMTestObj *)withScriptExecutionContextAndScriptStateAttributeRaises;
-- (void)setWithScriptExecutionContextAndScriptStateAttributeRaises:(DOMTestObj *)newWithScriptExecutionContextAndScriptStateAttributeRaises;
-- (DOMTestObj *)withScriptExecutionContextAndScriptStateWithSpacesAttribute;
-- (void)setWithScriptExecutionContextAndScriptStateWithSpacesAttribute:(DOMTestObj *)newWithScriptExecutionContextAndScriptStateWithSpacesAttribute;
-- (DOMTestObj *)withScriptArgumentsAndCallStackAttribute;
-- (void)setWithScriptArgumentsAndCallStackAttribute:(DOMTestObj *)newWithScriptArgumentsAndCallStackAttribute;
-#if ENABLE(Condition1)
-- (int)conditionalAttr1;
-- (void)setConditionalAttr1:(int)newConditionalAttr1;
-#endif
-#if ENABLE(Condition1) && ENABLE(Condition2)
-- (int)conditionalAttr2;
-- (void)setConditionalAttr2:(int)newConditionalAttr2;
-#endif
-#if ENABLE(Condition1) || ENABLE(Condition2)
-- (int)conditionalAttr3;
-- (void)setConditionalAttr3:(int)newConditionalAttr3;
-#endif
-#if ENABLE(Condition1)
-- (DOMTestObjectAConstructor *)conditionalAttr4;
-- (void)setConditionalAttr4:(DOMTestObjectAConstructor *)newConditionalAttr4;
-#endif
-#if ENABLE(Condition1) && ENABLE(Condition2)
-- (DOMTestObjectBConstructor *)conditionalAttr5;
-- (void)setConditionalAttr5:(DOMTestObjectBConstructor *)newConditionalAttr5;
-#endif
-#if ENABLE(Condition1) || ENABLE(Condition2)
-- (DOMTestObjectCConstructor *)conditionalAttr6;
-- (void)setConditionalAttr6:(DOMTestObjectCConstructor *)newConditionalAttr6;
-#endif
-- (DOMDocument *)contentDocument;
-- (DOMSVGPoint *)mutablePoint;
-- (void)setMutablePoint:(DOMSVGPoint *)newMutablePoint;
-- (DOMSVGPoint *)immutablePoint;
-- (void)setImmutablePoint:(DOMSVGPoint *)newImmutablePoint;
-- (int)strawberry;
-- (void)setStrawberry:(int)newStrawberry;
-- (float)strictFloat;
-- (void)setStrictFloat:(float)newStrictFloat;
-- (int)descriptionName;
-- (int)idName;
-- (void)setIdName:(int)newIdName;
-- (NSString *)hashName;
-- (int)replaceableAttribute;
-- (void)setReplaceableAttribute:(int)newReplaceableAttribute;
+@property(readonly) int readOnlyLongAttr;
+@property(readonly, copy) NSString *readOnlyStringAttr;
+@property(readonly, retain) DOMTestObj *readOnlyTestObjAttr;
+@property short shortAttr;
+@property unsigned short unsignedShortAttr;
+@property long long Attr;
+@property long long longLongAttr;
+@property unsigned long long unsignedLongLongAttr;
+@property(copy) NSString *stringAttr;
+@property(retain) DOMTestObj *testObjAttr;
+@property(retain) DOMTestObj *XMLObjAttr;
+@property BOOL create;
+@property(copy) NSString *reflectedStringAttr;
+@property int reflectedIntegralAttr;
+@property unsigned reflectedUnsignedIntegralAttr;
+@property BOOL reflectedBooleanAttr;
+@property(copy) NSString *reflectedURLAttr;
+@property(copy) NSString *reflectedStringAttr;
+@property int reflectedCustomIntegralAttr;
+@property BOOL reflectedCustomBooleanAttr;
+@property(copy) NSString *reflectedCustomURLAttr;
+@property int attrWithGetterException;
+@property int attrWithSetterException;
+@property(copy) NSString *stringAttrWithGetterException;
+@property(copy) NSString *stringAttrWithSetterException;
+@property int customAttr;
+@property int withScriptStateAttribute;
+@property(retain) DOMTestObj *withScriptExecutionContextAttribute;
+@property(retain) DOMTestObj *withScriptStateAttributeRaises;
+@property(retain) DOMTestObj *withScriptExecutionContextAttributeRaises;
+@property(retain) DOMTestObj *withScriptExecutionContextAndScriptStateAttribute;
+@property(retain) DOMTestObj *withScriptExecutionContextAndScriptStateAttributeRaises;
+@property(retain) DOMTestObj *withScriptExecutionContextAndScriptStateWithSpacesAttribute;
+@property(retain) DOMTestObj *withScriptArgumentsAndCallStackAttribute;
+@property int conditionalAttr1;
+@property int conditionalAttr2;
+@property int conditionalAttr3;
+@property(retain) DOMTestObjectAConstructor *conditionalAttr4;
+@property(retain) DOMTestObjectBConstructor *conditionalAttr5;
+@property(retain) DOMTestObjectCConstructor *conditionalAttr6;
+@property(readonly, retain) DOMDocument *contentDocument;
+@property(retain) DOMSVGPoint *mutablePoint;
+@property(retain) DOMSVGPoint *immutablePoint;
+@property int strawberry;
+@property float strictFloat;
+@property(readonly) int descriptionName;
+@property int idName;
+@property(readonly, copy) NSString *hashName;
+@property int replaceableAttribute;
+
 - (void)voidMethod;
 - (void)voidMethodWithArgs:(long long)Arg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
 - (long long)Method;

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h (127031 => 127032)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h	2012-08-29 19:49:21 UTC (rev 127031)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h	2012-08-29 19:50:15 UTC (rev 127032)
@@ -33,13 +33,12 @@
 @class NSString;
 
 @interface DOMTestSerializedScriptValueInterface : DOMObject
-- (NSString *)value;
-- (void)setValue:(NSString *)newValue;
-- (NSString *)readonlyValue;
-- (NSString *)cachedValue;
-- (void)setCachedValue:(NSString *)newCachedValue;
-- (DOMMessagePortArray *)ports;
-- (NSString *)cachedReadonlyValue;
+@property(retain) NSString *value;
+@property(readonly, retain) NSString *readonlyValue;
+@property(retain) NSString *cachedValue;
+@property(readonly, retain) DOMMessagePortArray *ports;
+@property(readonly, retain) NSString *cachedReadonlyValue;
+
 - (void)acceptTransferList:(NSString *)data transferList:(DOMArray *)transferList;
 - (void)multiTransferList:(NSString *)first tx:(DOMArray *)tx second:(NSString *)second txx:(DOMArray *)txx;
 @end
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to