[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:52:30 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4c0af6e9c8e5b22950d3785e65ce6864604a514b
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 16 19:37:30 2001 +0000
Removed all NSLog statements from the code base, replacing them with
KWQDEBUG/WEBKITDEBUG statements.
Added some assertion macros to the WebCore and the WebKit.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index 8d7d782..58d958d 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -107,7 +107,7 @@ void QApplication::_initialize(){
if (principalClass) {
application = [principalClass sharedApplication];
if (![NSBundle loadNibNamed: mainNibFile owner: application]) {
- NSLog (@"ERROR: QApplication::_initialize() unable to load %@\n", mainNibFile, nil);
+ KWQDEBUGLEVEL2(KWQ_LOG_ERROR, "ERROR: QApplication::_initialize() unable to load %s\n", DEBUG_OBJECT(mainNibFile));
}
}
}
@@ -128,11 +128,11 @@ void QApplication::setMainWidget(QWidget *w)
NSRect b = [((_KWQOwner *)application)->containerView bounds];
if (application == nil){
- NSLog (@"ERROR: QApplication::setMainWidget() application not set.\n");
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::setMainWidget() application not set.\n");
return;
}
if (w == 0){
- NSLog (@"ERROR: QApplication::setMainWidget() widget not valid.\n");
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::setMainWidget() widget not valid.\n");
return;
}
@@ -156,7 +156,7 @@ void QApplication::setMainWidget(QWidget *w)
int QApplication::exec()
{
if (application == nil){
- NSLog (@"ERROR: QApplication::exec() application not set.\n");
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::exec() application not set.\n");
return 0;
}
[application run];
diff --git a/WebCore/kwq/KWQChar.mm b/WebCore/kwq/KWQChar.mm
index 7108eea..8889072 100644
--- a/WebCore/kwq/KWQChar.mm
+++ b/WebCore/kwq/KWQChar.mm
@@ -25,6 +25,7 @@
// FIXME: obviously many functions here can be made inline
+#include <kwqdebug.h>
#include <Foundation/Foundation.h>
#include <qstring.h>
@@ -205,8 +206,7 @@ QChar::Direction QChar::direction() const
bool QChar::mirrored() const
{
// FIXME: unimplemented because we don't do BIDI yet
- NSLog(@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__,
- __LINE__);
+ _logNotYetImplemented();
// return whether character should be reversed if text direction is
// reversed
return FALSE;
@@ -215,8 +215,7 @@ bool QChar::mirrored() const
QChar QChar::mirroredChar() const
{
// FIXME: unimplemented because we don't do BIDI yet
- NSLog(@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__,
- __LINE__);
+ _logNotYetImplemented();
// return mirrored character if it is mirrored else return itself
return *this;
}
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index 6e00264..d500c65 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -276,10 +276,10 @@ QSize QFontMetrics::size(int, const QString &qstring, int len, int tabstops,
int *tabarray, char **intern ) const
{
if (tabstops != 0){
- NSLog (@"ERROR: QFontMetrics::size() tabs not supported.\n");
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QFontMetrics::size() tabs not supported.\n");
}
- NSLog (@"string = %@\n", QSTRING_TO_NSSTRING(qstring));
+ KWQDEBUG1("string = %s\n", DEBUG_OBJECT(QSTRING_TO_NSSTRING(qstring)));
NSString *string;
if (len != -1)
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 63d3f54..e1c9c5c 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -55,7 +55,7 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
{
DOM::Node cur_child = node.lastChild();
- NSLog(@"cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
+ KWQDEBUG2("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
while(!cur_child.isNull())
{
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 63d3f54..e1c9c5c 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -55,7 +55,7 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
{
DOM::Node cur_child = node.lastChild();
- NSLog(@"cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
+ KWQDEBUG2("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
while(!cur_child.isNull())
{
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index 1078ae9..f20bee3 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -26,6 +26,7 @@
#undef CACHE_DEBUG
//#define CACHE_DEBUG
+#include <kwqdebug.h>
#include <loader.h>
// up to which size is a picture for sure cacheable
@@ -920,10 +921,10 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
{
NSString *notificationName = [notification name];
if ([notificationName rangeOfString: @"uri"].location != 0){
- NSLog (@"cacheDataAvailable: Received invalid notication, %@", notificationName);
+ KWQDEBUG1("cacheDataAvailable: Received invalid notication, %s\n", DEBUG_OBJECT(notificationName));
}
else {
- NSLog (@"cacheDataAvailable: Received notication, %@", notificationName);
+ KWQDEBUG1("cacheDataAvailable: Received notication, %s\n", DEBUG_OBJECT(notificationName));
id <WCURICacheData> data = [notification object];
KIO::Job *job = static_cast<KIO::Job *>([data userData]);
m_loader->slotData(job, (const char *)[data cacheData], [data cacheDataSize]);
@@ -934,10 +935,10 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
{
NSString *notificationName = [notification name];
if ([notificationName rangeOfString: @"uri"].location != 0){
- NSLog (@"cacheFinished: Received invalid notication, %@", notificationName);
+ KWQDEBUG1 ("cacheFinished: Received invalid notication, %s\n", DEBUG_OBJECT(notificationName));
}
else {
- NSLog (@"cacheFinished: Received notication, %@", notificationName);
+ KWQDEBUG1 ("cacheFinished: Received notication, %s\n", DEBUG_OBJECT(notificationName));
// FIXME: need an implementation for this
id <WCURICacheData> data = [notification object];
KIO::Job *job = static_cast<KIO::Job *>([data userData]);
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 1078ae9..f20bee3 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -26,6 +26,7 @@
#undef CACHE_DEBUG
//#define CACHE_DEBUG
+#include <kwqdebug.h>
#include <loader.h>
// up to which size is a picture for sure cacheable
@@ -920,10 +921,10 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
{
NSString *notificationName = [notification name];
if ([notificationName rangeOfString: @"uri"].location != 0){
- NSLog (@"cacheDataAvailable: Received invalid notication, %@", notificationName);
+ KWQDEBUG1("cacheDataAvailable: Received invalid notication, %s\n", DEBUG_OBJECT(notificationName));
}
else {
- NSLog (@"cacheDataAvailable: Received notication, %@", notificationName);
+ KWQDEBUG1("cacheDataAvailable: Received notication, %s\n", DEBUG_OBJECT(notificationName));
id <WCURICacheData> data = [notification object];
KIO::Job *job = static_cast<KIO::Job *>([data userData]);
m_loader->slotData(job, (const char *)[data cacheData], [data cacheDataSize]);
@@ -934,10 +935,10 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
{
NSString *notificationName = [notification name];
if ([notificationName rangeOfString: @"uri"].location != 0){
- NSLog (@"cacheFinished: Received invalid notication, %@", notificationName);
+ KWQDEBUG1 ("cacheFinished: Received invalid notication, %s\n", DEBUG_OBJECT(notificationName));
}
else {
- NSLog (@"cacheFinished: Received notication, %@", notificationName);
+ KWQDEBUG1 ("cacheFinished: Received notication, %s\n", DEBUG_OBJECT(notificationName));
// FIXME: need an implementation for this
id <WCURICacheData> data = [notification object];
KIO::Job *job = static_cast<KIO::Job *>([data userData]);
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 1078ae9..f20bee3 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -26,6 +26,7 @@
#undef CACHE_DEBUG
//#define CACHE_DEBUG
+#include <kwqdebug.h>
#include <loader.h>
// up to which size is a picture for sure cacheable
@@ -920,10 +921,10 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
{
NSString *notificationName = [notification name];
if ([notificationName rangeOfString: @"uri"].location != 0){
- NSLog (@"cacheDataAvailable: Received invalid notication, %@", notificationName);
+ KWQDEBUG1("cacheDataAvailable: Received invalid notication, %s\n", DEBUG_OBJECT(notificationName));
}
else {
- NSLog (@"cacheDataAvailable: Received notication, %@", notificationName);
+ KWQDEBUG1("cacheDataAvailable: Received notication, %s\n", DEBUG_OBJECT(notificationName));
id <WCURICacheData> data = [notification object];
KIO::Job *job = static_cast<KIO::Job *>([data userData]);
m_loader->slotData(job, (const char *)[data cacheData], [data cacheDataSize]);
@@ -934,10 +935,10 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
{
NSString *notificationName = [notification name];
if ([notificationName rangeOfString: @"uri"].location != 0){
- NSLog (@"cacheFinished: Received invalid notication, %@", notificationName);
+ KWQDEBUG1 ("cacheFinished: Received invalid notication, %s\n", DEBUG_OBJECT(notificationName));
}
else {
- NSLog (@"cacheFinished: Received notication, %@", notificationName);
+ KWQDEBUG1 ("cacheFinished: Received notication, %s\n", DEBUG_OBJECT(notificationName));
// FIXME: need an implementation for this
id <WCURICacheData> data = [notification object];
KIO::Job *job = static_cast<KIO::Job *>([data userData]);
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index fa5b8fd..0ce8086 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -196,7 +196,7 @@ void QPainter::restore()
{
QPStateStack *pss = (QPStateStack *)data->ps_stack;
if ( pss == 0 || pss->isEmpty() ) {
- NSLog (@"ERROR void QPainter::restore() stack is empty\n");
+ KWQDEBUG("ERROR void QPainter::restore() stack is empty\n");
return;
}
QPState *ps = pss->pop();
@@ -299,7 +299,7 @@ void QPainter::drawArc (int x, int y, int w, int h, int a, int alen)
float fa, falen;
if (w != h){
- NSLog (@"ERROR (INCOMPLETE IMPLEMENTATION) void QPainter::drawArc (int x, int y, int w, int h, int a, int alen)\nOnly supports drawing arcs on a circle.\n");
+ KWQDEBUG("ERROR (INCOMPLETE IMPLEMENTATION) void QPainter::drawArc (int x, int y, int w, int h, int a, int alen)\nOnly supports drawing arcs on a circle.\n");
}
path = [[[NSBezierPath alloc] init] autorelease];
@@ -592,19 +592,19 @@ void QPainter::setRasterOp(RasterOp op)
else
data->compositingOperation = NSCompositeCopy;
#else
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented()
#endif
}
void QPainter::translate(double dx, double dy)
{
- NSLog (@"ERROR %s:%d %s (NOT IMPLEMENTED) (%d, %d)\n", __FILE__, __LINE__, __FUNCTION__, (int)dx, (int) dy);
+ _logNotYetImplemented()
}
void QPainter::scale(double dx, double dy)
{
- NSLog (@"ERROR %s:%d %s (NOT IMPLEMENTED) (%d, %d)\n", __FILE__, __LINE__, __FUNCTION__, (int)dx, (int) dy);
+ _logNotYetImplemented()
}
diff --git a/WebCore/kwq/KWQPixmap.mm b/WebCore/kwq/KWQPixmap.mm
index f89683f..9e4d75e 100644
--- a/WebCore/kwq/KWQPixmap.mm
+++ b/WebCore/kwq/KWQPixmap.mm
@@ -67,9 +67,9 @@ QPixmap::QPixmap(const QByteArray&bytes)
NSData *nsdata = [[[NSData alloc] initWithBytes: bytes.data() length: bytes.size() copy:NO freeWhenDone:NO bytesAreVM:NO] autorelease];
nsimage = [[NSImage alloc] initWithData: nsdata];
if (nsimage == nil){
- NSLog (@"unable to create image");
+ KWQDEBUG("unable to create image\n");
} else {
- NSLog (@"image created");
+ KWQDEBUG("image created\n");
}
[nsimage setFlipped: YES];
[nsimage setScalesWhenResized: YES];
@@ -177,7 +177,7 @@ QPixmap QPixmap::xForm(const QWMatrix &xmatrix) const
QImage QPixmap::convertToImage() const
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index ba27c52..3b2af80 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -292,9 +292,8 @@ const QChar *QString::unicode() const
if (len) {
ucs = const_cast<UniChar *>(CFStringGetCharactersPtr(s));
if (!ucs) {
-#ifdef _KWQ_DEBUG_
- NSLog(@"WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n",
- __FILE__, __FUNCTION__, __LINE__);
+#if _KWQ_DEBUG_
+ KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
#endif
if (cacheType != CacheUnicode) {
flushCache();
@@ -321,9 +320,8 @@ const char *QString::latin1() const
chs = const_cast<char *>(CFStringGetCStringPtr(s,
kCFStringEncodingISOLatin1));
if (!chs) {
-#ifdef _KWQ_DEBUG_
- NSLog(@"WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n",
- __FILE__, __FUNCTION__, __LINE__);
+#if _KWQ_DEBUG_
+ KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
#endif
if (cacheType != CacheLatin1) {
flushCache();
@@ -331,9 +329,8 @@ const char *QString::latin1() const
if (cache) {
if (!CFStringGetCString(s, cache, len + 1,
kCFStringEncodingISOLatin1)) {
-#ifdef _KWQ_DEBUG_
- NSLog(@"WARNING %s:%s:%d (CFStringGetCString failed)\n",
- __FILE__, __FUNCTION__, __LINE__);
+#if _KWQ_DEBUG_
+ KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCString failed)\n", __FUNCTION__, __FILE__, __LINE__);
#endif
*reinterpret_cast<char *>(cache) = '\0';
}
diff --git a/WebCore/kwq/KWQView.mm b/WebCore/kwq/KWQView.mm
index cdd1f32..0758745 100644
--- a/WebCore/kwq/KWQView.mm
+++ b/WebCore/kwq/KWQView.mm
@@ -110,7 +110,7 @@
- delayLayout: sender
{
[NSObject cancelPreviousPerformRequestsWithTarget: self selector: @selector(delayLayout:) object: self];
- NSLog (@"KWQHTMLView: delayLayout called");
+ KWQDEBUG("KWQHTMLView: delayLayout called\n");
[self setNeedsLayout: YES];
[self setNeedsDisplay: YES];
}
@@ -118,7 +118,7 @@
-(void)notificationReceived:(NSNotification *)notification
{
if ([[notification name] rangeOfString: @"uri-fin-"].location == 0){
- NSLog (@"KWQHTMLView: Received notification, %@", [notification name]);
+ KWQDEBUG1("KWQHTMLView: Received notification, %s\n", DEBUG_OBJECT([notification name]));
[self performSelector:@selector(delayLayout:) withObject:self afterDelay:(NSTimeInterval)0.5];
}
}
@@ -186,7 +186,7 @@
count = [views count];
while (count--){
- NSLog (@"Removing 0x%08x %@", [views objectAtIndex: 0], [[[views objectAtIndex: 0] class] className]);
+ KWQDEBUG2("Removing %p %s\n", [views objectAtIndex: 0], DEBUG_OBJECT([[[views objectAtIndex: 0] class] className]));
[[views objectAtIndex: 0] removeFromSuperviewWithoutNeedingDisplay];
}
[self setFrameSize: NSMakeSize (0,0)];
diff --git a/WebCore/kwq/KWQWMatrix.mm b/WebCore/kwq/KWQWMatrix.mm
index e448b20..95713fc 100644
--- a/WebCore/kwq/KWQWMatrix.mm
+++ b/WebCore/kwq/KWQWMatrix.mm
@@ -23,6 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <kwqdebug.h>
#include <qpainter.h>
@@ -37,7 +38,7 @@ QWMatrix::QWMatrix()
QWMatrix &QWMatrix::scale(double _sx, double _sy)
{
if (empty != TRUE){
- NSLog (@"ERROR (INCOMPLETE IMPLEMENTATION) QWMatrix &QWMatrix::scale(double _sx, double _sy) scale may only be called once.\n");
+ KWQDEBUG("ERROR (INCOMPLETE IMPLEMENTATION) QWMatrix &QWMatrix::scale(double _sx, double _sy) scale may only be called once.\n");
}
empty = FALSE;
sx = _sx;
diff --git a/WebCore/kwq/kwqdebug.h b/WebCore/kwq/kwqdebug.h
index ce3a00a..9d9ae5e 100644
--- a/WebCore/kwq/kwqdebug.h
+++ b/WebCore/kwq/kwqdebug.h
@@ -34,6 +34,10 @@
#undef Rect
#undef Boolean
+/*-----------------------------------------------------------------------------
+ * Logging macros
+ */
+
#define KWQ_LOG_NEVER_IMPLEMENTED 0x1
#define KWQ_LOG_PARTIALLY_IMPLEMENTED 0x2
#define KWQ_LOG_NOT_YET_IMPLEMENTED 0x4
@@ -99,6 +103,33 @@ void KWQLogAtLevel(unsigned int level, NSString *format, ...);
#define DEBUG_OBJECT(object) [[object description] cString]
+/*-----------------------------------------------------------------------------
+ * Assertion macros
+ */
+
+#define KWQ_ASSERT(expr) \
+ do { \
+ if (!(expr)) { \
+ NSString *reason = [NSString stringWithFormat:@"assertion failed: '%s'", #expr]; \
+ [[NSException exceptionWithName:NSGenericException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
+
+#define KWQ_ASSERT_VALID_ARG(arg,expr) \
+ do { \
+ if (!(expr)) { \
+ NSString *reason = [NSString stringWithFormat:@"'%s' fails check: '%s'", #arg, #expr]; \
+ [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
+
+#define WEBKIT_ASSERT_NOT_NIL(arg) \
+ do { \
+ if ((arg) == nil) { \
+ NSString *reason = [NSString stringWithFormat:@"'%s' is nil", #arg]; \
+ [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
#endif KWQDEBUG_H_
diff --git a/WebCore/src/kwq/KWQApplication.mm b/WebCore/src/kwq/KWQApplication.mm
index 8d7d782..58d958d 100644
--- a/WebCore/src/kwq/KWQApplication.mm
+++ b/WebCore/src/kwq/KWQApplication.mm
@@ -107,7 +107,7 @@ void QApplication::_initialize(){
if (principalClass) {
application = [principalClass sharedApplication];
if (![NSBundle loadNibNamed: mainNibFile owner: application]) {
- NSLog (@"ERROR: QApplication::_initialize() unable to load %@\n", mainNibFile, nil);
+ KWQDEBUGLEVEL2(KWQ_LOG_ERROR, "ERROR: QApplication::_initialize() unable to load %s\n", DEBUG_OBJECT(mainNibFile));
}
}
}
@@ -128,11 +128,11 @@ void QApplication::setMainWidget(QWidget *w)
NSRect b = [((_KWQOwner *)application)->containerView bounds];
if (application == nil){
- NSLog (@"ERROR: QApplication::setMainWidget() application not set.\n");
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::setMainWidget() application not set.\n");
return;
}
if (w == 0){
- NSLog (@"ERROR: QApplication::setMainWidget() widget not valid.\n");
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::setMainWidget() widget not valid.\n");
return;
}
@@ -156,7 +156,7 @@ void QApplication::setMainWidget(QWidget *w)
int QApplication::exec()
{
if (application == nil){
- NSLog (@"ERROR: QApplication::exec() application not set.\n");
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::exec() application not set.\n");
return 0;
}
[application run];
diff --git a/WebCore/src/kwq/KWQChar.mm b/WebCore/src/kwq/KWQChar.mm
index 7108eea..8889072 100644
--- a/WebCore/src/kwq/KWQChar.mm
+++ b/WebCore/src/kwq/KWQChar.mm
@@ -25,6 +25,7 @@
// FIXME: obviously many functions here can be made inline
+#include <kwqdebug.h>
#include <Foundation/Foundation.h>
#include <qstring.h>
@@ -205,8 +206,7 @@ QChar::Direction QChar::direction() const
bool QChar::mirrored() const
{
// FIXME: unimplemented because we don't do BIDI yet
- NSLog(@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__,
- __LINE__);
+ _logNotYetImplemented();
// return whether character should be reversed if text direction is
// reversed
return FALSE;
@@ -215,8 +215,7 @@ bool QChar::mirrored() const
QChar QChar::mirroredChar() const
{
// FIXME: unimplemented because we don't do BIDI yet
- NSLog(@"WARNING %s:%s:%d (NOT YET IMPLEMENTED)\n", __FILE__, __FUNCTION__,
- __LINE__);
+ _logNotYetImplemented();
// return mirrored character if it is mirrored else return itself
return *this;
}
diff --git a/WebCore/src/kwq/KWQFontMetrics.mm b/WebCore/src/kwq/KWQFontMetrics.mm
index 6e00264..d500c65 100644
--- a/WebCore/src/kwq/KWQFontMetrics.mm
+++ b/WebCore/src/kwq/KWQFontMetrics.mm
@@ -276,10 +276,10 @@ QSize QFontMetrics::size(int, const QString &qstring, int len, int tabstops,
int *tabarray, char **intern ) const
{
if (tabstops != 0){
- NSLog (@"ERROR: QFontMetrics::size() tabs not supported.\n");
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QFontMetrics::size() tabs not supported.\n");
}
- NSLog (@"string = %@\n", QSTRING_TO_NSSTRING(qstring));
+ KWQDEBUG1("string = %s\n", DEBUG_OBJECT(QSTRING_TO_NSSTRING(qstring)));
NSString *string;
if (len != -1)
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index 63d3f54..e1c9c5c 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -55,7 +55,7 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
{
DOM::Node cur_child = node.lastChild();
- NSLog(@"cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
+ KWQDEBUG2("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
while(!cur_child.isNull())
{
diff --git a/WebCore/src/kwq/KWQKloader.mm b/WebCore/src/kwq/KWQKloader.mm
index 1078ae9..f20bee3 100644
--- a/WebCore/src/kwq/KWQKloader.mm
+++ b/WebCore/src/kwq/KWQKloader.mm
@@ -26,6 +26,7 @@
#undef CACHE_DEBUG
//#define CACHE_DEBUG
+#include <kwqdebug.h>
#include <loader.h>
// up to which size is a picture for sure cacheable
@@ -920,10 +921,10 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
{
NSString *notificationName = [notification name];
if ([notificationName rangeOfString: @"uri"].location != 0){
- NSLog (@"cacheDataAvailable: Received invalid notication, %@", notificationName);
+ KWQDEBUG1("cacheDataAvailable: Received invalid notication, %s\n", DEBUG_OBJECT(notificationName));
}
else {
- NSLog (@"cacheDataAvailable: Received notication, %@", notificationName);
+ KWQDEBUG1("cacheDataAvailable: Received notication, %s\n", DEBUG_OBJECT(notificationName));
id <WCURICacheData> data = [notification object];
KIO::Job *job = static_cast<KIO::Job *>([data userData]);
m_loader->slotData(job, (const char *)[data cacheData], [data cacheDataSize]);
@@ -934,10 +935,10 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
{
NSString *notificationName = [notification name];
if ([notificationName rangeOfString: @"uri"].location != 0){
- NSLog (@"cacheFinished: Received invalid notication, %@", notificationName);
+ KWQDEBUG1 ("cacheFinished: Received invalid notication, %s\n", DEBUG_OBJECT(notificationName));
}
else {
- NSLog (@"cacheFinished: Received notication, %@", notificationName);
+ KWQDEBUG1 ("cacheFinished: Received notication, %s\n", DEBUG_OBJECT(notificationName));
// FIXME: need an implementation for this
id <WCURICacheData> data = [notification object];
KIO::Job *job = static_cast<KIO::Job *>([data userData]);
diff --git a/WebCore/src/kwq/KWQPainter.mm b/WebCore/src/kwq/KWQPainter.mm
index fa5b8fd..0ce8086 100644
--- a/WebCore/src/kwq/KWQPainter.mm
+++ b/WebCore/src/kwq/KWQPainter.mm
@@ -196,7 +196,7 @@ void QPainter::restore()
{
QPStateStack *pss = (QPStateStack *)data->ps_stack;
if ( pss == 0 || pss->isEmpty() ) {
- NSLog (@"ERROR void QPainter::restore() stack is empty\n");
+ KWQDEBUG("ERROR void QPainter::restore() stack is empty\n");
return;
}
QPState *ps = pss->pop();
@@ -299,7 +299,7 @@ void QPainter::drawArc (int x, int y, int w, int h, int a, int alen)
float fa, falen;
if (w != h){
- NSLog (@"ERROR (INCOMPLETE IMPLEMENTATION) void QPainter::drawArc (int x, int y, int w, int h, int a, int alen)\nOnly supports drawing arcs on a circle.\n");
+ KWQDEBUG("ERROR (INCOMPLETE IMPLEMENTATION) void QPainter::drawArc (int x, int y, int w, int h, int a, int alen)\nOnly supports drawing arcs on a circle.\n");
}
path = [[[NSBezierPath alloc] init] autorelease];
@@ -592,19 +592,19 @@ void QPainter::setRasterOp(RasterOp op)
else
data->compositingOperation = NSCompositeCopy;
#else
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented()
#endif
}
void QPainter::translate(double dx, double dy)
{
- NSLog (@"ERROR %s:%d %s (NOT IMPLEMENTED) (%d, %d)\n", __FILE__, __LINE__, __FUNCTION__, (int)dx, (int) dy);
+ _logNotYetImplemented()
}
void QPainter::scale(double dx, double dy)
{
- NSLog (@"ERROR %s:%d %s (NOT IMPLEMENTED) (%d, %d)\n", __FILE__, __LINE__, __FUNCTION__, (int)dx, (int) dy);
+ _logNotYetImplemented()
}
diff --git a/WebCore/src/kwq/KWQPixmap.mm b/WebCore/src/kwq/KWQPixmap.mm
index f89683f..9e4d75e 100644
--- a/WebCore/src/kwq/KWQPixmap.mm
+++ b/WebCore/src/kwq/KWQPixmap.mm
@@ -67,9 +67,9 @@ QPixmap::QPixmap(const QByteArray&bytes)
NSData *nsdata = [[[NSData alloc] initWithBytes: bytes.data() length: bytes.size() copy:NO freeWhenDone:NO bytesAreVM:NO] autorelease];
nsimage = [[NSImage alloc] initWithData: nsdata];
if (nsimage == nil){
- NSLog (@"unable to create image");
+ KWQDEBUG("unable to create image\n");
} else {
- NSLog (@"image created");
+ KWQDEBUG("image created\n");
}
[nsimage setFlipped: YES];
[nsimage setScalesWhenResized: YES];
@@ -177,7 +177,7 @@ QPixmap QPixmap::xForm(const QWMatrix &xmatrix) const
QImage QPixmap::convertToImage() const
{
- NSLog (@"ERROR %s:%s:%d (NOT IMPLEMENTED)\n", __FILE__, __FUNCTION__, __LINE__);
+ _logNotYetImplemented();
}
diff --git a/WebCore/src/kwq/KWQString.mm b/WebCore/src/kwq/KWQString.mm
index ba27c52..3b2af80 100644
--- a/WebCore/src/kwq/KWQString.mm
+++ b/WebCore/src/kwq/KWQString.mm
@@ -292,9 +292,8 @@ const QChar *QString::unicode() const
if (len) {
ucs = const_cast<UniChar *>(CFStringGetCharactersPtr(s));
if (!ucs) {
-#ifdef _KWQ_DEBUG_
- NSLog(@"WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n",
- __FILE__, __FUNCTION__, __LINE__);
+#if _KWQ_DEBUG_
+ KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
#endif
if (cacheType != CacheUnicode) {
flushCache();
@@ -321,9 +320,8 @@ const char *QString::latin1() const
chs = const_cast<char *>(CFStringGetCStringPtr(s,
kCFStringEncodingISOLatin1));
if (!chs) {
-#ifdef _KWQ_DEBUG_
- NSLog(@"WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n",
- __FILE__, __FUNCTION__, __LINE__);
+#if _KWQ_DEBUG_
+ KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
#endif
if (cacheType != CacheLatin1) {
flushCache();
@@ -331,9 +329,8 @@ const char *QString::latin1() const
if (cache) {
if (!CFStringGetCString(s, cache, len + 1,
kCFStringEncodingISOLatin1)) {
-#ifdef _KWQ_DEBUG_
- NSLog(@"WARNING %s:%s:%d (CFStringGetCString failed)\n",
- __FILE__, __FUNCTION__, __LINE__);
+#if _KWQ_DEBUG_
+ KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCString failed)\n", __FUNCTION__, __FILE__, __LINE__);
#endif
*reinterpret_cast<char *>(cache) = '\0';
}
diff --git a/WebCore/src/kwq/KWQView.mm b/WebCore/src/kwq/KWQView.mm
index cdd1f32..0758745 100644
--- a/WebCore/src/kwq/KWQView.mm
+++ b/WebCore/src/kwq/KWQView.mm
@@ -110,7 +110,7 @@
- delayLayout: sender
{
[NSObject cancelPreviousPerformRequestsWithTarget: self selector: @selector(delayLayout:) object: self];
- NSLog (@"KWQHTMLView: delayLayout called");
+ KWQDEBUG("KWQHTMLView: delayLayout called\n");
[self setNeedsLayout: YES];
[self setNeedsDisplay: YES];
}
@@ -118,7 +118,7 @@
-(void)notificationReceived:(NSNotification *)notification
{
if ([[notification name] rangeOfString: @"uri-fin-"].location == 0){
- NSLog (@"KWQHTMLView: Received notification, %@", [notification name]);
+ KWQDEBUG1("KWQHTMLView: Received notification, %s\n", DEBUG_OBJECT([notification name]));
[self performSelector:@selector(delayLayout:) withObject:self afterDelay:(NSTimeInterval)0.5];
}
}
@@ -186,7 +186,7 @@
count = [views count];
while (count--){
- NSLog (@"Removing 0x%08x %@", [views objectAtIndex: 0], [[[views objectAtIndex: 0] class] className]);
+ KWQDEBUG2("Removing %p %s\n", [views objectAtIndex: 0], DEBUG_OBJECT([[[views objectAtIndex: 0] class] className]));
[[views objectAtIndex: 0] removeFromSuperviewWithoutNeedingDisplay];
}
[self setFrameSize: NSMakeSize (0,0)];
diff --git a/WebCore/src/kwq/KWQWMatrix.mm b/WebCore/src/kwq/KWQWMatrix.mm
index e448b20..95713fc 100644
--- a/WebCore/src/kwq/KWQWMatrix.mm
+++ b/WebCore/src/kwq/KWQWMatrix.mm
@@ -23,6 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <kwqdebug.h>
#include <qpainter.h>
@@ -37,7 +38,7 @@ QWMatrix::QWMatrix()
QWMatrix &QWMatrix::scale(double _sx, double _sy)
{
if (empty != TRUE){
- NSLog (@"ERROR (INCOMPLETE IMPLEMENTATION) QWMatrix &QWMatrix::scale(double _sx, double _sy) scale may only be called once.\n");
+ KWQDEBUG("ERROR (INCOMPLETE IMPLEMENTATION) QWMatrix &QWMatrix::scale(double _sx, double _sy) scale may only be called once.\n");
}
empty = FALSE;
sx = _sx;
diff --git a/WebCore/src/kwq/kwqdebug.h b/WebCore/src/kwq/kwqdebug.h
index ce3a00a..9d9ae5e 100644
--- a/WebCore/src/kwq/kwqdebug.h
+++ b/WebCore/src/kwq/kwqdebug.h
@@ -34,6 +34,10 @@
#undef Rect
#undef Boolean
+/*-----------------------------------------------------------------------------
+ * Logging macros
+ */
+
#define KWQ_LOG_NEVER_IMPLEMENTED 0x1
#define KWQ_LOG_PARTIALLY_IMPLEMENTED 0x2
#define KWQ_LOG_NOT_YET_IMPLEMENTED 0x4
@@ -99,6 +103,33 @@ void KWQLogAtLevel(unsigned int level, NSString *format, ...);
#define DEBUG_OBJECT(object) [[object description] cString]
+/*-----------------------------------------------------------------------------
+ * Assertion macros
+ */
+
+#define KWQ_ASSERT(expr) \
+ do { \
+ if (!(expr)) { \
+ NSString *reason = [NSString stringWithFormat:@"assertion failed: '%s'", #expr]; \
+ [[NSException exceptionWithName:NSGenericException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
+
+#define KWQ_ASSERT_VALID_ARG(arg,expr) \
+ do { \
+ if (!(expr)) { \
+ NSString *reason = [NSString stringWithFormat:@"'%s' fails check: '%s'", #arg, #expr]; \
+ [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
+
+#define WEBKIT_ASSERT_NOT_NIL(arg) \
+ do { \
+ if ((arg) == nil) { \
+ NSString *reason = [NSString stringWithFormat:@"'%s' is nil", #arg]; \
+ [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
#endif KWQDEBUG_H_
diff --git a/WebKit/Misc.subproj/WebKitDebug.h b/WebKit/Misc.subproj/WebKitDebug.h
new file mode 100644
index 0000000..66301fc
--- /dev/null
+++ b/WebKit/Misc.subproj/WebKitDebug.h
@@ -0,0 +1,102 @@
+/* WebKitDebug.h
+ Copyright 2001, Apple, Inc. All rights reserved.
+*/
+
+#import <Foundation/Foundation.h>
+
+/*-----------------------------------------------------------------------------
+ * Logging macros
+ */
+
+#define WEBKIT_LOG_NEVER_IMPLEMENTED 0x1
+#define WEBKIT_LOG_PARTIALLY_IMPLEMENTED 0x2
+#define WEBKIT_LOG_NOT_YET_IMPLEMENTED 0x4
+#define WEBKIT_LOG_DEBUG 0x8
+#define WEBKIT_LOG_ERROR 0x10
+
+#define WEBKIT_LOG_NONE 0
+#define WEBKIT_LOG_ALL 0xffffffff
+
+void WebKitSetLogLevel(int mask);
+unsigned int WebKitGetLogLevel();
+void WebKitDebug(const char *format, ...);
+void WebKitDebugAtLevel(unsigned int level, const char *format, ...);
+void WebKitLog(NSString *format, ...);
+void WebKitLogAtLevel(unsigned int level, NSString *format, ...);
+
+
+#define _logNeverImplemented() \
+ WEBKITDEBUGLEVEL(WEBKIT_LOG_NEVER_IMPLEMENTED, "ERROR (NOT IMPLEMENTED)\n")
+
+#define _logPartiallyImplemented() \
+ WEBKITDEBUGLEVEL(WEBKIT_LOG_PARTIALLY_IMPLEMENTED, "WARNING (PARTIALLY IMPLEMENTED)\n")
+
+#define _logNotYetImplemented() \
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_NOT_YET_IMPLEMENTED, "WARNING (NOT YET IMPLEMENTED)\n")
+
+
+#define WEBKITDEBUG(format) WEBKITDEBUGLEVEL(WEBKIT_LOG_DEBUG,format)
+#define WEBKITDEBUG1(format,arg1) WEBKITDEBUGLEVEL1(WEBKIT_LOG_DEBUG,format,arg1)
+#define WEBKITDEBUG2(format,arg1,arg2) WEBKITDEBUGLEVEL2(WEBKIT_LOG_DEBUG,format,arg1,arg2)
+#define WEBKITDEBUG3(format,arg1,arg2,arg3) WEBKITDEBUGLEVEL3(WEBKIT_LOG_DEBUG,format,arg1,arg2,arg3)
+#define WEBKITDEBUG4(format,arg1,arg2,arg3,arg4) WEBKITDEBUGLEVEL4(WEBKIT_LOG_DEBUG,format,arg1,arg2,arg3,arg4)
+#define WEBKITDEBUG5(format,arg1,arg2,arg3,arg4,arg5) WEBKITDEBUGLEVEL5(WEBKIT_LOG_DEBUG,format,arg1,arg2,arg3,arg4,arg5)
+#define WEBKITDEBUG6(format,arg1,arg2,arg3,arg4,arg5,arg6) WEBKITDEBUGLEVEL6(WEBKIT_LOG_DEBUG,format,arg1,arg2,arg3,arg4,arg5,arg6)
+
+#define WEBKITDEBUGLEVEL(level,format) \
+ WebKitDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__, format);\
+ WebKitDebugAtLevel (level,format);
+
+#define WEBKITDEBUGLEVEL1(level,format,arg1) \
+ WebKitDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
+ WebKitDebugAtLevel (level,format,arg1);
+
+#define WEBKITDEBUGLEVEL2(level,format,arg1,arg2) \
+ WebKitDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
+ WebKitDebugAtLevel (level,format,arg1,arg2);
+
+#define WEBKITDEBUGLEVEL3(level,format,arg1,arg2,arg3) \
+ WebKitDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
+ WebKitDebugAtLevel (level,format,arg1,arg2,arg3);
+
+#define WEBKITDEBUGLEVEL4(level,format,arg1,arg2,arg3,arg4) \
+ WebKitDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
+ WebKitDebugAtLevel (level,format,arg1,arg2,arg3,arg4);
+
+#define WEBKITDEBUGLEVEL5(level,format,arg1,arg2,arg3,arg4,arg5) \
+ WebKitDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
+ WebKitDebugAtLevel (level,format,arg1,arg2,arg3,arg4,arg5);
+
+#define WEBKITDEBUGLEVEL6(level,format,arg1,arg2,arg3,arg4,arg5,arg6) \
+ WebKitDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
+ WebKitDebugAtLevel (level,format,arg1,arg2,arg3,arg4,arg5,arg6);
+
+#define DEBUG_OBJECT(object) [[object description] cString]
+
+/*-----------------------------------------------------------------------------
+ * Assertion macros
+ */
+
+#define WEBKIT_ASSERT(expr) \
+ do { \
+ if (!(expr)) { \
+ NSString *reason = [NSString stringWithFormat:@"assertion failed: '%s'", #expr]; \
+ [[NSException exceptionWithName:NSGenericException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
+
+#define WEBKIT_ASSERT_VALID_ARG(arg,expr) \
+ do { \
+ if (!(expr)) { \
+ NSString *reason = [NSString stringWithFormat:@"'%s' fails check: '%s'", #arg, #expr]; \
+ [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
+
+#define WEBKIT_ASSERT_NOT_NIL(arg) \
+ do { \
+ if ((arg) == nil) { \
+ NSString *reason = [NSString stringWithFormat:@"'%s' is nil", #arg]; \
+ [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
+ } \
+ } while (0)
diff --git a/WebKit/Misc.subproj/WebKitDebug.m b/WebKit/Misc.subproj/WebKitDebug.m
new file mode 100644
index 0000000..f70ecdb
--- /dev/null
+++ b/WebKit/Misc.subproj/WebKitDebug.m
@@ -0,0 +1,68 @@
+/* WebKitDebug.m
+ Copyright 2001, Apple, Inc. All rights reserved.
+*/
+
+#import "WebKitDebug.h"
+
+unsigned int WEBKIT_LOG_LEVEL = WEBKIT_LOG_ALL;
+
+
+void WebKitSetLogLevel(int mask) {
+ WEBKIT_LOG_LEVEL = mask;
+}
+
+bool checkedDefault = 0;
+
+unsigned int WebKitGetLogLevel(){
+ if (!checkedDefault){
+ NSString *logLevelString = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitLogLevel"];
+ if (logLevelString != nil){
+ if (![[NSScanner scannerWithString: logLevelString] scanHexInt: &WEBKIT_LOG_LEVEL]){
+ NSLog (@"Unable to scan hex value for WebKitLogLevel, default to value of %d", WEBKIT_LOG_LEVEL);
+ }
+ }
+ checkedDefault = 1;
+ }
+ return WEBKIT_LOG_LEVEL;
+}
+
+
+void WebKitLog(NSString *format, ...) {
+ if (WebKitGetLogLevel() & WEBKIT_LOG_ERROR){
+ va_list args;
+ va_start(args, format);
+ NSLogv(format, args);
+ va_end(args);
+ }
+}
+
+
+void WebKitLogAtLevel(unsigned int level, NSString *format, ...) {
+ if (WebKitGetLogLevel() & level){
+ va_list args;
+ va_start(args, format);
+ NSLogv(format, args);
+ va_end(args);
+ }
+}
+
+
+void WebKitDebug(const char *format, ...) {
+ if (WebKitGetLogLevel() & WEBKIT_LOG_DEBUG){
+ va_list args;
+ va_start(args, format);
+ vfprintf(stderr, format, args);
+ va_end(args);
+ }
+}
+
+
+void WebKitDebugAtLevel(unsigned int level, const char *format, ...) {
+ if (WebKitGetLogLevel() & level){
+ va_list args;
+ va_start(args, format);
+ vfprintf(stderr, format, args);
+ va_end(args);
+ }
+}
+
diff --git a/WebKit/Misc.subproj/WebKitReallyPrivate.h b/WebKit/Misc.subproj/WebKitReallyPrivate.h
index c4f95ae..b71e315 100644
--- a/WebKit/Misc.subproj/WebKitReallyPrivate.h
+++ b/WebKit/Misc.subproj/WebKitReallyPrivate.h
@@ -3,19 +3,5 @@
*/
#import "_NSMonitor.h"
+#import "WebKitDebug.h"
-#define WEBKIT_ASSERT_VALID_ARG(arg,expr) \
- do { \
- if (!(expr)) { \
- NSString *reason = [NSString stringWithFormat:@"'%s' fails check: '%s'", #arg, #expr]; \
- [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
- } \
- } while (0)
-
-#define WEBKIT_ASSERT_NOT_NIL(arg) \
- do { \
- if ((arg) == nil) { \
- NSString *reason = [NSString stringWithFormat:@"'%s' is nil", #arg]; \
- [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo: nil] raise]; \
- } \
- } while (0)
diff --git a/WebKit/WebKit.pbproj/kocienda.pbxuser b/WebKit/WebKit.pbproj/kocienda.pbxuser
index 13a9803..04d2752 100644
--- a/WebKit/WebKit.pbproj/kocienda.pbxuser
+++ b/WebKit/WebKit.pbproj/kocienda.pbxuser
@@ -12,13 +12,12 @@
PBXWorkspaceConfiguration = {
ContentSize = "{1207, 1028}";
LeftSlideOut = {
- ActiveTab = 0;
+ ActiveTab = 3;
Frame = "{{0, 23}, {1207, 1005}}";
Split0 = {
- ActiveTab = 2;
- Frame = "{{313, 0}, {894, 1005}}";
+ Frame = "{{224, 0}, {983, 1005}}";
Split0 = {
- Frame = "{{0, 663}, {894, 342}}";
+ Frame = "{{0, 24}, {983, 981}}";
};
SplitCount = 1;
Tab0 = {
@@ -54,9 +53,9 @@
};
};
Tab2 = {
- BuildMessageFrame = "{{0, 0}, {896, 213}}";
- BuildTranscriptFrame = "{{0, 222}, {896, 418}}";
- Frame = "{{0, 0}, {894, 638}}";
+ BuildMessageFrame = "{{0, 0}, {985, 213}}";
+ BuildTranscriptFrame = "{{0, 222}, {985, 418}}";
+ Frame = "{{0, 0}, {983, 638}}";
};
Tab3 = {
Frame = "{{0, 0}, {891, 295}}";
@@ -99,6 +98,11 @@
0867D69CFE84028FC02AAC07 = {
activeExec = 0;
};
+ 25A5593201A5996D0ECA149E = {
+ uiCtxt = {
+ sepNavWindowFrame = "{{38, 650}, {750, 502}}";
+ };
+ };
25C29825016E29620ECA149E = {
uiCtxt = {
sepNavWindowFrame = "{{38, 650}, {750, 502}}";
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 143a9d0..45893d9 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -124,7 +124,6 @@
INSTALL_PATH = "$(HOME)/Library/Frameworks";
LIBRARY_SEARCH_PATHS = "";
OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
PRODUCT_NAME = WebKit;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
@@ -179,6 +178,7 @@
9C93A48601920D0C0ECA16EA,
9C93A48A01920D3D0ECA16EA,
251E877A01A1EE570ECA149E,
+ 25A5593301A5996D0ECA149E,
);
isa = PBXHeadersBuildPhase;
name = Headers;
@@ -203,6 +203,7 @@
9C93A48701920D0C0ECA16EA,
9C93A48B01920D3D0ECA16EA,
251E877B01A1EE570ECA149E,
+ 25A5593401A5996D0ECA149E,
);
isa = PBXSourcesBuildPhase;
name = Sources;
@@ -342,6 +343,8 @@
25C29825016E29620ECA149E,
2568C729017490CF0ECA149E,
2568C72B017491070ECA149E,
+ 25A5593101A5996D0ECA149E,
+ 25A5593201A5996D0ECA149E,
);
isa = PBXGroup;
name = Misc;
@@ -434,6 +437,30 @@
);
};
};
+ 25A5593101A5996D0ECA149E = {
+ isa = PBXFileReference;
+ name = WebKitDebug.h;
+ path = Misc.subproj/WebKitDebug.h;
+ refType = 4;
+ };
+ 25A5593201A5996D0ECA149E = {
+ isa = PBXFileReference;
+ name = WebKitDebug.m;
+ path = Misc.subproj/WebKitDebug.m;
+ refType = 4;
+ };
+ 25A5593301A5996D0ECA149E = {
+ fileRef = 25A5593101A5996D0ECA149E;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 25A5593401A5996D0ECA149E = {
+ fileRef = 25A5593201A5996D0ECA149E;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
25BECC93017E0A0D0ECA149E = {
isa = PBXFileReference;
path = NSURICache.h;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list