Reviewed by Darin.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2005 01:08:26 +0000 (01:08 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2005 01:08:26 +0000 (01:08 +0000)
        Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
        Once building on Tiger isn't needed we will drop WebNSInt and use NSInt

        * WebView.subproj/WebDefaultResourceLoadDelegate.m:
        (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
        * WebView.subproj/WebLoader.m:
        (-[NSURLProtocol didReceiveData:lengthReceived:]):
        * WebView.subproj/WebResourceLoadDelegate.h:
        * WebView.subproj/WebUIDelegate.h:
        * WebView.subproj/WebView.h:
        * WebView.subproj/WebView.m:
        (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
        (-[WebView spellCheckerDocumentTag]):
        * WebView.subproj/WebViewInternal.h:
        * WebView.subproj/WebViewPrivate.h:

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

WebKit/ChangeLog
WebKit/WebView.subproj/WebDefaultResourceLoadDelegate.m
WebKit/WebView.subproj/WebFrame.m
WebKit/WebView.subproj/WebLoader.m
WebKit/WebView.subproj/WebResourceLoadDelegate.h
WebKit/WebView.subproj/WebUIDelegate.h
WebKit/WebView.subproj/WebView.h
WebKit/WebView.subproj/WebView.m
WebKit/WebView.subproj/WebViewInternal.h
WebKit/WebView.subproj/WebViewPrivate.h

index cecbbce8f9a5c49f5099df95badde1809cf4c193..1b85c6d04554ebcba23c949ba7f63793f544d4e4 100644 (file)
@@ -1,3 +1,25 @@
+2005-10-12  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Darin.
+        
+        Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
+        Once building on Tiger isn't needed we will drop WebNSInt and use NSInt
+
+        * WebView.subproj/WebDefaultResourceLoadDelegate.m:
+        (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
+        * WebView.subproj/WebFrame.m:
+        (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
+        * WebView.subproj/WebLoader.m:
+        (-[NSURLProtocol didReceiveData:lengthReceived:]):
+        * WebView.subproj/WebResourceLoadDelegate.h:
+        * WebView.subproj/WebUIDelegate.h:
+        * WebView.subproj/WebView.h:
+        * WebView.subproj/WebView.m:
+        (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
+        (-[WebView spellCheckerDocumentTag]):
+        * WebView.subproj/WebViewInternal.h:
+        * WebView.subproj/WebViewPrivate.h:
+
 2005-10-12  Darin Adler  <darin@apple.com>
 
         * WebView.subproj/WebPolicyDelegate.h: Fix a comment.
index 1d3499985bfa8ffaeba5c80a6735f9af5ea702ec..b42ae7609f878cda0df7fb0c78eda0eee060a407 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+typedef unsigned int WebNSUInt;
+#else
+typedef NSUInt WebNSUInt;
+#endif
+
 #import <WebKit/WebDefaultResourceLoadDelegate.h>
 
 #import <Foundation/NSURLAuthenticationChallenge.h>
@@ -77,7 +83,7 @@ static WebDefaultResourceLoadDelegate *sharedDelegate = nil;
 {
 }
 
--(void)webView: (WebView *)wv resource:identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource
+-(void)webView: (WebView *)wv resource:identifier didReceiveContentLength: (WebNSUInt)length fromDataSource:(WebDataSource *)dataSource
 {
 }
 
index d9b7be7891374a574778242f528a5c4d9e787d50..f08ec25373aca7a32fbe412da215a855d4adf007 100644 (file)
@@ -2685,9 +2685,9 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     
     if (length > 0) {
         if (implementations.delegateImplementsDidReceiveContentLength) {
-            [delegate webView:wv resource:identifier didReceiveContentLength:length fromDataSource:dataSource];
+            [delegate webView:wv resource:identifier didReceiveContentLength:(WebNSUInt)length fromDataSource:dataSource];
         } else {
-            [sharedDelegate webView:wv resource:identifier didReceiveContentLength:length fromDataSource:dataSource];
+            [sharedDelegate webView:wv resource:identifier didReceiveContentLength:(WebNSUInt)length fromDataSource:dataSource];
         }
     }
     
index 0b14b5dd64b8945b5f8e62d772b051279556c57a..20f32737583c655c0ad1117cddf9366f161661f2 100644 (file)
@@ -535,9 +535,9 @@ static BOOL NSURLConnectionSupportsBufferedData;
     [webView _incrementProgressForConnectionDelegate:self data:data];
 
     if (implementations.delegateImplementsDidReceiveContentLength)
-        [resourceLoadDelegate webView:webView resource:identifier didReceiveContentLength:lengthReceived fromDataSource:dataSource];
+        [resourceLoadDelegate webView:webView resource:identifier didReceiveContentLength:(WebNSUInt)lengthReceived fromDataSource:dataSource];
     else
-        [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:lengthReceived fromDataSource:dataSource];
+        [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:(WebNSUInt)lengthReceived fromDataSource:dataSource];
     [self release];
 }
 
index 363e5ade99af8b50d472634d98b1f910de868c49..18de43852f1ffb3c204e37295d248aac4d50e1c2 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSInt int
+#else
+#define WebNSInt NSInt
+#endif
+
 @class WebView;
 @class WebDataSource;
 @class NSURLAuthenticationChallenge;
     @param length The amount of new data received.  This is not the total amount, just the new amount received.
     @param dataSource The dataSource that initiated the load.
 */
-- (void)webView:(WebView *)sender resource:(id)identifier didReceiveContentLength: (unsigned)length fromDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender resource:(id)identifier didReceiveContentLength:(WebNSInt)length fromDataSource:(WebDataSource *)dataSource;
 
 /*!
     @method webView:resource:didFinishLoadingFromDataSource:
 
 @end
 
-
+#undef WebNSInt
\ No newline at end of file
index 64c2ef1550db4542779933e137ef2b94db3e1051..ad3c5ffeea04504309daf7f61ca06ba930841210 100644 (file)
 #import <Cocoa/Cocoa.h>
 #import <Foundation/NSURLRequest.h>
 
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSUInt unsigned int
+#else
+#define WebNSUInt NSUInt
+#endif
+
 /*!
     @enum WebMenuItemTag
     @discussion Each menu item in the default menu items array passed in
@@ -385,7 +391,7 @@ typedef enum {
     @param elementInformation Dictionary that describes the element that the mouse is over, or nil.
     @param modifierFlags The modifier flags as in NSEvent.
 */
-- (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
+- (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(WebNSUInt)modifierFlags;
 
 /*!
     @method webView:contextMenuItemsForElement:defaultMenuItems:
@@ -468,3 +474,5 @@ typedef enum {
 - (void)webView:(WebView *)webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:(NSPoint)point withPasteboard:(NSPasteboard *)pasteboard;
 
 @end
+
+#undef WebNSUInt
\ No newline at end of file
index 62686b31adb456b7af724c6c1a51184d461b0af4..ac56103ecf6263412829d57ad60a5a2405d1d5a0 100644 (file)
 
 #import <Cocoa/Cocoa.h>
 
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSInt int
+#else
+#define WebNSInt NSInt
+#endif
+
 @class DOMCSSStyleDeclaration;
 @class DOMDocument;
 @class DOMElement;
@@ -592,7 +598,7 @@ extern NSString * const WebViewDidChangeSelectionNotification;
 - (BOOL)smartInsertDeleteEnabled;
 - (void)setContinuousSpellCheckingEnabled:(BOOL)flag;
 - (BOOL)isContinuousSpellCheckingEnabled;
-- (int)spellCheckerDocumentTag;
+- (WebNSInt)spellCheckerDocumentTag;
 - (NSUndoManager *)undoManager;
 - (void)setEditingDelegate:(id)delegate;
 - (id)editingDelegate;
@@ -706,3 +712,5 @@ a custom implementation for each.
 */
  
 @end
+
+#undef WebNSInt
\ No newline at end of file
index d6d5a830e2fecea857801db4670d0995001ce189..253c21e928c9b391291e8320cb3540603f2b1af4 100644 (file)
@@ -657,7 +657,7 @@ static bool debugWidget = true;
     return menu;
 }
 
-- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(unsigned)modifierFlags
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInt)modifierFlags
 {
     // When the mouse isn't over this view at all, we'll get called with a dictionary of nil over
     // and over again. So it's a good idea to catch that here and not send multiple calls to the delegate
@@ -2804,7 +2804,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
     return _private->continuousSpellCheckingEnabled && [self _continuousCheckingAllowed];
 }
 
-- (int)spellCheckerDocumentTag
+- (WebNSInt)spellCheckerDocumentTag
 {
     if (!_private->hasSpellCheckerDocumentTag) {
         _private->spellCheckerDocumentTag = [NSSpellChecker uniqueSpellDocumentTag];
index cca906222a5bc5113f5f860b369cab7e47cc8f6f..232ab69bd1888abe9f482c6aed618b5dafd93204 100644 (file)
     WebBridge *dragCaretBridge;
     
     BOOL hasSpellCheckerDocumentTag;
-    int spellCheckerDocumentTag;
+    WebNSInt spellCheckerDocumentTag;
 
     BOOL continuousSpellCheckingEnabled;
     BOOL smartInsertDeleteEnabled;
index 04eb12b33a1e9d621449e39eb51b16537f395b6c..2ca31fbf0145d1171218bb8cc395d66e27dbfe3b 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// Define WebNSInt and WebNSUInt to wrap around NSInt on Leopard and still build on Tiger
+// Once building on Tiger isn't needed we will drop WebNSInt and use NSInt
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+typedef int WebNSInt;
+typedef unsigned int WebNSUInt;
+#else
+typedef NSInt WebNSInt;
+typedef NSUInt WebNSUInt;
+#endif
+
 #import <WebKit/WebView.h>
 #import <WebKit/WebFramePrivate.h>
 
@@ -167,7 +178,7 @@ typedef enum {
 
 - (NSMenu *)_menuForElement:(NSDictionary *)element defaultItems:(NSArray *)items;
 
-- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(unsigned)modifierFlags;
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInt)modifierFlags;
 
 /*!
 Could be worth adding to the API.