WebCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Sep 2004 20:40:13 +0000 (20:40 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Sep 2004 20:40:13 +0000 (20:40 +0000)
        Reviewed by John.

- consolidated OS version checks into prefix header

        * WebCorePrefix.h:
        * khtml/rendering/render_canvasimage.cpp:
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject roleDescription]):
        (-[KWQAccObject accessibilityActionDescription:]):
        * kwq/KWQComboBox.mm:
        (QComboBox::QComboBox):
        * kwq/KWQFoundationExtras.h:

WebKit:

        Reviewed by John.

- consolidated OS version checks into prefix header

        * Misc.subproj/WebFileDatabase.m:
        (-[WebFileDatabase _createLRUList:]):
        (+[WebFileDatabase _syncLoop:]):
        * Misc.subproj/WebKitErrors.m:
        (registerErrors):
        * Misc.subproj/WebNSObjectExtras.h:
        (WebNSRetainCFRelease):
        * Misc.subproj/WebNSPasteboardExtras.m:
        (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]):
        * Misc.subproj/WebUnicode.m:
        (_unicodeDirection):
        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebKeyGenerator.h:
        * WebCoreSupport.subproj/WebNewKeyGeneration.c:
        * WebKitPrefix.h:
        * WebView.subproj/WebDataSource.m:
        (+[WebDataSource _repTypesAllowImageTypeOmission:]):
        (-[WebDataSource isLoading]):
        * WebView.subproj/WebFrameView.m:
        (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
        * WebView.subproj/WebHTMLView.m:
        * WebView.subproj/WebPDFRepresentation.h:
        * WebView.subproj/WebPDFRepresentation.m:
        * WebView.subproj/WebPDFView.h:
        * WebView.subproj/WebPDFView.m:

WebBrowser:

        Reviewed by John.

- consolidated OS version checks into prefix header

        * AddressBarContentsManager.h:
        * AddressBarContentsManager.m:
        * AddressBarController.m:
        * AppController.m:
        (-[AppController applicationDidFinishLaunching:]):
        * BookmarkCollections.m:
        * BookmarksController.h:
        * BookmarksController.m:
        * BookmarksViewController.m:
        * BrowserDocument.h:
        * BrowserDocument.m:
        * BrowserDocumentController.h:
        * BrowserDocumentController.m:
        * BrowserNSNetServiceExtras.m:
        * BrowserWebBookmarkExtras.m:
        * BrowserWebController.m:
        * BrowserWebViewPrinting.m:
        * BrowserWindow.m:
        (-[BrowserWindow performKeyEquivalent:]):
        * BrowserWindowController.h:
        * BrowserWindowController.m:
        (-[BrowserWindowController locationField]):
        (-[BrowserWindowController searchField]):
        (-[BrowserWindowController locationBarIsShowing]):
        (-[BrowserWindowController setUpLocationBar]):
        (-[BrowserWindowController isShowingBar:]):
        (-[BrowserWindowController updateKeyboardLoop]):
        (-[BrowserWindowController windowDidLoad]):
        (-[BrowserWindowController dealloc]):
        (-[BrowserWindowController setDocument:]):
        (-[BrowserWindowController showLocationBarTemporarilyIfHidden]):
        (-[BrowserWindowController makeLocationBarPermanentIfTemporary]):
        (-[BrowserWindowController hideLocationBarIfTemporary]):
        (-[BrowserWindowController selectSearchField:]):
        (-[BrowserWindowController canShowInputFields]):
        (-[BrowserWindowController updateStopAndReloadButton]):
        (-[BrowserWindowController toggleLocationBar:]):
        (-[BrowserWindowController setToolbarsVisible:]):
        (-[BrowserWindowController closeTab:]):
        (-[BrowserWindowController fixFocusRingAroundLocationField]):
        (-[BrowserWindowController validateMenuItem:]):
        (-[BrowserWindowController showWindow:]):
        * ContextMenuHandler.m:
        * Debug/DebugUtilities.m:
        * DownloadProgressEntry.m:
        (-[NSFileManager setMetadataURL:referrer:atPath:]):
        * InternetConfigUtilities.m:
        * LoadProgressMonitor.m:
        * LocationChangeError.m:
        * NetworkController.h:
        * NetworkController.m:
        * OutlineViewPlus.h:
        * OutlineViewPlus.m:
        * Preferences.subproj/ISyncController.h:
        * Preferences.subproj/RSSPreferences.h:
        * Preferences.subproj/RSSPreferences.m:
        * Preferences.subproj/SecurityPreferences.m:
        * Preferences.subproj/WBPreferences.m:
        * PrintingAccessoryViewController.m:
        * SyndicationController.m:
        * TableViewPlus.m:
        * Test/PageLoadTestRunner.m:
        (-[PageLoadTestRunner setSingleTestURL:]):
        * ToolbarController.h:
        * ToolbarController.m:
        * WebBookmark.h:
        * WebBookmark.m:
        * WebBookmarkGroup.h:
        * WebBookmarkGroup.m:
        * WebBookmarkGroupPrivate.h:
        * WebBookmarkLeaf.m:
        * WebBookmarkList.m:
        * WebBookmarkPrivate.h:
        * WebBrowserPrefix.h:

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

24 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/WebCorePrefix.h
WebCore/khtml/rendering/render_canvasimage.cpp
WebCore/kwq/KWQAccObject.mm
WebCore/kwq/KWQComboBox.mm
WebCore/kwq/KWQFoundationExtras.h
WebKit/ChangeLog
WebKit/Misc.subproj/WebFileDatabase.m
WebKit/Misc.subproj/WebKitErrors.m
WebKit/Misc.subproj/WebNSObjectExtras.h
WebKit/Misc.subproj/WebNSPasteboardExtras.m
WebKit/Misc.subproj/WebUnicode.m
WebKit/WebCoreSupport.subproj/WebImageData.h
WebKit/WebCoreSupport.subproj/WebImageRenderer.h
WebKit/WebCoreSupport.subproj/WebKeyGenerator.h
WebKit/WebCoreSupport.subproj/WebNewKeyGeneration.c
WebKit/WebKitPrefix.h
WebKit/WebView.subproj/WebDataSource.m
WebKit/WebView.subproj/WebFrameView.m
WebKit/WebView.subproj/WebHTMLView.m
WebKit/WebView.subproj/WebPDFRepresentation.h
WebKit/WebView.subproj/WebPDFRepresentation.m
WebKit/WebView.subproj/WebPDFView.h
WebKit/WebView.subproj/WebPDFView.m

index c321ef8..d5c067c 100644 (file)
@@ -1,3 +1,18 @@
+2004-09-29  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by John.
+
+       - consolidated OS version checks into prefix header
+
+        * WebCorePrefix.h:
+        * khtml/rendering/render_canvasimage.cpp:
+        * kwq/KWQAccObject.mm:
+        (-[KWQAccObject roleDescription]):
+        (-[KWQAccObject accessibilityActionDescription:]):
+        * kwq/KWQComboBox.mm:
+        (QComboBox::QComboBox):
+        * kwq/KWQFoundationExtras.h:
+
 2004-09-29  David Hyatt  <hyatt@apple.com>
 
        Make sure <br>s always get line boxes.  Also prevent the creation of RenderTexts for whitespace normal/nowrap nodes
index 68d1168..b9015a0 100644 (file)
 
 #define KHTML_NO_XBL 1
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#define BUILDING_ON_PANTHER 1
+#endif
+
+#if BUILDING_ON_PANTHER
+#define OMIT_TIGER_FEATURES 1
+#endif
+
+#ifndef OMIT_TIGER_FEATURES
 #define KHTML_XSLT
 #endif
 
index 797a327..0c0a5ac 100644 (file)
@@ -48,7 +48,7 @@
 
 
 // To be public in Tiger.  Test on tiger and add conditional.
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if BUILDING_ON_PANTHER
 CG_EXTERN_C_BEGIN
 CG_EXTERN CGImageRef CGBitmapContextCreateImage(CGContextRef c);
 CG_EXTERN_C_END
index 2ef8e97..215c2a0 100644 (file)
@@ -260,7 +260,7 @@ using khtml::RenderImage;
 
 -(NSString*)roleDescription
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if OMIT_TIGER_FEATURES
     // We don't need role descriptions on Panther and we don't have the call
     // to get at localized ones anyway. At some point we may want to conditionally
     // compile this entire file instead, but this is OK too.
@@ -532,7 +532,7 @@ static QRect boundingBoxRect(RenderObject* obj)
 
 - (NSString *)accessibilityActionDescription:(NSString *)action
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if OMIT_TIGER_FEATURES
     // We don't need action descriptions on Panther and we don't have the call
     // to get at localized ones anyway. At some point we may want to conditionally
     // compile this entire file instead, but this is OK too.
index f4250ce..7fc7c39 100644 (file)
@@ -83,7 +83,7 @@ QComboBox::QComboBox()
     [button release];
     
     KWQPopUpButtonCell *cell = [[KWQPopUpButtonCell alloc] initWithQComboBox:this];
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef OMIT_TIGER_FEATURES
     // Work around problem where the pop-up menu gets a "..." in it
     // by turning off the default "ellipsizing" behavior.
     [cell setLineBreakMode:NSLineBreakByClipping];
index 4b9ce2b..2f25532 100644 (file)
@@ -63,7 +63,7 @@ static inline id KWQRetainNSRelease(id obj)
 // Definitions for GC-specific methods for Panther.
 // The finalize method simply won't be called.
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if BUILDING_ON_PANTHER
 
 @interface NSObject (KWQFoundationExtras)
 - (void)finalize;
index d334056..bb1bf50 100644 (file)
@@ -1,3 +1,36 @@
+2004-09-29  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by John.
+
+       - consolidated OS version checks into prefix header
+
+        * Misc.subproj/WebFileDatabase.m:
+        (-[WebFileDatabase _createLRUList:]):
+        (+[WebFileDatabase _syncLoop:]):
+        * Misc.subproj/WebKitErrors.m:
+        (registerErrors):
+        * Misc.subproj/WebNSObjectExtras.h:
+        (WebNSRetainCFRelease):
+        * Misc.subproj/WebNSPasteboardExtras.m:
+        (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]):
+        * Misc.subproj/WebUnicode.m:
+        (_unicodeDirection):
+        * WebCoreSupport.subproj/WebImageData.h:
+        * WebCoreSupport.subproj/WebImageRenderer.h:
+        * WebCoreSupport.subproj/WebKeyGenerator.h:
+        * WebCoreSupport.subproj/WebNewKeyGeneration.c:
+        * WebKitPrefix.h:
+        * WebView.subproj/WebDataSource.m:
+        (+[WebDataSource _repTypesAllowImageTypeOmission:]):
+        (-[WebDataSource isLoading]):
+        * WebView.subproj/WebFrameView.m:
+        (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
+        * WebView.subproj/WebHTMLView.m:
+        * WebView.subproj/WebPDFRepresentation.h:
+        * WebView.subproj/WebPDFRepresentation.m:
+        * WebView.subproj/WebPDFView.h:
+        * WebView.subproj/WebPDFView.m:
+
 2004-09-29  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Hyatt
index a93ab19..96a16e4 100644 (file)
@@ -208,7 +208,7 @@ static void UniqueFilePathForKey(id key, char *buffer)
 
     LOG(FileDatabaseActivity, "lru list created");
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if BUILDING_ON_PANTHER
     [pool release];
 #else
     [pool drain];
@@ -276,7 +276,7 @@ static void UniqueFilePathForKey(id key, char *buffer)
 
     END_EXCEPTION_HANDLER
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if BUILDING_ON_PANTHER
     [pool release];
 #else
     [pool drain];
index 6552399..f920876 100644 (file)
@@ -122,7 +122,7 @@ static void registerErrors()
 
     [NSError _web_addErrorsWithCodesAndDescriptions:dict inDomain:WebKitErrorDomain];
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if BUILDING_ON_PANTHER
     [pool release];
 #else
     [pool drain];
index 55bb491..5e47d96 100644 (file)
@@ -7,14 +7,14 @@
 
 static inline id WebNSRetainCFRelease(CFTypeRef obj)
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if BUILDING_ON_PANTHER
     return (id)obj;
 #else
     return (id)CFMakeCollectable(obj);
 #endif
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if BUILDING_ON_PANTHER
 
 @interface NSObject (WebExtras)
 - (void)finalize;
index 1861e8d..f6173c4 100644 (file)
 
 #import <HIServices/CoreTranslationFlavorTypeNames.h>
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
-#define BUILT_ON_TIGER_OR_LATER
-#endif
-
 NSString *WebURLPboardType = nil;
 NSString *WebURLNamePboardType = nil;
 
@@ -231,13 +227,13 @@ NSString *WebURLNamePboardType = nil;
     }
     NSArray *extensions = [NSArray arrayWithObject:extension];
     
-#ifdef BUILT_ON_TIGER_OR_LATER
-    [self setPropertyList:extensions forType:NSFilesPromisePboardType];
-    return source;
-#else
+#ifdef OMIT_TIGER_FEATURES
     id dragSource = [[NSFilePromiseDragSource alloc] initWithSource:source];
     [dragSource setTypes:extensions onPasteboard:self];
     return dragSource;
+#else
+    [self setPropertyList:extensions forType:NSFilesPromisePboardType];
+    return source;
 #endif
 }
 
index 5509842..2e99127 100644 (file)
@@ -14,7 +14,7 @@ static int _unicodeDigitValue(UChar32 c)
 
 static WebCoreUnicodeDirection _unicodeDirection(UChar32 c)
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#ifdef BUILDING_ON_PANTHER
     // Panther gets the direction of the hyphen wrong.  It returns "ET" (European Terminator) when
     // it should return "ES" (European Separator).
     if (c == '-')
index d7745a6..575cae8 100644 (file)
@@ -1,7 +1,7 @@
 /*     WebImageData.h
        Copyright 2004, Apple, Inc. All rights reserved.
 */
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef OMIT_TIGER_FEATURES
 
 #import <Cocoa/Cocoa.h>
 
index 568535e..6eb677f 100644 (file)
@@ -9,7 +9,7 @@
 
 @protocol WebCoreImageRenderer;
 
-//#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+//#ifndef OMIT_TIGER_FEATURES
 //#define USE_CGIMAGEREF YES
 //#endif
 
index 2eb19c3..8eec2c1 100644 (file)
@@ -6,7 +6,7 @@
 //  Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
 //
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef BUILDING_ON_PANTHER
 #define USE_NEW_KEY_GENERATION
 #endif
 
index d811706..f0059ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  WebNewKeyGeneration.cpp
+ *  WebNewKeyGeneration.c
  *  WebKit
  *
  *  Created by Chris Blumenberg on Mon Aug 23 2004.
index 6315374..766eb76 100644 (file)
 #endif
 
 #endif
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#define BUILDING_ON_PANTHER 1
+#endif
+
+#if BUILDING_ON_PANTHER
+#define OMIT_TIGER_FEATURES 1
+#endif
index 060d059..dc406c1 100644 (file)
@@ -32,9 +32,7 @@
 #import <WebKit/WebMainResourceClient.h>
 #import <WebKit/WebNSObjectExtras.h>
 #import <WebKit/WebNSURLExtras.h>
-// Assume we'll only ever compile this on Panther or greater, so 
-// MAC_OS_X_VERSION_10_3 is guranateed to be defined.
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef OMIT_TIGER_FEATURES
 #import <WebKit/WebPDFRepresentation.h>
 #endif
 #import <WebKit/WebResourceLoadDelegate.h>
             [WebHTMLRepresentation class], @"application/x-webarchive",
             [WebTextRepresentation class], @"text/",
             [WebTextRepresentation class], @"application/x-javascript",
-// Assume we'll only ever compile this on Panther or greater, so 
-// MAC_OS_X_VERSION_10_3 is guranateed to be defined.
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef OMIT_TIGER_FEATURES
             [WebPDFRepresentation class], @"application/pdf",
 #endif
             nil];
         }
     }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
+#if BUILDING_ON_PANTHER
     [pool release];
 #else
     [pool drain];
index 45046db..ea9b1aa 100644 (file)
@@ -23,9 +23,7 @@
 #import <WebKit/WebNSObjectExtras.h>
 #import <WebKit/WebNSPasteboardExtras.h>
 #import <WebKit/WebNSViewExtras.h>
-// Assume we'll only ever compile this on Panther or greater, so 
-// MAC_OS_X_VERSION_10_3 is guaranteed to be defined.
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef OMIT_TIGER_FEATURES
 #import <WebKit/WebPDFView.h>
 #endif
 #import <WebKit/WebTextRendererFactory.h>
@@ -232,9 +230,7 @@ static NSMutableDictionary *viewTypes;
             [WebHTMLView class], @"application/x-webarchive",
             [WebTextView class], @"text/",
             [WebTextView class], @"application/x-javascript",
-// Assume we'll only ever compile this on Panther or greater, so 
-// MAC_OS_X_VERSION_10_3 is guranateed to be defined.
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef OMIT_TIGER_FEATURES
             [WebPDFView class], @"application/pdf",
 #endif
             nil];
index a1a7763..a2e35b7 100644 (file)
@@ -118,7 +118,7 @@ void _NSResetKillRingOperationFlag(void);
 #define DRAG_LINK_LABEL_FONT_SIZE   11.0
 #define DRAG_LINK_URL_FONT_SIZE   10.0
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef OMIT_TIGER_FEATURES
 #define USE_APPKIT_FOR_ATTRIBUTED_STRINGS
 #endif
 
index 6796e67..b09493f 100644 (file)
@@ -2,9 +2,8 @@
     WebPDFRepresentation.h
     Copyright 2004, Apple, Inc. All rights reserved.
 */
-// Assume we'll only ever compile this on Panther or greater, so 
-// MAC_OS_X_VERSION_10_3 is guaranateed to be defined.
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+
+#ifndef OMIT_TIGER_FEATURES
 
 #import <Foundation/Foundation.h>
 
@@ -15,4 +14,4 @@
 }
 @end
 
-#endif  // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#endif  // OMIT_TIGER_FEATURES
index dc6003d..23b4a79 100644 (file)
@@ -2,9 +2,8 @@
     WebPDFRepresentation.m
     Copyright 2004, Apple, Inc. All rights reserved.
 */
-// Assume we'll only ever compile this on Panther or greater, so 
-// MAC_OS_X_VERSION_10_3 is guaranateed to be defined.
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+
+#ifndef OMIT_TIGER_FEATURES
 
 #import <Quartz/Quartz.h>
 
@@ -56,4 +55,4 @@
 
 @end
 
-#endif
+#endif // OMIT_TIGER_FEATURES
index c1877a2..fd2d7cc 100644 (file)
@@ -2,9 +2,7 @@
     WebPDFView.h
     Copyright 2004, Apple, Inc. All rights reserved.
 */
-// Assume we'll only ever compile this on Panther or greater, so 
-// MAC_OS_X_VERSION_10_3 is guaranateed to be defined.
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#ifndef OMIT_TIGER_FEATURES
 
 #import <Quartz/Quartz.h>
 
@@ -18,4 +16,4 @@
 }
 @end
 
-#endif  // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#endif  // OMIT_TIGER_FEATURES
index 98fe20a..d62de83 100644 (file)
@@ -2,9 +2,8 @@
     WebPDFView.m
     Copyright 2004, Apple, Inc. All rights reserved.
 */
-// Assume we'll only ever compile this on Panther or greater, so 
-// MAC_OS_X_VERSION_10_3 is guaranateed to be defined.
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+
+#ifndef OMIT_TIGER_FEATURES
 
 #import <Foundation/NSString_NSURLExtras.h>
 
@@ -161,4 +160,4 @@ static void applicationInfoForMIMEType(NSString *type, NSString **name, NSImage
 
 @end
 
-#endif //MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
+#endif // OMIT_TIGER_FEATURES