WebCore:
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Sep 2006 23:34:07 +0000 (23:34 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Sep 2006 23:34:07 +0000 (23:34 +0000)
        Reviewed by Darin.

        - Added @property syntax to non-generated headers
          inside #ifndef BUILDING_ON_TIGER.
        - Changed the DOMEventTarget protocol to have have new versions
          of addEventListener and removeEventListener with named parameters.
          These old style methods can be removed once Mail changes to use
          the new methods <rdar://problem/4746649>.

        * WebCorePrefix.h: define BUILDING_ON_TIGER when Tiger is the target
        * bindings/objc/DOM.mm:
        (-[DOMNode addEventListener:listener:useCapture:]):
        (-[DOMNode addEventListener:::]): call the new method
        (-[DOMNode removeEventListener:listener:useCapture:]):
        (-[DOMNode removeEventListener:::]): call the new method
        * bindings/objc/DOMAbstractView.h:
        * bindings/objc/DOMEventTarget.h:
        * bindings/objc/DOMHTMLAppletElement.h:
        * bindings/objc/DOMHTMLEmbedElement.h:
        * bindings/objc/DOMHTMLOptionElement.h:
        * bindings/objc/DOMObject.h:
        * bindings/objc/DOMRGBColor.h:

WebKit:

        Reviewed by Darin.

        Pass all headers through unifdef to filter out BUILDING_ON_TIGER blocks
        if MACOSX_DEPLOYMENT_TARGET is 10.4.

        * MigrateHeaders.make:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
WebCore/ChangeLog
WebCore/WebCorePrefix.h
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMAbstractView.h
WebCore/bindings/objc/DOMEventTarget.h
WebCore/bindings/objc/DOMHTMLAppletElement.h
WebCore/bindings/objc/DOMHTMLEmbedElement.h
WebCore/bindings/objc/DOMHTMLOptionElement.h
WebCore/bindings/objc/DOMObject.h
WebCore/bindings/objc/DOMRGBColor.h
WebKit/ChangeLog
WebKit/MigrateHeaders.make

index 90d9a7785e67774554eafbb7e74bd8ccc9fc889d..25de315066243c695b31db1fff1644e0c85672a2 100644 (file)
@@ -1,3 +1,28 @@
+2006-09-22  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Darin.
+
+        - Added @property syntax to non-generated headers
+          inside #ifndef BUILDING_ON_TIGER.
+        - Changed the DOMEventTarget protocol to have have new versions
+          of addEventListener and removeEventListener with named parameters.
+          These old style methods can be removed once Mail changes to use
+          the new methods <rdar://problem/4746649>.
+
+        * WebCorePrefix.h: define BUILDING_ON_TIGER when Tiger is the target
+        * bindings/objc/DOM.mm:
+        (-[DOMNode addEventListener:listener:useCapture:]):
+        (-[DOMNode addEventListener:::]): call the new method
+        (-[DOMNode removeEventListener:listener:useCapture:]):
+        (-[DOMNode removeEventListener:::]): call the new method
+        * bindings/objc/DOMAbstractView.h:
+        * bindings/objc/DOMEventTarget.h:
+        * bindings/objc/DOMHTMLAppletElement.h:
+        * bindings/objc/DOMHTMLEmbedElement.h:
+        * bindings/objc/DOMHTMLOptionElement.h:
+        * bindings/objc/DOMObject.h:
+        * bindings/objc/DOMRGBColor.h:
+
 2006-09-22  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by Eric.
index ed1013772978dfc6682eb8d43996e4ddb2ca6db5..82eb1fd5482ccd2dcb1d561c7ed9167e4071e971 100644 (file)
 
 #import <Cocoa/Cocoa.h>
 
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define BUILDING_ON_TIGER 1
+#endif
+
 #endif
 
 #ifdef __cplusplus
index 4d9a75dd8c08896c3ada792ba02af86fd1b03d49..b7399812e7612253ece5304af230e9b506e885ec 100644 (file)
@@ -393,10 +393,10 @@ static Class elementClass(const WebCore::AtomicString& tagName)
 
 @end
 
-// FIXME: this should be auto-genenerate in DOMNode.mm
+// FIXME: this should be auto-generated
 @implementation DOMNode (DOMEventTarget)
 
-- (void)addEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture
+- (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
 {
     if (![self _node]->isEventTargetNode())
         raiseDOMException(DOM_NOT_SUPPORTED_ERR);
@@ -406,7 +406,13 @@ static Class elementClass(const WebCore::AtomicString& tagName)
     wrapper->deref();
 }
 
-- (void)removeEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture
+- (void)addEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture
+{
+    // FIXME: this method can be removed once Mail changes to use the new method <rdar://problem/4746649>
+    [self addEventListener:type listener:listener useCapture:useCapture];
+}
+
+- (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
 {
     if (![self _node]->isEventTargetNode())
         raiseDOMException(DOM_NOT_SUPPORTED_ERR);
@@ -415,6 +421,12 @@ static Class elementClass(const WebCore::AtomicString& tagName)
         EventTargetNodeCast([self _node])->removeEventListener(type, wrapper, useCapture);
 }
 
+- (void)removeEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture
+{
+    // FIXME: this method can be removed once Mail changes to use the new method <rdar://problem/4746649>
+    [self removeEventListener:type listener:listener useCapture:useCapture];
+}
+
 - (BOOL)dispatchEvent:(DOMEvent *)event
 {
     if (![self _node]->isEventTargetNode())
index 6ecf248c7819acb0c18a4b1fae1d228485397581..d4341e7c69d80cbf71b54be403e089b5754dd640 100644 (file)
@@ -29,5 +29,9 @@
 @class DOMDocument;
 
 @interface DOMAbstractView : DOMObject
+#ifndef BUILDING_ON_TIGER
+@property(readonly) DOMDocument *document;
+#else
 - (DOMDocument *)document;
+#endif
 @end
index 0247cb79815cfedf97aece8412e5407f88456907..354d4ce9fe92fa12aaf2cbc596f03719eedd35d0 100644 (file)
@@ -28,7 +28,7 @@
 @protocol DOMEventListener;
 
 @protocol DOMEventTarget <NSObject, NSCopying>
-- (void)addEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture;
-- (void)removeEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture;
+- (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
+- (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
 - (BOOL)dispatchEvent:(DOMEvent *)event;
 @end
index 9dad568ea33bdb1f394772a506e742923f298a64..61e6859b9837aaa8624dabc1c3f9ebae3e63ed39 100644 (file)
 #import <WebCore/DOMHTMLElement.h>
 
 @interface DOMHTMLAppletElement : DOMHTMLElement
+#ifndef BUILDING_ON_TIGER
+@property NSString *align;
+@property NSString *alt;
+@property NSString *archive;
+@property NSString *code;
+@property NSString *codeBase;
+@property NSString *height;
+@property int hspace;
+@property NSString *name;
+@property NSString *object;
+@property int vspace;
+@property NSString *width;
+#else
 - (NSString *)align;
 - (void)setAlign:(NSString *)align;
 - (NSString *)alt;
@@ -49,4 +62,5 @@
 - (void)setVspace:(int)vspace;
 - (NSString *)width;
 - (void)setWidth:(NSString *)width;
+#endif
 @end
index f991ee8a80104e423c2aad280084aeeac8bb0bcc..2440501b6abbe9ecca6739559cea428cadf0d067 100644 (file)
 #import <WebCore/DOMHTMLElement.h>
 
 @interface DOMHTMLEmbedElement : DOMHTMLElement
+#ifndef BUILDING_ON_TIGER
+@property NSString *align;
+@property int height;
+@property NSString *name;
+@property NSString *src;
+@property NSString *type;
+@property int width;
+#else
 - (NSString *)align;
 - (void)setAlign:(NSString *)newAlign;
 - (int)height;
@@ -39,4 +47,5 @@
 - (void)setType:(NSString *)newType;
 - (int)width;
 - (void)setWidth:(int)newWidth;
+#endif
 @end
index b84f1e3aa32034efd1c8d4f36717010b7108121b..87a498b59413a6d36e8ec89348f435ec59d92a77 100644 (file)
 @class DOMHTMLFormElement;
 
 @interface DOMHTMLOptionElement : DOMHTMLElement
+#ifndef BUILDING_ON_TIGER
+@property(readonly) DOMHTMLFormElement *form;
+@property BOOL defaultSelected;
+@property(readonly) NSString *text;
+@property(readonly) int index;
+@property BOOL disabled;
+@property NSString *label;
+@property BOOL selected;
+@property NSString *value;
+#else
 - (DOMHTMLFormElement *)form;
 - (BOOL)defaultSelected;
 - (void)setDefaultSelected:(BOOL)defaultSelected;
@@ -42,4 +52,5 @@
 - (void)setSelected:(BOOL)selected;
 - (NSString *)value;
 - (void)setValue:(NSString *)value;
+#endif
 @end
index 263ccd5fb160c403ee073bbcc5f7d51507f1bb2a..bc2d1209062cc675c2d9d6ea2b40a0f5e8af633c 100644 (file)
@@ -40,5 +40,9 @@ typedef struct DOMObjectInternal DOMObjectInternal;
 @end
 
 @interface DOMObject (DOMLinkStyle)
+#ifndef BUILDING_ON_TIGER
+@property(readonly) DOMStyleSheet *sheet;
+#else
 - (DOMStyleSheet *)sheet;
+#endif
 @end
index c90d2d04bcdd9993f1debfd33e552d23b94f37c4..65108d68e1e421f171de5cd9399c08de3927aee3 100644 (file)
 @class DOMCSSPrimitiveValue;
 
 @interface DOMRGBColor : DOMObject
+#ifndef BUILDING_ON_TIGER
+@property(readonly) DOMCSSPrimitiveValue *red;
+@property(readonly) DOMCSSPrimitiveValue *green;
+@property(readonly) DOMCSSPrimitiveValue *blue;
+#else
 - (DOMCSSPrimitiveValue *)red;
 - (DOMCSSPrimitiveValue *)green;
 - (DOMCSSPrimitiveValue *)blue;
+#endif
 @end
 
 @interface DOMRGBColor (DOMRGBColorExtensions)
+#ifndef BUILDING_ON_TIGER
+@property(readonly) DOMCSSPrimitiveValue *alpha;
+@property(readonly) NSColor *color;
+#else
 - (DOMCSSPrimitiveValue *)alpha;
 - (NSColor *)color;
+#endif
 @end
index b2804028c912fee60d74a22b995b61a4560dfa72..0d042d38cecbd4f2ef4fd6e8934740dde7946f92 100644 (file)
@@ -1,3 +1,12 @@
+2006-09-22  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Darin.
+
+        Pass all headers through unifdef to filter out BUILDING_ON_TIGER blocks
+        if MACOSX_DEPLOYMENT_TARGET is 10.4.
+
+        * MigrateHeaders.make:
+
 2006-09-20  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by john
index 80805ed9595384198bff6b16b8348e7fe00c96f5..43e1759b367cbbddebc676baf4c397960c17d177 100644 (file)
@@ -188,7 +188,13 @@ all : \
 #
 
 REPLACE_RULES = -e s/WebCore/WebKit/ -e s/JavaScriptCore/WebKit/ -e s/DOMDOMImplementation/DOMImplementation/
-HEADER_MIGRATE_CMD = sed $(REPLACE_RULES) $< > $@
+HEADER_MIGRATE_CMD = sed $(REPLACE_RULES) $< $(PROCESS_HEADER_FOR_MACOSX_TARGET_CMD) > $@
+
+ifeq ($(MACOSX_DEPLOYMENT_TARGET),10.4)
+PROCESS_HEADER_FOR_MACOSX_TARGET_CMD = | ( unifdef -DBUILDING_ON_TIGER || exit 0 )
+else
+PROCESS_HEADER_FOR_MACOSX_TARGET_CMD = | ( unifdef -UBUILDING_ON_TIGER || exit 0 )
+endif
 
 $(PUBLIC_HEADERS_DIR)/DOM% : DOMDOM%
        $(HEADER_MIGRATE_CMD)