[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:36:32 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 4dd0af3e9139b8fef137e772cf6bafeb9238b3b6
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 5 23:56:25 2002 +0000

    	Update to use the new style of assertions.
    	A few places still use the WebKitDebug.h, for logging.
    
            * Bookmarks.subproj/WebBookmark.m:
            * Bookmarks.subproj/WebBookmarkGroup.m:
            * Bookmarks.subproj/WebBookmarkLeaf.m:
            * Bookmarks.subproj/WebBookmarkList.m:
            * Bookmarks.subproj/WebBookmarkSeparator.m:
            * History.subproj/WebHistory.m:
            * History.subproj/WebHistoryList.m:
            * History.subproj/WebHistoryPrivate.m:
            * History.subproj/WebURLsWithTitles.m:
            * Misc.subproj/WebDownloadHandler.m:
            * Misc.subproj/WebIconDatabase.m:
            * Misc.subproj/WebIconLoader.m:
            * Misc.subproj/WebKitDebug.h:
            * Misc.subproj/WebStringTruncator.m:
            * Panels.subproj/WebAuthenticationPanel.m:
            * Plugins.subproj/WebPlugin.m:
            * Plugins.subproj/WebPluginDatabase.m:
            * Plugins.subproj/WebPluginNullEventSender.m:
            * Plugins.subproj/WebPluginStream.m:
            * Plugins.subproj/WebPluginView.m:
            * Plugins.subproj/npapi.m:
            * WebCoreSupport.subproj/WebBridge.m:
            * WebCoreSupport.subproj/WebCookieAdapter.m:
            * WebCoreSupport.subproj/WebImageRenderer.m:
            * WebCoreSupport.subproj/WebImageRendererFactory.m:
            * WebCoreSupport.subproj/WebSubresourceClient.m:
            * WebCoreSupport.subproj/WebTextRenderer.m:
            * WebCoreSupport.subproj/WebTextRendererFactory.m:
            * WebCoreSupport.subproj/WebViewFactory.m:
            * WebView.subproj/WebController.m:
            * WebView.subproj/WebControllerPrivate.m:
            * WebView.subproj/WebDataSource.m:
            * WebView.subproj/WebDataSourcePrivate.m:
            * WebView.subproj/WebDefaultPolicyHandler.m:
            * WebView.subproj/WebFrame.m:
            * WebView.subproj/WebFramePrivate.m:
            * WebView.subproj/WebHTMLView.m:
            * WebView.subproj/WebHTMLViewPrivate.m:
            * WebView.subproj/WebMainResourceClient.m:
            * WebView.subproj/WebPreferences.m:
            * WebView.subproj/WebViewPrivate.m:
    	Use new assertions.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1974 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/WebBookmark.m b/WebKit/Bookmarks.subproj/WebBookmark.m
index 17775b3..a2d8ca5 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.m
+++ b/WebKit/Bookmarks.subproj/WebBookmark.m
@@ -13,7 +13,7 @@
 #import <WebKit/WebBookmarkLeaf.h>
 #import <WebKit/WebBookmarkList.h>
 #import <WebKit/WebBookmarkSeparator.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 // to get NSRequestConcreteImplementation
 #import <Foundation/NSPrivateDecls.h>
@@ -36,7 +36,7 @@ static unsigned _highestUsedID = 0;
 
 - (void)dealloc
 {
-    WEBKIT_ASSERT (_group == nil);
+    ASSERT(_group == nil);
 
     [_identifier release];    
     [super dealloc];
@@ -44,7 +44,7 @@ static unsigned _highestUsedID = 0;
 
 - (NSString *)identifier
 {
-    WEBKIT_ASSERT(_identifier != nil);
+    ASSERT(_identifier != nil);
     return [[_identifier retain] autorelease];
 }
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
index 792c3fb..918fb95 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkGroup.m
@@ -14,6 +14,8 @@
 #import <WebKit/WebBookmarkSeparator.h>
 #import <WebKit/WebKitDebug.h>
 
+#import <WebFoundation/WebAssertions.h>
+
 @interface WebBookmarkGroup (WebForwardDeclarations)
 - (void)_setTopBookmark:(WebBookmark *)newTopBookmark;
 @end
@@ -60,7 +62,7 @@
 {
     NSDictionary *userInfo;
 
-    WEBKIT_ASSERT (bookmark != nil);
+    ASSERT(bookmark != nil);
     
     if (_loading) {
         return;
@@ -79,7 +81,7 @@
 
 - (void)_setTopBookmark:(WebBookmark *)newTopBookmark
 {
-    WEBKIT_ASSERT_VALID_ARG (newTopBookmark, newTopBookmark == nil ||
+    ASSERT_ARG(newTopBookmark, newTopBookmark == nil ||
                              [newTopBookmark bookmarkType] == WebBookmarkTypeList);
     
     [newTopBookmark retain];
@@ -103,20 +105,20 @@
 
 - (void)_bookmarkChildrenDidChange:(WebBookmark *)bookmark
 {
-    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark bookmarkType] == WebBookmarkTypeList);
+    ASSERT_ARG(bookmark, [bookmark bookmarkType] == WebBookmarkTypeList);
     
     [self _sendChangeNotificationForBookmark:bookmark childrenChanged:YES];
 }
 
 - (void)_removedBookmark:(WebBookmark *)bookmark
 {
-    WEBKIT_ASSERT ([_bookmarksByID objectForKey:[bookmark identifier]] == bookmark);
+    ASSERT([_bookmarksByID objectForKey:[bookmark identifier]] == bookmark);
     [_bookmarksByID removeObjectForKey:[bookmark identifier]];
 }
 
 - (void)_addedBookmark:(WebBookmark *)bookmark
 {
-    WEBKIT_ASSERT ([_bookmarksByID objectForKey:[bookmark identifier]] == nil);
+    ASSERT([_bookmarksByID objectForKey:[bookmark identifier]] == nil);
     [_bookmarksByID setObject:bookmark forKey:[bookmark identifier]];
 }
 
@@ -127,8 +129,8 @@
 
 - (void)removeBookmark:(WebBookmark *)bookmark
 {
-    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark group] == self);
-    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] != nil || bookmark == _topBookmark);
+    ASSERT_ARG(bookmark, [bookmark group] == self);
+    ASSERT_ARG(bookmark, [bookmark parent] != nil || bookmark == _topBookmark);
 
     if (bookmark == _topBookmark) {
         [self _setTopBookmark:nil];
@@ -158,9 +160,9 @@
 {
     WebBookmark *bookmark;
 
-    WEBKIT_ASSERT_VALID_ARG (parent, [parent group] == self);
-    WEBKIT_ASSERT_VALID_ARG (parent, [parent bookmarkType] == WebBookmarkTypeList);
-    WEBKIT_ASSERT_VALID_ARG (newURLString, bookmarkType == WebBookmarkTypeLeaf || (newURLString == nil));
+    ASSERT_ARG(parent, [parent group] == self);
+    ASSERT_ARG(parent, [parent bookmarkType] == WebBookmarkTypeList);
+    ASSERT_ARG(newURLString, bookmarkType == WebBookmarkTypeLeaf || (newURLString == nil));
     
     if (bookmarkType == WebBookmarkTypeLeaf) {
         bookmark = [[WebBookmarkLeaf alloc] initWithURLString:newURLString
@@ -169,7 +171,7 @@
     } else if (bookmarkType == WebBookmarkTypeSeparator) {
         bookmark = [[WebBookmarkSeparator alloc] initWithGroup:self];
     } else {
-        WEBKIT_ASSERT (bookmarkType == WebBookmarkTypeList);
+        ASSERT(bookmarkType == WebBookmarkTypeList);
         bookmark = [[WebBookmarkList alloc] initWithTitle:newTitle
                                                     group:self];
     }
@@ -191,17 +193,17 @@
 
     path = [self file];
     if (path == nil) {
-        WEBKITDEBUG("couldn't load bookmarks; couldn't find or create directory to store it in\n");
+        ERROR("couldn't load bookmarks; couldn't find or create directory to store it in");
         return NO;
     }
 
     dictionary = [NSDictionary dictionaryWithContentsOfFile: path];
     if (dictionary == nil) {
         if (![[NSFileManager defaultManager] fileExistsAtPath: path]) {
-            WEBKITDEBUG("no bookmarks file found at %s\n",
+            ERROR("no bookmarks file found at %s",
                         DEBUG_OBJECT(path));
         } else {
-            WEBKITDEBUG("attempt to read bookmarks from %s failed; perhaps contents are corrupted\n",
+            ERROR("attempt to read bookmarks from %s failed; perhaps contents are corrupted",
                         DEBUG_OBJECT(path));
         }
         return NO;
@@ -226,7 +228,7 @@
 
     if (result == YES) {
         duration = CFAbsoluteTimeGetCurrent() - start;
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "loading %d bookmarks from %s took %f seconds\n",
+        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "loading %d bookmarks from %s took %f seconds",
                           [[self topBookmark] _numberOfDescendants], DEBUG_OBJECT([self file]), duration);
     }
 
@@ -240,13 +242,13 @@
 
     path = [self file];
     if (path == nil) {
-        WEBKITDEBUG("couldn't save bookmarks; couldn't find or create directory to store it in\n");
+        ERROR("couldn't save bookmarks; couldn't find or create directory to store it in");
         return NO;
     }
 
     dictionary = [[self topBookmark] dictionaryRepresentation];
     if (![dictionary writeToFile:path atomically:YES]) {
-        WEBKITDEBUG("attempt to save %s to %s failed\n", DEBUG_OBJECT(dictionary), DEBUG_OBJECT(path));
+        ERROR("attempt to save %s to %s failed", DEBUG_OBJECT(dictionary), DEBUG_OBJECT(path));
         return NO;
     }
 
@@ -263,7 +265,7 @@
     
     if (result == YES) {
         duration = CFAbsoluteTimeGetCurrent() - start;
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "saving %d bookmarks to %s took %f seconds\n",
+        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "saving %d bookmarks to %s took %f seconds",
                           [[self topBookmark] _numberOfDescendants], DEBUG_OBJECT([self file]), duration);
     }
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
index 1a24dce..b727515 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkLeaf.m
@@ -11,7 +11,7 @@
 #import <WebKit/WebBookmarkGroup.h>
 #import <WebKit/WebBookmarkGroupPrivate.h>
 #import <WebKit/WebHistoryItem.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 #import <WebFoundation/WebNSURLExtras.h>
 
@@ -45,7 +45,7 @@
 
 - (id)initFromDictionaryRepresentation:(NSDictionary *)dict withGroup:(WebBookmarkGroup *)group
 {
-    WEBKIT_ASSERT_VALID_ARG (dict, dict != nil);
+    ASSERT_ARG(dict, dict != nil);
 
     [super init];
 
@@ -98,7 +98,7 @@
         return;
     }
 
-    WEBKIT_ASSERT (_entry != nil);
+    ASSERT(_entry != nil);
     [_entry setTitle:title];
 
     [[self group] _bookmarkDidChange:self];    
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkList.m b/WebKit/Bookmarks.subproj/WebBookmarkList.m
index 8324f70..dfc9e68 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkList.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkList.m
@@ -11,7 +11,7 @@
 #import <WebKit/WebBookmarkSeparator.h>
 #import <WebKit/WebBookmarkPrivate.h>
 #import <WebKit/WebBookmarkGroupPrivate.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 #define TitleKey		@"Title"
 #define ChildrenKey		@"Children"
@@ -36,7 +36,7 @@
     WebBookmark *child;
     unsigned index, count;
     
-    WEBKIT_ASSERT_VALID_ARG (dict, dict != nil);
+    ASSERT_ARG(dict, dict != nil);
 
     [super init];
 
@@ -175,8 +175,8 @@
 
 - (void)removeChild:(WebBookmark *)bookmark
 {
-    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] == self);
-    WEBKIT_ASSERT_VALID_ARG (bookmark, [_list containsObject:bookmark]);
+    ASSERT_ARG(bookmark, [bookmark parent] == self);
+    ASSERT_ARG(bookmark, [_list containsObject:bookmark]);
     
     [_list removeObject:bookmark];
     [bookmark _setParent:nil];
@@ -187,8 +187,8 @@
 
 - (void)insertChild:(WebBookmark *)bookmark atIndex:(unsigned)index
 {
-    WEBKIT_ASSERT_VALID_ARG (bookmark, [bookmark parent] == nil);
-    WEBKIT_ASSERT_VALID_ARG (bookmark, ![_list containsObject:bookmark]);
+    ASSERT_ARG(bookmark, [bookmark parent] == nil);
+    ASSERT_ARG(bookmark, ![_list containsObject:bookmark]);
 
     [_list insertObject:bookmark atIndex:index];
     [bookmark _setParent:self];
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkSeparator.m b/WebKit/Bookmarks.subproj/WebBookmarkSeparator.m
index 834c0c9..aeccf71 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkSeparator.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkSeparator.m
@@ -9,7 +9,7 @@
 #import "WebBookmarkSeparator.h"
 
 #import "WebBookmarkPrivate.h"
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 
 @implementation WebBookmarkSeparator
@@ -25,7 +25,7 @@
 - (id)initFromDictionaryRepresentation:(NSDictionary *)dict withGroup:(WebBookmarkGroup *)group
 {
     if (![[dict objectForKey:WebBookmarkTypeKey] isEqualToString:WebBookmarkTypeSeparatorValue]) {
-        WEBKITDEBUG("Can't initialize Bookmark separator from non-separator type");
+        ERROR("Can't initialize Bookmark separator from non-separator type");
         return nil;
     }
 
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0ed7c1e..c84ef4a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,51 @@
+2002-09-05  Darin Adler  <darin at apple.com>
+
+	Update to use the new style of assertions.
+	A few places still use the WebKitDebug.h, for logging.
+
+        * Bookmarks.subproj/WebBookmark.m:
+        * Bookmarks.subproj/WebBookmarkGroup.m:
+        * Bookmarks.subproj/WebBookmarkLeaf.m:
+        * Bookmarks.subproj/WebBookmarkList.m:
+        * Bookmarks.subproj/WebBookmarkSeparator.m:
+        * History.subproj/WebHistory.m:
+        * History.subproj/WebHistoryList.m:
+        * History.subproj/WebHistoryPrivate.m:
+        * History.subproj/WebURLsWithTitles.m:
+        * Misc.subproj/WebDownloadHandler.m:
+        * Misc.subproj/WebIconDatabase.m:
+        * Misc.subproj/WebIconLoader.m:
+        * Misc.subproj/WebKitDebug.h:
+        * Misc.subproj/WebStringTruncator.m:
+        * Panels.subproj/WebAuthenticationPanel.m:
+        * Plugins.subproj/WebPlugin.m:
+        * Plugins.subproj/WebPluginDatabase.m:
+        * Plugins.subproj/WebPluginNullEventSender.m:
+        * Plugins.subproj/WebPluginStream.m:
+        * Plugins.subproj/WebPluginView.m:
+        * Plugins.subproj/npapi.m:
+        * WebCoreSupport.subproj/WebBridge.m:
+        * WebCoreSupport.subproj/WebCookieAdapter.m:
+        * WebCoreSupport.subproj/WebImageRenderer.m:
+        * WebCoreSupport.subproj/WebImageRendererFactory.m:
+        * WebCoreSupport.subproj/WebSubresourceClient.m:
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        * WebCoreSupport.subproj/WebTextRendererFactory.m:
+        * WebCoreSupport.subproj/WebViewFactory.m:
+        * WebView.subproj/WebController.m:
+        * WebView.subproj/WebControllerPrivate.m:
+        * WebView.subproj/WebDataSource.m:
+        * WebView.subproj/WebDataSourcePrivate.m:
+        * WebView.subproj/WebDefaultPolicyHandler.m:
+        * WebView.subproj/WebFrame.m:
+        * WebView.subproj/WebFramePrivate.m:
+        * WebView.subproj/WebHTMLView.m:
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        * WebView.subproj/WebMainResourceClient.m:
+        * WebView.subproj/WebPreferences.m:
+        * WebView.subproj/WebViewPrivate.m:
+	Use new assertions.
+
 2002-09-05  Richard Williamson (Local)  <rjw at apple.com>
 
         Removed debugging.
@@ -23,7 +71,6 @@
         * WebView.subproj/WebDataSourcePrivate.m:
         (-[WebDataSource _startLoading:]):
         
-        
         Lookup post Jaguar CG SPI.  Can now run and build
         w/o patched CG.
         
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0ed7c1e..c84ef4a 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,51 @@
+2002-09-05  Darin Adler  <darin at apple.com>
+
+	Update to use the new style of assertions.
+	A few places still use the WebKitDebug.h, for logging.
+
+        * Bookmarks.subproj/WebBookmark.m:
+        * Bookmarks.subproj/WebBookmarkGroup.m:
+        * Bookmarks.subproj/WebBookmarkLeaf.m:
+        * Bookmarks.subproj/WebBookmarkList.m:
+        * Bookmarks.subproj/WebBookmarkSeparator.m:
+        * History.subproj/WebHistory.m:
+        * History.subproj/WebHistoryList.m:
+        * History.subproj/WebHistoryPrivate.m:
+        * History.subproj/WebURLsWithTitles.m:
+        * Misc.subproj/WebDownloadHandler.m:
+        * Misc.subproj/WebIconDatabase.m:
+        * Misc.subproj/WebIconLoader.m:
+        * Misc.subproj/WebKitDebug.h:
+        * Misc.subproj/WebStringTruncator.m:
+        * Panels.subproj/WebAuthenticationPanel.m:
+        * Plugins.subproj/WebPlugin.m:
+        * Plugins.subproj/WebPluginDatabase.m:
+        * Plugins.subproj/WebPluginNullEventSender.m:
+        * Plugins.subproj/WebPluginStream.m:
+        * Plugins.subproj/WebPluginView.m:
+        * Plugins.subproj/npapi.m:
+        * WebCoreSupport.subproj/WebBridge.m:
+        * WebCoreSupport.subproj/WebCookieAdapter.m:
+        * WebCoreSupport.subproj/WebImageRenderer.m:
+        * WebCoreSupport.subproj/WebImageRendererFactory.m:
+        * WebCoreSupport.subproj/WebSubresourceClient.m:
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        * WebCoreSupport.subproj/WebTextRendererFactory.m:
+        * WebCoreSupport.subproj/WebViewFactory.m:
+        * WebView.subproj/WebController.m:
+        * WebView.subproj/WebControllerPrivate.m:
+        * WebView.subproj/WebDataSource.m:
+        * WebView.subproj/WebDataSourcePrivate.m:
+        * WebView.subproj/WebDefaultPolicyHandler.m:
+        * WebView.subproj/WebFrame.m:
+        * WebView.subproj/WebFramePrivate.m:
+        * WebView.subproj/WebHTMLView.m:
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        * WebView.subproj/WebMainResourceClient.m:
+        * WebView.subproj/WebPreferences.m:
+        * WebView.subproj/WebViewPrivate.m:
+	Use new assertions.
+
 2002-09-05  Richard Williamson (Local)  <rjw at apple.com>
 
         Removed debugging.
@@ -23,7 +71,6 @@
         * WebView.subproj/WebDataSourcePrivate.m:
         (-[WebDataSource _startLoading:]):
         
-        
         Lookup post Jaguar CG SPI.  Can now run and build
         w/o patched CG.
         
diff --git a/WebKit/History.subproj/WebHistory.m b/WebKit/History.subproj/WebHistory.m
index 6d7993e..a99ad9f 100644
--- a/WebKit/History.subproj/WebHistory.m
+++ b/WebKit/History.subproj/WebHistory.m
@@ -9,7 +9,7 @@
 #import "WebHistory.h"
 #import "WebHistoryPrivate.h"
 
-#import "WebKitDebug.h"
+#import <WebFoundation/WebAssertions.h>
 
 NSString *WebHistoryEntriesChangedNotification = @"WebHistoryEntriesChangedNotification";
 
@@ -19,7 +19,7 @@ NSString *WebHistoryEntriesChangedNotification = @"WebHistoryEntriesChangedNotif
 {
     // Should only be called once.  Need to rationalize usage
     // of history.
-    WEBKIT_ASSERT ([[self class] sharedHistory] == nil);
+    ASSERT([[self class] sharedHistory] == nil);
     
     WebHistory *h = [[self alloc] initWithFile:file];
     [[self class] setSharedHistory: h];
diff --git a/WebKit/History.subproj/WebHistoryList.m b/WebKit/History.subproj/WebHistoryList.m
index a0a41d0..d730eb9 100644
--- a/WebKit/History.subproj/WebHistoryList.m
+++ b/WebKit/History.subproj/WebHistoryList.m
@@ -5,7 +5,7 @@
 
 #import "WebHistoryList.h"
 #import "WebHistoryItem.h"
-#import "WebKitDebug.h"
+#import <WebFoundation/WebAssertions.h>
 
 struct WebHistoryListNode
 {
@@ -96,7 +96,7 @@ static void freeNode(WebHistoryListNode *node)
 
 -(void)setMaximumSize:(int)size
 {
-    WEBKIT_ASSERT(size > 0 || size == -1);
+    ASSERT(size > 0 || size == -1);
     _maximumSize = size;
 }
 
@@ -178,7 +178,7 @@ static void freeNode(WebHistoryListNode *node)
 
 -(WebHistoryItem *)entryAtIndex:(int)index
 {
-    WEBKIT_ASSERT(index >= 0 && index < _count);
+    ASSERT(index >= 0 && index < _count);
 
     WebHistoryListNode *node = _head;
     int i;
@@ -191,7 +191,7 @@ static void freeNode(WebHistoryListNode *node)
 
 -(void)replaceEntryAtIndex:(int)index withEntry:(WebHistoryItem *)entry
 {
-    WEBKIT_ASSERT(index >= 0 && index < _count);
+    ASSERT(index >= 0 && index < _count);
 
     WebHistoryListNode *node = _head;
     int i;
@@ -205,7 +205,7 @@ static void freeNode(WebHistoryListNode *node)
 
 -(WebHistoryItem *)removeEntryAtIndex:(int)index
 {
-    WEBKIT_ASSERT(index > 0 && index < _count);
+    ASSERT(index > 0 && index < _count);
 
     WebHistoryListNode *node = _head;
     int i;
@@ -238,7 +238,7 @@ static void freeNode(WebHistoryListNode *node)
 
 -(void)removeEntriesToIndex:(int)index
 {
-    WEBKIT_ASSERT(index > 0 && index < _count);
+    ASSERT(index > 0 && index < _count);
 
     WebHistoryListNode *node = _head;
     int i;
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index d1ba34f..01b8182 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -8,10 +8,12 @@
 
 #import "WebHistoryPrivate.h"
 
+#import "WebHistoryItem.h"
+#import <WebKit/WebKitDebug.h>
+
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebNSCalendarDateExtras.h>
 #import <WebFoundation/WebNSURLExtras.h>
-#import <WebKit/WebKitDebug.h>
-#import "WebHistoryItem.h"
 
 @interface WebHistoryPrivate (Private)
 -(WebHistoryItem *)_entryForURLString:(NSString *)URLString;
@@ -65,7 +67,7 @@
 {
     int count;
 
-    WEBKIT_ASSERT_VALID_ARG (index, index != nil);
+    ASSERT_ARG(index, index != nil);
 
     //FIXME: just does linear search through days; inefficient if many days
     count = [_datesWithEntries count];
@@ -88,8 +90,8 @@
     NSMutableArray *entriesForDate;
     NSCalendarDate *entryDate;
 
-    WEBKIT_ASSERT_VALID_ARG (entry, entry != nil);
-    WEBKIT_ASSERT_VALID_ARG (dateIndex, dateIndex >= 0 && (uint)dateIndex < [_entriesByDate count]);
+    ASSERT_ARG(entry, entry != nil);
+    ASSERT_ARG(dateIndex, dateIndex >= 0 && (uint)dateIndex < [_entriesByDate count]);
 
     //FIXME: just does linear search through entries; inefficient if many entries for this date
     entryDate = [entry lastVisitedDate];
@@ -120,7 +122,7 @@
 
     foundDate = [self findIndex: &dateIndex forDay: [entry lastVisitedDate]];
 
-    WEBKIT_ASSERT (foundDate);
+    ASSERT(foundDate);
     
     entriesForDate = [_entriesByDate objectAtIndex: dateIndex];
     [entriesForDate removeObject: entry];
@@ -140,7 +142,7 @@
     int dateIndex;
     NSString *URLString;
 
-    WEBKIT_ASSERT_VALID_ARG (entry, [entry lastVisitedDate] != nil);
+    ASSERT_ARG(entry, [entry lastVisitedDate] != nil);
 
     URLString = [[entry URL] absoluteString];
     [self removeEntryForURLString: URLString];
@@ -229,7 +231,7 @@
 {
     WebHistoryItem *entry;
 
-    WEBKIT_ASSERT (oldURLString != nil);
+    ASSERT(oldURLString != nil);
 
     entry = [self _entryForURLString:oldURLString];
     if (entry == nil) {
@@ -369,17 +371,17 @@
 
     path = [self file];
     if (path == nil) {
-        WEBKITDEBUG("couldn't load history; couldn't find or create directory to store it in\n");
+        ERROR("couldn't load history; couldn't find or create directory to store it in");
         return NO;
     }
 
     array = [NSArray arrayWithContentsOfFile: path];
     if (array == nil) {
         if (![[NSFileManager defaultManager] fileExistsAtPath: path]) {
-            WEBKITDEBUG("no history file found at %s\n",
+            ERROR("no history file found at %s",
                             DEBUG_OBJECT(path));
         } else {
-            WEBKITDEBUG("attempt to read history from %s failed; perhaps contents are corrupted\n",
+            ERROR("attempt to read history from %s failed; perhaps contents are corrupted",
                             DEBUG_OBJECT(path));
         }
         return NO;
@@ -432,7 +434,7 @@
 
     if (result) {
         duration = CFAbsoluteTimeGetCurrent() - start;
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "loading %d history entries from %s took %f seconds\n",
+        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "loading %d history entries from %s took %f seconds",
                            numberOfItems, DEBUG_OBJECT([self file]), duration);
     }
 
@@ -447,13 +449,13 @@
 
     path = [self file];
     if (path == nil) {
-        WEBKITDEBUG("couldn't save history; couldn't find or create directory to store it in\n");
+        ERROR("couldn't save history; couldn't find or create directory to store it in");
         return NO;
     }
 
     array = [self arrayRepresentation];
     if (![array writeToFile:path atomically:YES]) {
-        WEBKITDEBUG("attempt to save %s to %s failed\n", DEBUG_OBJECT(array), DEBUG_OBJECT(path));
+        ERROR("attempt to save %s to %s failed", DEBUG_OBJECT(array), DEBUG_OBJECT(path));
         return NO;
     }
     
@@ -472,7 +474,7 @@
 
     if (result) {
         duration = CFAbsoluteTimeGetCurrent() - start;
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "saving %d history entries to %s took %f seconds\n",
+        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "saving %d history entries to %s took %f seconds",
                            numberOfItems, DEBUG_OBJECT([self file]), duration);
     }
 
diff --git a/WebKit/History.subproj/WebURLsWithTitles.m b/WebKit/History.subproj/WebURLsWithTitles.m
index 7a3dc80..4b44117 100644
--- a/WebKit/History.subproj/WebURLsWithTitles.m
+++ b/WebKit/History.subproj/WebURLsWithTitles.m
@@ -7,7 +7,7 @@
 //
 
 #import "WebURLsWithTitles.h"
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 #import <WebFoundation/WebNSURLExtras.h>
 
diff --git a/WebKit/Misc.subproj/WebDownloadHandler.m b/WebKit/Misc.subproj/WebDownloadHandler.m
index d8a15da..dc016b3 100644
--- a/WebKit/Misc.subproj/WebDownloadHandler.m
+++ b/WebKit/Misc.subproj/WebDownloadHandler.m
@@ -6,11 +6,14 @@
 //  Copyright (c) 2002 Apple Computer, Inc.
 //
 
-#import <WebKit/WebControllerPolicyHandlerPrivate.h>
 #import <WebKit/WebDownloadHandler.h>
+
+#import <WebKit/WebControllerPolicyHandlerPrivate.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebKitDebug.h>
 
+#import <WebFoundation/WebAssertions.h>
+
 @implementation WebDownloadHandler
 
 - initWithDataSource:(WebDataSource *)dSource
diff --git a/WebKit/Misc.subproj/WebIconDatabase.m b/WebKit/Misc.subproj/WebIconDatabase.m
index cc0a90c..be1eea9 100644
--- a/WebKit/Misc.subproj/WebIconDatabase.m
+++ b/WebKit/Misc.subproj/WebIconDatabase.m
@@ -6,10 +6,12 @@
 //  Copyright (c) 2002 __MyCompanyName__. All rights reserved.
 //
 
-#import <WebKit/WebKitDebug.h>
 #import <WebKit/WebIconDatabase.h>
+
 #import <WebKit/WebIconDatabasePrivate.h>
+#import <WebKit/WebKitDebug.h>
 
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebNSURLExtras.h>
 #import <WebFoundation/WebFileDatabase.h>
 
@@ -365,7 +367,7 @@ NSSize WebIconMediumSize = {32, 32};
                 NSImage *icon = [[NSImage alloc] initWithData:iconData];
                 if(icon){
                     duration = CFAbsoluteTimeGetCurrent() - start;
-                    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "loading and creating icon %s took %f seconds\n",
+                    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "loading and creating icon %s took %f seconds",
                                       DEBUG_OBJECT(iconURL), duration);
                     
                     // Cache it
@@ -729,7 +731,7 @@ NSSize WebIconMediumSize = {32, 32};
 #endif
     
     duration = CFAbsoluteTimeGetCurrent() - start;
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "scaling icon took %f seconds.\n", duration);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "scaling icon took %f seconds.", duration);
 
     return scaledIcon;
 }
diff --git a/WebKit/Misc.subproj/WebIconLoader.m b/WebKit/Misc.subproj/WebIconLoader.m
index 0b7da98..6363317 100644
--- a/WebKit/Misc.subproj/WebIconLoader.m
+++ b/WebKit/Misc.subproj/WebIconLoader.m
@@ -6,7 +6,7 @@
 //  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
 //
 
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebKit/WebIconDatabase.h>
 #import <WebKit/WebIconDatabasePrivate.h>
 #import <WebKit/WebIconLoader.h>
diff --git a/WebKit/Misc.subproj/WebKitDebug.h b/WebKit/Misc.subproj/WebKitDebug.h
index 25448d4..77ba091 100644
--- a/WebKit/Misc.subproj/WebKitDebug.h
+++ b/WebKit/Misc.subproj/WebKitDebug.h
@@ -8,10 +8,6 @@
 #ifdef NDEBUG
 
 #define WEBKITDEBUGLEVEL(level, format...) ((void)0)
-#define WEBKIT_ASSERT(expr) ((void)0)
-#define WEBKIT_ASSERT_VALID_ARG(arg, expr) ((void)0)
-#define WEBKIT_ASSERT_NOT_NIL(arg) ((void)0)
-#define WEBKIT_ASSERT_NOT_REACHED() ((void)0)
 
 #else
 
@@ -67,51 +63,8 @@ void WebKitLog(unsigned int level, const char *file, int line, const char *funct
 #define WEBKITDEBUGLEVEL(level, format...) \
     WebKitLog(level, __FILE__, __LINE__, __PRETTY_FUNCTION__, format)
 
-/*-----------------------------------------------------------------------------
- * Assertion macros
- */
-
-#import <signal.h>
-#import <sys/types.h>
-#import <sys/time.h>
-#import <sys/resource.h>
-
-#define WEBKIT_ASSERTION_FAILURE(str_expr) \
-    do { \
-        struct rlimit _rlimit = {RLIM_INFINITY, RLIM_INFINITY}; \
-        setrlimit(RLIMIT_CORE, &_rlimit); \
-            fprintf(stderr, "=================\nASSERTION FAILED: %s (%s:%d %s)\n=================\n", str_expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
-        raise(SIGQUIT); \
-    } while (0)
-
-#define WEBKIT_ASSERT(expr) \
-    do { \
-        if (!(expr)) { \
-            WEBKIT_ASSERTION_FAILURE(#expr); \
-        } \
-    } while (0)
-
-#define WEBKIT_ASSERT_VALID_ARG(arg, expr) \
-    do { \
-        if (!(expr)) { \
-            WEBKIT_ASSERTION_FAILURE("bad arg " #arg " (" #expr ")"); \
-        } \
-    } while (0)
-    
-#define WEBKIT_ASSERT_NOT_NIL(arg) \
-    do { \
-        if ((arg) == nil) { \
-            WEBKIT_ASSERTION_FAILURE("bad arg " #arg " (" #arg " not nil )"); \
-        } \
-    } while (0)
-
-#define WEBKIT_ASSERT_NOT_REACHED() \
-    WEBKIT_ASSERTION_FAILURE("reached unreachable code")
-
 #endif
 
-#define WEBKITDEBUG(format...) WEBKITDEBUGLEVEL(WEBKIT_LOG_GENERIC_DEBUG, format)
-
 #ifdef WEB_MALLOC_TESTING
 #ifdef __cplusplus
 extern "C" {
diff --git a/WebKit/Misc.subproj/WebStringTruncator.m b/WebKit/Misc.subproj/WebStringTruncator.m
index 667f35a..f2a4290 100644
--- a/WebKit/Misc.subproj/WebStringTruncator.m
+++ b/WebKit/Misc.subproj/WebStringTruncator.m
@@ -9,7 +9,7 @@
 #import <WebKit/WebStringTruncator.h>
 #import <Cocoa/Cocoa.h>
 
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebKit/WebTextRendererFactory.h>
 #import <WebKit/WebTextRenderer.h>
 
@@ -28,7 +28,7 @@ static float currentEllipsisWidth;
     NSRange omitEndRange, beforeRange, afterRange;
     unsigned truncatedLength;
     
-    WEBKIT_ASSERT(keepCount < STRING_BUFFER_SIZE);
+    ASSERT(keepCount < STRING_BUFFER_SIZE);
     
     omitStart = (keepCount + 1) / 2;
     
@@ -41,7 +41,7 @@ static float currentEllipsisWidth;
     afterRange.length = length - afterRange.location;
     
     truncatedLength = beforeRange.length + 1 + afterRange.length;
-    WEBKIT_ASSERT(truncatedLength <= length);
+    ASSERT(truncatedLength <= length);
 
     [string getCharacters:buffer range:beforeRange];
     buffer[beforeRange.length] = ELLIPSIS_CHARACTER;
@@ -67,8 +67,8 @@ static float currentEllipsisWidth;
     float widthForLargestKnownToFit, widthForSmallestKnownToNotFit;
     float ratio;
     
-    WEBKIT_ASSERT_VALID_ARG(font, font);
-    WEBKIT_ASSERT_VALID_ARG(maxWidth, maxWidth >= 0);
+    ASSERT_ARG(font, font);
+    ASSERT_ARG(maxWidth, maxWidth >= 0);
     
     if (![currentFont isEqual:font]) {
         [currentFont release];
@@ -80,7 +80,7 @@ static float currentEllipsisWidth;
         currentEllipsisWidth = [currentRenderer floatWidthForCharacters:&ellipsis stringLength:1 fromCharacterPosition: 0 numberOfCharacters: 1 applyRounding: NO attemptFontSubstitution: YES];
     }
     
-    WEBKIT_ASSERT(currentRenderer);
+    ASSERT(currentRenderer);
 
     length = [string length];
     if (length > STRING_BUFFER_SIZE) {
@@ -113,8 +113,8 @@ static float currentEllipsisWidth;
     }
     
     while (keepCountForLargestKnownToFit + 1 < keepCountForSmallestKnownToNotFit) {
-        WEBKIT_ASSERT(widthForLargestKnownToFit <= maxWidth);
-        WEBKIT_ASSERT(widthForSmallestKnownToNotFit > maxWidth);
+        ASSERT(widthForLargestKnownToFit <= maxWidth);
+        ASSERT(widthForSmallestKnownToNotFit > maxWidth);
 
         ratio = (keepCountForSmallestKnownToNotFit - keepCountForLargestKnownToFit)
             / (widthForSmallestKnownToNotFit - widthForLargestKnownToFit);
@@ -126,10 +126,10 @@ static float currentEllipsisWidth;
             keepCount = keepCountForSmallestKnownToNotFit - 1;
         }
         
-        WEBKIT_ASSERT(keepCount < length);
-        WEBKIT_ASSERT(keepCount > 0);
-        WEBKIT_ASSERT(keepCount < keepCountForSmallestKnownToNotFit);
-        WEBKIT_ASSERT(keepCount > keepCountForLargestKnownToFit);
+        ASSERT(keepCount < length);
+        ASSERT(keepCount > 0);
+        ASSERT(keepCount < keepCountForSmallestKnownToNotFit);
+        ASSERT(keepCount > keepCountForLargestKnownToFit);
         
 	truncatedLength = [self centerTruncateString:string
                                               length:length
diff --git a/WebKit/Panels.subproj/WebAuthenticationPanel.m b/WebKit/Panels.subproj/WebAuthenticationPanel.m
index aa0a9c2..607f3b4 100644
--- a/WebKit/Panels.subproj/WebAuthenticationPanel.m
+++ b/WebKit/Panels.subproj/WebAuthenticationPanel.m
@@ -7,7 +7,7 @@
 
 #import <WebKit/WebAuthenticationPanel.h>
 #import <WebKit/WebStandardPanelsPrivate.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 
 #define WebAuthenticationPanelNibName @"WebAuthenticationPanel"
@@ -114,7 +114,7 @@
 
 - (void)runAsSheetOnWindow:(NSWindow *)window withRequest:(WebAuthenticationRequest *)req
 {
-    WEBKIT_ASSERT(!usingSheet);
+    ASSERT(!usingSheet);
 
     [self setUpForRequest:req];
 
@@ -129,8 +129,8 @@
     WebAuthenticationResult *result = nil;
     WebAuthenticationRequest *req;
 
-    WEBKIT_ASSERT(usingSheet);
-    WEBKIT_ASSERT(request != nil);
+    ASSERT(usingSheet);
+    ASSERT(request != nil);
 
     if (returnCode == 0) {
         result = [WebAuthenticationResult authenticationResultWithUsername:[username stringValue] password:[password stringValue]];
diff --git a/WebKit/Plugins.subproj/WebPlugin.m b/WebKit/Plugins.subproj/WebPlugin.m
index 9f1fc19..242d7de 100644
--- a/WebKit/Plugins.subproj/WebPlugin.m
+++ b/WebKit/Plugins.subproj/WebPlugin.m
@@ -24,7 +24,7 @@
  */
 
 #import "WebPlugin.h"
-#import "WebKitDebug.h"
+#import <WebFoundation/WebAssertions.h>
 
 typedef void (* FunctionPointer) (void);
 typedef void (* TransitionVector) (void);
@@ -202,17 +202,17 @@ TransitionVector tVectorForFunctionPointer(FunctionPointer);
     }else{ // single CFM file
         err = FSPathMakeRef((UInt8 *)[path cString], &fref, NULL);
         if(err != noErr){
-            WEBKITDEBUG("WebNetscapePlugin: load: FSPathMakeRef failed. Error=%d\n", err);
+            ERROR("WebNetscapePlugin: load: FSPathMakeRef failed. Error=%d", err);
             return NO;
         }
         err = FSGetCatalogInfo(&fref, kFSCatInfoNone, NULL, NULL, &spec, NULL);
         if(err != noErr){
-            WEBKITDEBUG("WebNetscapePlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
+            ERROR("WebNetscapePlugin: load: FSGetCatalogInfo failed. Error=%d", err);
             return NO;
         }
         err = GetDiskFragment(&spec, 0, kCFragGoesToEOF, nil, kPrivateCFragCopy, &connID, (Ptr *)&pluginMainFunc, nil);
         if(err != noErr){
-            WEBKITDEBUG("WebNetscapePlugin: load: GetDiskFragment failed. Error=%d\n", err);
+            ERROR("WebNetscapePlugin: load: GetDiskFragment failed. Error=%d", err);
             return NO;
         }
         pluginMainFunc = (mainFuncPtr)functionPointerForTVector((TransitionVector)pluginMainFunc);
@@ -260,7 +260,7 @@ TransitionVector tVectorForFunctionPointer(FunctionPointer);
         
         pluginSize = pluginFuncs.size;
         pluginVersion = pluginFuncs.version;
-        WEBKITDEBUG("pluginMainFunc: %d, size=%d, version=%d\n", npErr, pluginSize, pluginVersion);
+        ERROR("pluginMainFunc: %d, size=%d, version=%d", npErr, pluginSize, pluginVersion);
         
         NPP_New = (NPP_NewProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.newp);
         NPP_Destroy = (NPP_DestroyProcPtr)functionPointerForTVector((TransitionVector)pluginFuncs.destroy);
@@ -320,7 +320,7 @@ TransitionVector tVectorForFunctionPointer(FunctionPointer);
         NPP_GetValue = pluginFuncs.getvalue;
         NPP_SetValue = pluginFuncs.setvalue;
     }
-    WEBKITDEBUG("Plugin Loaded\n");
+    ERROR("Plugin Loaded");
     isLoaded = TRUE;
     return YES;
 }
@@ -337,7 +337,7 @@ TransitionVector tVectorForFunctionPointer(FunctionPointer);
     }else{
         CloseConnection(&connID);
     }
-    WEBKITDEBUG("Plugin Unloaded\n");
+    ERROR("Plugin Unloaded");
     isLoaded = FALSE;
 }
 
diff --git a/WebKit/Plugins.subproj/WebPluginDatabase.m b/WebKit/Plugins.subproj/WebPluginDatabase.m
index 73fb398..6595bfa 100644
--- a/WebKit/Plugins.subproj/WebPluginDatabase.m
+++ b/WebKit/Plugins.subproj/WebPluginDatabase.m
@@ -178,7 +178,7 @@ static NSArray *pluginLocations(void)
         plugin = [[WebNetscapePlugin alloc] initWithPath:[pluginPaths objectAtIndex:i]];
         if (plugin) {
             [pluginArray addObject:plugin];
-            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Found plugin: %s\n", [[plugin name] lossyCString]);
+            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Found plugin: %s", [[plugin name] lossyCString]);
             WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "%s", [[plugin description] lossyCString]);
             [plugin release];
         }
diff --git a/WebKit/Plugins.subproj/WebPluginNullEventSender.m b/WebKit/Plugins.subproj/WebPluginNullEventSender.m
index bdb3ffd..90c4eb4 100644
--- a/WebKit/Plugins.subproj/WebPluginNullEventSender.m
+++ b/WebKit/Plugins.subproj/WebPluginNullEventSender.m
@@ -5,7 +5,8 @@
 
 #import "WebPluginNullEventSender.h"
 #import <Carbon/Carbon.h>
-#import <WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
+#import <WebKit/WebKitDebug.h>
 #import <WebKit/WebPluginView.h>
 
 @implementation WebNetscapePluginNullEventSender
@@ -38,7 +39,7 @@
     
     [view sendEvent:&event];
     
-    //WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(nullEvent): %d  when: %u %d\n", acceptedEvent, (unsigned)event.when, shouldStop);
+    //WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(nullEvent): %d  when: %u %d", acceptedEvent, (unsigned)event.when, shouldStop);
     
     // FIXME: Why .01? Why not 0? Why not a larger number?
     [self performSelector:@selector(sendNullEvents) withObject:nil afterDelay:.01];
@@ -46,7 +47,7 @@
 
 -(void)stop
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stopping null events\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stopping null events");
     [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(sendNullEvents) object:nil];
 }
 
diff --git a/WebKit/Plugins.subproj/WebPluginStream.m b/WebKit/Plugins.subproj/WebPluginStream.m
index 0a2d023..28fcf3c 100644
--- a/WebKit/Plugins.subproj/WebPluginStream.m
+++ b/WebKit/Plugins.subproj/WebPluginStream.m
@@ -10,9 +10,9 @@
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebControllerPrivate.h>
-#import <WebKitDebug.h>
+#import <WebKit/WebKitDebug.h>
 
-#import <WebFoundation/WebFoundation.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebNSFileManagerExtras.h>
 #import <WebFoundation/WebResourceRequest.h>
 
@@ -147,7 +147,7 @@
         // FIXME: Need a way to check if stream is seekable
         
         NPError npErr = NPP_NewStream(instance, (char *)[mimeType cString], &npStream, NO, &transferMode);
-        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_NewStream: %d %s\n", npErr, [[URL absoluteString] cString]);
+        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_NewStream: %d %s", npErr, [[URL absoluteString] cString]);
         
         if(npErr != NPERR_NO_ERROR){
             [self stop];
@@ -155,13 +155,13 @@
         }
         
         if(transferMode == NP_NORMAL)
-            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stream type: NP_NORMAL\n");
+            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stream type: NP_NORMAL");
         else if(transferMode == NP_ASFILEONLY)
-            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stream type: NP_ASFILEONLY\n");
+            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stream type: NP_ASFILEONLY");
         else if(transferMode == NP_ASFILE)
-            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stream type: NP_ASFILE\n");
+            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stream type: NP_ASFILE");
         else if(transferMode == NP_SEEK){
-            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stream type: NP_SEEK not yet supported\n");
+            WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "Stream type: NP_SEEK not yet supported");
             [self stop];
             return;
         }
@@ -176,10 +176,10 @@
 
     if(transferMode != NP_ASFILEONLY){
         int32 numBytes = NPP_WriteReady(instance, &npStream);
-        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_WriteReady bytes=%lu\n", numBytes);
+        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_WriteReady bytes=%lu", numBytes);
         
         numBytes = NPP_Write(instance, &npStream, offset, [data length], (void *)[data bytes]);
-        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_Write bytes=%lu\n", numBytes);
+        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_Write bytes=%lu", numBytes);
         
         offset += [data length];
     }
@@ -190,7 +190,7 @@
     // Don't report error before we've called NPP_NewStream
     if(!isFirstChunk){
         NPError npErr = NPP_DestroyStream(instance, &npStream, error);
-        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_DestroyStream: %d\n", npErr);
+        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_DestroyStream: %d", npErr);
     }
 }
 
@@ -211,14 +211,14 @@
         // FIXME: Will cString use the correct character set?
         carbonPath = [[NSFileManager defaultManager] _web_carbonPathForPath:path];
         NPP_StreamAsFile(instance, &npStream, [carbonPath cString]);
-        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_StreamAsFile: %s\n", [carbonPath cString]);
+        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_StreamAsFile: %s", [carbonPath cString]);
     }
     npErr = NPP_DestroyStream(instance, &npStream, NPRES_DONE);
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_DestroyStream: %d\n", npErr);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_DestroyStream: %d", npErr);
     
     if(notifyData){
         NPP_URLNotify(instance, [[URL absoluteString] cString], NPRES_DONE, notifyData);
-        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_URLNotify\n");
+        WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_URLNotify");
     }
     
     [self stop];
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index c883e37..79ca58b 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -20,6 +20,7 @@
 #import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebKitDebug.h>
 
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebError.h>
 #import <WebFoundation/WebNSStringExtras.h>
 #import <WebFoundation/WebNSURLExtras.h>
@@ -143,7 +144,7 @@
 #endif
     [self sendEvent:&event]; 
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(activateEvent): %d  isActive: %d\n", acceptedEvent, (event.modifiers & activeFlag));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(activateEvent): %d  isActive: %d", acceptedEvent, (event.modifiers & activeFlag));
 }
 
 - (BOOL)sendUpdateEvent
@@ -157,7 +158,7 @@
 
     BOOL acceptedEvent = [self sendEvent:&event]; 
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(updateEvt): %d\n", acceptedEvent);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(updateEvt): %d", acceptedEvent);
     
     return acceptedEvent;
 }
@@ -179,7 +180,7 @@
 #endif
     [self sendEvent:&event]; 
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(getFocusEvent): %d\n", acceptedEvent);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(getFocusEvent): %d", acceptedEvent);
     return YES;
 }
 
@@ -195,7 +196,7 @@
 #endif
     [self sendEvent:&event]; 
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(loseFocusEvent): %d\n", acceptedEvent);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(loseFocusEvent): %d", acceptedEvent);
     return YES;
 }
 
@@ -211,7 +212,7 @@
 #endif
     [self sendEvent:&event]; 
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(mouseDown): %d pt.v=%d, pt.h=%d\n", acceptedEvent, event.where.v, event.where.h);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(mouseDown): %d pt.v=%d, pt.h=%d", acceptedEvent, event.where.v, event.where.h);
 }
 
 - (void)mouseUp:(NSEvent *)theEvent
@@ -226,7 +227,7 @@
 #endif
     [self sendEvent:&event]; 
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(mouseUp): %d pt.v=%d, pt.h=%d\n", acceptedEvent, event.where.v, event.where.h);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(mouseUp): %d pt.v=%d, pt.h=%d", acceptedEvent, event.where.v, event.where.h);
 }
 
 - (void)mouseEntered:(NSEvent *)theEvent
@@ -241,7 +242,7 @@
 #endif
     [self sendEvent:&event]; 
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(mouseEntered): %d\n", acceptedEvent);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(mouseEntered): %d", acceptedEvent);
 }
 
 - (void)mouseExited:(NSEvent *)theEvent
@@ -256,7 +257,7 @@
 #endif
     [self sendEvent:&event]; 
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(mouseExited): %d\n", acceptedEvent);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(mouseExited): %d", acceptedEvent);
     
     // Set cursor back to arrow cursor.
     [[NSCursor arrowCursor] set];
@@ -275,7 +276,7 @@
     
     BOOL acceptedEvent = [self sendEvent:&event];
 
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(keyUp): %d charCode:%c keyCode:%lu\n",
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(keyUp): %d charCode:%c keyCode:%lu",
                      acceptedEvent, (char) (event.message & charCodeMask), (event.message & keyCodeMask));
     
     // If the plug-in didn't accept this event,
@@ -304,7 +305,7 @@
     
     BOOL acceptedEvent = [self sendEvent:&event];
 
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(keyDown): %d charCode:%c keyCode:%lu\n",
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(keyDown): %d charCode:%c keyCode:%lu",
                      acceptedEvent, (char) (event.message & charCodeMask), (event.message & keyCodeMask));
     
     // If the plug-in didn't accept this event,
@@ -345,7 +346,7 @@
 
     BOOL acceptedEvent = [self sendEvent:&event];
 
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(performKeyEquivalent): %d charCode:%c keyCode:%lu\n",
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(performKeyEquivalent): %d charCode:%c keyCode:%lu",
                      acceptedEvent, (char) (event.message & charCodeMask), (event.message & keyCodeMask));
     
     return acceptedEvent;
@@ -362,7 +363,7 @@
 #endif
     [self sendEvent:&event];
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(menuForEvent): %d pt.v=%d, pt.h=%d\n", acceptedEvent, event.where.v, event.where.h);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_HandleEvent(menuForEvent): %d pt.v=%d, pt.h=%d", acceptedEvent, event.where.v, event.where.h);
 
     return nil;
 }
@@ -496,7 +497,7 @@
     NPError npErr =
 #endif
     NPP_SetWindow(instance, &window);
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_SetWindow: %d, port=0x%08x, window.x:%d window.y:%d\n",
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_SetWindow: %d, port=0x%08x, window.x:%d window.y:%d",
                      npErr, (int)nPort.port, (int)window.x, (int)window.y);
 
 #if 0
@@ -544,7 +545,7 @@
     NPError npErr =
 #endif
     NPP_New((char *)[mime cString], instance, fullMode ? NP_FULL : NP_EMBED, argsCount, cAttributes, cValues, NULL);
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_New: %d\n", npErr);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_New: %d", npErr);
     
     // Create a WindowRef is one doesn't already exist
     [[self window] _windowRef];
@@ -621,7 +622,7 @@
     NPError npErr =
 #endif
     NPP_Destroy(instance, NULL);
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_Destroy: %d\n", npErr);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPP_Destroy: %d", npErr);
 }
 
 - (WebDataSource *)webDataSource
@@ -895,7 +896,7 @@
 {
     NSString *theTarget = nil;
         
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_GetURLNotify: %s target: %s\n", URL, target);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_GetURLNotify: %s target: %s", URL, target);
         
     if(!URL)
         return NPERR_INVALID_URL;
@@ -910,7 +911,7 @@
 {
     NSString *theTarget = nil;
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_GetURL: %s target: %s\n", URL, target);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_GetURL: %s target: %s", URL, target);
     
     if(!URL)
         return NPERR_INVALID_URL;
@@ -928,7 +929,7 @@
     NSURL *tempURL;
     NSString *path, *theTarget = nil;
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_PostURLNotify: %s\n", URL);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_PostURLNotify: %s", URL);
  
     if(!URL)
         return NPERR_INVALID_URL;
@@ -960,7 +961,7 @@
 {
     NSString *theTarget = nil;
         
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_PostURL: %s\n", URL);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_PostURL: %s", URL);
     
     if(!URL)
         return NPERR_INVALID_URL;
@@ -973,19 +974,19 @@
 
 -(NPError)newStream:(NPMIMEType)type target:(const char *)target stream:(NPStream**)stream
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_NewStream\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_NewStream");
     return NPERR_GENERIC_ERROR;
 }
 
 -(NPError)write:(NPStream*)stream len:(SInt32)len buffer:(void *)buffer
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_Write\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_Write");
     return NPERR_GENERIC_ERROR;
 }
 
 -(NPError)destroyStream:(NPStream*)stream reason:(NPReason)reason
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_DestroyStream\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_DestroyStream");
     if(!stream->ndata)
         return NPERR_INVALID_INSTANCE_ERROR;
         
@@ -995,7 +996,7 @@
 
 -(void)status:(const char *)message
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_Status: %s\n", message);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_Status: %s", message);
     if(webController){
         [[webController windowContext] setStatusText:[NSString stringWithCString:message]];
     }
@@ -1003,19 +1004,19 @@
 
 -(void)invalidateRect:(NPRect *)invalidRect
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_InvalidateRect\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_InvalidateRect");
     [self sendUpdateEvent];
 }
 
 -(void)invalidateRegion:(NPRegion)invalidateRegion
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_InvalidateRegion\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_InvalidateRegion");
     [self sendUpdateEvent];
 }
 
 -(void)forceRedraw
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "forceRedraw\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "forceRedraw");
     [self sendUpdateEvent];
 }
 
diff --git a/WebKit/Plugins.subproj/npapi.m b/WebKit/Plugins.subproj/npapi.m
index e378e0c..73f7be6 100644
--- a/WebKit/Plugins.subproj/npapi.m
+++ b/WebKit/Plugins.subproj/npapi.m
@@ -25,40 +25,40 @@
 
 #import "npapi.h"
 
-#import "WebKitDebug.h"
+#import <WebKit/WebKitDebug.h>
 #import "WebNetscapePluginViewPrivate.h"
 
 // general plug-in to browser functions
 
 const char* NPN_UserAgent(NPP instance)
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_UserAgent\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_UserAgent");
     return "IE";
 }
 
 void* NPN_MemAlloc(UInt32 size)
 {
-    //WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_MemAlloc\n");
+    //WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_MemAlloc");
     return malloc(size);
 
 }
 
 void NPN_MemFree(void* ptr)
 {
-    //WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_MemFree\n");
+    //WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_MemFree");
     free(ptr);
 
 }
 
 UInt32 NPN_MemFlush(UInt32 size)
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_MemFlush\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_MemFlush");
     return 0;
 }
 
 void NPN_ReloadPlugins(NPBool reloadPages)
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_ReloadPlugins\n");
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_ReloadPlugins");
 
 }
 
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index e712e83..6097bfc 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -12,7 +12,7 @@
 #import <WebKit/WebHistoryItem.h>
 #import <WebKit/WebHTMLRepresentationPrivate.h>
 #import <WebKit/WebHTMLViewPrivate.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
 #import <WebKit/WebLoadProgress.h>
 #import <WebKit/WebSubresourceClient.h>
@@ -58,7 +58,7 @@
 
 - (WebCoreBridge *)descendantFrameNamed:(NSString *)name
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     return [[frame frameNamed:name] _bridge];
 }
 
@@ -66,7 +66,7 @@
     withURL:(NSURL *)URL renderPart:(KHTMLRenderPart *)childRenderPart
     allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     WebFrame *newFrame = [[frame controller] createFrameNamed:frameName for:nil inParent:[self dataSource] allowsScrolling:allowsScrolling];
     if (newFrame == nil) {
         return nil;
@@ -88,7 +88,7 @@
 
 - (WebCoreBridge *)openNewWindowWithURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
 
     WebController *newController = [[[frame controller] windowContext] openNewWindowWithURL:URL];
     WebFrame *newFrame = [newController mainFrame];
@@ -98,49 +98,49 @@
 
 - (BOOL)areToolbarsVisible
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     return [[[frame controller] windowContext] areToolbarsVisible];
 }
 
 - (void)setToolbarsVisible:(BOOL)visible
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     [[[frame controller] windowContext] setToolbarsVisible:visible];
 }
 
 - (BOOL)areScrollbarsVisible
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     return [[frame webView] allowsScrolling];
 }
 
 - (void)setScrollbarsVisible:(BOOL)visible
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     return [[frame webView] setAllowsScrolling:visible];
 }
 
 - (BOOL)isStatusBarVisible
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     return [[[frame controller] windowContext] isStatusBarVisible];
 }
 
 - (void)setStatusBarVisible:(BOOL)visible
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     [[[frame controller] windowContext] setStatusBarVisible:visible];
 }
 
 - (void)setWindowFrame:(NSRect)frameRect
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     [[[frame controller] windowContext] setFrame:frameRect];
 }
 
 - (NSWindow *)window
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     return [[[frame controller] windowContext] window];
 }
 
@@ -151,25 +151,25 @@
 
 - (void)setStatusText:(NSString *)status
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     [[[frame controller] windowContext] setStatusText:status];
 }
 
 - (WebCoreBridge *)mainFrame
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     return [[[frame controller] mainFrame] _bridge];
 }
 
 - (WebCoreBridge *)frameNamed:(NSString *)name
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     return [[[frame controller] frameNamed:name] _bridge];
 }
 
 - (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)withDataSource
 {
-    WEBKIT_ASSERT([self dataSource] == withDataSource);
+    ASSERT([self dataSource] == withDataSource);
 
     if ([withDataSource _overrideEncoding] != kCFStringEncodingInvalidId) {
 	[self addData:data withOverrideEncoding:[withDataSource _overrideEncoding]];
@@ -185,7 +185,7 @@
 
 - (void)objectLoadedFromCache:(NSURL *)URL size:(unsigned)bytes
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
 
     WebResourceRequest *request = [[WebResourceRequest alloc] initWithClient:nil URL:URL];
     WebResourceHandle *handle = [[WebResourceHandle alloc] initWithRequest:request];
@@ -213,14 +213,14 @@
 
 - (void)setFrame:(WebFrame *)webFrame
 {
-    WEBKIT_ASSERT(webFrame != nil);
+    ASSERT(webFrame != nil);
 
     if (frame == nil) {
 	// FIXME: non-retained because data source owns representation owns bridge
 	frame = webFrame;
         [self setTextSizeMultiplier:[[frame controller] textSizeMultiplier]];
     } else {
-	WEBKIT_ASSERT(frame == webFrame);
+	ASSERT(frame == webFrame);
     }
 }
 
@@ -232,11 +232,11 @@
 
 - (WebDataSource *)dataSource
 {
-    WEBKIT_ASSERT(frame != nil);
+    ASSERT(frame != nil);
     WebDataSource *dataSource = [frame dataSource];
 
-    WEBKIT_ASSERT(dataSource != nil);
-    WEBKIT_ASSERT([dataSource _isCommitted]);
+    ASSERT(dataSource != nil);
+    ASSERT([dataSource _isCommitted]);
 
     return dataSource;
 }
diff --git a/WebKit/WebCoreSupport.subproj/WebCookieAdapter.m b/WebKit/WebCoreSupport.subproj/WebCookieAdapter.m
index 3e68bfb..2fcc82a 100644
--- a/WebKit/WebCoreSupport.subproj/WebCookieAdapter.m
+++ b/WebKit/WebCoreSupport.subproj/WebCookieAdapter.m
@@ -8,7 +8,7 @@
 
 #import "WebCookieAdapter.h"
 #import <WebFoundation/WebCookieManager.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 
 @implementation WebCookieAdapter
@@ -18,7 +18,7 @@
     if (![self sharedAdapter]) {
         [[[self alloc] init] release];
     }
-    WEBKIT_ASSERT([[self sharedAdapter] isMemberOfClass:self]);
+    ASSERT([[self sharedAdapter] isKindOfClass:self]);
 }
 
 - (BOOL)cookiesEnabled
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index aa4fbc3..63f5b30 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -6,7 +6,7 @@
 #import <WebKit/WebImageRenderer.h>
 
 #import <WebKit/WebException.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 #define MINIMUM_DURATION (1.0/30.0)
 
@@ -245,7 +245,7 @@ static NSMutableArray *activeImageRenderers;
     NSSize size = [self size];
 
     // Check and see if a single draw of the image can convert the entire area we are supposed to tile.
-    WEBKIT_ASSERT([[NSView focusView] isFlipped]);
+    ASSERT([[NSView focusView] isFlipped]);
     NSRect oneTileRect;
     oneTileRect.origin.x = rect.origin.x + fmodf(fmodf(-point.x, size.width) - size.width, size.width);
     oneTileRect.origin.y = rect.origin.y + fmodf(fmodf(-point.y, size.height) - size.height, size.height);
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m b/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
index b9fff83..e271537 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
@@ -26,7 +26,7 @@
 
 #import <WebKit/WebImageRendererFactory.h>
 #import <WebKit/WebImageRenderer.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 @implementation WebImageRendererFactory
 
@@ -35,7 +35,7 @@
     if (![self sharedFactory]) {
         [[[self alloc] init] release];
     }
-    WEBKIT_ASSERT([[self sharedFactory] isMemberOfClass:self]);
+    ASSERT([[self sharedFactory] isKindOfClass:self]);
 }
 
 + (WebImageRendererFactory *)sharedFactory
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index 2588a72..491c0fe 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -19,7 +19,7 @@
 #import <WebKit/WebControllerPrivate.h>
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebDataSourcePrivate.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 @implementation WebSubresourceClient
 
@@ -35,14 +35,14 @@
 
 - (void)didStartLoadingWithURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(currentURL == nil);
+    ASSERT(currentURL == nil);
     currentURL = [URL retain];
     [[dataSource controller] _didStartLoading:currentURL];
 }
 
 - (void)didStopLoading
 {
-    WEBKIT_ASSERT(currentURL != nil);
+    ASSERT(currentURL != nil);
     [[dataSource controller] _didStopLoading:currentURL];
     [currentURL release];
     currentURL = nil;
@@ -50,7 +50,7 @@
 
 - (void)dealloc
 {
-    WEBKIT_ASSERT(currentURL == nil);
+    ASSERT(currentURL == nil);
     
     [loader release];
     [dataSource release];
@@ -109,7 +109,7 @@
 
 - (void)handleDidReceiveData:(WebResourceHandle *)handle data:(NSData *)data
 {
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([currentURL isEqual:[handle URL]]);
 
     [self receivedProgressWithHandle:handle complete: NO];
     [loader addData:data];
@@ -133,8 +133,8 @@
 
 - (void)handleDidFinishLoading:(WebResourceHandle *)handle
 {    
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
-    WEBKIT_ASSERT([[handle response] statusCode] == WebResourceHandleStatusLoadComplete);
+    ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([[handle response] statusCode] == WebResourceHandleStatusLoadComplete);
 
     [loader finish];
     
@@ -152,7 +152,7 @@
 
 - (void)handleDidFailLoading:(WebResourceHandle *)handle withError:(WebError *)error
 {
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([currentURL isEqual:[handle URL]]);
 
     [loader cancel];
     
@@ -165,8 +165,8 @@
 
 - (void)handleDidRedirect:(WebResourceHandle *)handle toURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(currentURL != nil);
-    WEBKIT_ASSERT([URL isEqual:[handle URL]]);
+    ASSERT(currentURL != nil);
+    ASSERT([URL isEqual:[handle URL]]);
 
     // FIXME: We do want to tell the client about redirects.
     // But the current API doesn't give any way to tell redirects on
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index 2588a72..491c0fe 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -19,7 +19,7 @@
 #import <WebKit/WebControllerPrivate.h>
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebDataSourcePrivate.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 @implementation WebSubresourceClient
 
@@ -35,14 +35,14 @@
 
 - (void)didStartLoadingWithURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(currentURL == nil);
+    ASSERT(currentURL == nil);
     currentURL = [URL retain];
     [[dataSource controller] _didStartLoading:currentURL];
 }
 
 - (void)didStopLoading
 {
-    WEBKIT_ASSERT(currentURL != nil);
+    ASSERT(currentURL != nil);
     [[dataSource controller] _didStopLoading:currentURL];
     [currentURL release];
     currentURL = nil;
@@ -50,7 +50,7 @@
 
 - (void)dealloc
 {
-    WEBKIT_ASSERT(currentURL == nil);
+    ASSERT(currentURL == nil);
     
     [loader release];
     [dataSource release];
@@ -109,7 +109,7 @@
 
 - (void)handleDidReceiveData:(WebResourceHandle *)handle data:(NSData *)data
 {
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([currentURL isEqual:[handle URL]]);
 
     [self receivedProgressWithHandle:handle complete: NO];
     [loader addData:data];
@@ -133,8 +133,8 @@
 
 - (void)handleDidFinishLoading:(WebResourceHandle *)handle
 {    
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
-    WEBKIT_ASSERT([[handle response] statusCode] == WebResourceHandleStatusLoadComplete);
+    ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([[handle response] statusCode] == WebResourceHandleStatusLoadComplete);
 
     [loader finish];
     
@@ -152,7 +152,7 @@
 
 - (void)handleDidFailLoading:(WebResourceHandle *)handle withError:(WebError *)error
 {
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([currentURL isEqual:[handle URL]]);
 
     [loader cancel];
     
@@ -165,8 +165,8 @@
 
 - (void)handleDidRedirect:(WebResourceHandle *)handle toURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(currentURL != nil);
-    WEBKIT_ASSERT([URL isEqual:[handle URL]]);
+    ASSERT(currentURL != nil);
+    ASSERT([URL isEqual:[handle URL]]);
 
     // FIXME: We do want to tell the client about redirects.
     // But the current API doesn't give any way to tell redirects on
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index e30660f..b5c0e9e 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -861,7 +861,7 @@ cleanup:
     start = (c / blockSize) * blockSize;
     end = start + (blockSize - 1);
         
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "%s (0x%04x) adding glyphs for 0x%04x to 0x%04x\n", DEBUG_OBJECT(font), c, start, end);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "%s (0x%04x) adding glyphs for 0x%04x to 0x%04x", DEBUG_OBJECT(font), c, start, end);
 
     map->startRange = start;
     map->endRange = end;
@@ -934,7 +934,7 @@ cleanup:
     if (end > 0xffff)
         end = 0xffff;
 
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "%s (0x%04x) adding widths for range 0x%04x to 0x%04x\n", DEBUG_OBJECT(font), glyphID, start, end);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "%s (0x%04x) adding widths for range 0x%04x to 0x%04x", DEBUG_OBJECT(font), glyphID, start, end);
 
     map->startRange = start;
     map->endRange = end;
@@ -956,7 +956,7 @@ cleanup:
     }
 
 #ifdef _TIMING
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "%s total time to advances lookup %f seconds\n", DEBUG_OBJECT(font), totalCGGetAdvancesTime);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_FONTCACHE, "%s total time to advances lookup %f seconds", DEBUG_OBJECT(font), totalCGGetAdvancesTime);
 #endif
     return map;
 }
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.m b/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.m
index 5e1fea1..a7e4d63 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRendererFactory.m
@@ -2,14 +2,16 @@
     WebTextRendererFactory.m
     Copyright 2002, Apple, Inc. All rights reserved.
 */
-#import <mach-o/dyld.h>                // for NSSymbol, NSAddressOfSymbolWithHint(), NSLookupAndBindSymbolWithHint()
 
 #import <WebKit/WebTextRendererFactory.h>
 #import <WebKit/WebTextRenderer.h>
-#import <WebKit/WebKitDebug.h>
+
+#import <WebFoundation/WebAssertions.h>
 
 #import <CoreGraphics/CoreGraphicsPrivate.h>
 
+#import <mach-o/dyld.h>
+
 @interface WebFontCacheKey : NSObject
 {
     NSString *family;
@@ -77,7 +79,7 @@
 
 - (void)endCoalesceTextDrawing
 {
-    WEBKIT_ASSERT ([self coalesceTextDrawing]);
+    ASSERT([self coalesceTextDrawing]);
     
     NSView *targetView = [viewStack objectAtIndex: [viewStack count]-1];
     [viewStack removeLastObject];
@@ -91,7 +93,7 @@
 
 - (WebGlyphBuffer *)glyphBufferForFont: (NSFont *)font andColor: (NSColor *)color
 {
-    WEBKIT_ASSERT ([self coalesceTextDrawing]);
+    ASSERT([self coalesceTextDrawing]);
 
     NSMutableSet *glyphBuffers;
     WebGlyphBuffer *glyphBuffer = nil;
@@ -128,13 +130,9 @@
 
         // Turn off auto expiration of glyphs in CG's cache
         // and increase the cache size.
-        NSSymbol symbol;
-        void (*functionPtr)(CGFontCache *,bool) = NULL;
-        
-        symbol = NSLookupAndBindSymbol("_CGFontCacheSetShouldAutoExpire");
+        NSSymbol symbol = NSLookupAndBindSymbol("_CGFontCacheSetShouldAutoExpire");
         if (symbol != NULL) {
-            NSLog (@"Disabling glyph auto expiration in CG\n");
-            functionPtr = NSAddressOfSymbol(symbol);
+            void (*functionPtr)(CGFontCache *,bool) = NSAddressOfSymbol(symbol);
     
             CGFontCache *fontCache;
             fontCache = CGFontCacheCreate();
@@ -143,10 +141,10 @@
             CGFontCacheRelease(fontCache);
         }
         else {
-            NSLog (@"Unable to disabling glyph auto expiration in CG.  Performance will be degraded.\n");
+            NSLog(@"CoreGraphics is missing call to disable glyph auto expiration. Pages will load more slowly.");
         }
     }
-    WEBKIT_ASSERT([[self sharedFactory] isMemberOfClass:self]);
+    ASSERT([[self sharedFactory] isKindOfClass:self]);
 }
 
 + (WebTextRendererFactory *)sharedFactory;
@@ -236,7 +234,6 @@
         }
     }
     
-    //NSLog(@"unable to find font for family %@, traits 0x%08x(%d), size %f", family, traits, traits, size);
     return [[NSFontManager sharedFontManager] fontWithFamily:@"Helvetica" traits:traits weight:5 size:size];
 }
 
diff --git a/WebKit/WebCoreSupport.subproj/WebViewFactory.m b/WebKit/WebCoreSupport.subproj/WebViewFactory.m
index cbab924..1a5d15c 100644
--- a/WebKit/WebCoreSupport.subproj/WebViewFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebViewFactory.m
@@ -12,7 +12,7 @@
 #import <WebKit/WebPluginDatabase.h>
 #import <WebKit/WebPluginView.h>
 #import <WebKit/WebViewFactory.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 #import <WebFoundation/WebNSURLExtras.h>
 
@@ -23,7 +23,7 @@
     if (![self sharedFactory]) {
         [[[self alloc] init] release];
     }
-    WEBKIT_ASSERT([[self sharedFactory] isMemberOfClass:self]);
+    ASSERT([[self sharedFactory] isKindOfClass:self]);
 }
 
 - (NSView *)viewForPluginWithURL:(NSURL *)pluginURL serviceType:(NSString *)serviceType arguments:(NSArray *)args baseURL:(NSURL *)baseURL
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index a882af2..c9868c0 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -19,7 +19,7 @@
 #import <WebKit/WebHistoryItem.h>
 #import <WebKit/WebKitErrors.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebKit/WebPluginDatabase.h>
 #import <WebKit/WebViewPrivate.h>
 
@@ -320,12 +320,12 @@ NSString * WebContextMenuElementFrameKey = @"WebContextFrame";
     
     targetFrame = [self frameNamed: [item target]];
     if (targetFrame == nil){
-        NSLog (@"Target frame not found, using main frame instead, will be fixed soon\n");
+        NSLog (@"Target frame not found, using main frame instead, will be fixed soon");
 #if 0
         int pos = 1;
         WebHistoryItem *next = item;
         while (next){
-            NSLog (@"frame name %@, parent %@\n", [next target], [next parent]);
+            NSLog (@"frame name %@, parent %@", [next target], [next parent]);
             nextFrame = [self frameNamed: [next parent]];
             next = [[self backForwardList] backEntryAtIndex: pos++];
             if ([[next target] isEqual: @"_top"]){
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 0b0b87a..8fd4663 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -14,7 +14,7 @@
 #import <WebKit/WebStandardPanelsPrivate.h>
 #import <WebKit/WebViewPrivate.h>
 
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 #import <WebFoundation/WebCacheLoaderConstants.h>
 #import <WebFoundation/WebError.h>
@@ -84,7 +84,7 @@
 {
     WebFrame *frame = [dataSource webFrame];
     
-    WEBKIT_ASSERT (dataSource != nil);
+    ASSERT(dataSource != nil);
     
     [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle 
         fromDataSource: dataSource complete:isComplete];
@@ -102,7 +102,7 @@
 {
     WebFrame *frame = [dataSource webFrame];
     
-    WEBKIT_ASSERT (dataSource != nil);
+    ASSERT(dataSource != nil);
 
     [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle 
         fromDataSource: dataSource complete:isComplete];
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index 4711df2..93d35b8 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -13,7 +13,7 @@
 #import <WebKit/WebController.h>
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebView.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
 
 #import <WebFoundation/WebFoundation.h>
@@ -168,7 +168,7 @@
     // All data sources used in a document share the same controller.
     // A single document may have many data sources corresponding to
     // frames or iframes.
-    WEBKIT_ASSERT(_private->parent == nil || [_private->parent controller] == _private->controller);
+    ASSERT(_private->parent == nil || [_private->parent controller] == _private->controller);
     return _private->controller;
 }
 
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 70c9e05..205aa85 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -28,6 +28,7 @@
 #import <WebKit/WebViewPrivate.h>
 #import <WebKit/WebKitDebug.h>
 
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebError.h>
 #import <WebFoundation/WebNSDictionaryExtras.h>
 #import <WebFoundation/WebNSStringExtras.h>
@@ -51,7 +52,7 @@
 {
     // controller is only retained while loading, but this object is also
     // retained while loading, so no need to release here
-    WEBKIT_ASSERT(!loading);
+    ASSERT(!loading);
     
     NSEnumerator *e = [[frames allValues] objectEnumerator];
     WebFrame *frame;
@@ -104,7 +105,7 @@
 
 - (void)_setLoading:(BOOL)loading
 {
-    WEBKIT_ASSERT_VALID_ARG("loading", loading == NO || loading == YES);
+    ASSERT_ARG("loading", loading == NO || loading == YES);
     
     if (_private->loading == loading)
         return;
@@ -162,11 +163,11 @@
 
 - (void)_startLoading: (BOOL)forceRefresh
 {
-    WEBKIT_ASSERT ([self _isStopping] == NO);
+    ASSERT([self _isStopping] == NO);
 
     [self _setPrimaryLoadComplete: NO];
     
-    WEBKIT_ASSERT ([self webFrame] != nil);
+    ASSERT([self webFrame] != nil);
     
     [self _clearErrors];
     
@@ -278,7 +279,7 @@
     // We should never be getting a redirect callback after the data
     // source is committed. It would be a WebFoundation bug if it sent
     // a redirect callback after commit.
-    WEBKIT_ASSERT(!_private->committed);
+    ASSERT(!_private->committed);
 
     [URL retain];
     [_private->finalURL release];
@@ -384,7 +385,7 @@
 
 - (WebBridge *)_bridge
 {
-    WEBKIT_ASSERT(_private->committed);
+    ASSERT(_private->committed);
     return [[self webFrame] _bridge];
 }
 
@@ -396,7 +397,7 @@
 -(void)_commitIfReady
 {
     if ([[self contentPolicy] policyAction] == WebContentPolicyShow && _private->gotFirstByte && !_private->committed) {
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "committed resource = %s\n", [[[self originalURL] absoluteString] cString]);
+        WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "committed resource = %s", [[[self originalURL] absoluteString] cString]);
 	_private->committed = TRUE;
 	[self _makeRepresentation];
         [[self webFrame] _transitionToCommitted];
@@ -447,7 +448,7 @@
 
 - (void)_loadIcon
 {
-    WEBKIT_ASSERT(!_private->iconLoader);
+    ASSERT(!_private->iconLoader);
 
     if([self isMainDocument] && !_private->mainDocumentError){
         
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
index 2dcf6cc..f238def 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultPolicyDelegate.m
@@ -50,7 +50,7 @@
 
 - (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)URL
 {
-    NSLog (@"pluginNotFoundForMIMEType:pluginPageURL: - MIME %@, URL \n", mime, URL);
+    NSLog (@"pluginNotFoundForMIMEType:pluginPageURL: - MIME %@, URL ", mime, URL);
 }
 
 - (WebClickPolicy *)clickPolicyForElement: (NSDictionary *)elementInformation button: (NSEventType)eventType modifierMask: (unsigned int)eventMask
diff --git a/WebKit/WebView.subproj/WebDefaultPolicyHandler.m b/WebKit/WebView.subproj/WebDefaultPolicyHandler.m
index 2dcf6cc..f238def 100644
--- a/WebKit/WebView.subproj/WebDefaultPolicyHandler.m
+++ b/WebKit/WebView.subproj/WebDefaultPolicyHandler.m
@@ -50,7 +50,7 @@
 
 - (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)URL
 {
-    NSLog (@"pluginNotFoundForMIMEType:pluginPageURL: - MIME %@, URL \n", mime, URL);
+    NSLog (@"pluginNotFoundForMIMEType:pluginPageURL: - MIME %@, URL ", mime, URL);
 }
 
 - (WebClickPolicy *)clickPolicyForElement: (NSDictionary *)elementInformation button: (NSEventType)eventType modifierMask: (unsigned int)eventMask
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 366cab1..82a9ea7 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -20,6 +20,7 @@
 #import <WebKit/WebLocationChangeHandler.h>
 #import <WebKit/WebViewPrivate.h>
 
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebFoundation.h>
 #import <WebFoundation/WebNSURLExtras.h>
 
@@ -121,12 +122,12 @@
     id <WebLocationChangeHandler>locationChangeHandler;
     WebDataSource *oldDataSource;
     
-    WEBKIT_ASSERT ([self controller] != nil);
+    ASSERT([self controller] != nil);
 
     // Unfortunately the view must be non-nil, this is ultimately due
     // to KDE parser requiring a KHTMLView.  Once we settle on a final
     // KDE drop we should fix this dependency.
-    WEBKIT_ASSERT ([self webView] != nil);
+    ASSERT([self webView] != nil);
 
     // Record the current scroll position if this frame is associated with the
     // current entry in the back/forward list.
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index e47c8f5..0dbc7af 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -23,6 +23,7 @@
 #import <WebKit/WebPreferencesPrivate.h>
 #import <WebKit/WebViewPrivate.h>
 
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebNSURLExtras.h>
 #import <WebFoundation/WebFoundation.h>
 
@@ -157,7 +158,7 @@ static const char * const stateNames[] = {
 
 - (void)_timedLayout: (id)userInfo
 {
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s:  state = %s\n", [[self name] cString], stateNames[_private->state]);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s:  state = %s", [[self name] cString], stateNames[_private->state]);
     
     [_private->scheduledLayoutTimer release];
     _private->scheduledLayoutTimer = nil;
@@ -166,7 +167,7 @@ static const char * const stateNames[] = {
         NSView <WebDocumentView> *documentView = [[self webView] documentView];
         
         if ([self controller])
-            WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s:  performing timed layout, %f seconds since start of document load\n", [[self name] cString], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
+            WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s:  performing timed layout, %f seconds since start of document load", [[self name] cString], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
             
         if ([[self webView] isDocumentHTML]) {
             WebHTMLView *htmlView = (WebHTMLView *)documentView;
@@ -193,7 +194,7 @@ static const char * const stateNames[] = {
     }
     else {
         if ([self controller])
-            WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s:  NOT performing timed layout (not needed), %f seconds since start of document load\n", [[self name] cString], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
+            WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s:  NOT performing timed layout (not needed), %f seconds since start of document load", [[self name] cString], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
     }
 }
 
@@ -217,13 +218,13 @@ static const char * const stateNames[] = {
                 // ahead and schedule a layout.
                 timeSinceStart = (CFAbsoluteTimeGetCurrent() - [[self dataSource] _loadingStartedTime]);
                 if (timeSinceStart > (double)defaultTimedDelay) {
-                    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "performing early layout because commit time, %f, exceeded initial layout interval %f\n", timeSinceStart, defaultTimedDelay);
+                    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "performing early layout because commit time, %f, exceeded initial layout interval %f", timeSinceStart, defaultTimedDelay);
                     [self _timedLayout: nil];
                 }
                 else {
                     NSTimeInterval timedDelay = defaultTimedDelay - timeSinceStart;
                     
-                    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "registering delayed layout after %f seconds, time since start %f\n", timedDelay, timeSinceStart);
+                    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "registering delayed layout after %f seconds, time since start %f", timedDelay, timeSinceStart);
                     [self _scheduleLayout: timedDelay];
                 }
             }
@@ -239,7 +240,7 @@ static const char * const stateNames[] = {
         
         default:
         {
-	    WEBKIT_ASSERT_NOT_REACHED();
+	    ASSERT_NOT_REACHED();
         }
     }
 }
@@ -247,7 +248,7 @@ static const char * const stateNames[] = {
 
 - (void)_transitionToCommitted
 {
-    WEBKIT_ASSERT ([self controller] != nil);
+    ASSERT([self controller] != nil);
     NSView <WebDocumentView> *documentView;
     WebHistoryItem *backForwardItem;
     WebBackForwardList *backForwardList = [[self controller] backForwardList];
@@ -258,7 +259,7 @@ static const char * const stateNames[] = {
     switch ([self _state]) {
     	case WebFrameStateProvisional:
         {
-	    WEBKIT_ASSERT (documentView != nil);
+	    ASSERT(documentView != nil);
 
             // Set the committed data source on the frame.
             [self _setDataSource: _private->provisionalDataSource];
@@ -307,7 +308,7 @@ static const char * const stateNames[] = {
                 // if we're in the WebFrameLoadTypeUninitialized state.
                 case WebFrameLoadTypeUninitialized:
                 default:
-		    WEBKIT_ASSERT_NOT_REACHED();
+		    ASSERT_NOT_REACHED();
                 }
             }
             
@@ -325,7 +326,7 @@ static const char * const stateNames[] = {
         case WebFrameStateComplete:
         default:
         {
-	    WEBKIT_ASSERT_NOT_REACHED();
+	    ASSERT_NOT_REACHED();
         }
     }
 }
@@ -337,9 +338,9 @@ static const char * const stateNames[] = {
 
 - (void)_setState: (WebFrameState)newState
 {
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  transition from %s to %s\n", [[self name] cString], stateNames[_private->state], stateNames[newState]);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  transition from %s to %s", [[self name] cString], stateNames[_private->state], stateNames[newState]);
     if ([self controller])
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s:  transition from %s to %s, %f seconds since start of document load\n", [[self name] cString], stateNames[_private->state], stateNames[newState], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
+        WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s:  transition from %s to %s, %f seconds since start of document load", [[self name] cString], stateNames[_private->state], stateNames[newState], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
     
     if (newState == WebFrameStateComplete && self == [[self controller] mainFrame]){
         WEBKITDEBUGLEVEL (WEBKIT_LOG_DOCUMENTLOAD, "completed %s (%f seconds)", [[[[self dataSource] originalURL] absoluteString] cString], CFAbsoluteTimeGetCurrent() - [[self dataSource] _loadingStartedTime]);
@@ -366,21 +367,21 @@ static const char * const stateNames[] = {
 
 - (void)_isLoadComplete
 {
-    WEBKIT_ASSERT ([self controller] != nil);
+    ASSERT([self controller] != nil);
 
     switch ([self _state]) {
         case WebFrameStateProvisional:
         {
             WebDataSource *pd = [self provisionalDataSource];
             
-            WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete in WebFrameStateProvisional\n", [[self name] cString]);
+            WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete in WebFrameStateProvisional", [[self name] cString]);
             // If we've received any errors we may be stuck in the provisional state and actually
             // complete.
             if ([[pd errors] count] != 0 || [pd mainDocumentError]) {
                 // Check all children first.
-                WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete, current state WebFrameStateProvisional, %d errors\n", [[self name] cString], [[pd errors] count]);
+                WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete, current state WebFrameStateProvisional, %d errors", [[self name] cString], [[pd errors] count]);
                 if (![pd isLoading]) {
-                    WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete in WebFrameStateProvisional, load done\n", [[self name] cString]);
+                    WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete in WebFrameStateProvisional, load done", [[self name] cString]);
 
                     [[[self controller] locationChangeHandler] locationChangeDone: [pd mainDocumentError] forDataSource:pd];
 
@@ -399,7 +400,7 @@ static const char * const stateNames[] = {
         {
             WebDataSource *ds = [self dataSource];
             
-            //WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete, current state WEBFRAMESTATE_COMMITTED\n", [[self name] cString]);
+            //WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete, current state WEBFRAMESTATE_COMMITTED", [[self name] cString]);
             if (![ds isLoading]) {
                 id thisView = [self webView];
                 NSView <WebDocumentView> *thisDocumentView = [thisView documentView];
@@ -503,14 +504,14 @@ static const char * const stateNames[] = {
         
         case WebFrameStateComplete:
         {
-            WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete, current state WebFrameStateComplete\n", [[self name] cString]);
+            WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s:  checking complete, current state WebFrameStateComplete", [[self name] cString]);
             return;
         }
         
         // Yikes!  Serious horkage.
         default:
         {
-	    WEBKIT_ASSERT_NOT_REACHED();
+	    ASSERT_NOT_REACHED();
         }
     }
 }
@@ -536,7 +537,7 @@ static const char * const stateNames[] = {
 - (void)_checkLoadComplete
 {
 
-    WEBKIT_ASSERT ([self controller] != nil);
+    ASSERT([self controller] != nil);
 
     // Now walk the frame tree to see if any frame that may have initiated a load is done.
     [WebFrame _recursiveCheckCompleteFromFrame: [[self controller] mainFrame]];
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 9c1de15..5363ce0 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -8,7 +8,7 @@
 
 #import <WebKit/WebViewPrivate.h>
 
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebDocument.h>
 #import <WebKit/WebDynamicScrollBarsView.h>
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index b438247..daf8682 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -21,6 +21,8 @@
 #import <WebKit/WebTextRendererFactory.h>
 #import <WebKit/WebViewPrivate.h>
 
+#import <WebFoundation/WebAssertions.h>
+
 // Needed for the mouse moved notification.
 #import <AppKit/NSResponder_Private.h>
 
@@ -175,7 +177,7 @@
     
 #ifdef _KWQ_TIMING        
     double thisTime = CFAbsoluteTimeGetCurrent() - start;
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_TIMING, "%s apply style seconds = %f\n", [self URL], thisTime);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_TIMING, "%s apply style seconds = %f", [self URL], thisTime);
 #endif
 
     _private->needsToApplyStyles = NO;
@@ -198,13 +200,13 @@
     double start = CFAbsoluteTimeGetCurrent();
 #endif
 
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_VIEW, "%s doing layout\n", DEBUG_OBJECT(self));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_VIEW, "%s doing layout", DEBUG_OBJECT(self));
     [[self _bridge] forceLayout];
     _private->needsLayout = NO;
 
 #ifdef _KWQ_TIMING        
     double thisTime = CFAbsoluteTimeGetCurrent() - start;
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_TIMING, "%s layout seconds = %f\n", [self URL], thisTime);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_TIMING, "%s layout seconds = %f", [self URL], thisTime);
 #endif
 }
 
@@ -307,21 +309,21 @@
 
 - (void)setNeedsDisplay:(BOOL)flag
 {
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "%s flag = %d\n", DEBUG_OBJECT(self), (int)flag);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "%s flag = %d", DEBUG_OBJECT(self), (int)flag);
     [super setNeedsDisplay: flag];
 }
 
 
 - (void)setNeedsLayout: (BOOL)flag
 {
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "%s flag = %d\n", DEBUG_OBJECT(self), (int)flag);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "%s flag = %d", DEBUG_OBJECT(self), (int)flag);
     _private->needsLayout = flag;
 }
 
 
 - (void)setNeedsToApplyStyles: (BOOL)flag
 {
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "%s flag = %d\n", DEBUG_OBJECT(self), (int)flag);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "%s flag = %d", DEBUG_OBJECT(self), (int)flag);
     _private->needsToApplyStyles = flag;
 }
 
@@ -329,7 +331,7 @@
 // This should eventually be removed.
 - (void)drawRect:(NSRect)rect
 {
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "%s drawing\n", DEBUG_OBJECT(self));
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "%s drawing", DEBUG_OBJECT(self));
 
     if ([self inLiveResize]){
         if (!NSEqualRects(rect, [self visibleRect])){
@@ -352,7 +354,7 @@
 
     //double start = CFAbsoluteTimeGetCurrent();
     [[self _bridge] drawRect:rect];
-    //WebKitDebugAtLevel (WEBKIT_LOG_TIMING, "draw time %e\n", CFAbsoluteTimeGetCurrent() - start);
+    //WebKitDebugAtLevel (WEBKIT_LOG_TIMING, "draw time %e", CFAbsoluteTimeGetCurrent() - start);
 
     if ([WebTextRenderer shouldBufferTextDrawing] && focusView)
         [[WebTextRendererFactory sharedFactory] endCoalesceTextDrawing];
@@ -377,7 +379,7 @@
 
 #ifdef _KWQ_TIMING
     double thisTime = CFAbsoluteTimeGetCurrent() - start;
-    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s draw seconds = %f\n", widget->part()->baseURL().URL().latin1(), thisTime);
+    WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s draw seconds = %f", widget->part()->baseURL().URL().latin1(), thisTime);
 #endif
 }
 
@@ -517,7 +519,7 @@
 
 - (void)keyDown: (NSEvent *)event
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_EVENTS, "keyDown: %s\n", DEBUG_OBJECT(event));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_EVENTS, "keyDown: %s", DEBUG_OBJECT(event));
     int state = 0;
     
     // FIXME: We don't want to call keyPressEvent for scrolling key events,
@@ -539,7 +541,7 @@
 
 - (void)keyUp: (NSEvent *)event
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_EVENTS, "keyUp: %s\n", DEBUG_OBJECT(event));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_EVENTS, "keyUp: %s", DEBUG_OBJECT(event));
     int state = 0;
     
     // FIXME: Make sure this logic matches keyDown above.
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 4f14cb6..3777397 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -9,7 +9,7 @@
 #import <WebKit/WebHTMLViewPrivate.h>
 
 #import <AppKit/NSResponder_Private.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebKit/WebImageRenderer.h>
 #import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebPluginView.h>
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index bdd9f17..d90c8e6 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -18,6 +18,7 @@
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebKitDebug.h>
 
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebError.h>
 #import <WebFoundation/WebFileTypeMappings.h>
 #import <WebFoundation/WebResourceHandle.h>
@@ -42,14 +43,14 @@
 
 - (void)didStartLoadingWithURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(currentURL == nil);
+    ASSERT(currentURL == nil);
     currentURL = [URL retain];
     [[dataSource controller] _didStartLoading:currentURL];
 }
 
 - (void)didStopLoading
 {
-    WEBKIT_ASSERT(currentURL != nil);
+    ASSERT(currentURL != nil);
     [[dataSource controller] _didStopLoading:currentURL];
     [currentURL release];
     currentURL = nil;
@@ -57,8 +58,8 @@
 
 - (void)dealloc
 {
-    WEBKIT_ASSERT(currentURL == nil);
-    WEBKIT_ASSERT(downloadHandler == nil);
+    ASSERT(currentURL == nil);
+    ASSERT(downloadHandler == nil);
     
     [downloadProgressHandler release];
     [resourceData release];
@@ -110,13 +111,13 @@
 
 - (NSString *)handleWillUseUserAgent:(WebResourceHandle *)handle forURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT([dataSource controller]);
+    ASSERT([dataSource controller]);
     return [[dataSource controller] userAgentForURL:URL];
 }
 
 - (void)handleDidBeginLoading:(WebResourceHandle *)handle
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s\n", DEBUG_OBJECT([handle URL]));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s", DEBUG_OBJECT([handle URL]));
     
     [self didStartLoadingWithURL:[handle URL]];
 }
@@ -125,7 +126,7 @@
 {
     WebError *error;
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s\n", DEBUG_OBJECT([handle URL]));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s", DEBUG_OBJECT([handle URL]));
     
     // FIXME: Maybe we should be passing the URL from the handle here, not from the dataSource.
     error = [[WebError alloc] initWithErrorCode:WebResultCancelled 
@@ -141,10 +142,10 @@
 
 - (void)handleDidFinishLoading:(WebResourceHandle *)handle
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s\n", DEBUG_OBJECT([handle URL]));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s", DEBUG_OBJECT([handle URL]));
     
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
-    WEBKIT_ASSERT([[handle response] statusCode] == WebResourceHandleStatusLoadComplete);
+    ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([[handle response] statusCode] == WebResourceHandleStatusLoadComplete);
 
     WebContentAction contentAction = [[dataSource contentPolicy] policyAction];
     
@@ -178,9 +179,9 @@
     NSString *contentType = [handle contentType];
     WebFrame *frame = [dataSource webFrame];
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s, data = %p, length %d\n", DEBUG_OBJECT([handle URL]), data, [data length]);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s, data = %p, length %d", DEBUG_OBJECT([handle URL]), data, [data length]);
     
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([currentURL isEqual:[handle URL]]);
     
     // Check the mime type and ask the client for the content policy.
     if(isFirstChunk){
@@ -239,9 +240,9 @@
 
 - (void)handleDidFailLoading:(WebResourceHandle *)handle withError:(WebError *)result
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s, result = %s\n", DEBUG_OBJECT([handle URL]), DEBUG_OBJECT([result errorDescription]));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s, result = %s", DEBUG_OBJECT([handle URL]), DEBUG_OBJECT([result errorDescription]));
 
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([currentURL isEqual:[handle URL]]);
 
     [self receivedError:result forHandle:handle];
     
@@ -254,10 +255,10 @@
 
 - (void)handleDidRedirect:(WebResourceHandle *)handle toURL:(NSURL *)URL
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_REDIRECT, "URL = %s\n", DEBUG_OBJECT(URL));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_REDIRECT, "URL = %s", DEBUG_OBJECT(URL));
 
-    WEBKIT_ASSERT(currentURL != nil);
-    WEBKIT_ASSERT([URL isEqual:[handle URL]]);
+    ASSERT(currentURL != nil);
+    ASSERT([URL isEqual:[handle URL]]);
     
     [dataSource _setURL:URL];
 
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index bdd9f17..d90c8e6 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -18,6 +18,7 @@
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebKitDebug.h>
 
+#import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebError.h>
 #import <WebFoundation/WebFileTypeMappings.h>
 #import <WebFoundation/WebResourceHandle.h>
@@ -42,14 +43,14 @@
 
 - (void)didStartLoadingWithURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT(currentURL == nil);
+    ASSERT(currentURL == nil);
     currentURL = [URL retain];
     [[dataSource controller] _didStartLoading:currentURL];
 }
 
 - (void)didStopLoading
 {
-    WEBKIT_ASSERT(currentURL != nil);
+    ASSERT(currentURL != nil);
     [[dataSource controller] _didStopLoading:currentURL];
     [currentURL release];
     currentURL = nil;
@@ -57,8 +58,8 @@
 
 - (void)dealloc
 {
-    WEBKIT_ASSERT(currentURL == nil);
-    WEBKIT_ASSERT(downloadHandler == nil);
+    ASSERT(currentURL == nil);
+    ASSERT(downloadHandler == nil);
     
     [downloadProgressHandler release];
     [resourceData release];
@@ -110,13 +111,13 @@
 
 - (NSString *)handleWillUseUserAgent:(WebResourceHandle *)handle forURL:(NSURL *)URL
 {
-    WEBKIT_ASSERT([dataSource controller]);
+    ASSERT([dataSource controller]);
     return [[dataSource controller] userAgentForURL:URL];
 }
 
 - (void)handleDidBeginLoading:(WebResourceHandle *)handle
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s\n", DEBUG_OBJECT([handle URL]));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s", DEBUG_OBJECT([handle URL]));
     
     [self didStartLoadingWithURL:[handle URL]];
 }
@@ -125,7 +126,7 @@
 {
     WebError *error;
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s\n", DEBUG_OBJECT([handle URL]));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s", DEBUG_OBJECT([handle URL]));
     
     // FIXME: Maybe we should be passing the URL from the handle here, not from the dataSource.
     error = [[WebError alloc] initWithErrorCode:WebResultCancelled 
@@ -141,10 +142,10 @@
 
 - (void)handleDidFinishLoading:(WebResourceHandle *)handle
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s\n", DEBUG_OBJECT([handle URL]));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s", DEBUG_OBJECT([handle URL]));
     
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
-    WEBKIT_ASSERT([[handle response] statusCode] == WebResourceHandleStatusLoadComplete);
+    ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([[handle response] statusCode] == WebResourceHandleStatusLoadComplete);
 
     WebContentAction contentAction = [[dataSource contentPolicy] policyAction];
     
@@ -178,9 +179,9 @@
     NSString *contentType = [handle contentType];
     WebFrame *frame = [dataSource webFrame];
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s, data = %p, length %d\n", DEBUG_OBJECT([handle URL]), data, [data length]);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s, data = %p, length %d", DEBUG_OBJECT([handle URL]), data, [data length]);
     
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([currentURL isEqual:[handle URL]]);
     
     // Check the mime type and ask the client for the content policy.
     if(isFirstChunk){
@@ -239,9 +240,9 @@
 
 - (void)handleDidFailLoading:(WebResourceHandle *)handle withError:(WebError *)result
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s, result = %s\n", DEBUG_OBJECT([handle URL]), DEBUG_OBJECT([result errorDescription]));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "URL = %s, result = %s", DEBUG_OBJECT([handle URL]), DEBUG_OBJECT([result errorDescription]));
 
-    WEBKIT_ASSERT([currentURL isEqual:[handle URL]]);
+    ASSERT([currentURL isEqual:[handle URL]]);
 
     [self receivedError:result forHandle:handle];
     
@@ -254,10 +255,10 @@
 
 - (void)handleDidRedirect:(WebResourceHandle *)handle toURL:(NSURL *)URL
 {
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_REDIRECT, "URL = %s\n", DEBUG_OBJECT(URL));
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_REDIRECT, "URL = %s", DEBUG_OBJECT(URL));
 
-    WEBKIT_ASSERT(currentURL != nil);
-    WEBKIT_ASSERT([URL isEqual:[handle URL]]);
+    ASSERT(currentURL != nil);
+    ASSERT([URL isEqual:[handle URL]]);
     
     [dataSource _setURL:URL];
 
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index 92ec6af..8ba89b7 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -4,7 +4,7 @@
 */
 #import "WebPreferences.h"
 
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 // These are private because callers should be using the cover methods
 #define        WebKitLogLevelPreferenceKey                @"WebKitLogLevel"
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index a882af2..c9868c0 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -19,7 +19,7 @@
 #import <WebKit/WebHistoryItem.h>
 #import <WebKit/WebKitErrors.h>
 #import <WebKit/WebKitStatisticsPrivate.h>
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 #import <WebKit/WebPluginDatabase.h>
 #import <WebKit/WebViewPrivate.h>
 
@@ -320,12 +320,12 @@ NSString * WebContextMenuElementFrameKey = @"WebContextFrame";
     
     targetFrame = [self frameNamed: [item target]];
     if (targetFrame == nil){
-        NSLog (@"Target frame not found, using main frame instead, will be fixed soon\n");
+        NSLog (@"Target frame not found, using main frame instead, will be fixed soon");
 #if 0
         int pos = 1;
         WebHistoryItem *next = item;
         while (next){
-            NSLog (@"frame name %@, parent %@\n", [next target], [next parent]);
+            NSLog (@"frame name %@, parent %@", [next target], [next parent]);
             nextFrame = [self frameNamed: [next parent]];
             next = [[self backForwardList] backEntryAtIndex: pos++];
             if ([[next target] isEqual: @"_top"]){
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 0b0b87a..8fd4663 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -14,7 +14,7 @@
 #import <WebKit/WebStandardPanelsPrivate.h>
 #import <WebKit/WebViewPrivate.h>
 
-#import <WebKit/WebKitDebug.h>
+#import <WebFoundation/WebAssertions.h>
 
 #import <WebFoundation/WebCacheLoaderConstants.h>
 #import <WebFoundation/WebError.h>
@@ -84,7 +84,7 @@
 {
     WebFrame *frame = [dataSource webFrame];
     
-    WEBKIT_ASSERT (dataSource != nil);
+    ASSERT(dataSource != nil);
     
     [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle 
         fromDataSource: dataSource complete:isComplete];
@@ -102,7 +102,7 @@
 {
     WebFrame *frame = [dataSource webFrame];
     
-    WEBKIT_ASSERT (dataSource != nil);
+    ASSERT(dataSource != nil);
 
     [[self resourceProgressHandler] receivedProgress: progress forResourceHandle: resourceHandle 
         fromDataSource: dataSource complete:isComplete];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list