Reviewed by Tim O.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 May 2006 19:00:11 +0000 (19:00 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 May 2006 19:00:11 +0000 (19:00 +0000)
        <rdar://problem/4559808> WebKit fails to compile for ppc64
        <rdar://problem/4522085> 64-bit: WebKit uses FSSpec which is not available in 64-bit
        Gets WebKit building under 64-bit. Rename WebNSInt and WebNSUInt to WebNSInteger and WebNSUInteger.
        Start using WebNSInteger where we need to match AppKit API usage of NSInteger.

        HIWebView and a couple of helper functions are disabled until they can be moved off of QuickDraw.
        <rdar://problem/4561772> HIWebView needs to be reworked to not use QuickDraw, needed for 64-bit

        * Carbon/CarbonUtils.m: disabled this file in 64-bit <rdar://problem/4561772>
        * Carbon/CarbonWindowAdapter.m:
        (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
        * Carbon/CarbonWindowFrame.m:
        (+[CarbonWindowFrame frameRectForContentRect:styleMask:]):
        (+[CarbonWindowFrame contentRectForFrameRect:styleMask:]):
        (+[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]):
        (-[CarbonWindowFrame frameRectForContentRect:styleMask:]):
        (-[CarbonWindowFrame contentRectForFrameRect:styleMask:]):
        (-[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]):
        * Carbon/HIViewAdapter.m: disabled this file in 64-bit <rdar://problem/4561772>
        * Carbon/HIWebView.m: disabled this file in 64-bit <rdar://problem/4561772>
        (HIWebViewEventHandler):
        * DefaultDelegates/WebDefaultResourceLoadDelegate.m:
        (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
        * History/WebBackForwardList.m:
        (-[WebBackForwardList removeItem:]):
        (-[WebBackForwardList goToItem:]):
        * Misc/WebDownload.m:
        (-[WebDownloadInternal download:didReceiveDataOfLength:]):
        * Misc/WebFileDatabase.m:
        (UniqueFilePathForKey):
        * Misc/WebIconDatabase.m:
        (-[NSMutableDictionary retainIconForURL:]):
        (-[NSMutableDictionary releaseIconForURL:]):
        (-[WebIconDatabase _totalRetainCountForIconURLString:]):
        (-[WebIconDatabase _retainIconForIconURLString:]):
        (-[WebIconDatabase _releaseIconForIconURLString:]):
        * Misc/WebSearchableTextView.m:
        (-[NSString selectionRect]):
        * Misc/WebTypesInternal.h: Added.
        * Plugins/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream _destroyStream]):
        (CarbonPathFromPOSIXPath):
        * Plugins/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView sendActivateEvent:]):
        (-[WebBaseNetscapePluginView sendUpdateEvent]):
        (TSMEventHandler):
        (-[WebBaseNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
        (-[WebBaseNetscapePluginView _printedPluginBitmap]):
        (-[NSData _web_locationAfterFirstBlankLine]):
        * Plugins/WebBasePluginPackage.m:
        (-[WebBasePluginPackage hash]):
        * Plugins/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage load]):
        (functionPointerForTVector):
        * WebInspector/WebInspector.m:
        (-[WebInspector _updateSystemColors]):
        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebDataSource.m:
        (-[WebDataSource _didReceiveData:contentLength:forResource:]):
        * WebView/WebFrame.m:
        (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
        * WebView/WebHTMLView.m:
        (-[NSArray drawRect:]):
        (-[WebHTMLView characterIndexForPoint:]):
        (-[WebHTMLView conversationIdentifier]):
        * WebView/WebResourceLoadDelegate.h:
        * WebView/WebUIDelegate.h:
        * WebView/WebView.h:
        * WebView/WebView.m:
        (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
        (-[WebView spellCheckerDocumentTag]):
        * WebView/WebViewInternal.h:
        * WebView/WebViewPrivate.h:

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

28 files changed:
WebKit/Carbon/CarbonUtils.m
WebKit/Carbon/CarbonWindowAdapter.m
WebKit/Carbon/CarbonWindowFrame.m
WebKit/Carbon/HIViewAdapter.m
WebKit/Carbon/HIWebView.m
WebKit/ChangeLog
WebKit/DefaultDelegates/WebDefaultResourceLoadDelegate.m
WebKit/History/WebBackForwardList.m
WebKit/Misc/WebDownload.m
WebKit/Misc/WebFileDatabase.m
WebKit/Misc/WebIconDatabase.m
WebKit/Misc/WebSearchableTextView.m
WebKit/Misc/WebTypesInternal.h [new file with mode: 0644]
WebKit/Plugins/WebBaseNetscapePluginStream.m
WebKit/Plugins/WebBaseNetscapePluginView.m
WebKit/Plugins/WebBasePluginPackage.m
WebKit/Plugins/WebNetscapePluginPackage.m
WebKit/WebInspector/WebInspector.m
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebDataSource.m
WebKit/WebView/WebFrame.m
WebKit/WebView/WebHTMLView.m
WebKit/WebView/WebResourceLoadDelegate.h
WebKit/WebView/WebUIDelegate.h
WebKit/WebView/WebView.h
WebKit/WebView/WebView.m
WebKit/WebView/WebViewInternal.h
WebKit/WebView/WebViewPrivate.h

index 661b8fcc4e24cd98a920943662a8638dc7e4dce5..982bc2e6cdf9aed598caf282d02634783c36548f 100644 (file)
@@ -26,6 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// <rdar://problem/4561772> HIWebView needs to be reworked to not use QuickDraw, needed for 64-bit
+#if !__LP64__
+
 #include "CarbonUtils.h"
 #import <WebKitSystemInterface.h>
 
@@ -37,7 +40,6 @@ static NSAutoreleasePool*     sPool;
 static unsigned numPools;
 static EventLoopRef poolLoop;
 
-
 void                    HIWebViewRegisterClass( void );
 
 void
@@ -67,7 +69,6 @@ WebInitForCarbon()
     }
 }
 
-
 /*
     The pool cleaner is required because Carbon applications do not have
     an autorelease pool provided by their event loops.  Importantly,
@@ -129,3 +130,4 @@ WebConvertNSImageToCGImageRef(
        return image;
 }
 
+#endif
index f901fc8ce3aed9d923978478968e325080bda362..53ff28908a7563550a094cec4b14567d2ad52ce2 100644 (file)
 #import <assert.h>
 
 #import "WebNSObjectExtras.h"
+#import "WebTypesInternal.h"
 
 @interface NSWindow(HIWebFrameView)
 - _initContent:(const NSRect *)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag contentView:aView;
 - (void)_oldPlaceWindow:(NSRect)frameRect;
 - (void)_windowMovedToRect:(NSRect)actualFrame;
-- (void)_setWindowNumber:(int)nativeWindow;
+- (void)_setWindowNumber:(WebNSInteger)nativeWindow;
 - (NSGraphicsContext *)_threadContext;
 - (void)_setFrame:(NSRect)newWindowFrameRect;
 - (void)_setVisible:(BOOL)flag;
@@ -187,7 +188,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
  //   _auxiliaryStorage->_auxWFlags.hasShadow = (windowAttributes & kWindowNoShadowAttribute) ? NO : YES;
 
     // Record the window number.
-    [self _setWindowNumber:(int)nativeWindow];
+    [self _setWindowNumber:(WebNSInteger)nativeWindow];
 
     // Set up from the frame rectangle.
     // We didn't even really try to get it right at _initContent:... time, because it's more trouble that it's worth to write a real +[NSCarbonWindow frameRectForContentRect:styleMask:].  M.P. Notice - 10/10/00
index 381e95c343506c34998e66d858246f2f62f7633d..42b45717177b3b3daaf4ee2a68af271700114287 100644 (file)
@@ -34,6 +34,8 @@
 #import <HIToolbox/MacWindows.h>
 #import <assert.h>
 
+#import "WebTypesInternal.h"
+
 @interface NSView(Secret)
 - (void)_setWindow:(NSWindow *)window;
 @end
 }
 
 // Given a content rectangle and style mask, return a corresponding frame rectangle.
-+ (NSRect)frameRectForContentRect:(NSRect)contentRect styleMask:(unsigned int)style {
++ (NSRect)frameRectForContentRect:(NSRect)contentRect styleMask:(WebNSUInteger)style {
 
     // We don't bother figuring out a good value, because content rects weren't so meaningful for NSCarbonWindows in the past, but this might not be a good assumption anymore.  M.P. Warning - 12/5/00
     return contentRect;
 
 }
 
-+ (NSRect)contentRectForFrameRect:(NSRect)frameRect styleMask:(unsigned int)style {
++ (NSRect)contentRectForFrameRect:(NSRect)frameRect styleMask:(WebNSUInteger)style {
 
     // We don't bother figuring out a good value, because content rects weren't so meaningful for NSCarbonWindows in the past, but this might not be a good assumption anymore.  KW - copied from +frameRectForContentRect:styleMask
     return frameRect;
 
 }
 
-+ (NSSize)minFrameSizeForMinContentSize:(NSSize)cSize styleMask:(unsigned int)style {
++ (NSSize)minFrameSizeForMinContentSize:(NSSize)cSize styleMask:(WebNSUInteger)style {
     // See comments above.  We don't make any assumptions about the relationship between content rects and frame rects
     return cSize;
 }
 
-- (NSRect)frameRectForContentRect:(NSRect)cRect styleMask:(unsigned int)style {
+- (NSRect)frameRectForContentRect:(NSRect)cRect styleMask:(WebNSUInteger)style {
     return [[self class] frameRectForContentRect: cRect styleMask:style];
 }
-- (NSRect)contentRectForFrameRect:(NSRect)fRect styleMask:(unsigned int)style {
+- (NSRect)contentRectForFrameRect:(NSRect)fRect styleMask:(WebNSUInteger)style {
     return [[self class] contentRectForFrameRect: fRect styleMask:style];
 }
-- (NSSize)minFrameSizeForMinContentSize:(NSSize)cSize styleMask:(unsigned int)style {
+- (NSSize)minFrameSizeForMinContentSize:(NSSize)cSize styleMask:(WebNSUInteger)style {
     return [[self class] minFrameSizeForMinContentSize:cSize styleMask: style];
 }
 
index 09e7d61c7eff2e35e96ce7391b677955219872b8..39cc86c33d96ea9d93f1c46f09efac7b3555e83d 100644 (file)
@@ -26,6 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// <rdar://problem/4561772> HIWebView needs to be reworked to not use QuickDraw, needed for 64-bit
+#if !__LP64__
+
 #import "HIViewAdapter.h"
 
 #import <objc/objc.h>
@@ -260,3 +263,4 @@ static void SetViewNeedsDisplay(HIViewRef inHIView, RgnHandle inRegion, Boolean
     }
 }
 
+#endif
index 77f7ba8051807f34ea12b1377c8ebaec3197d4ac..f27f04e89e25469ab621386ede1e489b69c4238e 100644 (file)
@@ -26,6 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+// <rdar://problem/4561772> HIWebView needs to be reworked to not use QuickDraw, needed for 64-bit
+#if !__LP64__
+
 #include "HIWebView.h"
 
 #include "CarbonWindowAdapter.h"
@@ -1396,9 +1399,13 @@ HIWebViewEventHandler(
                                                        sizeof( OSType ), NULL, &tag );
                                        GetEventParameter( inEvent, kEventParamControlDataBuffer, typePtr, NULL,
                                                        sizeof( Ptr ), NULL, &ptr );
-                                       GetEventParameter( inEvent, kEventParamControlDataBufferSize, typeLongInteger, NULL,
-                                                       sizeof( Size ), NULL, &size );
-       
+
+#if __LP64__
+                                       GetEventParameter(inEvent, kEventParamControlDataBufferSize, typeSInt64, NULL, sizeof(Size), NULL, &size);
+#else
+                                       GetEventParameter(inEvent, kEventParamControlDataBufferSize, typeSInt32, NULL, sizeof(Size), NULL, &size);
+#endif
+
                                        if ( tag == kControlKindTag )
                                        {
                                                Size            outSize;
@@ -1414,7 +1421,11 @@ HIWebViewEventHandler(
                                                }
 
                                                outSize = sizeof( ControlKind );
-                                               SetEventParameter( inEvent, kEventParamControlDataBufferSize, typeLongInteger, sizeof( Size ), &outSize );                                              
+#if __LP64__
+                        SetEventParameter(inEvent, kEventParamControlDataBufferSize, typeSInt64, sizeof(Size), &outSize);
+#else
+                        SetEventParameter(inEvent, kEventParamControlDataBufferSize, typeSInt32, sizeof(Size), &outSize);
+#endif
                                        }
 
                                        break;
@@ -1638,3 +1649,5 @@ UpdateObserver( CFRunLoopObserverRef observer, CFRunLoopActivity activity, void
         DisposeRgn( region );
     }
 }
+
+#endif
index 3faf6fba2b3067478ad9371657503b9ffb983e29..6336f532bb6d353a2e69efa60076053f8f06e5b9 100644 (file)
@@ -1,3 +1,81 @@
+2006-05-25  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Tim O.
+
+        <rdar://problem/4559808> WebKit fails to compile for ppc64
+        <rdar://problem/4522085> 64-bit: WebKit uses FSSpec which is not available in 64-bit
+        Gets WebKit building under 64-bit. Rename WebNSInt and WebNSUInt to WebNSInteger and WebNSUInteger.
+        Start using WebNSInteger where we need to match AppKit API usage of NSInteger.
+
+        HIWebView and a couple of helper functions are disabled until they can be moved off of QuickDraw.
+        <rdar://problem/4561772> HIWebView needs to be reworked to not use QuickDraw, needed for 64-bit
+
+        * Carbon/CarbonUtils.m: disabled this file in 64-bit <rdar://problem/4561772>
+        * Carbon/CarbonWindowAdapter.m:
+        (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
+        * Carbon/CarbonWindowFrame.m:
+        (+[CarbonWindowFrame frameRectForContentRect:styleMask:]):
+        (+[CarbonWindowFrame contentRectForFrameRect:styleMask:]):
+        (+[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]):
+        (-[CarbonWindowFrame frameRectForContentRect:styleMask:]):
+        (-[CarbonWindowFrame contentRectForFrameRect:styleMask:]):
+        (-[CarbonWindowFrame minFrameSizeForMinContentSize:styleMask:]):
+        * Carbon/HIViewAdapter.m: disabled this file in 64-bit <rdar://problem/4561772>
+        * Carbon/HIWebView.m: disabled this file in 64-bit <rdar://problem/4561772>
+        (HIWebViewEventHandler):
+        * DefaultDelegates/WebDefaultResourceLoadDelegate.m:
+        (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveContentLength:fromDataSource:]):
+        * History/WebBackForwardList.m:
+        (-[WebBackForwardList removeItem:]):
+        (-[WebBackForwardList goToItem:]):
+        * Misc/WebDownload.m:
+        (-[WebDownloadInternal download:didReceiveDataOfLength:]):
+        * Misc/WebFileDatabase.m:
+        (UniqueFilePathForKey):
+        * Misc/WebIconDatabase.m:
+        (-[NSMutableDictionary retainIconForURL:]):
+        (-[NSMutableDictionary releaseIconForURL:]):
+        (-[WebIconDatabase _totalRetainCountForIconURLString:]):
+        (-[WebIconDatabase _retainIconForIconURLString:]):
+        (-[WebIconDatabase _releaseIconForIconURLString:]):
+        * Misc/WebSearchableTextView.m:
+        (-[NSString selectionRect]):
+        * Misc/WebTypesInternal.h: Added.
+        * Plugins/WebBaseNetscapePluginStream.m:
+        (-[WebBaseNetscapePluginStream _destroyStream]):
+        (CarbonPathFromPOSIXPath):
+        * Plugins/WebBaseNetscapePluginView.m:
+        (-[WebBaseNetscapePluginView sendActivateEvent:]):
+        (-[WebBaseNetscapePluginView sendUpdateEvent]):
+        (TSMEventHandler):
+        (-[WebBaseNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
+        (-[WebBaseNetscapePluginView _printedPluginBitmap]):
+        (-[NSData _web_locationAfterFirstBlankLine]):
+        * Plugins/WebBasePluginPackage.m:
+        (-[WebBasePluginPackage hash]):
+        * Plugins/WebNetscapePluginPackage.m:
+        (-[WebNetscapePluginPackage load]):
+        (functionPointerForTVector):
+        * WebInspector/WebInspector.m:
+        (-[WebInspector _updateSystemColors]):
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebView/WebDataSource.m:
+        (-[WebDataSource _didReceiveData:contentLength:forResource:]):
+        * WebView/WebFrame.m:
+        (-[WebFrame _sendRemainingDelegateMessagesWithIdentifier:response:length:error:]):
+        * WebView/WebHTMLView.m:
+        (-[NSArray drawRect:]):
+        (-[WebHTMLView characterIndexForPoint:]):
+        (-[WebHTMLView conversationIdentifier]):
+        * WebView/WebResourceLoadDelegate.h:
+        * WebView/WebUIDelegate.h:
+        * WebView/WebView.h:
+        * WebView/WebView.m:
+        (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
+        (-[WebView spellCheckerDocumentTag]):
+        * WebView/WebViewInternal.h:
+        * WebView/WebViewPrivate.h:
+
 === WebKit-521.11 ===
 
 2006-05-23  Maciej Stachowiak  <mjs@apple.com>
index b42ae7609f878cda0df7fb0c78eda0eee060a407..02148b9a66001fc30a65bfccba9427e693c1b5de 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>
@@ -43,6 +37,7 @@ typedef NSUInt WebNSUInt;
 #import <WebKit/WebPanelAuthenticationHandler.h>
 #import <WebKit/WebView.h>
 
+#import "WebTypesInternal.h"
 
 @implementation WebDefaultResourceLoadDelegate
 
@@ -83,7 +78,7 @@ static WebDefaultResourceLoadDelegate *sharedDelegate = nil;
 {
 }
 
--(void)webView: (WebView *)wv resource:identifier didReceiveContentLength: (WebNSUInt)length fromDataSource:(WebDataSource *)dataSource
+-(void)webView: (WebView *)wv resource:identifier didReceiveContentLength: (WebNSUInteger)length fromDataSource:(WebDataSource *)dataSource
 {
 }
 
index a44ba69dbb93b8a1b0840650004d419d4e0d2080..2923ac0328e6c1a2af220f997ff56a6d88c910a3 100644 (file)
@@ -34,6 +34,8 @@
 #import <WebKit/WebPreferencesPrivate.h>
 #import <WebKit/WebKitSystemBits.h>
 
+#import "WebTypesInternal.h"
+
 #define COMPUTE_DEFAULT_PAGE_CACHE_SIZE UINT_MAX
 
 @interface WebBackForwardListPrivate : NSObject
     if (!item)
         return;
     
-    unsigned itemIndex = [_private->entries indexOfObjectIdenticalTo:item];
+    WebNSUInteger itemIndex = [_private->entries indexOfObjectIdenticalTo:item];
     ASSERT(itemIndex != (unsigned)_private->current);
     
-    if (itemIndex != NSNotFound && itemIndex != (unsigned)_private->current) {
+    if (itemIndex != NSNotFound && itemIndex != (WebNSUInteger)_private->current) {
         [_private->entries removeObjectAtIndex:itemIndex];
     }
 }
 
 - (void)goToItem:(WebHistoryItem *)item
 {
-    int index = [_private->entries indexOfObjectIdenticalTo:item];
+    WebNSUInteger index = [_private->entries indexOfObjectIdenticalTo:item];
     if (index != NSNotFound)
         _private->current = index;
     else
index a9221e0060f1ceb1e87339e2e112741e4ebcdb00..3b5b082034c09870d25146310feb384abf203dd0 100644 (file)
@@ -33,6 +33,8 @@
 #import <JavaScriptCore/Assertions.h>
 #import <WebKit/WebPanelAuthenticationHandler.h>
 
+#import "WebTypesInternal.h"
+
 @class NSURLConnectionDelegateProxy;
 
 // FIXME: Remove these declarations because _initWithLoadingConnection is declared in NSURLDownloadPrivate.h
     [realDelegate download:download didReceiveResponse:response];
 }
 
-- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(unsigned)length
+- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(WebNSUInteger)length
 {
     [realDelegate download:download didReceiveDataOfLength:length];
 }
index a831b3e616e738a683dd7e00a6ab475891f8a6f4..ec666c9af2fe37d248115ec37ba7d47a1a3106fa 100644 (file)
@@ -210,7 +210,11 @@ static void UniqueFilePathForKey(id key, char *buffer)
         hash2 = (37 * hash2) ^ s[cnt];
     }
 
+#if __LP64__
+    snprintf(buffer, UniqueFilePathSize, "%.2u/%.2u/%.10u-%.10u.cache", ((hash1 & 0xff) >> 4), ((hash2 & 0xff) >> 4), hash1, hash2);
+#else
     snprintf(buffer, UniqueFilePathSize, "%.2lu/%.2lu/%.10lu-%.10lu.cache", ((hash1 & 0xff) >> 4), ((hash2 & 0xff) >> 4), hash1, hash2);
+#endif
 }
 
 -(void)_createLRUList:(id)arg
index 0c057d758044ffdce0d3881ccc9692d0d1af5fe0..b8f00873d4ff851c8b86816acf19db42cfb17041 100644 (file)
@@ -35,6 +35,8 @@
 #import <WebKit/WebNSURLExtras.h>
 #import <WebKit/WebPreferences.h>
 
+#import "WebTypesInternal.h"
+
 NSString * const WebIconDatabaseVersionKey =   @"WebIconDatabaseVersion";
 NSString * const WebURLToIconURLKey =          @"WebSiteURLToIconURLKey";
 
@@ -210,7 +212,7 @@ NSSize WebIconLargeSize = {128, 128};
     if (![self _isEnabled])
         return;
     
-    int retainCount = (int)(void *)CFDictionaryGetValue(_private->pageURLToRetainCount, URL);
+    WebNSUInteger retainCount = (WebNSUInteger)(void *)CFDictionaryGetValue(_private->pageURLToRetainCount, URL);
     CFDictionarySetValue(_private->pageURLToRetainCount, URL, (void *)(retainCount + 1));
 }
 
@@ -221,14 +223,14 @@ NSSize WebIconLargeSize = {128, 128};
     if (![self _isEnabled])
         return;
     
-    int retainCount = (int)(void *)CFDictionaryGetValue(_private->pageURLToRetainCount, pageURL);
+    WebNSUInteger retainCount = (WebNSUInteger)(void *)CFDictionaryGetValue(_private->pageURLToRetainCount, pageURL);
     
     if (retainCount <= 0) {
         LOG_ERROR("The icon for %@ was released more times than it was retained.", pageURL);
         return;
     }
     
-    int newRetainCount = retainCount - 1;
+    WebNSUInteger newRetainCount = retainCount - 1;
 
     if (newRetainCount == 0) {
         // Forget association between this page URL and a retain count
@@ -605,7 +607,7 @@ NSSize WebIconLargeSize = {128, 128};
 {
     // Add up the retain counts for each associated page, plus the retain counts not associated
     // with any page, which are stored in _private->iconURLToExtraRetainCount
-    int result = (int)(void *)CFDictionaryGetValue(_private->iconURLToExtraRetainCount, iconURLString);
+    WebNSUInteger result = (WebNSUInteger)(void *)CFDictionaryGetValue(_private->iconURLToExtraRetainCount, iconURLString);
     
     id URLStrings = [_private->iconURLToPageURLs objectForKey:iconURLString];
     if (URLStrings != nil) {
@@ -614,11 +616,11 @@ NSSize WebIconLargeSize = {128, 128};
             NSString *URLString;
             while ((URLString = [e nextObject]) != nil) {
                 ASSERT([URLString isKindOfClass:[NSString class]]);
-                result += (int)(void *)CFDictionaryGetValue(_private->pageURLToRetainCount, URLString);
+                result += (WebNSUInteger)(void *)CFDictionaryGetValue(_private->pageURLToRetainCount, URLString);
             }
         } else {
             ASSERT([URLStrings isKindOfClass:[NSString class]]);
-            result += (int)(void *)CFDictionaryGetValue(_private->pageURLToRetainCount, URLStrings);
+            result += (WebNSUInteger)(void *)CFDictionaryGetValue(_private->pageURLToRetainCount, URLStrings);
         }
     }
 
@@ -703,8 +705,8 @@ NSSize WebIconLargeSize = {128, 128};
 {
     ASSERT(iconURLString);
     
-    int retainCount = (int)(void *)CFDictionaryGetValue(_private->iconURLToExtraRetainCount, iconURLString);
-    int newRetainCount = retainCount + 1;
+    WebNSUInteger retainCount = (WebNSUInteger)(void *)CFDictionaryGetValue(_private->iconURLToExtraRetainCount, iconURLString);
+    WebNSUInteger newRetainCount = retainCount + 1;
 
     CFDictionarySetValue(_private->iconURLToExtraRetainCount, iconURLString, (void *)newRetainCount);
 
@@ -756,13 +758,13 @@ NSSize WebIconLargeSize = {128, 128};
 {
     ASSERT(iconURLString);
     
-    int retainCount = (int)(void *)CFDictionaryGetValue(_private->iconURLToExtraRetainCount, iconURLString);
+    WebNSUInteger retainCount = (WebNSUInteger)(void *)CFDictionaryGetValue(_private->iconURLToExtraRetainCount, iconURLString);
 
     ASSERT(retainCount > 0);
     if (retainCount <= 0)
         return;
     
-    int newRetainCount = retainCount - 1;
+    WebNSUInteger newRetainCount = retainCount - 1;
     if (newRetainCount == 0) {
         CFDictionaryRemoveValue(_private->iconURLToExtraRetainCount, iconURLString);
         if ([self _totalRetainCountForIconURLString:iconURLString] == 0) {
index e175658e4f3c21d84bb8a4742657171b1ab3197b..a2d5f954e9f42df70150046712d7dc9c690e404d 100644 (file)
@@ -28,6 +28,7 @@
 
 #import "WebSearchableTextView.h"
 #import "WebDocumentPrivate.h"
+#import "WebTypesInternal.h"
 
 @interface NSString (_Web_StringTextFinding)
 - (NSRange)findString:(NSString *)string selectedRange:(NSRange)selectedRange options:(unsigned)mask wrap:(BOOL)wrapFlag;
@@ -91,7 +92,7 @@
     NSValue *rangeAsValue;
     while ((rangeAsValue = [rangeEnumerator nextObject]) != nil) {
         NSRange range = [rangeAsValue rangeValue];
-        unsigned rectCount;
+        WebNSUInteger rectCount;
         NSRectArray rectArray = [[self layoutManager] rectArrayForCharacterRange:range 
                                                     withinSelectedCharacterRange:range 
                                                                  inTextContainer:[self textContainer] 
diff --git a/WebKit/Misc/WebTypesInternal.h b/WebKit/Misc/WebTypesInternal.h
new file mode 100644 (file)
index 0000000..44dcc48
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * 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 int WebNSInteger;
+typedef unsigned int WebNSUInteger;
+#else
+typedef NSInteger WebNSInteger;
+typedef NSUInteger WebNSUInteger;
+#endif
+
+#ifndef CGFLOAT_DEFINED
+#if __LP64__
+typedef double CGFloat;
+#else
+typedef float CGFloat;
+#endif
+#define CGFLOAT_DEFINED 1
+#endif
index a27d0c9c895f2df18a52c0d32e7f5b0bda17b231..f5a66ad3b760f60f36819e8a78bd09f99536deac 100644 (file)
@@ -38,7 +38,7 @@
 
 #import <Foundation/NSURLResponse.h>
 
-static const char *CarbonPathFromPOSIXPath(const char *posixPath);
+static char *CarbonPathFromPOSIXPath(const char *posixPath);
 
 #define WEB_REASON_NONE -1
 
@@ -265,7 +265,7 @@ static const char *CarbonPathFromPOSIXPath(const char *posixPath);
     if (stream.ndata != NULL) {
         if (reason == NPRES_DONE && (transferMode == NP_ASFILE || transferMode == NP_ASFILEONLY)) {
             ASSERT(path != NULL);
-            const char *carbonPath = CarbonPathFromPOSIXPath(path);
+            char *carbonPath = CarbonPathFromPOSIXPath(path);
             ASSERT(carbonPath != NULL);
             NPP_StreamAsFile(instance, &stream, carbonPath);
 
@@ -277,6 +277,7 @@ static const char *CarbonPathFromPOSIXPath(const char *posixPath);
             free(path);
             path = NULL;
             LOG(Plugins, "NPP_StreamAsFile responseURL=%@ path=%s", responseURL, carbonPath);
+            free(carbonPath);
         }
         
         NPError npErr;
@@ -430,55 +431,23 @@ static const char *CarbonPathFromPOSIXPath(const char *posixPath);
 
 @end
 
-static const char *CarbonPathFromPOSIXPath(const char *posixPath)
+static char *CarbonPathFromPOSIXPath(const char *posixPath)
 {
-    // Returns NULL if path is to file that does not exist.
     // Doesn't add a trailing colon for directories; this is a problem for paths to a volume,
     // so this function would need to be revised if we ever wanted to call it with that.
 
-    OSStatus error;
-    FSCatalogInfo info;
-
-    // Make an FSRef.
-    FSRef ref;
-    error = FSPathMakeRef((const UInt8 *)posixPath, &ref, NULL);
-    if (error != noErr) {
-        return NULL;
-    }
-
-    // Get volume refNum.
-    error = FSGetCatalogInfo(&ref, kFSCatInfoVolume, &info, NULL, NULL, NULL);
-    if (error != noErr) {
-        return NULL;
-    }
-
-    // Get root directory FSRef.
-    FSRef rootRef;
-    error = FSGetVolumeInfo(info.volume, 0, NULL, kFSVolInfoNone, NULL, NULL, &rootRef);
-    if (error != noErr) {
-        return NULL;
-    }
-
-    // Get the pieces of the path.
-    NSMutableData *carbonPath = [NSMutableData dataWithBytes:"" length:1];
-    BOOL needColon = NO;
-    for (;;) {
-        FSSpec spec;
-        FSRef parentRef;
-        error = FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, &spec, &parentRef);
-        if (error != noErr) {
-            return NULL;
-        }
-        if (needColon) {
-            [carbonPath replaceBytesInRange:NSMakeRange(0, 0) withBytes:":" length:1];
-        }
-        [carbonPath replaceBytesInRange:NSMakeRange(0, 0) withBytes:&spec.name[1] length:spec.name[0]];
-        needColon = YES;
-        if (FSCompareFSRefs(&ref, &rootRef) == noErr) {
-            break;
+    CFURLRef url = CFURLCreateFromFileSystemRepresentation(NULL, (const UInt8 *)posixPath, strlen(posixPath), false);
+    if (url) {
+        CFStringRef hfsPath = CFURLCopyFileSystemPath(url, kCFURLHFSPathStyle);
+        CFRelease(url);
+        if (hfsPath) {
+            CFIndex bufSize = CFStringGetMaximumSizeOfFileSystemRepresentation(hfsPath);
+            char *filename = malloc(bufSize);
+            CFStringGetFileSystemRepresentation(hfsPath, filename, bufSize);
+            CFRelease(hfsPath);
+            return filename;
         }
-        ref = parentRef;
     }
 
-    return (const char *)[carbonPath bytes];
+    return NULL;
 }
index b46d932644bd674c21a0b0359fc73a62fd338cb8..48de61f8b0c88c81f010c5187efd401d74306d3a 100644 (file)
@@ -112,7 +112,7 @@ typedef struct {
 
 @interface NSData (WebPluginDataExtras)
 - (BOOL)_web_startsWithBlankLine;
-- (unsigned)_web_locationAfterFirstBlankLine;
+- (WebNSInteger)_web_locationAfterFirstBlankLine;
 @end
 
 static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *pluginView);
@@ -573,7 +573,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     [self getCarbonEvent:&event];
     event.what = activateEvt;
     WindowRef windowRef = [[self window] windowRef];
-    event.message = (UInt32)windowRef;
+    event.message = (unsigned long)windowRef;
     if (activate) {
         event.modifiers |= activeFlag;
     }
@@ -591,7 +591,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     [self getCarbonEvent:&event];
     event.what = updateEvt;
     WindowRef windowRef = [[self window] windowRef];
-    event.message = (UInt32)windowRef;
+    event.message = (unsigned long)windowRef;
 
     BOOL acceptedEvent = [self sendEvent:&event];
 
@@ -838,7 +838,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     }
     
     // Two-pass read to allocate/extract Mac charCodes
-    UInt32 numBytes;    
+    ByteCount numBytes;    
     status = GetEventParameter(rawKeyEventRef, kEventParamKeyMacCharCodes, typeChar, NULL, 0, &numBytes, NULL);
     if (status != noErr) {
         LOG_ERROR("GetEventParameter failed with error: %d", status);
@@ -1859,7 +1859,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
         if ([postData _web_startsWithBlankLine]) {
             postData = [postData subdataWithRange:NSMakeRange(1, [postData length] - 1)];
         } else {
-            unsigned location = [postData _web_locationAfterFirstBlankLine];
+            WebNSInteger location = [postData _web_locationAfterFirstBlankLine];
             if (location != NSNotFound) {
                 // If the blank line is somewhere in the middle of postData, everything before is the header.
                 NSData *headerData = [postData subdataWithRange:NSMakeRange(0, location)];
@@ -2143,6 +2143,9 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
 
 - (NSBitmapImageRep *)_printedPluginBitmap
 {
+#ifdef NP_NO_QUICKDRAW
+    return nil;
+#else
     // Cannot print plugins that do not implement NPP_Print
     if (!NPP_Print)
         return nil;
@@ -2204,6 +2207,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
     DisposeGWorld(printGWorld);
         
     return bitmap;
+#endif
 }
 
 @end
@@ -2216,7 +2220,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
 }
 
 
-- (unsigned)_web_locationAfterFirstBlankLine
+- (WebNSInteger)_web_locationAfterFirstBlankLine
 {
     const char *bytes = (const char *)[self bytes];
     unsigned length = [self length];
index 284148d6b6f2516d93effa1db1b4dcd45977dca0..f868dd025525f4d43cd8646fa5ba615885cd4687 100644 (file)
@@ -36,6 +36,8 @@
 
 #import <WebKitSystemInterface.h>
 
+#import "WebTypesInternal.h"
+
 #import <mach-o/arch.h>
 #import <mach-o/loader.h>
 
             [[object lastModifiedDate] isEqual:lastModifiedDate]);
 }
 
-- (unsigned)hash
+- (WebNSUInteger)hash
 {
     return [[name stringByAppendingString:[lastModifiedDate description]] hash];
 }
index 27bb15d5e2de0cbc458f4ff8766c67f3b8d6612f..477c93ef9c1f71ce1a68f9cf57d141fbaf0e33f5 100644 (file)
@@ -290,7 +290,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
 {    
     NP_GetEntryPointsFuncPtr NP_GetEntryPoints = NULL;
     NP_InitializeFuncPtr NP_Initialize = NULL;
-    MainFuncPtr pluginMainFunc;
+    MainFuncPtr pluginMainFunc = NULL;
     NPError npErr;
 
 #if !LOG_DISABLED
@@ -653,8 +653,8 @@ FunctionPointer functionPointerForTVector(TransitionVector tvp)
         if (newGlue != NULL) {
             unsigned i;
             for (i = 0; i < 6; i++) newGlue[i] = temp[i];
-            newGlue[0] |= ((UInt32)tvp >> 16);
-            newGlue[1] |= ((UInt32)tvp & 0xFFFF);
+            newGlue[0] |= ((uintptr_t)tvp >> 16);
+            newGlue[1] |= ((uintptr_t)tvp & 0xFFFF);
             MakeDataExecutable(newGlue, sizeof(temp));
         }
     }
index d5a9e45043aebbd3e678feba61c8fb49a9f5238e..5b15a9e0ee76b62a7297a23285c5bfc9dc006927 100644 (file)
@@ -756,7 +756,7 @@ static NSMapTable *lastChildIgnoringWhitespaceCache = NULL;
     if (!_private->webViewLoaded)
         return;
 
-    float red = 0.0, green = 0.0, blue = 0.0;
+    CGFloat red = 0.0, green = 0.0, blue = 0.0;
     NSColor *color = [[NSColor alternateSelectedControlColor] colorUsingColorSpaceName:NSDeviceRGBColorSpace];
     [color getRed:&red green:&green blue:&blue alpha:NULL];
 
index f3a5e7186c42f5a55a2a49bfac3565449235027d..22e07976b661e1af8a9a7eef7c99acc5f89dfd37 100644 (file)
                93EB178D09F88D460091F8FF /* WebSystemInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 93EB178C09F88D460091F8FF /* WebSystemInterface.m */; };
                93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EB178E09F88D510091F8FF /* WebSystemInterface.h */; };
                ABDDF20D08EB0DDC001E1241 /* WebDownloadInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ABDDF20C08EB0DDC001E1241 /* WebDownloadInternal.h */; };
+               DD7CDEE70A23BA9E00069928 /* WebTypesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */; };
                DD89682009AA87240097E7F0 /* WebElementDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = DD89681E09AA87240097E7F0 /* WebElementDictionary.h */; };
                DD89682109AA87240097E7F0 /* WebElementDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = DD89681F09AA87240097E7F0 /* WebElementDictionary.m */; };
                ED6BE2E7088C32B50044DEDC /* WebNSAttributedStringExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = ED6BE2E5088C32B50044DEDC /* WebNSAttributedStringExtras.h */; };
                ED7F6D8B0980683500C235ED /* WebNSDataExtrasPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = ED7F6D8A0980683500C235ED /* WebNSDataExtrasPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-               51B0D4750A1BEB2A001760A9 /* Development */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = NO;
-                       };
-                       name = Development;
-               };
-               51B0D4760A1BEB2A001760A9 /* Deployment */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = YES;
-                       };
-                       name = Deployment;
-               };
-/* End PBXBuildStyle section */
-
 /* Begin PBXFileReference section */
                1C68F640095B5FC100C2984E /* webInspector */ = {isa = PBXFileReference; lastKnownFileType = folder; name = webInspector; path = WebInspector/webInspector; sourceTree = SOURCE_ROOT; };
                1C68F65C095B5FC100C2984E /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                BEE18F9A0472B73200CA289C /* WebLocalizableStrings.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebLocalizableStrings.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                BEE52D4A0473032500CA289C /* WebKitSystemBits.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitSystemBits.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                BEE52D4B0473032500CA289C /* WebKitSystemBits.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebKitSystemBits.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebTypesInternal.h; sourceTree = "<group>"; };
                DD89681E09AA87240097E7F0 /* WebElementDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebElementDictionary.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                DD89681F09AA87240097E7F0 /* WebElementDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebElementDictionary.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                ED21B9810528F7AA003299AC /* WebDocumentInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDocumentInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                                6578F5DF045F817400000128 /* WebDownload.m */,
                                DD89681E09AA87240097E7F0 /* WebElementDictionary.h */,
                                DD89681F09AA87240097E7F0 /* WebElementDictionary.m */,
+                               DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */,
                        );
                        path = Misc;
                        sourceTree = "<group>";
                                93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */,
                                225F881509F97E8A00423A40 /* WebPluginPrivate.h in Headers */,
                                658A40960A14853B005E6987 /* WebDataSourceInternal.h in Headers */,
+                               DD7CDEE70A23BA9E00069928 /* WebTypesInternal.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
-                       buildSettings = {
-                       };
-                       buildStyles = (
-                               51B0D4750A1BEB2A001760A9 /* Development */,
-                               51B0D4760A1BEB2A001760A9 /* Deployment */,
-                       );
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                PRODUCT_NAME = WebKit;
                                STYLE_LDFLAGS = "";
                                UMBRELLA_FRAMEWORKS_DIR = "$(BUILT_PRODUCTS_DIR)";
+                               VALID_ARCHS = "i386 ppc ppc7400 ppc970 ppc64 x86_64";
                                WEBCORE_PRIVATE_HEADERS_DIR = "$(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders";
                        };
                        name = Debug;
                                PRODUCT_NAME = WebKit;
                                STYLE_LDFLAGS = "";
                                UMBRELLA_FRAMEWORKS_DIR = "$(BUILT_PRODUCTS_DIR)";
+                               VALID_ARCHS = "i386 ppc ppc7400 ppc970 ppc64 x86_64";
                                WEBCORE_PRIVATE_HEADERS_DIR = "$(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders";
                        };
                        name = Release;
                                );
                                STYLE_LDFLAGS = "-sub_umbrella WebCore -sub_umbrella JavaScriptCore";
                                UMBRELLA_FRAMEWORKS_DIR = "$(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks";
+                               VALID_ARCHS = "i386 ppc ppc7400 ppc970 ppc64 x86_64";
                                WEBCORE_PRIVATE_HEADERS_DIR = "$(UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders";
                        };
                        name = Production;
index a4c1c2a39831207d36efc069bb58ec940fc0c6ae..71054e946a4f32aa04588b0fec3c10e5aa6ea9b5 100644 (file)
@@ -926,9 +926,9 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class class,
     [webView _incrementProgressForIdentifier:identifier data:data];
 
     if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidReceiveContentLength)
-        [[webView resourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:(WebNSUInt)lengthReceived fromDataSource:self];
+        [[webView resourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:(WebNSUInteger)lengthReceived fromDataSource:self];
     else
-        [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:(WebNSUInt)lengthReceived fromDataSource:self];
+        [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:(WebNSUInteger)lengthReceived fromDataSource:self];
 }
 
 
index b1145311ecbe2bf31c926cd4b358b6adb6d7b1e9..be92a3c4d8eedd52af2ee7f6a230efe23b790cbe 100644 (file)
@@ -2594,9 +2594,9 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     
     if (length > 0) {
         if (implementations.delegateImplementsDidReceiveContentLength) {
-            [delegate webView:wv resource:identifier didReceiveContentLength:(WebNSUInt)length fromDataSource:dataSource];
+            [delegate webView:wv resource:identifier didReceiveContentLength:(WebNSUInteger)length fromDataSource:dataSource];
         } else {
-            [sharedDelegate webView:wv resource:identifier didReceiveContentLength:(WebNSUInt)length fromDataSource:dataSource];
+            [sharedDelegate webView:wv resource:identifier didReceiveContentLength:(WebNSUInteger)length fromDataSource:dataSource];
         }
     }
     
index 9477306b0669fd0748542f03b0118bbb1f379d20..ac52bff5a1daf021ba87ba5ac2a5c7672c93a3ee 100644 (file)
@@ -2590,7 +2590,7 @@ static WebHTMLView *lastHitView = nil;
     LOG(View, "%@ drawing", self);
 
     const NSRect *rects;
-    int count;
+    WebNSInteger count;
     [self getRectsBeingDrawn:&rects count:&count];
 
     BOOL subviewsWereSetAside = _private->subviewsSetAside;
@@ -5098,7 +5098,7 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
     return validAttributes;
 }
 
-- (unsigned int)characterIndexForPoint:(NSPoint)thePoint
+- (WebNSUInteger)characterIndexForPoint:(NSPoint)thePoint
 {
     NSWindow *window = [self window];
     WebFrameBridge *bridge = [self _bridge];
@@ -5169,9 +5169,9 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
     return (long)self;
 }
 #else
-- (NSInt)conversationIdentifier
+- (NSInteger)conversationIdentifier
 {
-    return (NSInt)self;
+    return (NSInteger)self;
 }
 #endif
 
index f812c0581552e11c499b71e74d0b17a528c887eb..f92466b3fbb61e3235abe5311865aa1ec58e7a98 100644 (file)
@@ -27,9 +27,9 @@
  */
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
-#define WebNSInt int
+#define WebNSInteger int
 #else
-#define WebNSInt NSInt
+#define WebNSInteger NSInteger
 #endif
 
 @class WebView;
     @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:(WebNSInt)length fromDataSource:(WebDataSource *)dataSource;
+- (void)webView:(WebView *)sender resource:(id)identifier didReceiveContentLength:(WebNSInteger)length fromDataSource:(WebDataSource *)dataSource;
 
 /*!
     @method webView:resource:didFinishLoadingFromDataSource:
 
 @end
 
-#undef WebNSInt
+#undef WebNSInteger
index d499728814ad59978c8aaaf0d89d84964c033ba5..005d7f9941c007156dfb2ee8866895d57dc1031a 100644 (file)
@@ -30,9 +30,9 @@
 #import <Foundation/NSURLRequest.h>
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
-#define WebNSUInt unsigned int
+#define WebNSUInteger unsigned int
 #else
-#define WebNSUInt NSUInt
+#define WebNSUInteger NSUInteger
 #endif
 
 /*!
@@ -391,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:(WebNSUInt)modifierFlags;
+- (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(WebNSUInteger)modifierFlags;
 
 /*!
     @method webView:contextMenuItemsForElement:defaultMenuItems:
@@ -475,4 +475,4 @@ typedef enum {
 
 @end
 
-#undef WebNSUInt
+#undef WebNSUInteger
index 9ca6151feaf45cc24eeb6d5026735ad0b18c2fc9..523a2eabb93a4a9aaa274b52946a954834367eb7 100644 (file)
@@ -29,9 +29,9 @@
 #import <Cocoa/Cocoa.h>
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
-#define WebNSInt int
+#define WebNSInteger int
 #else
-#define WebNSInt NSInt
+#define WebNSInteger NSInt
 #endif
 
 @class DOMCSSStyleDeclaration;
@@ -598,7 +598,7 @@ extern NSString * const WebViewDidChangeSelectionNotification;
 - (BOOL)smartInsertDeleteEnabled;
 - (void)setContinuousSpellCheckingEnabled:(BOOL)flag;
 - (BOOL)isContinuousSpellCheckingEnabled;
-- (WebNSInt)spellCheckerDocumentTag;
+- (WebNSInteger)spellCheckerDocumentTag;
 - (NSUndoManager *)undoManager;
 - (void)setEditingDelegate:(id)delegate;
 - (id)editingDelegate;
@@ -713,4 +713,4 @@ a custom implementation for each.
  
 @end
 
-#undef WebNSInt
+#undef WebNSInteger
index 8a76e2748528bc7877e29a1cc18c918a1b41cd6e..fdf7f993353bd2667abf4b9ed6fa552a401bbd79 100644 (file)
@@ -95,9 +95,9 @@
 
 #import <WebCore/WebCoreTextRenderer.h>
 
-#if __ppc__
+#if __ppc__ || __ppc64__
 #define PROCESSOR "PPC"
-#elif __i386__
+#elif __i386__ || __x86_64__
 #define PROCESSOR "Intel"
 #else
 #error Unknown architecture
@@ -282,7 +282,7 @@ macro(yankAndSelect) \
     WebFrameBridge *dragCaretBridge;
     
     BOOL hasSpellCheckerDocumentTag;
-    WebNSInt spellCheckerDocumentTag;
+    WebNSInteger spellCheckerDocumentTag;
 
     BOOL continuousSpellCheckingEnabled;
     BOOL smartInsertDeleteEnabled;
@@ -683,7 +683,7 @@ static bool debugWidget = true;
     return menu;
 }
 
-- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInt)modifierFlags
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInteger)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
@@ -2882,7 +2882,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
     return _private->continuousSpellCheckingEnabled && [self _continuousCheckingAllowed];
 }
 
-- (WebNSInt)spellCheckerDocumentTag
+- (WebNSInteger)spellCheckerDocumentTag
 {
     if (!_private->hasSpellCheckerDocumentTag) {
         _private->spellCheckerDocumentTag = [NSSpellChecker uniqueSpellDocumentTag];
index d07e0464acad1756ecf383c0162354fad8ac3b97..41187680052506a958efebbdd1e4386410b386d7 100644 (file)
@@ -29,6 +29,7 @@
 // This header contains WebView declarations that can be used anywhere in the Web Kit, but are neither SPI nor API.
 
 #import "WebViewPrivate.h"
+#import "WebTypesInternal.h"
 
 @class WebPageBridge;
 
@@ -76,7 +77,7 @@
 + (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme;
 + (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme;
 - (BOOL)_isPerformingProgrammaticFocus;
-- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInt)modifierFlags;
+- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInteger)modifierFlags;
 - (WebView *)_openNewWindowWithRequest:(NSURLRequest *)request;
 - (void)_writeImageForElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;
 - (void)_writeLinkElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;
index 0986a0738f5e334a2a4c7cd9ecdaf0128f00df17..a527fda55706f2d4f784c6d0d9a2cff14331b71d 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>