[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 06:01:45 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit cf7fbbc0153e39066f5f137821982af7e0e0e5f3
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Apr 3 21:05:53 2002 +0000
2002-04-03 Kenneth Kocienda <kocienda at apple.com>
WebBrowser:
Updated debugging log messages to use new varargs macros.
* ActivityViewer.m: (-[ActivityViewer showActivity:]):
* AppController.m: (-[AppController _computeHistoryFilePath]), (-[AppController
updateHistoryInMenu]):
* BrowserDocument.m: (-[BrowserDocument _saveScrollPosition]), (-[BrowserDocument
_restoreScrollPosition]), (-[BrowserDocument locationChangeStartedForFrame:]),
(-[BrowserDocument locationChangeCommittedForFrame:]), (-[BrowserDocument
locationChangeDone:forFrame:]):
* Debug/DebugUtilities.m: (+[DebugUtilities loadDebugBookmarks:]):
* LoadProgressEntry.m: (-[LoadProgressEntry status]):
* WebBrowser.pbproj/project.pbxproj:
WebCore:
Updated debugging log messages to use new varargs macros.
* src/kwq/KWQApplication.mm: (QApplication::sendEvent),
(QApplication::_initialize):
* src/kwq/KWQColor.mm: (QColor::setNamedColor):
* src/kwq/KWQComboBox.mm: (QComboBox::setCurrentItem):
* src/kwq/KWQFont.mm: (QFont::getFont):
* src/kwq/KWQFontMetrics.mm: (-[KWQLayoutInfo _initializeCaches]),
(_rectForString):
* src/kwq/KWQKHTMLPart.mm: (recursive), (KHTMLPart::write), (KHTMLPart::end),
(KHTMLPart::nodeActivated):
* src/kwq/KWQKloader.mm: (-[URLLoadClient IFURLHandleResourceDidBeginLoading:]),
(-[URLLoadClient IFURLHandleResourceDidCancelLoading:]), (-[URLLoadClient
IFURLHandleResourceDidFinishLoading:data:]), (-[URLLoadClient
IFURLHandle:resourceDataDidBecomeAvailable:]), (-[URLLoadClient
IFURLHandle:resourceDidFailLoadingWithResult:]), (-[URLLoadClient
IFURLHandle:didRedirectToURL:]), (Loader::servePendingRequests):
* src/kwq/KWQObject.mm: (QObject::connect), (QObject::performAction):
* src/kwq/KWQScrollView.mm: (QScrollView::addChild),
(QScrollView::resizeContents), (QScrollView::updateContents),
(QScrollView::repaintContents):
* src/kwq/KWQString.mm: (QString::unicode), (QString::latin1):
* src/kwq/KWQView.mm: (-[KWQHTMLView notificationReceived:]), (-[KWQHTMLView
layout]), (-[KWQHTMLView drawRect:]), (-[KWQHTMLView resetView]), (-[KWQHTMLView
mouseDragged:]):
* src/kwq/KWQWidget.mm: (QWidget::resize), (QWidget::move):
* src/kwq/WCPlugin.mm: (-[WCPlugin initializeWithPath:]), (-[WCPlugin load]):
* src/kwq/WCPluginDatabase.mm: (findPlugins):
* src/kwq/kwqdebug.h:
* src/kwq/kwqdebug.mm: (timestamp), (KWQLog):
WebFoundation:
Updated debugging log messages to use new varargs macros.
* WebFoundation.pbproj/project.pbxproj:
WebKit:
Updated debugging log messages to use new varargs macros.
* History.subproj/IFWebHistoryPrivate.m: (-[IFWebHistoryPrivate
removeEntryForURLString:]), (-[IFWebHistoryPrivate _loadHistoryGuts:]),
(-[IFWebHistoryPrivate loadHistory]), (-[IFWebHistoryPrivate _saveHistoryGuts:]),
(-[IFWebHistoryPrivate saveHistory]):
* Misc.subproj/WebKitDebug.h:
* Misc.subproj/WebKitDebug.m: (timestamp), (WebKitLog):
* Plugins.subproj/IFPluginView.mm: (-[IFPluginView
initWithFrame:plugin:url:mime:arguments:mode:]), (-[IFPluginView setWindow]),
(-[IFPluginView newStream:mimeType:notifyData:]), (-[IFPluginView
IFURLHandle:resourceDataDidBecomeAvailable:]), (-[IFPluginView
IFURLHandleResourceDidFinishLoading:data:]), (-[IFPluginView
becomeFirstResponder]), (-[IFPluginView resignFirstResponder]), (-[IFPluginView
sendUpdateEvent]), (-[IFPluginView mouseDown:]), (-[IFPluginView mouseUp:]),
(-[IFPluginView mouseEntered:]), (-[IFPluginView mouseExited:]), (-[IFPluginView
keyUp:]), (-[IFPluginView keyDown:]), (-[IFPluginView
getURLNotify:target:notifyData:]), (-[IFPluginView getURL:target:]),
(-[IFPluginView status:]), (-[IFPluginView stop]):
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/IFBaseWebControllerPrivate.mm: (-[IFBaseWebController
_receivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
_mainReceivedProgress:forResource:fromDataSource:]):
* WebView.subproj/IFMainURLHandleClient.mm: (-[IFMainURLHandleClient
IFURLHandleResourceDidBeginLoading:]), (-[IFMainURLHandleClient
IFURLHandleResourceDidCancelLoading:]), (-[IFMainURLHandleClient
IFURLHandleResourceDidFinishLoading:data:]), (-[IFMainURLHandleClient
IFURLHandle:resourceDataDidBecomeAvailable:]), (-[IFMainURLHandleClient
IFURLHandle:resourceDidFailLoadingWithResult:]), (-[IFMainURLHandleClient
IFURLHandle:didRedirectToURL:]):
* WebView.subproj/IFWebDataSource.mm: (-[IFWebDataSource isLoading]):
* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _stopLoading]):
* WebView.subproj/IFWebFramePrivate.mm: (-[IFWebFrame
_transitionProvisionalToLayoutAcceptable]), (-[IFWebFrame _timedLayout:]),
(-[IFWebFrame _setState:]), (-[IFWebFrame _isLoadComplete]):
* WebView.subproj/IFWebView.mm: (-[IFWebView reapplyStyles]), (-[IFWebView
layout]), (-[IFWebView setNeedsDisplay:]), (-[IFWebView setNeedsLayout:]),
(-[IFWebView setNeedsToApplyStyles:]), (-[IFWebView drawRect:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 7882397..40cc354 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,36 @@
+2002-04-03 Kenneth Kocienda <kocienda at apple.com>
+
+ Updated debugging log messages to use new varargs macros.
+
+ * src/kwq/KWQApplication.mm: (QApplication::sendEvent),
+ (QApplication::_initialize):
+ * src/kwq/KWQColor.mm: (QColor::setNamedColor):
+ * src/kwq/KWQComboBox.mm: (QComboBox::setCurrentItem):
+ * src/kwq/KWQFont.mm: (QFont::getFont):
+ * src/kwq/KWQFontMetrics.mm: (-[KWQLayoutInfo _initializeCaches]),
+ (_rectForString):
+ * src/kwq/KWQKHTMLPart.mm: (recursive), (KHTMLPart::write), (KHTMLPart::end),
+ (KHTMLPart::nodeActivated):
+ * src/kwq/KWQKloader.mm: (-[URLLoadClient IFURLHandleResourceDidBeginLoading:]),
+ (-[URLLoadClient IFURLHandleResourceDidCancelLoading:]), (-[URLLoadClient
+ IFURLHandleResourceDidFinishLoading:data:]), (-[URLLoadClient
+ IFURLHandle:resourceDataDidBecomeAvailable:]), (-[URLLoadClient
+ IFURLHandle:resourceDidFailLoadingWithResult:]), (-[URLLoadClient
+ IFURLHandle:didRedirectToURL:]), (Loader::servePendingRequests):
+ * src/kwq/KWQObject.mm: (QObject::connect), (QObject::performAction):
+ * src/kwq/KWQScrollView.mm: (QScrollView::addChild),
+ (QScrollView::resizeContents), (QScrollView::updateContents),
+ (QScrollView::repaintContents):
+ * src/kwq/KWQString.mm: (QString::unicode), (QString::latin1):
+ * src/kwq/KWQView.mm: (-[KWQHTMLView notificationReceived:]), (-[KWQHTMLView
+ layout]), (-[KWQHTMLView drawRect:]), (-[KWQHTMLView resetView]), (-[KWQHTMLView
+ mouseDragged:]):
+ * src/kwq/KWQWidget.mm: (QWidget::resize), (QWidget::move):
+ * src/kwq/WCPlugin.mm: (-[WCPlugin initializeWithPath:]), (-[WCPlugin load]):
+ * src/kwq/WCPluginDatabase.mm: (findPlugins):
+ * src/kwq/kwqdebug.h:
+ * src/kwq/kwqdebug.mm: (timestamp), (KWQLog):
+
2002-04-03 Darin Adler <darin at apple.com>
Fix problems that show up only when xNDEBUG is set.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 7882397..40cc354 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,36 @@
+2002-04-03 Kenneth Kocienda <kocienda at apple.com>
+
+ Updated debugging log messages to use new varargs macros.
+
+ * src/kwq/KWQApplication.mm: (QApplication::sendEvent),
+ (QApplication::_initialize):
+ * src/kwq/KWQColor.mm: (QColor::setNamedColor):
+ * src/kwq/KWQComboBox.mm: (QComboBox::setCurrentItem):
+ * src/kwq/KWQFont.mm: (QFont::getFont):
+ * src/kwq/KWQFontMetrics.mm: (-[KWQLayoutInfo _initializeCaches]),
+ (_rectForString):
+ * src/kwq/KWQKHTMLPart.mm: (recursive), (KHTMLPart::write), (KHTMLPart::end),
+ (KHTMLPart::nodeActivated):
+ * src/kwq/KWQKloader.mm: (-[URLLoadClient IFURLHandleResourceDidBeginLoading:]),
+ (-[URLLoadClient IFURLHandleResourceDidCancelLoading:]), (-[URLLoadClient
+ IFURLHandleResourceDidFinishLoading:data:]), (-[URLLoadClient
+ IFURLHandle:resourceDataDidBecomeAvailable:]), (-[URLLoadClient
+ IFURLHandle:resourceDidFailLoadingWithResult:]), (-[URLLoadClient
+ IFURLHandle:didRedirectToURL:]), (Loader::servePendingRequests):
+ * src/kwq/KWQObject.mm: (QObject::connect), (QObject::performAction):
+ * src/kwq/KWQScrollView.mm: (QScrollView::addChild),
+ (QScrollView::resizeContents), (QScrollView::updateContents),
+ (QScrollView::repaintContents):
+ * src/kwq/KWQString.mm: (QString::unicode), (QString::latin1):
+ * src/kwq/KWQView.mm: (-[KWQHTMLView notificationReceived:]), (-[KWQHTMLView
+ layout]), (-[KWQHTMLView drawRect:]), (-[KWQHTMLView resetView]), (-[KWQHTMLView
+ mouseDragged:]):
+ * src/kwq/KWQWidget.mm: (QWidget::resize), (QWidget::move):
+ * src/kwq/WCPlugin.mm: (-[WCPlugin initializeWithPath:]), (-[WCPlugin load]):
+ * src/kwq/WCPluginDatabase.mm: (findPlugins):
+ * src/kwq/kwqdebug.h:
+ * src/kwq/kwqdebug.mm: (timestamp), (KWQLog):
+
2002-04-03 Darin Adler <darin at apple.com>
Fix problems that show up only when xNDEBUG is set.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7882397..40cc354 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,36 @@
+2002-04-03 Kenneth Kocienda <kocienda at apple.com>
+
+ Updated debugging log messages to use new varargs macros.
+
+ * src/kwq/KWQApplication.mm: (QApplication::sendEvent),
+ (QApplication::_initialize):
+ * src/kwq/KWQColor.mm: (QColor::setNamedColor):
+ * src/kwq/KWQComboBox.mm: (QComboBox::setCurrentItem):
+ * src/kwq/KWQFont.mm: (QFont::getFont):
+ * src/kwq/KWQFontMetrics.mm: (-[KWQLayoutInfo _initializeCaches]),
+ (_rectForString):
+ * src/kwq/KWQKHTMLPart.mm: (recursive), (KHTMLPart::write), (KHTMLPart::end),
+ (KHTMLPart::nodeActivated):
+ * src/kwq/KWQKloader.mm: (-[URLLoadClient IFURLHandleResourceDidBeginLoading:]),
+ (-[URLLoadClient IFURLHandleResourceDidCancelLoading:]), (-[URLLoadClient
+ IFURLHandleResourceDidFinishLoading:data:]), (-[URLLoadClient
+ IFURLHandle:resourceDataDidBecomeAvailable:]), (-[URLLoadClient
+ IFURLHandle:resourceDidFailLoadingWithResult:]), (-[URLLoadClient
+ IFURLHandle:didRedirectToURL:]), (Loader::servePendingRequests):
+ * src/kwq/KWQObject.mm: (QObject::connect), (QObject::performAction):
+ * src/kwq/KWQScrollView.mm: (QScrollView::addChild),
+ (QScrollView::resizeContents), (QScrollView::updateContents),
+ (QScrollView::repaintContents):
+ * src/kwq/KWQString.mm: (QString::unicode), (QString::latin1):
+ * src/kwq/KWQView.mm: (-[KWQHTMLView notificationReceived:]), (-[KWQHTMLView
+ layout]), (-[KWQHTMLView drawRect:]), (-[KWQHTMLView resetView]), (-[KWQHTMLView
+ mouseDragged:]):
+ * src/kwq/KWQWidget.mm: (QWidget::resize), (QWidget::move):
+ * src/kwq/WCPlugin.mm: (-[WCPlugin initializeWithPath:]), (-[WCPlugin load]):
+ * src/kwq/WCPluginDatabase.mm: (findPlugins):
+ * src/kwq/kwqdebug.h:
+ * src/kwq/kwqdebug.mm: (timestamp), (KWQLog):
+
2002-04-03 Darin Adler <darin at apple.com>
Fix problems that show up only when xNDEBUG is set.
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index db39772..3a7607e 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -91,7 +91,9 @@ void QApplication::restoreOverrideCursor()
bool QApplication::sendEvent(QObject *o, QEvent *e)
{
- KWQDEBUG1 ("received %d\n", e->type());
+ QEvent::Type type = e->type();
+
+ KWQDEBUG ("received %d\n", type);
return FALSE;
}
@@ -127,7 +129,7 @@ void QApplication::_initialize()
if (principalClass) {
application = [principalClass sharedApplication];
if (![NSBundle loadNibNamed: mainNibFile owner: application]) {
- KWQDEBUGLEVEL1(KWQ_LOG_ERROR, "ERROR: QApplication::_initialize() unable to load %s\n", DEBUG_OBJECT(mainNibFile));
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::_initialize() unable to load %s\n", DEBUG_OBJECT(mainNibFile));
}
}
}
diff --git a/WebCore/kwq/KWQColor.mm b/WebCore/kwq/KWQColor.mm
index 52c53aa..8a8b417 100644
--- a/WebCore/kwq/KWQColor.mm
+++ b/WebCore/kwq/KWQColor.mm
@@ -221,7 +221,7 @@ void QColor::setNamedColor(const QString &name)
setRgb(r, g, b);
}
else {
- KWQDEBUG1 ("couldn't create color using name %s\n", name.ascii());
+ KWQDEBUG ("couldn't create color using name %s\n", name.ascii());
setRgb(0, 0, 0);
}
}
diff --git a/WebCore/kwq/KWQComboBox.mm b/WebCore/kwq/KWQComboBox.mm
index 1961019..4fcc8f8 100644
--- a/WebCore/kwq/KWQComboBox.mm
+++ b/WebCore/kwq/KWQComboBox.mm
@@ -134,7 +134,7 @@ void QComboBox::setCurrentItem(int index)
if (num != 0 && index < num)
[comboBox selectItemAtIndex: index];
else
- KWQDEBUG2 ("Error, index = %d, numberOfItems = %d", index, num);
+ KWQDEBUG ("Error, index = %d, numberOfItems = %d", index, num);
}
int QComboBox::currentItem() const
diff --git a/WebCore/kwq/KWQFont.mm b/WebCore/kwq/KWQFont.mm
index 059aac0..69f4624 100644
--- a/WebCore/kwq/KWQFont.mm
+++ b/WebCore/kwq/KWQFont.mm
@@ -189,7 +189,7 @@ NSFont *QFont::getFont()
}
}
if (font == nil) {
- KWQDEBUGLEVEL1(KWQ_LOG_FONTCACHE, "unable to find font for family %s\n", [_family lossyCString]);
+ KWQDEBUGLEVEL(KWQ_LOG_FONTCACHE, "unable to find font for family %s\n", [_family lossyCString]);
loadDefaultFont();
font = [[NSFontManager sharedFontManager] fontWithFamily:defaultFontFamilyName traits:_trait weight:5 size:_size];
}
diff --git a/WebCore/kwq/KWQFontMetrics.mm b/WebCore/kwq/KWQFontMetrics.mm
index b60f095..1185b5d 100644
--- a/WebCore/kwq/KWQFontMetrics.mm
+++ b/WebCore/kwq/KWQFontMetrics.mm
@@ -466,7 +466,7 @@ static void __IFFillStyleWithAttributes(ATSUStyle style, NSFont *theFont) {
short unsigned int sequentialGlyphs[INITIAL_GLYPH_CACHE_MAX];
ATSLayoutRecord *glyphRecords;
- KWQDEBUGLEVEL6 (KWQ_LOG_FONTCACHE, "Caching %s %.0f (%ld glyphs) ascent = %f, descent = %f, defaultLineHeightForFont = %f\n", [[font displayName] cString], [font pointSize], numGlyphsInFont, [font ascender], [font descender], [font defaultLineHeightForFont]);
+ KWQDEBUGLEVEL (KWQ_LOG_FONTCACHE, "Caching %s %.0f (%ld glyphs) ascent = %f, descent = %f, defaultLineHeightForFont = %f\n", [[font displayName] cString], [font pointSize], numGlyphsInFont, [font ascender], [font descender], [font defaultLineHeightForFont]);
// Initially just cache the max of number of glyphs in font or
// INITIAL_GLYPH_CACHE_MAX. Holes in the cache will be filled on demand
@@ -520,7 +520,7 @@ static void __IFFillStyleWithAttributes(ATSUStyle style, NSFont *theFont) {
static int totalCacheSize = 0;
totalCacheSize += widthCacheSize * sizeof(_IFGlyphWidth) + numGlyphs * sizeof(ATSGlyphRef) + sizeof(KWQLayoutInfo);
- KWQDEBUGLEVEL4 (KWQ_LOG_MEMUSAGE, "memory usage in bytes: widths = %ld, latin1 ext. character-to-glyph = %ld, total this cache = %ld, total all caches %d\n", widthCacheSize * sizeof(_IFGlyphWidth), numGlyphs * sizeof(ATSGlyphRef), widthCacheSize * sizeof(_IFGlyphWidth) + numGlyphs * sizeof(ATSGlyphRef) + sizeof(KWQLayoutInfo), totalCacheSize);
+ KWQDEBUGLEVEL (KWQ_LOG_MEMUSAGE, "memory usage in bytes: widths = %ld, latin1 ext. character-to-glyph = %ld, total this cache = %ld, total all caches %d\n", widthCacheSize * sizeof(_IFGlyphWidth), numGlyphs * sizeof(ATSGlyphRef), widthCacheSize * sizeof(_IFGlyphWidth) + numGlyphs * sizeof(ATSGlyphRef) + sizeof(KWQLayoutInfo), totalCacheSize);
#endif
}
@@ -577,8 +577,7 @@ static NSRect _rectForString (KWQLayoutInfo *self, const UniChar *internalBuffer
// If we can't use the cached map, then calculate a map for this string. Expensive.
if (needCharToGlyphLookup){
- KWQDEBUGLEVEL3(KWQ_LOG_FONTCACHECHARMISS, "character-to-glyph cache miss for character 0x%04x in %s, %.0f\n", internalBuffer[i], [[font displayName] lossyCString], [font pointSize]);
-
+ KWQDEBUGLEVEL (KWQ_LOG_FONTCACHECHARMISS, "character-to-glyph cache miss for character 0x%04x in %s, %.0f\n", internalBuffer[i], [[font displayName] lossyCString], [font pointSize])
__IFInitATSGlyphVector(&self->_glyphVector, stringLength);
(void)ATSUConvertCharToGlyphs(self->_styleGroup, internalBuffer, 0, stringLength, 0, &self->_glyphVector);
glyphRecords = self->_glyphVector.firstRecord;
@@ -604,7 +603,7 @@ static NSRect _rectForString (KWQLayoutInfo *self, const UniChar *internalBuffer
blockEnd = blockStart + INCREMENTAL_GLYPH_CACHE_BLOCK;
if (blockEnd > self->widthCacheSize)
blockEnd = self->widthCacheSize;
- KWQDEBUGLEVEL5 (KWQ_LOG_FONTCACHE, "width cache miss for glyph 0x%04x in %s, %.0f, filling block 0x%04x to 0x%04x\n", glyphID, [[font displayName] cString], [font pointSize], blockStart, blockEnd);
+ KWQDEBUGLEVEL (KWQ_LOG_FONTCACHE, "width cache miss for glyph 0x%04x in %s, %.0f, filling block 0x%04x to 0x%04x\n", glyphID, [[font displayName] cString], [font pointSize], blockStart, blockEnd);
for (blockID = blockStart; blockID < blockEnd; blockID++)
sequentialGlyphs[blockID-blockStart] = blockID;
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index e918ae7..1d7bfe1 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -114,7 +114,7 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
{
DOM::Node cur_child = node.lastChild();
- KWQDEBUG2("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
+ KWQDEBUG("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
while(!cur_child.isNull())
{
@@ -610,7 +610,7 @@ void KHTMLPart::write( const char *str, int len )
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
d->totalWriteTime += thisTime;
- KWQDEBUGLEVEL4 (0x200, "%s bytes = %d, seconds = %f, total = %f\n", d->m_url.url().latin1(), len, thisTime, d->totalWriteTime);
+ KWQDEBUGLEVEL (0x200, "%s bytes = %d, seconds = %f, total = %f\n", d->m_url.url().latin1(), len, thisTime, d->totalWriteTime);
#endif
}
@@ -647,7 +647,7 @@ void KHTMLPart::end()
}
#ifndef APPLE_CHANGES
- KWQDEBUG2 ("0x%08x end(): for url %s\n", (unsigned int)this, d->m_url.url().latin1());
+ KWQDEBUG ("0x%08x end(): for url %s\n", (unsigned int)this, d->m_url.url().latin1());
// make sure nothing's left in there...
if(d->m_decoder)
write(d->m_decoder->flush());
@@ -1611,7 +1611,7 @@ void KHTMLPart::emitUnloadEvent()
void KHTMLPart::nodeActivated(const DOM::Node &aNode)
{
- KWQDEBUG2 ("name %s = %s\n", (const char *)aNode.nodeName().string(), (const char *)aNode.nodeValue().string());
+ KWQDEBUG ("name %s = %s\n", (const char *)aNode.nodeName().string(), (const char *)aNode.nodeValue().string());
}
void KHTMLPart::stopAutoScroll()
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index e918ae7..1d7bfe1 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -114,7 +114,7 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
{
DOM::Node cur_child = node.lastChild();
- KWQDEBUG2("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
+ KWQDEBUG("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
while(!cur_child.isNull())
{
@@ -610,7 +610,7 @@ void KHTMLPart::write( const char *str, int len )
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
d->totalWriteTime += thisTime;
- KWQDEBUGLEVEL4 (0x200, "%s bytes = %d, seconds = %f, total = %f\n", d->m_url.url().latin1(), len, thisTime, d->totalWriteTime);
+ KWQDEBUGLEVEL (0x200, "%s bytes = %d, seconds = %f, total = %f\n", d->m_url.url().latin1(), len, thisTime, d->totalWriteTime);
#endif
}
@@ -647,7 +647,7 @@ void KHTMLPart::end()
}
#ifndef APPLE_CHANGES
- KWQDEBUG2 ("0x%08x end(): for url %s\n", (unsigned int)this, d->m_url.url().latin1());
+ KWQDEBUG ("0x%08x end(): for url %s\n", (unsigned int)this, d->m_url.url().latin1());
// make sure nothing's left in there...
if(d->m_decoder)
write(d->m_decoder->flush());
@@ -1611,7 +1611,7 @@ void KHTMLPart::emitUnloadEvent()
void KHTMLPart::nodeActivated(const DOM::Node &aNode)
{
- KWQDEBUG2 ("name %s = %s\n", (const char *)aNode.nodeName().string(), (const char *)aNode.nodeValue().string());
+ KWQDEBUG ("name %s = %s\n", (const char *)aNode.nodeName().string(), (const char *)aNode.nodeValue().string());
}
void KHTMLPart::stopAutoScroll()
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index 69485d6..5ae4052 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -1025,7 +1025,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource,
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource,
static_cast<KIO::TransferJob *>(userData)->url().url().latin1());
}
@@ -1041,7 +1041,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _removeURLHandle: job->handle()];
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource, urlString.latin1());
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource, urlString.latin1());
m_loader->slotFinished(job);
@@ -1067,7 +1067,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _removeURLHandle: job->handle()];
- KWQDEBUGLEVEL4 (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
m_loader->slotFinished(job);
@@ -1090,7 +1090,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
QString urlString = job->url().url();
- KWQDEBUGLEVEL4 (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
m_loader->slotData(job, (const char *)[data bytes], [data length]);
@@ -1111,7 +1111,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
- KWQDEBUGLEVEL3 (KWQ_LOG_LOADING, "dataSource = %p, result = %d, URL = %s\n", m_dataSource, result, job->url().url().latin1());
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p, result = %d, URL = %s\n", m_dataSource, result, job->url().url().latin1());
[m_dataSource _removeURLHandle: job->handle()];
@@ -1131,7 +1131,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
- KWQDEBUGLEVEL1 (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
[m_dataSource _part]->setBaseURL([[url absoluteString] cString]);
[[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
@@ -1219,7 +1219,7 @@ void Loader::servePendingRequests()
KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
#ifdef APPLE_CHANGES
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n",
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n",
req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
//job->begin(d->m_recv, job);
job->begin((URLLoadClient *)req->client, job);
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 69485d6..5ae4052 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -1025,7 +1025,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource,
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource,
static_cast<KIO::TransferJob *>(userData)->url().url().latin1());
}
@@ -1041,7 +1041,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _removeURLHandle: job->handle()];
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource, urlString.latin1());
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource, urlString.latin1());
m_loader->slotFinished(job);
@@ -1067,7 +1067,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _removeURLHandle: job->handle()];
- KWQDEBUGLEVEL4 (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
m_loader->slotFinished(job);
@@ -1090,7 +1090,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
QString urlString = job->url().url();
- KWQDEBUGLEVEL4 (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
m_loader->slotData(job, (const char *)[data bytes], [data length]);
@@ -1111,7 +1111,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
- KWQDEBUGLEVEL3 (KWQ_LOG_LOADING, "dataSource = %p, result = %d, URL = %s\n", m_dataSource, result, job->url().url().latin1());
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p, result = %d, URL = %s\n", m_dataSource, result, job->url().url().latin1());
[m_dataSource _removeURLHandle: job->handle()];
@@ -1131,7 +1131,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
- KWQDEBUGLEVEL1 (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
[m_dataSource _part]->setBaseURL([[url absoluteString] cString]);
[[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
@@ -1219,7 +1219,7 @@ void Loader::servePendingRequests()
KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
#ifdef APPLE_CHANGES
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n",
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n",
req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
//job->begin(d->m_recv, job);
job->begin((URLLoadClient *)req->client, job);
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 69485d6..5ae4052 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -1025,7 +1025,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource,
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource,
static_cast<KIO::TransferJob *>(userData)->url().url().latin1());
}
@@ -1041,7 +1041,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _removeURLHandle: job->handle()];
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource, urlString.latin1());
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource, urlString.latin1());
m_loader->slotFinished(job);
@@ -1067,7 +1067,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _removeURLHandle: job->handle()];
- KWQDEBUGLEVEL4 (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
m_loader->slotFinished(job);
@@ -1090,7 +1090,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
QString urlString = job->url().url();
- KWQDEBUGLEVEL4 (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
m_loader->slotData(job, (const char *)[data bytes], [data length]);
@@ -1111,7 +1111,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
- KWQDEBUGLEVEL3 (KWQ_LOG_LOADING, "dataSource = %p, result = %d, URL = %s\n", m_dataSource, result, job->url().url().latin1());
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p, result = %d, URL = %s\n", m_dataSource, result, job->url().url().latin1());
[m_dataSource _removeURLHandle: job->handle()];
@@ -1131,7 +1131,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
- KWQDEBUGLEVEL1 (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
[m_dataSource _part]->setBaseURL([[url absoluteString] cString]);
[[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
@@ -1219,7 +1219,7 @@ void Loader::servePendingRequests()
KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
#ifdef APPLE_CHANGES
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n",
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n",
req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
//job->begin(d->m_recv, job);
job->begin((URLLoadClient *)req->client, job);
diff --git a/WebCore/kwq/KWQObject.mm b/WebCore/kwq/KWQObject.mm
index f3f3966..a0be3ed 100644
--- a/WebCore/kwq/KWQObject.mm
+++ b/WebCore/kwq/KWQObject.mm
@@ -33,7 +33,7 @@ bool QObject::connect(const QObject *sender, const char *signal, const QObject *
{
if (sender)
((QObject *)sender)->setTarget ((QObject *)dest);
- KWQDEBUG4 ("src = %p, signal = %s, dest = %p, slot = %s\n", sender, signal, dest, slot);
+ KWQDEBUG ("src = %p, signal = %s, dest = %p, slot = %s\n", sender, signal, dest, slot);
return FALSE;
}
@@ -43,7 +43,7 @@ bool QObject::connect(const QObject *sender, const char *signal, const char *slo
{
if (sender)
((QObject *)sender)->setTarget ((QObject *)sender);
- KWQDEBUG3 ("src = %p, signal = %s, slot = %s\n", sender, signal, slot);
+ KWQDEBUG ("src = %p, signal = %s, slot = %s\n", sender, signal, slot);
return FALSE;
}
@@ -57,7 +57,7 @@ void QObject::emitAction(QObject::Actions action)
void QObject::performAction(QObject::Actions action)
{
- KWQDEBUG1 ("action = %d\n", action);
+ KWQDEBUG ("action = %d\n", action);
}
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 2eaf8a6..67cb172 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -157,7 +157,7 @@ void QScrollView::addChild(QWidget* child, int x, int y)
[subView removeFromSuperview];
- KWQDEBUGLEVEL6 (KWQ_LOG_FRAMES, "Adding %p %s at (%d,%d) w %d h %d\n", subView, [[[subView class] className] cString], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "Adding %p %s at (%d,%d) w %d h %d\n", subView, [[[subView class] className] cString], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
[thisView addSubview: subView];
}
@@ -177,12 +177,12 @@ void QScrollView::removeChild(QWidget* child)
void QScrollView::resizeContents(int w, int h)
{
- KWQDEBUGLEVEL4 (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
//if ([nsview isKindOfClass: NSClassFromString(@"IFDynamicScrollBarsView")])
if ([getView() isKindOfClass: NSClassFromString(@"NSScrollView")]){
IFWebView *wview = [(NSScrollView *)getView() documentView];
- KWQDEBUGLEVEL4 (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", wview, [[[wview class] className] cString], w, h);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", wview, [[[wview class] className] cString], w, h);
//w -= (int)[NSScroller scrollerWidth];
//w -= 1;
if (w < 0)
@@ -202,7 +202,7 @@ void QScrollView::resizeContents(int w, int h)
void QScrollView::updateContents(int x, int y, int w, int h)
{
- KWQDEBUGLEVEL6 (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
}
void QScrollView::updateContents(const QRect &rect)
@@ -213,7 +213,7 @@ void QScrollView::updateContents(const QRect &rect)
void QScrollView::repaintContents(int x, int y, int w, int h, bool erase=TRUE)
{
- KWQDEBUGLEVEL6 (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
}
QPoint QScrollView::contentsToViewport(const QPoint &)
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index b59d1cc..a226a7e 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -304,7 +304,7 @@ const QChar *QString::unicode() const
if (cache == NULL || * (int *) cache != CacheUnicode) {
flushCache();
- KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
+ KWQDEBUG("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
cache = CFAllocatorAllocate(kCFAllocatorDefault, sizeof(int) + len * sizeof (UniChar), 0);
* (int *) cache = CacheUnicode;
CFStringGetCharacters(s, CFRangeMake(0, len), (UniChar *) ((int *) cache + 1));
@@ -325,11 +325,11 @@ const char *QString::latin1() const
if (cache == NULL || * (int *) cache != CacheLatin1) {
flushCache();
- KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
+ KWQDEBUG("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
cache = CFAllocatorAllocate(kCFAllocatorDefault, sizeof(int) + len + 1, 0);
* (int *) cache = CacheLatin1;
if (!CFStringGetCString(s, (char *) ((int *) cache + 1), len + 1, kCFStringEncodingISOLatin1)) {
- KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCString failed)\n", __FUNCTION__, __FILE__, __LINE__);
+ KWQDEBUG("WARNING %s:%s:%d (CFStringGetCString failed)\n", __FUNCTION__, __FILE__, __LINE__);
* (char *) ((int *) cache + 1) = '\0';
}
}
diff --git a/WebCore/kwq/KWQView.mm b/WebCore/kwq/KWQView.mm
index c10c866..701ac6c 100644
--- a/WebCore/kwq/KWQView.mm
+++ b/WebCore/kwq/KWQView.mm
@@ -154,7 +154,7 @@
-(void)notificationReceived:(NSNotification *)notification
{
if ([[notification name] rangeOfString: @"uri-fin-"].location == 0){
- KWQDEBUG1("KWQHTMLView: Received notification, %s\n", DEBUG_OBJECT([notification name]));
+ KWQDEBUG("KWQHTMLView: Received notification, %s\n", DEBUG_OBJECT([notification name]));
[self performSelector:@selector(delayLayout:) withObject:self afterDelay:(NSTimeInterval)0.5];
}
}
@@ -177,7 +177,7 @@
double start = CFAbsoluteTimeGetCurrent();
#endif
((KHTMLView *)widget)->layout();
- KWQDEBUGLEVEL1 (KWQ_LOG_TIMING, "layout time %e\n", CFAbsoluteTimeGetCurrent() - start);
+ KWQDEBUGLEVEL (KWQ_LOG_TIMING, "layout time %e\n", CFAbsoluteTimeGetCurrent() - start);
needsLayout = NO;
}
}
@@ -207,7 +207,7 @@
(int)rect.origin.y,
(int)rect.size.width,
(int)rect.size.height );
- KWQDEBUGLEVEL1 (KWQ_LOG_TIMING, "draw time %e\n", CFAbsoluteTimeGetCurrent() - start);
+ KWQDEBUGLEVEL (KWQ_LOG_TIMING, "draw time %e\n", CFAbsoluteTimeGetCurrent() - start);
[self unlockFocus];
}
}
@@ -231,7 +231,7 @@
count = [views count];
while (count--){
- KWQDEBUG2("Removing %p %s\n", [views objectAtIndex: 0], DEBUG_OBJECT([[[views objectAtIndex: 0] class] className]));
+ KWQDEBUG("Removing %p %s\n", [views objectAtIndex: 0], DEBUG_OBJECT([[[views objectAtIndex: 0] class] className]));
[[views objectAtIndex: 0] removeFromSuperviewWithoutNeedingDisplay];
}
[self setFrameSize: NSMakeSize (0,0)];
@@ -305,7 +305,7 @@
- (void)mouseDragged: (NSEvent *)event
{
NSPoint p = [event locationInWindow];
- KWQDEBUG2 ("mouseDragged %f, %f\n", p.x, p.y);
+ KWQDEBUG ("mouseDragged %f, %f\n", p.x, p.y);
}
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index ead6ef5..5a144ec 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -92,7 +92,7 @@ QSize QWidget::sizeHint() const
void QWidget::resize(int w, int h)
{
- KWQDEBUG4 ("%p %s to w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
+ KWQDEBUG ("%p %s to w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
internalSetGeometry( pos().x(), pos().y(), w, h );
}
@@ -183,7 +183,7 @@ QPoint QWidget::pos() const
void QWidget::move(int x, int y)
{
- KWQDEBUG4 ("%p %s to x %d y %d\n", getView(), [[[getView() class] className] cString], x, y);
+ KWQDEBUG ("%p %s to x %d y %d\n", getView(), [[[getView() class] className] cString], x, y);
internalSetGeometry( x,
y,
width(), height() );
diff --git a/WebCore/kwq/WCPlugin.mm b/WebCore/kwq/WCPlugin.mm
index 5db67fe..39fe253 100644
--- a/WebCore/kwq/WCPlugin.mm
+++ b/WebCore/kwq/WCPlugin.mm
@@ -45,12 +45,12 @@
if([[fileInfo objectForKey:@"NSFileHFSTypeCode"] unsignedLongValue] == 1112690764){ // 1112690764 = 'BRPL'
err = FSPathMakeRef((UInt8 *)[pluginPath cString], &fref, NULL);
if(err != noErr){
- KWQDEBUG1("WCPlugin: FSPathMakeRef failed. Error=%d\n", err);
+ KWQDEBUG("WCPlugin: FSPathMakeRef failed. Error=%d\n", err);
return FALSE;
}
resRef = FSOpenResFile(&fref, fsRdPerm);
if(resRef <= noErr){
- KWQDEBUG2("WCPlugin: FSOpenResFile failed. Can't open resource file: %s, Error=%d\n", [pluginPath lossyCString], err);
+ KWQDEBUG("WCPlugin: FSOpenResFile failed. Can't open resource file: %s, Error=%d\n", [pluginPath lossyCString], err);
return FALSE;
}
[self getPluginInfoForResourceFile:resRef];
@@ -174,17 +174,17 @@
}else{ // single CFM file
err = FSPathMakeRef((UInt8 *)[path cString], &fref, NULL);
if(err != noErr){
- KWQDEBUG1("WCPlugin: load: FSPathMakeRef failed. Error=%d\n", err);
+ KWQDEBUG("WCPlugin: load: FSPathMakeRef failed. Error=%d\n", err);
return;
}
err = FSGetCatalogInfo(&fref, kFSCatInfoNone, NULL, NULL, &spec, NULL);
if(err != noErr){
- KWQDEBUG1("WCPlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
+ KWQDEBUG("WCPlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
return;
}
err = GetDiskFragment(&spec, 0, kCFragGoesToEOF, nil, kPrivateCFragCopy, &connID, (Ptr *)&pluginMainFunc, nil);
if(err != noErr){
- KWQDEBUG1("WCPlugin: load: GetDiskFragment failed. Error=%d\n", err);
+ KWQDEBUG("WCPlugin: load: GetDiskFragment failed. Error=%d\n", err);
return;
}
pluginMainFunc = functionPointerForTVector(pluginMainFunc);
@@ -217,7 +217,7 @@
pluginSize = pluginFuncs.size;
pluginVersion = pluginFuncs.version;
- KWQDEBUG3("pluginMainFunc: %d, size=%d, version=%d\n", npErr, pluginSize, pluginVersion);
+ KWQDEBUG("pluginMainFunc: %d, size=%d, version=%d\n", npErr, pluginSize, pluginVersion);
NPP_New = functionPointerForTVector(pluginFuncs.newp);
NPP_Destroy = functionPointerForTVector(pluginFuncs.destroy);
diff --git a/WebCore/kwq/WCPluginDatabase.mm b/WebCore/kwq/WCPluginDatabase.mm
index 083a0ff..cd14e7c 100644
--- a/WebCore/kwq/WCPluginDatabase.mm
+++ b/WebCore/kwq/WCPluginDatabase.mm
@@ -152,8 +152,8 @@ NSArray *findPlugins(void)
if([plugin initializeWithPath:[pluginPaths objectAtIndex:i]]){
[plugin retain];
[pluginArray addObject:plugin];
- KWQDEBUG1("Found plugin: %s\n", [[plugin name] lossyCString]);
- KWQDEBUG1("%s", [[plugin description] lossyCString]);
+ KWQDEBUG("Found plugin: %s\n", [[plugin name] lossyCString]);
+ KWQDEBUG("%s", [[plugin description] lossyCString]);
}
}
return [pluginArray retain];
diff --git a/WebCore/kwq/kwqdebug.h b/WebCore/kwq/kwqdebug.h
index f9f7dc6..cbb8081 100644
--- a/WebCore/kwq/kwqdebug.h
+++ b/WebCore/kwq/kwqdebug.h
@@ -36,14 +36,7 @@
#ifdef xNDEBUG
-#define KWQDEBUGLEVEL(level,format) ((void)0)
-#define KWQDEBUGLEVEL1(level,format,arg1) ((void)0)
-#define KWQDEBUGLEVEL2(level,format,arg1,arg2) ((void)0)
-#define KWQDEBUGLEVEL3(level,format,arg1,arg2,arg3) ((void)0)
-#define KWQDEBUGLEVEL4(level,format,arg1,arg2,arg3,arg4) ((void)0)
-#define KWQDEBUGLEVEL5(level,format,arg1,arg2,arg3,arg4,arg5) ((void)0)
-#define KWQDEBUGLEVEL6(level,format,arg1,arg2,arg3,arg4,arg5,arg6) ((void)0)
-#define KWQDEBUGLEVEL7(level,format,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ((void)0)
+#define KWQDEBUGLEVEL(level,format...) ((void)0)
#define KWQ_ASSERT(expr) ((void)0)
#define KWQ_ASSERT_VALID_ARG(arg,expr) ((void)0)
@@ -80,43 +73,15 @@ long _GetMillisecondsSinceEpoch();
void KWQSetLogLevel(int mask);
unsigned int KWQGetLogLevel();
-void KWQDebugAtLevel(unsigned int level, const char *format, ...)
- __attribute__((__format__ (__printf__, 2, 3)));
+void KWQLog(unsigned int level, const char *file, int line, const char *function, const char *format, ...)
+ __attribute__((__format__ (__printf__, 5, 6)));
-#define KWQDEBUGLEVEL(level,format) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format);
-
-#define KWQDEBUGLEVEL1(level,format,arg1) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1);
-
-#define KWQDEBUGLEVEL2(level,format,arg1,arg2) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2);
-
-#define KWQDEBUGLEVEL3(level,format,arg1,arg2,arg3) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3);
-
-#define KWQDEBUGLEVEL4(level,format,arg1,arg2,arg3,arg4) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3,arg4);
-
-#define KWQDEBUGLEVEL5(level,format,arg1,arg2,arg3,arg4,arg5) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3,arg4,arg5);
-
-#define KWQDEBUGLEVEL6(level,format,arg1,arg2,arg3,arg4,arg5,arg6) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3,arg4,arg5,arg6);
-
-#define KWQDEBUGLEVEL7(level,format,arg1,arg2,arg3,arg4,arg5,arg6,arg7) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3,arg4,arg5,arg6,arg7);
#define DEBUG_OBJECT(object) [[object description] lossyCString]
+#define KWQDEBUGLEVEL(level,format...) \
+ KWQLog(level, __FILE__, __LINE__, __PRETTY_FUNCTION__, format);
+
/*-----------------------------------------------------------------------------
* Assertion macros
*/
@@ -147,13 +112,7 @@ void KWQDebugAtLevel(unsigned int level, const char *format, ...)
#endif
-#define KWQDEBUG(format) KWQDEBUGLEVEL(KWQ_LOG_DEBUG,format)
-#define KWQDEBUG1(format,arg1) KWQDEBUGLEVEL1(KWQ_LOG_DEBUG,format,arg1)
-#define KWQDEBUG2(format,arg1,arg2) KWQDEBUGLEVEL2(KWQ_LOG_DEBUG,format,arg1,arg2)
-#define KWQDEBUG3(format,arg1,arg2,arg3) KWQDEBUGLEVEL3(KWQ_LOG_DEBUG,format,arg1,arg2,arg3)
-#define KWQDEBUG4(format,arg1,arg2,arg3,arg4) KWQDEBUGLEVEL4(KWQ_LOG_DEBUG,format,arg1,arg2,arg3,arg4)
-#define KWQDEBUG5(format,arg1,arg2,arg3,arg4,arg5) KWQDEBUGLEVEL5(KWQ_LOG_DEBUG,format,arg1,arg2,arg3,arg4,arg5)
-#define KWQDEBUG6(format,arg1,arg2,arg3,arg4,arg5,arg6) KWQDEBUGLEVEL6(KWQ_LOG_DEBUG,format,arg1,arg2,arg3,arg4,arg5,arg6)
+#define KWQDEBUG(format...) KWQDEBUGLEVEL(KWQ_LOG_DEBUG,format)
#define _logNeverImplemented() \
KWQDEBUGLEVEL(KWQ_LOG_NEVER_IMPLEMENTED, "ERROR (NOT IMPLEMENTED)\n")
diff --git a/WebCore/kwq/kwqdebug.mm b/WebCore/kwq/kwqdebug.mm
index 2fdae58..da34b7d 100644
--- a/WebCore/kwq/kwqdebug.mm
+++ b/WebCore/kwq/kwqdebug.mm
@@ -49,13 +49,26 @@ unsigned int KWQGetLogLevel(){
return KWQ_LOG_LEVEL;
}
+static const char *
+timestamp(void)
+{
+ NSString *date = [[NSDate date] descriptionWithCalendarFormat:@"%b %d %H:%M:%S.%F"
+ timeZone:[NSTimeZone systemTimeZone]
+ locale:nil];
+ return [date cString];
+}
+
-void KWQDebugAtLevel(unsigned int level, const char *format, ...) {
- if (KWQGetLogLevel() & level){
+void KWQLog(unsigned int level, const char *file, int line, const char *function, const char *format, ...)
+{
+ if (KWQGetLogLevel() & level) {
va_list args;
+ fprintf(stderr, "%s - [WEBCORE] - ", timestamp());
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
+ if (format[strlen(format) - 1] != '\n')
+ putc('\n', stderr);
}
}
diff --git a/WebCore/src/kwq/KWQApplication.mm b/WebCore/src/kwq/KWQApplication.mm
index db39772..3a7607e 100644
--- a/WebCore/src/kwq/KWQApplication.mm
+++ b/WebCore/src/kwq/KWQApplication.mm
@@ -91,7 +91,9 @@ void QApplication::restoreOverrideCursor()
bool QApplication::sendEvent(QObject *o, QEvent *e)
{
- KWQDEBUG1 ("received %d\n", e->type());
+ QEvent::Type type = e->type();
+
+ KWQDEBUG ("received %d\n", type);
return FALSE;
}
@@ -127,7 +129,7 @@ void QApplication::_initialize()
if (principalClass) {
application = [principalClass sharedApplication];
if (![NSBundle loadNibNamed: mainNibFile owner: application]) {
- KWQDEBUGLEVEL1(KWQ_LOG_ERROR, "ERROR: QApplication::_initialize() unable to load %s\n", DEBUG_OBJECT(mainNibFile));
+ KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::_initialize() unable to load %s\n", DEBUG_OBJECT(mainNibFile));
}
}
}
diff --git a/WebCore/src/kwq/KWQColor.mm b/WebCore/src/kwq/KWQColor.mm
index 52c53aa..8a8b417 100644
--- a/WebCore/src/kwq/KWQColor.mm
+++ b/WebCore/src/kwq/KWQColor.mm
@@ -221,7 +221,7 @@ void QColor::setNamedColor(const QString &name)
setRgb(r, g, b);
}
else {
- KWQDEBUG1 ("couldn't create color using name %s\n", name.ascii());
+ KWQDEBUG ("couldn't create color using name %s\n", name.ascii());
setRgb(0, 0, 0);
}
}
diff --git a/WebCore/src/kwq/KWQComboBox.mm b/WebCore/src/kwq/KWQComboBox.mm
index 1961019..4fcc8f8 100644
--- a/WebCore/src/kwq/KWQComboBox.mm
+++ b/WebCore/src/kwq/KWQComboBox.mm
@@ -134,7 +134,7 @@ void QComboBox::setCurrentItem(int index)
if (num != 0 && index < num)
[comboBox selectItemAtIndex: index];
else
- KWQDEBUG2 ("Error, index = %d, numberOfItems = %d", index, num);
+ KWQDEBUG ("Error, index = %d, numberOfItems = %d", index, num);
}
int QComboBox::currentItem() const
diff --git a/WebCore/src/kwq/KWQFont.mm b/WebCore/src/kwq/KWQFont.mm
index 059aac0..69f4624 100644
--- a/WebCore/src/kwq/KWQFont.mm
+++ b/WebCore/src/kwq/KWQFont.mm
@@ -189,7 +189,7 @@ NSFont *QFont::getFont()
}
}
if (font == nil) {
- KWQDEBUGLEVEL1(KWQ_LOG_FONTCACHE, "unable to find font for family %s\n", [_family lossyCString]);
+ KWQDEBUGLEVEL(KWQ_LOG_FONTCACHE, "unable to find font for family %s\n", [_family lossyCString]);
loadDefaultFont();
font = [[NSFontManager sharedFontManager] fontWithFamily:defaultFontFamilyName traits:_trait weight:5 size:_size];
}
diff --git a/WebCore/src/kwq/KWQFontMetrics.mm b/WebCore/src/kwq/KWQFontMetrics.mm
index b60f095..1185b5d 100644
--- a/WebCore/src/kwq/KWQFontMetrics.mm
+++ b/WebCore/src/kwq/KWQFontMetrics.mm
@@ -466,7 +466,7 @@ static void __IFFillStyleWithAttributes(ATSUStyle style, NSFont *theFont) {
short unsigned int sequentialGlyphs[INITIAL_GLYPH_CACHE_MAX];
ATSLayoutRecord *glyphRecords;
- KWQDEBUGLEVEL6 (KWQ_LOG_FONTCACHE, "Caching %s %.0f (%ld glyphs) ascent = %f, descent = %f, defaultLineHeightForFont = %f\n", [[font displayName] cString], [font pointSize], numGlyphsInFont, [font ascender], [font descender], [font defaultLineHeightForFont]);
+ KWQDEBUGLEVEL (KWQ_LOG_FONTCACHE, "Caching %s %.0f (%ld glyphs) ascent = %f, descent = %f, defaultLineHeightForFont = %f\n", [[font displayName] cString], [font pointSize], numGlyphsInFont, [font ascender], [font descender], [font defaultLineHeightForFont]);
// Initially just cache the max of number of glyphs in font or
// INITIAL_GLYPH_CACHE_MAX. Holes in the cache will be filled on demand
@@ -520,7 +520,7 @@ static void __IFFillStyleWithAttributes(ATSUStyle style, NSFont *theFont) {
static int totalCacheSize = 0;
totalCacheSize += widthCacheSize * sizeof(_IFGlyphWidth) + numGlyphs * sizeof(ATSGlyphRef) + sizeof(KWQLayoutInfo);
- KWQDEBUGLEVEL4 (KWQ_LOG_MEMUSAGE, "memory usage in bytes: widths = %ld, latin1 ext. character-to-glyph = %ld, total this cache = %ld, total all caches %d\n", widthCacheSize * sizeof(_IFGlyphWidth), numGlyphs * sizeof(ATSGlyphRef), widthCacheSize * sizeof(_IFGlyphWidth) + numGlyphs * sizeof(ATSGlyphRef) + sizeof(KWQLayoutInfo), totalCacheSize);
+ KWQDEBUGLEVEL (KWQ_LOG_MEMUSAGE, "memory usage in bytes: widths = %ld, latin1 ext. character-to-glyph = %ld, total this cache = %ld, total all caches %d\n", widthCacheSize * sizeof(_IFGlyphWidth), numGlyphs * sizeof(ATSGlyphRef), widthCacheSize * sizeof(_IFGlyphWidth) + numGlyphs * sizeof(ATSGlyphRef) + sizeof(KWQLayoutInfo), totalCacheSize);
#endif
}
@@ -577,8 +577,7 @@ static NSRect _rectForString (KWQLayoutInfo *self, const UniChar *internalBuffer
// If we can't use the cached map, then calculate a map for this string. Expensive.
if (needCharToGlyphLookup){
- KWQDEBUGLEVEL3(KWQ_LOG_FONTCACHECHARMISS, "character-to-glyph cache miss for character 0x%04x in %s, %.0f\n", internalBuffer[i], [[font displayName] lossyCString], [font pointSize]);
-
+ KWQDEBUGLEVEL (KWQ_LOG_FONTCACHECHARMISS, "character-to-glyph cache miss for character 0x%04x in %s, %.0f\n", internalBuffer[i], [[font displayName] lossyCString], [font pointSize])
__IFInitATSGlyphVector(&self->_glyphVector, stringLength);
(void)ATSUConvertCharToGlyphs(self->_styleGroup, internalBuffer, 0, stringLength, 0, &self->_glyphVector);
glyphRecords = self->_glyphVector.firstRecord;
@@ -604,7 +603,7 @@ static NSRect _rectForString (KWQLayoutInfo *self, const UniChar *internalBuffer
blockEnd = blockStart + INCREMENTAL_GLYPH_CACHE_BLOCK;
if (blockEnd > self->widthCacheSize)
blockEnd = self->widthCacheSize;
- KWQDEBUGLEVEL5 (KWQ_LOG_FONTCACHE, "width cache miss for glyph 0x%04x in %s, %.0f, filling block 0x%04x to 0x%04x\n", glyphID, [[font displayName] cString], [font pointSize], blockStart, blockEnd);
+ KWQDEBUGLEVEL (KWQ_LOG_FONTCACHE, "width cache miss for glyph 0x%04x in %s, %.0f, filling block 0x%04x to 0x%04x\n", glyphID, [[font displayName] cString], [font pointSize], blockStart, blockEnd);
for (blockID = blockStart; blockID < blockEnd; blockID++)
sequentialGlyphs[blockID-blockStart] = blockID;
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index e918ae7..1d7bfe1 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -114,7 +114,7 @@ static void recursive(const DOM::Node &pNode, const DOM::Node &node)
{
DOM::Node cur_child = node.lastChild();
- KWQDEBUG2("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
+ KWQDEBUG("cur_child: %s = %s", cur_child.nodeName().string().latin1(), cur_child.nodeValue().string().latin1());
while(!cur_child.isNull())
{
@@ -610,7 +610,7 @@ void KHTMLPart::write( const char *str, int len )
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
d->totalWriteTime += thisTime;
- KWQDEBUGLEVEL4 (0x200, "%s bytes = %d, seconds = %f, total = %f\n", d->m_url.url().latin1(), len, thisTime, d->totalWriteTime);
+ KWQDEBUGLEVEL (0x200, "%s bytes = %d, seconds = %f, total = %f\n", d->m_url.url().latin1(), len, thisTime, d->totalWriteTime);
#endif
}
@@ -647,7 +647,7 @@ void KHTMLPart::end()
}
#ifndef APPLE_CHANGES
- KWQDEBUG2 ("0x%08x end(): for url %s\n", (unsigned int)this, d->m_url.url().latin1());
+ KWQDEBUG ("0x%08x end(): for url %s\n", (unsigned int)this, d->m_url.url().latin1());
// make sure nothing's left in there...
if(d->m_decoder)
write(d->m_decoder->flush());
@@ -1611,7 +1611,7 @@ void KHTMLPart::emitUnloadEvent()
void KHTMLPart::nodeActivated(const DOM::Node &aNode)
{
- KWQDEBUG2 ("name %s = %s\n", (const char *)aNode.nodeName().string(), (const char *)aNode.nodeValue().string());
+ KWQDEBUG ("name %s = %s\n", (const char *)aNode.nodeName().string(), (const char *)aNode.nodeValue().string());
}
void KHTMLPart::stopAutoScroll()
diff --git a/WebCore/src/kwq/KWQKloader.mm b/WebCore/src/kwq/KWQKloader.mm
index 69485d6..5ae4052 100644
--- a/WebCore/src/kwq/KWQKloader.mm
+++ b/WebCore/src/kwq/KWQKloader.mm
@@ -1025,7 +1025,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource,
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource,
static_cast<KIO::TransferJob *>(userData)->url().url().latin1());
}
@@ -1041,7 +1041,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _removeURLHandle: job->handle()];
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource, urlString.latin1());
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s\n", m_dataSource, urlString.latin1());
m_loader->slotFinished(job);
@@ -1067,7 +1067,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[m_dataSource _removeURLHandle: job->handle()];
- KWQDEBUGLEVEL4 (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
m_loader->slotFinished(job);
@@ -1090,7 +1090,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
QString urlString = job->url().url();
- KWQDEBUGLEVEL4 (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p for URL %s data at %p, length %d\n", m_dataSource, urlString.latin1(), data, [data length]);
m_loader->slotData(job, (const char *)[data bytes], [data length]);
@@ -1111,7 +1111,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
- KWQDEBUGLEVEL3 (KWQ_LOG_LOADING, "dataSource = %p, result = %d, URL = %s\n", m_dataSource, result, job->url().url().latin1());
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p, result = %d, URL = %s\n", m_dataSource, result, job->url().url().latin1());
[m_dataSource _removeURLHandle: job->handle()];
@@ -1131,7 +1131,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
- KWQDEBUGLEVEL1 (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
[m_dataSource _part]->setBaseURL([[url absoluteString] cString]);
[[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
@@ -1219,7 +1219,7 @@ void Loader::servePendingRequests()
KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
#ifdef APPLE_CHANGES
- KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n",
+ KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n",
req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
//job->begin(d->m_recv, job);
job->begin((URLLoadClient *)req->client, job);
diff --git a/WebCore/src/kwq/KWQObject.mm b/WebCore/src/kwq/KWQObject.mm
index f3f3966..a0be3ed 100644
--- a/WebCore/src/kwq/KWQObject.mm
+++ b/WebCore/src/kwq/KWQObject.mm
@@ -33,7 +33,7 @@ bool QObject::connect(const QObject *sender, const char *signal, const QObject *
{
if (sender)
((QObject *)sender)->setTarget ((QObject *)dest);
- KWQDEBUG4 ("src = %p, signal = %s, dest = %p, slot = %s\n", sender, signal, dest, slot);
+ KWQDEBUG ("src = %p, signal = %s, dest = %p, slot = %s\n", sender, signal, dest, slot);
return FALSE;
}
@@ -43,7 +43,7 @@ bool QObject::connect(const QObject *sender, const char *signal, const char *slo
{
if (sender)
((QObject *)sender)->setTarget ((QObject *)sender);
- KWQDEBUG3 ("src = %p, signal = %s, slot = %s\n", sender, signal, slot);
+ KWQDEBUG ("src = %p, signal = %s, slot = %s\n", sender, signal, slot);
return FALSE;
}
@@ -57,7 +57,7 @@ void QObject::emitAction(QObject::Actions action)
void QObject::performAction(QObject::Actions action)
{
- KWQDEBUG1 ("action = %d\n", action);
+ KWQDEBUG ("action = %d\n", action);
}
diff --git a/WebCore/src/kwq/KWQScrollView.mm b/WebCore/src/kwq/KWQScrollView.mm
index 2eaf8a6..67cb172 100644
--- a/WebCore/src/kwq/KWQScrollView.mm
+++ b/WebCore/src/kwq/KWQScrollView.mm
@@ -157,7 +157,7 @@ void QScrollView::addChild(QWidget* child, int x, int y)
[subView removeFromSuperview];
- KWQDEBUGLEVEL6 (KWQ_LOG_FRAMES, "Adding %p %s at (%d,%d) w %d h %d\n", subView, [[[subView class] className] cString], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "Adding %p %s at (%d,%d) w %d h %d\n", subView, [[[subView class] className] cString], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
[thisView addSubview: subView];
}
@@ -177,12 +177,12 @@ void QScrollView::removeChild(QWidget* child)
void QScrollView::resizeContents(int w, int h)
{
- KWQDEBUGLEVEL4 (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
//if ([nsview isKindOfClass: NSClassFromString(@"IFDynamicScrollBarsView")])
if ([getView() isKindOfClass: NSClassFromString(@"NSScrollView")]){
IFWebView *wview = [(NSScrollView *)getView() documentView];
- KWQDEBUGLEVEL4 (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", wview, [[[wview class] className] cString], w, h);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", wview, [[[wview class] className] cString], w, h);
//w -= (int)[NSScroller scrollerWidth];
//w -= 1;
if (w < 0)
@@ -202,7 +202,7 @@ void QScrollView::resizeContents(int w, int h)
void QScrollView::updateContents(int x, int y, int w, int h)
{
- KWQDEBUGLEVEL6 (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
}
void QScrollView::updateContents(const QRect &rect)
@@ -213,7 +213,7 @@ void QScrollView::updateContents(const QRect &rect)
void QScrollView::repaintContents(int x, int y, int w, int h, bool erase=TRUE)
{
- KWQDEBUGLEVEL6 (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at (%d,%d) w %d h %d\n", getView(), [[[getView() class] className] cString], x, y, w, h);
}
QPoint QScrollView::contentsToViewport(const QPoint &)
diff --git a/WebCore/src/kwq/KWQString.mm b/WebCore/src/kwq/KWQString.mm
index b59d1cc..a226a7e 100644
--- a/WebCore/src/kwq/KWQString.mm
+++ b/WebCore/src/kwq/KWQString.mm
@@ -304,7 +304,7 @@ const QChar *QString::unicode() const
if (cache == NULL || * (int *) cache != CacheUnicode) {
flushCache();
- KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
+ KWQDEBUG("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
cache = CFAllocatorAllocate(kCFAllocatorDefault, sizeof(int) + len * sizeof (UniChar), 0);
* (int *) cache = CacheUnicode;
CFStringGetCharacters(s, CFRangeMake(0, len), (UniChar *) ((int *) cache + 1));
@@ -325,11 +325,11 @@ const char *QString::latin1() const
if (cache == NULL || * (int *) cache != CacheLatin1) {
flushCache();
- KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
+ KWQDEBUG("WARNING %s:%s:%d (CFStringGetCharactersPtr failed)\n", __FUNCTION__, __FILE__, __LINE__);
cache = CFAllocatorAllocate(kCFAllocatorDefault, sizeof(int) + len + 1, 0);
* (int *) cache = CacheLatin1;
if (!CFStringGetCString(s, (char *) ((int *) cache + 1), len + 1, kCFStringEncodingISOLatin1)) {
- KWQDEBUG3("WARNING %s:%s:%d (CFStringGetCString failed)\n", __FUNCTION__, __FILE__, __LINE__);
+ KWQDEBUG("WARNING %s:%s:%d (CFStringGetCString failed)\n", __FUNCTION__, __FILE__, __LINE__);
* (char *) ((int *) cache + 1) = '\0';
}
}
diff --git a/WebCore/src/kwq/KWQView.mm b/WebCore/src/kwq/KWQView.mm
index c10c866..701ac6c 100644
--- a/WebCore/src/kwq/KWQView.mm
+++ b/WebCore/src/kwq/KWQView.mm
@@ -154,7 +154,7 @@
-(void)notificationReceived:(NSNotification *)notification
{
if ([[notification name] rangeOfString: @"uri-fin-"].location == 0){
- KWQDEBUG1("KWQHTMLView: Received notification, %s\n", DEBUG_OBJECT([notification name]));
+ KWQDEBUG("KWQHTMLView: Received notification, %s\n", DEBUG_OBJECT([notification name]));
[self performSelector:@selector(delayLayout:) withObject:self afterDelay:(NSTimeInterval)0.5];
}
}
@@ -177,7 +177,7 @@
double start = CFAbsoluteTimeGetCurrent();
#endif
((KHTMLView *)widget)->layout();
- KWQDEBUGLEVEL1 (KWQ_LOG_TIMING, "layout time %e\n", CFAbsoluteTimeGetCurrent() - start);
+ KWQDEBUGLEVEL (KWQ_LOG_TIMING, "layout time %e\n", CFAbsoluteTimeGetCurrent() - start);
needsLayout = NO;
}
}
@@ -207,7 +207,7 @@
(int)rect.origin.y,
(int)rect.size.width,
(int)rect.size.height );
- KWQDEBUGLEVEL1 (KWQ_LOG_TIMING, "draw time %e\n", CFAbsoluteTimeGetCurrent() - start);
+ KWQDEBUGLEVEL (KWQ_LOG_TIMING, "draw time %e\n", CFAbsoluteTimeGetCurrent() - start);
[self unlockFocus];
}
}
@@ -231,7 +231,7 @@
count = [views count];
while (count--){
- KWQDEBUG2("Removing %p %s\n", [views objectAtIndex: 0], DEBUG_OBJECT([[[views objectAtIndex: 0] class] className]));
+ KWQDEBUG("Removing %p %s\n", [views objectAtIndex: 0], DEBUG_OBJECT([[[views objectAtIndex: 0] class] className]));
[[views objectAtIndex: 0] removeFromSuperviewWithoutNeedingDisplay];
}
[self setFrameSize: NSMakeSize (0,0)];
@@ -305,7 +305,7 @@
- (void)mouseDragged: (NSEvent *)event
{
NSPoint p = [event locationInWindow];
- KWQDEBUG2 ("mouseDragged %f, %f\n", p.x, p.y);
+ KWQDEBUG ("mouseDragged %f, %f\n", p.x, p.y);
}
diff --git a/WebCore/src/kwq/KWQWidget.mm b/WebCore/src/kwq/KWQWidget.mm
index ead6ef5..5a144ec 100644
--- a/WebCore/src/kwq/KWQWidget.mm
+++ b/WebCore/src/kwq/KWQWidget.mm
@@ -92,7 +92,7 @@ QSize QWidget::sizeHint() const
void QWidget::resize(int w, int h)
{
- KWQDEBUG4 ("%p %s to w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
+ KWQDEBUG ("%p %s to w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
internalSetGeometry( pos().x(), pos().y(), w, h );
}
@@ -183,7 +183,7 @@ QPoint QWidget::pos() const
void QWidget::move(int x, int y)
{
- KWQDEBUG4 ("%p %s to x %d y %d\n", getView(), [[[getView() class] className] cString], x, y);
+ KWQDEBUG ("%p %s to x %d y %d\n", getView(), [[[getView() class] className] cString], x, y);
internalSetGeometry( x,
y,
width(), height() );
diff --git a/WebCore/src/kwq/WCPlugin.mm b/WebCore/src/kwq/WCPlugin.mm
index 5db67fe..39fe253 100644
--- a/WebCore/src/kwq/WCPlugin.mm
+++ b/WebCore/src/kwq/WCPlugin.mm
@@ -45,12 +45,12 @@
if([[fileInfo objectForKey:@"NSFileHFSTypeCode"] unsignedLongValue] == 1112690764){ // 1112690764 = 'BRPL'
err = FSPathMakeRef((UInt8 *)[pluginPath cString], &fref, NULL);
if(err != noErr){
- KWQDEBUG1("WCPlugin: FSPathMakeRef failed. Error=%d\n", err);
+ KWQDEBUG("WCPlugin: FSPathMakeRef failed. Error=%d\n", err);
return FALSE;
}
resRef = FSOpenResFile(&fref, fsRdPerm);
if(resRef <= noErr){
- KWQDEBUG2("WCPlugin: FSOpenResFile failed. Can't open resource file: %s, Error=%d\n", [pluginPath lossyCString], err);
+ KWQDEBUG("WCPlugin: FSOpenResFile failed. Can't open resource file: %s, Error=%d\n", [pluginPath lossyCString], err);
return FALSE;
}
[self getPluginInfoForResourceFile:resRef];
@@ -174,17 +174,17 @@
}else{ // single CFM file
err = FSPathMakeRef((UInt8 *)[path cString], &fref, NULL);
if(err != noErr){
- KWQDEBUG1("WCPlugin: load: FSPathMakeRef failed. Error=%d\n", err);
+ KWQDEBUG("WCPlugin: load: FSPathMakeRef failed. Error=%d\n", err);
return;
}
err = FSGetCatalogInfo(&fref, kFSCatInfoNone, NULL, NULL, &spec, NULL);
if(err != noErr){
- KWQDEBUG1("WCPlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
+ KWQDEBUG("WCPlugin: load: FSGetCatalogInfo failed. Error=%d\n", err);
return;
}
err = GetDiskFragment(&spec, 0, kCFragGoesToEOF, nil, kPrivateCFragCopy, &connID, (Ptr *)&pluginMainFunc, nil);
if(err != noErr){
- KWQDEBUG1("WCPlugin: load: GetDiskFragment failed. Error=%d\n", err);
+ KWQDEBUG("WCPlugin: load: GetDiskFragment failed. Error=%d\n", err);
return;
}
pluginMainFunc = functionPointerForTVector(pluginMainFunc);
@@ -217,7 +217,7 @@
pluginSize = pluginFuncs.size;
pluginVersion = pluginFuncs.version;
- KWQDEBUG3("pluginMainFunc: %d, size=%d, version=%d\n", npErr, pluginSize, pluginVersion);
+ KWQDEBUG("pluginMainFunc: %d, size=%d, version=%d\n", npErr, pluginSize, pluginVersion);
NPP_New = functionPointerForTVector(pluginFuncs.newp);
NPP_Destroy = functionPointerForTVector(pluginFuncs.destroy);
diff --git a/WebCore/src/kwq/WCPluginDatabase.mm b/WebCore/src/kwq/WCPluginDatabase.mm
index 083a0ff..cd14e7c 100644
--- a/WebCore/src/kwq/WCPluginDatabase.mm
+++ b/WebCore/src/kwq/WCPluginDatabase.mm
@@ -152,8 +152,8 @@ NSArray *findPlugins(void)
if([plugin initializeWithPath:[pluginPaths objectAtIndex:i]]){
[plugin retain];
[pluginArray addObject:plugin];
- KWQDEBUG1("Found plugin: %s\n", [[plugin name] lossyCString]);
- KWQDEBUG1("%s", [[plugin description] lossyCString]);
+ KWQDEBUG("Found plugin: %s\n", [[plugin name] lossyCString]);
+ KWQDEBUG("%s", [[plugin description] lossyCString]);
}
}
return [pluginArray retain];
diff --git a/WebCore/src/kwq/kwqdebug.h b/WebCore/src/kwq/kwqdebug.h
index f9f7dc6..cbb8081 100644
--- a/WebCore/src/kwq/kwqdebug.h
+++ b/WebCore/src/kwq/kwqdebug.h
@@ -36,14 +36,7 @@
#ifdef xNDEBUG
-#define KWQDEBUGLEVEL(level,format) ((void)0)
-#define KWQDEBUGLEVEL1(level,format,arg1) ((void)0)
-#define KWQDEBUGLEVEL2(level,format,arg1,arg2) ((void)0)
-#define KWQDEBUGLEVEL3(level,format,arg1,arg2,arg3) ((void)0)
-#define KWQDEBUGLEVEL4(level,format,arg1,arg2,arg3,arg4) ((void)0)
-#define KWQDEBUGLEVEL5(level,format,arg1,arg2,arg3,arg4,arg5) ((void)0)
-#define KWQDEBUGLEVEL6(level,format,arg1,arg2,arg3,arg4,arg5,arg6) ((void)0)
-#define KWQDEBUGLEVEL7(level,format,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ((void)0)
+#define KWQDEBUGLEVEL(level,format...) ((void)0)
#define KWQ_ASSERT(expr) ((void)0)
#define KWQ_ASSERT_VALID_ARG(arg,expr) ((void)0)
@@ -80,43 +73,15 @@ long _GetMillisecondsSinceEpoch();
void KWQSetLogLevel(int mask);
unsigned int KWQGetLogLevel();
-void KWQDebugAtLevel(unsigned int level, const char *format, ...)
- __attribute__((__format__ (__printf__, 2, 3)));
+void KWQLog(unsigned int level, const char *file, int line, const char *function, const char *format, ...)
+ __attribute__((__format__ (__printf__, 5, 6)));
-#define KWQDEBUGLEVEL(level,format) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format);
-
-#define KWQDEBUGLEVEL1(level,format,arg1) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1);
-
-#define KWQDEBUGLEVEL2(level,format,arg1,arg2) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2);
-
-#define KWQDEBUGLEVEL3(level,format,arg1,arg2,arg3) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3);
-
-#define KWQDEBUGLEVEL4(level,format,arg1,arg2,arg3,arg4) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3,arg4);
-
-#define KWQDEBUGLEVEL5(level,format,arg1,arg2,arg3,arg4,arg5) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3,arg4,arg5);
-
-#define KWQDEBUGLEVEL6(level,format,arg1,arg2,arg3,arg4,arg5,arg6) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3,arg4,arg5,arg6);
-
-#define KWQDEBUGLEVEL7(level,format,arg1,arg2,arg3,arg4,arg5,arg6,arg7) \
- KWQDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- KWQDebugAtLevel (level,format,arg1,arg2,arg3,arg4,arg5,arg6,arg7);
#define DEBUG_OBJECT(object) [[object description] lossyCString]
+#define KWQDEBUGLEVEL(level,format...) \
+ KWQLog(level, __FILE__, __LINE__, __PRETTY_FUNCTION__, format);
+
/*-----------------------------------------------------------------------------
* Assertion macros
*/
@@ -147,13 +112,7 @@ void KWQDebugAtLevel(unsigned int level, const char *format, ...)
#endif
-#define KWQDEBUG(format) KWQDEBUGLEVEL(KWQ_LOG_DEBUG,format)
-#define KWQDEBUG1(format,arg1) KWQDEBUGLEVEL1(KWQ_LOG_DEBUG,format,arg1)
-#define KWQDEBUG2(format,arg1,arg2) KWQDEBUGLEVEL2(KWQ_LOG_DEBUG,format,arg1,arg2)
-#define KWQDEBUG3(format,arg1,arg2,arg3) KWQDEBUGLEVEL3(KWQ_LOG_DEBUG,format,arg1,arg2,arg3)
-#define KWQDEBUG4(format,arg1,arg2,arg3,arg4) KWQDEBUGLEVEL4(KWQ_LOG_DEBUG,format,arg1,arg2,arg3,arg4)
-#define KWQDEBUG5(format,arg1,arg2,arg3,arg4,arg5) KWQDEBUGLEVEL5(KWQ_LOG_DEBUG,format,arg1,arg2,arg3,arg4,arg5)
-#define KWQDEBUG6(format,arg1,arg2,arg3,arg4,arg5,arg6) KWQDEBUGLEVEL6(KWQ_LOG_DEBUG,format,arg1,arg2,arg3,arg4,arg5,arg6)
+#define KWQDEBUG(format...) KWQDEBUGLEVEL(KWQ_LOG_DEBUG,format)
#define _logNeverImplemented() \
KWQDEBUGLEVEL(KWQ_LOG_NEVER_IMPLEMENTED, "ERROR (NOT IMPLEMENTED)\n")
diff --git a/WebCore/src/kwq/kwqdebug.mm b/WebCore/src/kwq/kwqdebug.mm
index 2fdae58..da34b7d 100644
--- a/WebCore/src/kwq/kwqdebug.mm
+++ b/WebCore/src/kwq/kwqdebug.mm
@@ -49,13 +49,26 @@ unsigned int KWQGetLogLevel(){
return KWQ_LOG_LEVEL;
}
+static const char *
+timestamp(void)
+{
+ NSString *date = [[NSDate date] descriptionWithCalendarFormat:@"%b %d %H:%M:%S.%F"
+ timeZone:[NSTimeZone systemTimeZone]
+ locale:nil];
+ return [date cString];
+}
+
-void KWQDebugAtLevel(unsigned int level, const char *format, ...) {
- if (KWQGetLogLevel() & level){
+void KWQLog(unsigned int level, const char *file, int line, const char *function, const char *format, ...)
+{
+ if (KWQGetLogLevel() & level) {
va_list args;
+ fprintf(stderr, "%s - [WEBCORE] - ", timestamp());
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
+ if (format[strlen(format) - 1] != '\n')
+ putc('\n', stderr);
}
}
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 946161e..59e2c09 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,44 @@
+2002-04-03 Kenneth Kocienda <kocienda at apple.com>
+
+ Updated debugging log messages to use new varargs macros.
+
+ * History.subproj/IFWebHistoryPrivate.m: (-[IFWebHistoryPrivate
+ removeEntryForURLString:]), (-[IFWebHistoryPrivate _loadHistoryGuts:]),
+ (-[IFWebHistoryPrivate loadHistory]), (-[IFWebHistoryPrivate _saveHistoryGuts:]),
+ (-[IFWebHistoryPrivate saveHistory]):
+ * Misc.subproj/WebKitDebug.h:
+ * Misc.subproj/WebKitDebug.m: (timestamp), (WebKitLog):
+ * Plugins.subproj/IFPluginView.mm: (-[IFPluginView
+ initWithFrame:plugin:url:mime:arguments:mode:]), (-[IFPluginView setWindow]),
+ (-[IFPluginView newStream:mimeType:notifyData:]), (-[IFPluginView
+ IFURLHandle:resourceDataDidBecomeAvailable:]), (-[IFPluginView
+ IFURLHandleResourceDidFinishLoading:data:]), (-[IFPluginView
+ becomeFirstResponder]), (-[IFPluginView resignFirstResponder]), (-[IFPluginView
+ sendUpdateEvent]), (-[IFPluginView mouseDown:]), (-[IFPluginView mouseUp:]),
+ (-[IFPluginView mouseEntered:]), (-[IFPluginView mouseExited:]), (-[IFPluginView
+ keyUp:]), (-[IFPluginView keyDown:]), (-[IFPluginView
+ getURLNotify:target:notifyData:]), (-[IFPluginView getURL:target:]),
+ (-[IFPluginView status:]), (-[IFPluginView stop]):
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/IFBaseWebControllerPrivate.mm: (-[IFBaseWebController
+ _receivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
+ _mainReceivedProgress:forResource:fromDataSource:]):
+ * WebView.subproj/IFMainURLHandleClient.mm: (-[IFMainURLHandleClient
+ IFURLHandleResourceDidBeginLoading:]), (-[IFMainURLHandleClient
+ IFURLHandleResourceDidCancelLoading:]), (-[IFMainURLHandleClient
+ IFURLHandleResourceDidFinishLoading:data:]), (-[IFMainURLHandleClient
+ IFURLHandle:resourceDataDidBecomeAvailable:]), (-[IFMainURLHandleClient
+ IFURLHandle:resourceDidFailLoadingWithResult:]), (-[IFMainURLHandleClient
+ IFURLHandle:didRedirectToURL:]):
+ * WebView.subproj/IFWebDataSource.mm: (-[IFWebDataSource isLoading]):
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _stopLoading]):
+ * WebView.subproj/IFWebFramePrivate.mm: (-[IFWebFrame
+ _transitionProvisionalToLayoutAcceptable]), (-[IFWebFrame _timedLayout:]),
+ (-[IFWebFrame _setState:]), (-[IFWebFrame _isLoadComplete]):
+ * WebView.subproj/IFWebView.mm: (-[IFWebView reapplyStyles]), (-[IFWebView
+ layout]), (-[IFWebView setNeedsDisplay:]), (-[IFWebView setNeedsLayout:]),
+ (-[IFWebView setNeedsToApplyStyles:]), (-[IFWebView drawRect:]):
+
2002-04-02 Darin Adler <darin at apple.com>
* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _setTitle:]):
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 946161e..59e2c09 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,44 @@
+2002-04-03 Kenneth Kocienda <kocienda at apple.com>
+
+ Updated debugging log messages to use new varargs macros.
+
+ * History.subproj/IFWebHistoryPrivate.m: (-[IFWebHistoryPrivate
+ removeEntryForURLString:]), (-[IFWebHistoryPrivate _loadHistoryGuts:]),
+ (-[IFWebHistoryPrivate loadHistory]), (-[IFWebHistoryPrivate _saveHistoryGuts:]),
+ (-[IFWebHistoryPrivate saveHistory]):
+ * Misc.subproj/WebKitDebug.h:
+ * Misc.subproj/WebKitDebug.m: (timestamp), (WebKitLog):
+ * Plugins.subproj/IFPluginView.mm: (-[IFPluginView
+ initWithFrame:plugin:url:mime:arguments:mode:]), (-[IFPluginView setWindow]),
+ (-[IFPluginView newStream:mimeType:notifyData:]), (-[IFPluginView
+ IFURLHandle:resourceDataDidBecomeAvailable:]), (-[IFPluginView
+ IFURLHandleResourceDidFinishLoading:data:]), (-[IFPluginView
+ becomeFirstResponder]), (-[IFPluginView resignFirstResponder]), (-[IFPluginView
+ sendUpdateEvent]), (-[IFPluginView mouseDown:]), (-[IFPluginView mouseUp:]),
+ (-[IFPluginView mouseEntered:]), (-[IFPluginView mouseExited:]), (-[IFPluginView
+ keyUp:]), (-[IFPluginView keyDown:]), (-[IFPluginView
+ getURLNotify:target:notifyData:]), (-[IFPluginView getURL:target:]),
+ (-[IFPluginView status:]), (-[IFPluginView stop]):
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/IFBaseWebControllerPrivate.mm: (-[IFBaseWebController
+ _receivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
+ _mainReceivedProgress:forResource:fromDataSource:]):
+ * WebView.subproj/IFMainURLHandleClient.mm: (-[IFMainURLHandleClient
+ IFURLHandleResourceDidBeginLoading:]), (-[IFMainURLHandleClient
+ IFURLHandleResourceDidCancelLoading:]), (-[IFMainURLHandleClient
+ IFURLHandleResourceDidFinishLoading:data:]), (-[IFMainURLHandleClient
+ IFURLHandle:resourceDataDidBecomeAvailable:]), (-[IFMainURLHandleClient
+ IFURLHandle:resourceDidFailLoadingWithResult:]), (-[IFMainURLHandleClient
+ IFURLHandle:didRedirectToURL:]):
+ * WebView.subproj/IFWebDataSource.mm: (-[IFWebDataSource isLoading]):
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _stopLoading]):
+ * WebView.subproj/IFWebFramePrivate.mm: (-[IFWebFrame
+ _transitionProvisionalToLayoutAcceptable]), (-[IFWebFrame _timedLayout:]),
+ (-[IFWebFrame _setState:]), (-[IFWebFrame _isLoadComplete]):
+ * WebView.subproj/IFWebView.mm: (-[IFWebView reapplyStyles]), (-[IFWebView
+ layout]), (-[IFWebView setNeedsDisplay:]), (-[IFWebView setNeedsLayout:]),
+ (-[IFWebView setNeedsToApplyStyles:]), (-[IFWebView drawRect:]):
+
2002-04-02 Darin Adler <darin at apple.com>
* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _setTitle:]):
diff --git a/WebKit/History.subproj/IFWebHistoryPrivate.m b/WebKit/History.subproj/IFWebHistoryPrivate.m
index 65a6997..65a077d 100644
--- a/WebKit/History.subproj/IFWebHistoryPrivate.m
+++ b/WebKit/History.subproj/IFWebHistoryPrivate.m
@@ -124,7 +124,7 @@
[_datesWithEntries removeObjectAtIndex: dateIndex];
}
} else {
- WEBKITDEBUG2("'%s' was in url dictionary but its date %s was not in date index",
+ WEBKITDEBUG("'%s' was in url dictionary but its date %s was not in date index",
DEBUG_OBJECT([entry url]), DEBUG_OBJECT([entry lastVisitedDate]));
}
@@ -362,10 +362,10 @@
array = [NSArray arrayWithContentsOfFile: path];
if (array == nil) {
if (![[NSFileManager defaultManager] fileExistsAtPath: path]) {
- WEBKITDEBUG1("no history file found at %s\n",
+ WEBKITDEBUG("no history file found at %s\n",
DEBUG_OBJECT(path));
} else {
- WEBKITDEBUG1("attempt to read history from %s failed; perhaps contents are corrupted\n",
+ WEBKITDEBUG("attempt to read history from %s failed; perhaps contents are corrupted\n",
DEBUG_OBJECT(path));
}
return NO;
@@ -418,7 +418,7 @@
if (result == YES) {
duration = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL3 (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\n",
numberOfItems, DEBUG_OBJECT([self file]), duration);
}
@@ -439,7 +439,7 @@
array = [self arrayRepresentation];
if (![array writeToFile:path atomically:YES]) {
- WEBKITDEBUG2("attempt to save %s to %s failed\n", DEBUG_OBJECT(array), DEBUG_OBJECT(path));
+ WEBKITDEBUG("attempt to save %s to %s failed\n", DEBUG_OBJECT(array), DEBUG_OBJECT(path));
return NO;
}
@@ -458,7 +458,7 @@
if (result == YES) {
duration = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL3 (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\n",
numberOfItems, DEBUG_OBJECT([self file]), duration);
}
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index 65a6997..65a077d 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -124,7 +124,7 @@
[_datesWithEntries removeObjectAtIndex: dateIndex];
}
} else {
- WEBKITDEBUG2("'%s' was in url dictionary but its date %s was not in date index",
+ WEBKITDEBUG("'%s' was in url dictionary but its date %s was not in date index",
DEBUG_OBJECT([entry url]), DEBUG_OBJECT([entry lastVisitedDate]));
}
@@ -362,10 +362,10 @@
array = [NSArray arrayWithContentsOfFile: path];
if (array == nil) {
if (![[NSFileManager defaultManager] fileExistsAtPath: path]) {
- WEBKITDEBUG1("no history file found at %s\n",
+ WEBKITDEBUG("no history file found at %s\n",
DEBUG_OBJECT(path));
} else {
- WEBKITDEBUG1("attempt to read history from %s failed; perhaps contents are corrupted\n",
+ WEBKITDEBUG("attempt to read history from %s failed; perhaps contents are corrupted\n",
DEBUG_OBJECT(path));
}
return NO;
@@ -418,7 +418,7 @@
if (result == YES) {
duration = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL3 (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\n",
numberOfItems, DEBUG_OBJECT([self file]), duration);
}
@@ -439,7 +439,7 @@
array = [self arrayRepresentation];
if (![array writeToFile:path atomically:YES]) {
- WEBKITDEBUG2("attempt to save %s to %s failed\n", DEBUG_OBJECT(array), DEBUG_OBJECT(path));
+ WEBKITDEBUG("attempt to save %s to %s failed\n", DEBUG_OBJECT(array), DEBUG_OBJECT(path));
return NO;
}
@@ -458,7 +458,7 @@
if (result == YES) {
duration = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL3 (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\n",
numberOfItems, DEBUG_OBJECT([self file]), duration);
}
diff --git a/WebKit/Misc.subproj/WebKitDebug.h b/WebKit/Misc.subproj/WebKitDebug.h
index 01a4d04..70b2741 100644
--- a/WebKit/Misc.subproj/WebKitDebug.h
+++ b/WebKit/Misc.subproj/WebKitDebug.h
@@ -6,16 +6,9 @@
#ifdef xNDEBUG
-#define WEBKITDEBUGLEVEL(level,format) ((void)0)
-#define WEBKITDEBUGLEVEL1(level,format,arg1) ((void)0)
-#define WEBKITDEBUGLEVEL2(level,format,arg1,arg2) ((void)0)
-#define WEBKITDEBUGLEVEL3(level,format,arg1,arg2,arg3) ((void)0)
-#define WEBKITDEBUGLEVEL4(level,format,arg1,arg2,arg3,arg4) ((void)0)
-#define WEBKITDEBUGLEVEL5(level,format,arg1,arg2,arg3,arg4,arg5) ((void)0)
-#define WEBKITDEBUGLEVEL6(level,format,arg1,arg2,arg3,arg4,arg5,arg6) ((void)0)
-
+#define WEBKITDEBUGLEVEL(level, format...) ((void)0)
#define WEBKIT_ASSERT(expr) ((void)0)
-#define WEBKIT_ASSERT_VALID_ARG(arg,expr) ((void)0)
+#define WEBKIT_ASSERT_VALID_ARG(arg, expr) ((void)0)
#define WEBKIT_ASSERT_NOT_NIL(arg) ((void)0)
#else
@@ -55,43 +48,18 @@ extern "C" {
void WebKitSetLogLevel(int mask);
unsigned int WebKitGetLogLevel(void);
-void WebKitDebugAtLevel(unsigned int level, const char *format, ...)
- __attribute__((__format__ (__printf__, 2, 3)));
+void WebKitLog(unsigned int level, const char *file, int line, const char *function, const char *format, ...)
+ __attribute__((__format__ (__printf__, 5, 6)));
#ifdef __cplusplus
}
#endif
-#define WEBKITDEBUGLEVEL(level,format) \
- WebKitDebugAtLevel (level,"[%s:%d %s] ", __FILE__, __LINE__, __FUNCTION__);\
- 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] lossyCString]
+#define WEBKITDEBUGLEVEL(level, format...) \
+ WebKitLog(level, __FILE__, __LINE__, __PRETTY_FUNCTION__, format)
+
/*-----------------------------------------------------------------------------
* Assertion macros
*/
@@ -131,10 +99,4 @@ void WebKitDebugAtLevel(unsigned int level, const char *format, ...)
#define _logNotYetImplemented() \
WEBKITDEBUGLEVEL (WEBKIT_LOG_NOT_YET_IMPLEMENTED, "WARNING (NOT YET IMPLEMENTED)\n")
-#define WEBKITDEBUG(format) WEBKITDEBUGLEVEL(WEBKIT_LOG_GENERIC_DEBUG,format)
-#define WEBKITDEBUG1(format,arg1) WEBKITDEBUGLEVEL1(WEBKIT_LOG_GENERIC_DEBUG,format,arg1)
-#define WEBKITDEBUG2(format,arg1,arg2) WEBKITDEBUGLEVEL2(WEBKIT_LOG_GENERIC_DEBUG,format,arg1,arg2)
-#define WEBKITDEBUG3(format,arg1,arg2,arg3) WEBKITDEBUGLEVEL3(WEBKIT_LOG_GENERIC_DEBUG,format,arg1,arg2,arg3)
-#define WEBKITDEBUG4(format,arg1,arg2,arg3,arg4) WEBKITDEBUGLEVEL4(WEBKIT_LOG_GENERIC_DEBUG,format,arg1,arg2,arg3,arg4)
-#define WEBKITDEBUG5(format,arg1,arg2,arg3,arg4,arg5) WEBKITDEBUGLEVEL5(WEBKIT_LOG_GENERIC_DEBUG,format,arg1,arg2,arg3,arg4,arg5)
-#define WEBKITDEBUG6(format,arg1,arg2,arg3,arg4,arg5,arg6) WEBKITDEBUGLEVEL6(WEBKIT_LOG_GENERIC_DEBUG,format,arg1,arg2,arg3,arg4,arg5,arg6)
+#define WEBKITDEBUG(format...) WEBKITDEBUGLEVEL(WEBKIT_LOG_GENERIC_DEBUG, format)
diff --git a/WebKit/Misc.subproj/WebKitDebug.m b/WebKit/Misc.subproj/WebKitDebug.m
index 262dac8..6fe0d8b 100644
--- a/WebKit/Misc.subproj/WebKitDebug.m
+++ b/WebKit/Misc.subproj/WebKitDebug.m
@@ -28,13 +28,25 @@ unsigned int WebKitGetLogLevel(){
return WEBKIT_LOG_LEVEL;
}
+static const char *
+timestamp(void)
+{
+ NSString *date = [[NSDate date] descriptionWithCalendarFormat:@"%b %d %H:%M:%S.%F"
+ timeZone:[NSTimeZone systemTimeZone]
+ locale:nil];
+ return [date cString];
+}
-void WebKitDebugAtLevel(unsigned int level, const char *format, ...) {
- if (WebKitGetLogLevel() & level){
+void WebKitLog(unsigned int level, const char *file, int line, const char *function, const char *format, ...)
+{
+ if (WebKitGetLogLevel() & level) {
va_list args;
+ fprintf(stderr, "%s - [WEBKIT] - ", timestamp());
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
+ if (format[strlen(format) - 1] != '\n')
+ putc('\n', stderr);
}
}
diff --git a/WebKit/Plugins.subproj/IFPluginView.mm b/WebKit/Plugins.subproj/IFPluginView.mm
index 1bdd8cc..c28567a 100644
--- a/WebKit/Plugins.subproj/IFPluginView.mm
+++ b/WebKit/Plugins.subproj/IFPluginView.mm
@@ -132,7 +132,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
}else{
npErr = NPP_New(cMime, instance, mode, 0, NULL, NULL, &saved);
}
- WEBKITDEBUG1("NPP_New: %d\n", npErr);
+ WEBKITDEBUG("NPP_New: %d\n", npErr);
transferred = FALSE;
stopped = FALSE;
@@ -222,10 +222,10 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
window.type = NPWindowTypeWindow;
npErr = NPP_SetWindow(instance, &window);
- WEBKITDEBUG2("NPP_SetWindow: %d, port=%d\n", npErr, (int)nPort.port);
- WEBKITDEBUG4("frameInWindow.origin.x=%f, frameInWindow.origin.y=%f, frameInWindow.size.height=%d, frameInWindow.size.width=%d\n",
+ WEBKITDEBUG("NPP_SetWindow: %d, port=%d\n", npErr, (int)nPort.port);
+ WEBKITDEBUG("frameInWindow.origin.x=%f, frameInWindow.origin.y=%f, frameInWindow.size.height=%d, frameInWindow.size.width=%d\n",
frameInWindow.origin.x, frameInWindow.origin.y, (int)frameInWindow.size.height, (int)frameInWindow.size.width);
- WEBKITDEBUG4("visibleRectInWindow.origin.x=%f, visibleRectInWindow.origin.y=%f, visibleRectInWindow.size.height=%d, visibleRectInWindow.size.width=%d\n",
+ WEBKITDEBUG("visibleRectInWindow.origin.x=%f, visibleRectInWindow.origin.y=%f, visibleRectInWindow.size.height=%d, visibleRectInWindow.size.width=%d\n",
visibleRectInWindow.origin.x, visibleRectInWindow.origin.y, (int)visibleRectInWindow.size.height, (int)visibleRectInWindow.size.width);
}
@@ -275,7 +275,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
streamData->mimeType = cMime;
npErr = NPP_NewStream(instance, cMime, stream, FALSE, &transferMode);
- WEBKITDEBUG1("NPP_NewStream: %d\n", npErr);
+ WEBKITDEBUG("NPP_NewStream: %d\n", npErr);
streamData->transferMode = transferMode;
if(transferMode == NP_NORMAL){
@@ -314,9 +314,9 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
streamData = [[[sender attributes] objectForKey:IFURLHandleUserData] pointerValue];
if(streamData->transferMode != NP_ASFILEONLY){
bytes = NPP_WriteReady(instance, streamData->stream);
- //WEBKITDEBUG1("NPP_WriteReady bytes=%u\n", bytes);
+ //WEBKITDEBUG("NPP_WriteReady bytes=%u\n", bytes);
bytes = NPP_Write(instance, streamData->stream, streamData->offset, [data length], (void *)[data bytes]);
- //WEBKITDEBUG1("NPP_Write bytes=%u\n", bytes);
+ //WEBKITDEBUG("NPP_Write bytes=%u\n", bytes);
streamData->offset += [data length];
}
if(streamData->transferMode == NP_ASFILE || streamData->transferMode == NP_ASFILEONLY){
@@ -343,18 +343,18 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
[filename appendString:streamData->filename];
[filesToErase addObject:filename];
fileManager = [NSFileManager defaultManager];
- WEBKITDEBUG3("Writing plugin file out to: %s %s size: %u\n", [filenameClassic cString], [filename cString], [streamData->data length]);
+ WEBKITDEBUG("Writing plugin file out to: %s %s size: %u\n", [filenameClassic cString], [filename cString], [streamData->data length]);
[fileManager removeFileAtPath:filename handler:nil];
[fileManager createFileAtPath:filename contents:streamData->data attributes:nil];
cFilename = malloc([filenameClassic length]+1);
[filenameClassic getCString:cFilename];
NPP_StreamAsFile(instance, streamData->stream, cFilename);
- WEBKITDEBUG1("NPP_StreamAsFile: %s\n", cFilename);
+ WEBKITDEBUG("NPP_StreamAsFile: %s\n", cFilename);
[streamData->data release];
[streamData->filename release];
}
npErr = NPP_DestroyStream(instance, streamData->stream, NPRES_DONE);
- WEBKITDEBUG1("NPP_DestroyStream: %d\n", npErr);
+ WEBKITDEBUG("NPP_DestroyStream: %d\n", npErr);
if(streamData->stream->notifyData){
NPP_URLNotify(instance, streamData->stream->url, NPRES_DONE, streamData->stream->notifyData);
WEBKITDEBUG("NPP_URLNotify\n");
@@ -399,7 +399,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
Microseconds(&msecs);
event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(getFocusEvent): %d when: %lu\n", acceptedEvent, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(getFocusEvent): %d when: %lu\n", acceptedEvent, event.when);
return YES;
}
@@ -413,7 +413,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
Microseconds(&msecs);
event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(loseFocusEvent): %d when: %lu\n", acceptedEvent, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(loseFocusEvent): %d when: %lu\n", acceptedEvent, event.when);
return YES;
}
@@ -429,7 +429,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
event.modifiers = isActive;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(activateEvent): %d isActive: %d\n", acceptedEvent, (event.modifiers & activeFlag));
+ WEBKITDEBUG("NPP_HandleEvent(activateEvent): %d isActive: %d\n", acceptedEvent, (event.modifiers & activeFlag));
}
-(void)sendUpdateEvent
@@ -443,7 +443,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
Microseconds(&msecs);
event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(updateEvt): %d when: %lu\n", acceptedEvent, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(updateEvt): %d when: %lu\n", acceptedEvent, event.when);
}
-(void)mouseDown:(NSEvent *)theEvent
@@ -460,7 +460,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)([theEvent timestamp] * 60); // seconds to ticks
event.modifiers = 0;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG4("NPP_HandleEvent(mouseDown): %d pt.v=%d, pt.h=%d ticks=%lu\n", acceptedEvent, pt.v, pt.h, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(mouseDown): %d pt.v=%d, pt.h=%d ticks=%lu\n", acceptedEvent, pt.v, pt.h, event.when);
}
-(void)mouseUp:(NSEvent *)theEvent
@@ -477,7 +477,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)([theEvent timestamp] * 60);
event.modifiers = 0;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG4("NPP_HandleEvent(mouseUp): %d pt.v=%d, pt.h=%d ticks=%lu\n", acceptedEvent, pt.v, pt.h, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(mouseUp): %d pt.v=%d, pt.h=%d ticks=%lu\n", acceptedEvent, pt.v, pt.h, event.when);
}
- (void)mouseEntered:(NSEvent *)theEvent
@@ -489,7 +489,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)([theEvent timestamp] * 60);
event.modifiers = 1;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG1("NPP_HandleEvent(mouseEntered): %d\n", acceptedEvent);
+ WEBKITDEBUG("NPP_HandleEvent(mouseEntered): %d\n", acceptedEvent);
}
- (void)mouseExited:(NSEvent *)theEvent
@@ -501,7 +501,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)([theEvent timestamp] * 60);
event.modifiers = 0;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG1("NPP_HandleEvent(mouseExited): %d\n", acceptedEvent);
+ WEBKITDEBUG("NPP_HandleEvent(mouseExited): %d\n", acceptedEvent);
}
- (void)keyUp:(NSEvent *)theEvent
@@ -513,7 +513,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.message = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
event.when = (uint32)([theEvent timestamp] * 60);
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(keyUp): %d key:%c\n", acceptedEvent, (char) (event.message & charCodeMask));
+ WEBKITDEBUG("NPP_HandleEvent(keyUp): %d key:%c\n", acceptedEvent, (char) (event.message & charCodeMask));
//Note: QT Plug-in doesn't use keyUp's
}
@@ -526,7 +526,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.message = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
event.when = (uint32)([theEvent timestamp] * 60);
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(keyDown): %d key:%c\n", acceptedEvent, (char) (event.message & charCodeMask));
+ WEBKITDEBUG("NPP_HandleEvent(keyDown): %d key:%c\n", acceptedEvent, (char) (event.message & charCodeMask));
}
// plug-in to browser calls
@@ -536,7 +536,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
NSURL *newURL;
IFWebDataSource *dataSource;
- WEBKITDEBUG2("NPN_GetURLNotify: %s target: %s\n", url, target);
+ WEBKITDEBUG("NPN_GetURLNotify: %s target: %s\n", url, target);
if(!strcmp(url, "")){
return NPERR_INVALID_URL;
@@ -558,7 +558,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
-(NPError)getURL:(const char *)url target:(const char *)target
{
- WEBKITDEBUG2("NPN_GetURL: %s target: %s\n", url, target);
+ WEBKITDEBUG("NPN_GetURL: %s target: %s\n", url, target);
return [self getURLNotify:url target:target notifyData:NULL];
}
@@ -596,7 +596,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
{
IFWebDataSource *dataSource;
- WEBKITDEBUG1("NPN_Status: %s\n", message);
+ WEBKITDEBUG("NPN_Status: %s\n", message);
if(webController){
dataSource = [[webController mainFrame] dataSource];
[webController setStatusText:[NSString stringWithCString:message] forDataSource:dataSource];
@@ -644,7 +644,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self removeTrackingRect:trackingTag];
npErr = NPP_Destroy(instance, NULL);
- WEBKITDEBUG1("NPP_Destroy: %d\n", npErr);
+ WEBKITDEBUG("NPP_Destroy: %d\n", npErr);
stopped = TRUE;
}
}
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index 1bdd8cc..c28567a 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -132,7 +132,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
}else{
npErr = NPP_New(cMime, instance, mode, 0, NULL, NULL, &saved);
}
- WEBKITDEBUG1("NPP_New: %d\n", npErr);
+ WEBKITDEBUG("NPP_New: %d\n", npErr);
transferred = FALSE;
stopped = FALSE;
@@ -222,10 +222,10 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
window.type = NPWindowTypeWindow;
npErr = NPP_SetWindow(instance, &window);
- WEBKITDEBUG2("NPP_SetWindow: %d, port=%d\n", npErr, (int)nPort.port);
- WEBKITDEBUG4("frameInWindow.origin.x=%f, frameInWindow.origin.y=%f, frameInWindow.size.height=%d, frameInWindow.size.width=%d\n",
+ WEBKITDEBUG("NPP_SetWindow: %d, port=%d\n", npErr, (int)nPort.port);
+ WEBKITDEBUG("frameInWindow.origin.x=%f, frameInWindow.origin.y=%f, frameInWindow.size.height=%d, frameInWindow.size.width=%d\n",
frameInWindow.origin.x, frameInWindow.origin.y, (int)frameInWindow.size.height, (int)frameInWindow.size.width);
- WEBKITDEBUG4("visibleRectInWindow.origin.x=%f, visibleRectInWindow.origin.y=%f, visibleRectInWindow.size.height=%d, visibleRectInWindow.size.width=%d\n",
+ WEBKITDEBUG("visibleRectInWindow.origin.x=%f, visibleRectInWindow.origin.y=%f, visibleRectInWindow.size.height=%d, visibleRectInWindow.size.width=%d\n",
visibleRectInWindow.origin.x, visibleRectInWindow.origin.y, (int)visibleRectInWindow.size.height, (int)visibleRectInWindow.size.width);
}
@@ -275,7 +275,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
streamData->mimeType = cMime;
npErr = NPP_NewStream(instance, cMime, stream, FALSE, &transferMode);
- WEBKITDEBUG1("NPP_NewStream: %d\n", npErr);
+ WEBKITDEBUG("NPP_NewStream: %d\n", npErr);
streamData->transferMode = transferMode;
if(transferMode == NP_NORMAL){
@@ -314,9 +314,9 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
streamData = [[[sender attributes] objectForKey:IFURLHandleUserData] pointerValue];
if(streamData->transferMode != NP_ASFILEONLY){
bytes = NPP_WriteReady(instance, streamData->stream);
- //WEBKITDEBUG1("NPP_WriteReady bytes=%u\n", bytes);
+ //WEBKITDEBUG("NPP_WriteReady bytes=%u\n", bytes);
bytes = NPP_Write(instance, streamData->stream, streamData->offset, [data length], (void *)[data bytes]);
- //WEBKITDEBUG1("NPP_Write bytes=%u\n", bytes);
+ //WEBKITDEBUG("NPP_Write bytes=%u\n", bytes);
streamData->offset += [data length];
}
if(streamData->transferMode == NP_ASFILE || streamData->transferMode == NP_ASFILEONLY){
@@ -343,18 +343,18 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
[filename appendString:streamData->filename];
[filesToErase addObject:filename];
fileManager = [NSFileManager defaultManager];
- WEBKITDEBUG3("Writing plugin file out to: %s %s size: %u\n", [filenameClassic cString], [filename cString], [streamData->data length]);
+ WEBKITDEBUG("Writing plugin file out to: %s %s size: %u\n", [filenameClassic cString], [filename cString], [streamData->data length]);
[fileManager removeFileAtPath:filename handler:nil];
[fileManager createFileAtPath:filename contents:streamData->data attributes:nil];
cFilename = malloc([filenameClassic length]+1);
[filenameClassic getCString:cFilename];
NPP_StreamAsFile(instance, streamData->stream, cFilename);
- WEBKITDEBUG1("NPP_StreamAsFile: %s\n", cFilename);
+ WEBKITDEBUG("NPP_StreamAsFile: %s\n", cFilename);
[streamData->data release];
[streamData->filename release];
}
npErr = NPP_DestroyStream(instance, streamData->stream, NPRES_DONE);
- WEBKITDEBUG1("NPP_DestroyStream: %d\n", npErr);
+ WEBKITDEBUG("NPP_DestroyStream: %d\n", npErr);
if(streamData->stream->notifyData){
NPP_URLNotify(instance, streamData->stream->url, NPRES_DONE, streamData->stream->notifyData);
WEBKITDEBUG("NPP_URLNotify\n");
@@ -399,7 +399,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
Microseconds(&msecs);
event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(getFocusEvent): %d when: %lu\n", acceptedEvent, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(getFocusEvent): %d when: %lu\n", acceptedEvent, event.when);
return YES;
}
@@ -413,7 +413,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
Microseconds(&msecs);
event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(loseFocusEvent): %d when: %lu\n", acceptedEvent, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(loseFocusEvent): %d when: %lu\n", acceptedEvent, event.when);
return YES;
}
@@ -429,7 +429,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
event.modifiers = isActive;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(activateEvent): %d isActive: %d\n", acceptedEvent, (event.modifiers & activeFlag));
+ WEBKITDEBUG("NPP_HandleEvent(activateEvent): %d isActive: %d\n", acceptedEvent, (event.modifiers & activeFlag));
}
-(void)sendUpdateEvent
@@ -443,7 +443,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
Microseconds(&msecs);
event.when = (uint32)((double)UnsignedWideToUInt64(msecs) / 1000000 * 60); // microseconds to ticks
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(updateEvt): %d when: %lu\n", acceptedEvent, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(updateEvt): %d when: %lu\n", acceptedEvent, event.when);
}
-(void)mouseDown:(NSEvent *)theEvent
@@ -460,7 +460,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)([theEvent timestamp] * 60); // seconds to ticks
event.modifiers = 0;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG4("NPP_HandleEvent(mouseDown): %d pt.v=%d, pt.h=%d ticks=%lu\n", acceptedEvent, pt.v, pt.h, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(mouseDown): %d pt.v=%d, pt.h=%d ticks=%lu\n", acceptedEvent, pt.v, pt.h, event.when);
}
-(void)mouseUp:(NSEvent *)theEvent
@@ -477,7 +477,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)([theEvent timestamp] * 60);
event.modifiers = 0;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG4("NPP_HandleEvent(mouseUp): %d pt.v=%d, pt.h=%d ticks=%lu\n", acceptedEvent, pt.v, pt.h, event.when);
+ WEBKITDEBUG("NPP_HandleEvent(mouseUp): %d pt.v=%d, pt.h=%d ticks=%lu\n", acceptedEvent, pt.v, pt.h, event.when);
}
- (void)mouseEntered:(NSEvent *)theEvent
@@ -489,7 +489,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)([theEvent timestamp] * 60);
event.modifiers = 1;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG1("NPP_HandleEvent(mouseEntered): %d\n", acceptedEvent);
+ WEBKITDEBUG("NPP_HandleEvent(mouseEntered): %d\n", acceptedEvent);
}
- (void)mouseExited:(NSEvent *)theEvent
@@ -501,7 +501,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.when = (uint32)([theEvent timestamp] * 60);
event.modifiers = 0;
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG1("NPP_HandleEvent(mouseExited): %d\n", acceptedEvent);
+ WEBKITDEBUG("NPP_HandleEvent(mouseExited): %d\n", acceptedEvent);
}
- (void)keyUp:(NSEvent *)theEvent
@@ -513,7 +513,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.message = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
event.when = (uint32)([theEvent timestamp] * 60);
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(keyUp): %d key:%c\n", acceptedEvent, (char) (event.message & charCodeMask));
+ WEBKITDEBUG("NPP_HandleEvent(keyUp): %d key:%c\n", acceptedEvent, (char) (event.message & charCodeMask));
//Note: QT Plug-in doesn't use keyUp's
}
@@ -526,7 +526,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
event.message = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
event.when = (uint32)([theEvent timestamp] * 60);
acceptedEvent = NPP_HandleEvent(instance, &event);
- WEBKITDEBUG2("NPP_HandleEvent(keyDown): %d key:%c\n", acceptedEvent, (char) (event.message & charCodeMask));
+ WEBKITDEBUG("NPP_HandleEvent(keyDown): %d key:%c\n", acceptedEvent, (char) (event.message & charCodeMask));
}
// plug-in to browser calls
@@ -536,7 +536,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
NSURL *newURL;
IFWebDataSource *dataSource;
- WEBKITDEBUG2("NPN_GetURLNotify: %s target: %s\n", url, target);
+ WEBKITDEBUG("NPN_GetURLNotify: %s target: %s\n", url, target);
if(!strcmp(url, "")){
return NPERR_INVALID_URL;
@@ -558,7 +558,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
-(NPError)getURL:(const char *)url target:(const char *)target
{
- WEBKITDEBUG2("NPN_GetURL: %s target: %s\n", url, target);
+ WEBKITDEBUG("NPN_GetURL: %s target: %s\n", url, target);
return [self getURLNotify:url target:target notifyData:NULL];
}
@@ -596,7 +596,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
{
IFWebDataSource *dataSource;
- WEBKITDEBUG1("NPN_Status: %s\n", message);
+ WEBKITDEBUG("NPN_Status: %s\n", message);
if(webController){
dataSource = [[webController mainFrame] dataSource];
[webController setStatusText:[NSString stringWithCString:message] forDataSource:dataSource];
@@ -644,7 +644,7 @@ static id IFPluginMake(NSRect rect, WCPlugin *plugin, NSString *url, NSString *m
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self removeTrackingRect:trackingTag];
npErr = NPP_Destroy(instance, NULL);
- WEBKITDEBUG1("NPP_Destroy: %d\n", npErr);
+ WEBKITDEBUG("NPP_Destroy: %d\n", npErr);
stopped = TRUE;
}
}
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index cc5e407..49d3a54 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 38;
+ objectVersion = 36;
objects = {
014CEA440018CDF011CA2923 = {
buildRules = (
diff --git a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
index ae20eeb..9b3ca12 100644
--- a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
@@ -45,7 +45,7 @@
[self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
if (frame != nil) {
IFError *error = [[[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled failingURL: [dataSource inputURL]] autorelease];
[frame _checkLoadCompleteResource: resourceDescription error: error isMainDocument: NO];
@@ -70,7 +70,7 @@
[self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
[dataSource _setPrimaryLoadComplete: YES];
if (frame != nil) {
IFError *error = [[[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled failingURL: [dataSource inputURL]] autorelease];
@@ -86,7 +86,7 @@
// Check to see if this is these are the first bits of a provisional data source,
// if so we need to transition the data source from provisional to committed.
if([frame provisionalDataSource] == dataSource){
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "committing resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "committing resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
[frame _transitionProvisionalToCommitted];
}
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index 2c8b701..55bd695 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -34,12 +34,12 @@
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
}
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)sender
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = -1;
@@ -50,7 +50,7 @@
- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)sender data: (NSData *)data
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = [data length];
@@ -61,7 +61,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
{
- WEBKITDEBUGLEVEL3 (WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
//FIXME: This is a temporary hack to make sure we don't load non-html content.
//Since the cache returns nil for contentType when the URL is in the cache (2892912),
@@ -85,7 +85,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDidFailLoadingWithResult:(int)result
{
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "url = %s, result = %d\n", [[[sender url] absoluteString] cString], result);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s, result = %d\n", [[[sender url] absoluteString] cString], result);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = [sender contentLength];
@@ -98,7 +98,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_REDIRECT, "url = %s\n", [[url absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_REDIRECT, "url = %s\n", [[url absoluteString] cString]);
part->setBaseURL([[url absoluteString] cString]);
[[dataSource controller] serverRedirectTo: url forDataSource: dataSource];
diff --git a/WebKit/WebView.subproj/IFWebDataSource.mm b/WebKit/WebView.subproj/IFWebDataSource.mm
index c129085..61513cc 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.mm
+++ b/WebKit/WebView.subproj/IFWebDataSource.mm
@@ -215,7 +215,7 @@ static id IFWebDataSourceMake(void *url)
IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
int i, count;
- WEBKITDEBUGLEVEL4 (WEBKIT_LOG_LOADING, "frame %s: primaryLoadComplete %d, [data->urlHandles count] = %d, URL = %s\n", [[[self frame] name] cString], (int)data->primaryLoadComplete, [data->urlHandles count], [[[self inputURL] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "frame %s: primaryLoadComplete %d, [data->urlHandles count] = %d, URL = %s\n", [[[self frame] name] cString], (int)data->primaryLoadComplete, [data->urlHandles count], [[[self inputURL] absoluteString] cString]);
if (data->primaryLoadComplete == NO)
return YES;
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index 8b720d8..be28b3c 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -174,7 +174,7 @@
count = [data->urlHandles count];
for (i = 0; i < count; i++) {
handle = [data->urlHandles objectAtIndex: i];
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "cancelling %s\n", [[[handle url] absoluteString] cString] );
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelling %s\n", [[[handle url] absoluteString] cString] );
[[data->urlHandles objectAtIndex: i] cancelLoadInBackground];
}
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.mm b/WebKit/WebView.subproj/IFWebFramePrivate.mm
index 0c9e7e2..6b768e9 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.mm
@@ -150,13 +150,13 @@ char *stateNames[6] = {
// ahead and schedule a layout.
timeSinceStart = (CFAbsoluteTimeGetCurrent() - [[self dataSource] _loadingStartedTime]);
if (timeSinceStart > (double)defaultTimedDelay){
- WEBKITDEBUGLEVEL2 (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\n", timeSinceStart, defaultTimedDelay);
[self _timedLayout: nil];
}
else {
NSTimeInterval timedDelay = defaultTimedDelay - timeSinceStart;
- WEBKITDEBUGLEVEL2 (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\n", timedDelay, timeSinceStart);
[NSTimer scheduledTimerWithTimeInterval:timedDelay target:self selector: @selector(_timedLayout:) userInfo: nil repeats:FALSE];
}
}
@@ -246,17 +246,17 @@ char *stateNames[6] = {
{
IFWebFramePrivate *data = (IFWebFramePrivate *)_framePrivate;
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s: state = %s\n", [[self name] cString], stateNames[data->state]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s: state = %s\n", [[self name] cString], stateNames[data->state]);
if (data->state == IFWEBFRAMESTATE_LAYOUT_ACCEPTABLE){
if ([self controller])
- WEBKITDEBUGLEVEL2 (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\n", [[self name] cString], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
[[self view] setNeedsLayout: YES];
[[self view] setNeedsDisplay: YES];
}
else {
if ([self controller])
- WEBKITDEBUGLEVEL2 (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\n", [[self name] cString], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
}
}
@@ -271,9 +271,9 @@ char *stateNames[6] = {
{
IFWebFramePrivate *data = (IFWebFramePrivate *)_framePrivate;
- WEBKITDEBUGLEVEL3 (WEBKIT_LOG_LOADING, "%s: transition from %s to %s\n", [[self name] cString], stateNames[data->state], stateNames[newState]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: transition from %s to %s\n", [[self name] cString], stateNames[data->state], stateNames[newState]);
if ([self controller])
- WEBKITDEBUGLEVEL4 (WEBKIT_LOG_TIMING, "%s: transition from %s to %s, %f seconds since start of document load\n", [[self name] cString], stateNames[data->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\n", [[self name] cString], stateNames[data->state], stateNames[newState], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
data->state = newState;
}
@@ -303,14 +303,14 @@ char *stateNames[6] = {
case IFWEBFRAMESTATE_PROVISIONAL:
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "%s: checking complete in IFWEBFRAMESTATE_PROVISIONAL\n", [[self name] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete in IFWEBFRAMESTATE_PROVISIONAL\n", [[self name] cString]);
// If we've received any errors we may be stuck in the provisional state and actually
// complete.
if ([[self errors] count] != 0){
// Check all children first.
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_PROVISIONAL, %d errors\n", [[self name] cString], [[self errors] count]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_PROVISIONAL, %d errors\n", [[self name] cString], [[self errors] count]);
if (![[self provisionalDataSource] isLoading]){
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "%s: checking complete in IFWEBFRAMESTATE_PROVISIONAL, load done\n", [[self name] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete in IFWEBFRAMESTATE_PROVISIONAL, load done\n", [[self name] cString]);
// We now the provisional data source didn't cut the mustard, release it.
[data setProvisionalDataSource: nil];
@@ -325,7 +325,7 @@ char *stateNames[6] = {
case IFWEBFRAMESTATE_COMMITTED_PAGE:
case IFWEBFRAMESTATE_LAYOUT_ACCEPTABLE:
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_COMMITTED\n", [[self name] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_COMMITTED\n", [[self name] cString]);
if (![[self dataSource] isLoading]){
id mainView = [[[self controller] mainFrame] view];
id thisView = [self view];
@@ -367,7 +367,7 @@ char *stateNames[6] = {
case IFWEBFRAMESTATE_COMPLETE:
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_COMPLETE\n", [[self name] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_COMPLETE\n", [[self name] cString]);
return;
}
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index 77936cc..781acc5 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -124,7 +124,7 @@
((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles = NO;
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s apply style seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s apply style seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
#endif
}
}
@@ -153,7 +153,7 @@
((IFWebViewPrivate *)_viewPrivate)->needsLayout = NO;
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s layout seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s layout seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
#endif
}
}
@@ -270,21 +270,21 @@
- (void)setNeedsDisplay:(BOOL)flag
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
[super setNeedsDisplay: flag];
}
- (void)setNeedsLayout: (bool)flag
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
((IFWebViewPrivate *)_viewPrivate)->needsLayout = flag;
}
- (void)setNeedsToApplyStyles: (bool)flag
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles = flag;
}
@@ -342,7 +342,7 @@
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s draw seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s draw seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
#endif
}
}
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index c129085..61513cc 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -215,7 +215,7 @@ static id IFWebDataSourceMake(void *url)
IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
int i, count;
- WEBKITDEBUGLEVEL4 (WEBKIT_LOG_LOADING, "frame %s: primaryLoadComplete %d, [data->urlHandles count] = %d, URL = %s\n", [[[self frame] name] cString], (int)data->primaryLoadComplete, [data->urlHandles count], [[[self inputURL] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "frame %s: primaryLoadComplete %d, [data->urlHandles count] = %d, URL = %s\n", [[[self frame] name] cString], (int)data->primaryLoadComplete, [data->urlHandles count], [[[self inputURL] absoluteString] cString]);
if (data->primaryLoadComplete == NO)
return YES;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 8b720d8..be28b3c 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -174,7 +174,7 @@
count = [data->urlHandles count];
for (i = 0; i < count; i++) {
handle = [data->urlHandles objectAtIndex: i];
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "cancelling %s\n", [[[handle url] absoluteString] cString] );
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelling %s\n", [[[handle url] absoluteString] cString] );
[[data->urlHandles objectAtIndex: i] cancelLoadInBackground];
}
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 0c9e7e2..6b768e9 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -150,13 +150,13 @@ char *stateNames[6] = {
// ahead and schedule a layout.
timeSinceStart = (CFAbsoluteTimeGetCurrent() - [[self dataSource] _loadingStartedTime]);
if (timeSinceStart > (double)defaultTimedDelay){
- WEBKITDEBUGLEVEL2 (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\n", timeSinceStart, defaultTimedDelay);
[self _timedLayout: nil];
}
else {
NSTimeInterval timedDelay = defaultTimedDelay - timeSinceStart;
- WEBKITDEBUGLEVEL2 (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\n", timedDelay, timeSinceStart);
[NSTimer scheduledTimerWithTimeInterval:timedDelay target:self selector: @selector(_timedLayout:) userInfo: nil repeats:FALSE];
}
}
@@ -246,17 +246,17 @@ char *stateNames[6] = {
{
IFWebFramePrivate *data = (IFWebFramePrivate *)_framePrivate;
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s: state = %s\n", [[self name] cString], stateNames[data->state]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s: state = %s\n", [[self name] cString], stateNames[data->state]);
if (data->state == IFWEBFRAMESTATE_LAYOUT_ACCEPTABLE){
if ([self controller])
- WEBKITDEBUGLEVEL2 (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\n", [[self name] cString], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
[[self view] setNeedsLayout: YES];
[[self view] setNeedsDisplay: YES];
}
else {
if ([self controller])
- WEBKITDEBUGLEVEL2 (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\n", [[self name] cString], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
}
}
@@ -271,9 +271,9 @@ char *stateNames[6] = {
{
IFWebFramePrivate *data = (IFWebFramePrivate *)_framePrivate;
- WEBKITDEBUGLEVEL3 (WEBKIT_LOG_LOADING, "%s: transition from %s to %s\n", [[self name] cString], stateNames[data->state], stateNames[newState]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: transition from %s to %s\n", [[self name] cString], stateNames[data->state], stateNames[newState]);
if ([self controller])
- WEBKITDEBUGLEVEL4 (WEBKIT_LOG_TIMING, "%s: transition from %s to %s, %f seconds since start of document load\n", [[self name] cString], stateNames[data->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\n", [[self name] cString], stateNames[data->state], stateNames[newState], CFAbsoluteTimeGetCurrent() - [[[[self controller] mainFrame] dataSource] _loadingStartedTime]);
data->state = newState;
}
@@ -303,14 +303,14 @@ char *stateNames[6] = {
case IFWEBFRAMESTATE_PROVISIONAL:
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "%s: checking complete in IFWEBFRAMESTATE_PROVISIONAL\n", [[self name] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete in IFWEBFRAMESTATE_PROVISIONAL\n", [[self name] cString]);
// If we've received any errors we may be stuck in the provisional state and actually
// complete.
if ([[self errors] count] != 0){
// Check all children first.
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_PROVISIONAL, %d errors\n", [[self name] cString], [[self errors] count]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_PROVISIONAL, %d errors\n", [[self name] cString], [[self errors] count]);
if (![[self provisionalDataSource] isLoading]){
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "%s: checking complete in IFWEBFRAMESTATE_PROVISIONAL, load done\n", [[self name] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete in IFWEBFRAMESTATE_PROVISIONAL, load done\n", [[self name] cString]);
// We now the provisional data source didn't cut the mustard, release it.
[data setProvisionalDataSource: nil];
@@ -325,7 +325,7 @@ char *stateNames[6] = {
case IFWEBFRAMESTATE_COMMITTED_PAGE:
case IFWEBFRAMESTATE_LAYOUT_ACCEPTABLE:
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_COMMITTED\n", [[self name] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_COMMITTED\n", [[self name] cString]);
if (![[self dataSource] isLoading]){
id mainView = [[[self controller] mainFrame] view];
id thisView = [self view];
@@ -367,7 +367,7 @@ char *stateNames[6] = {
case IFWEBFRAMESTATE_COMPLETE:
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_COMPLETE\n", [[self name] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "%s: checking complete, current state IFWEBFRAMESTATE_COMPLETE\n", [[self name] cString]);
return;
}
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 77936cc..781acc5 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -124,7 +124,7 @@
((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles = NO;
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s apply style seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s apply style seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
#endif
}
}
@@ -153,7 +153,7 @@
((IFWebViewPrivate *)_viewPrivate)->needsLayout = NO;
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s layout seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s layout seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
#endif
}
}
@@ -270,21 +270,21 @@
- (void)setNeedsDisplay:(BOOL)flag
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
[super setNeedsDisplay: flag];
}
- (void)setNeedsLayout: (bool)flag
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
((IFWebViewPrivate *)_viewPrivate)->needsLayout = flag;
}
- (void)setNeedsToApplyStyles: (bool)flag
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_VIEW, "flag = %d\n", (int)flag);
((IFWebViewPrivate *)_viewPrivate)->needsToApplyStyles = flag;
}
@@ -342,7 +342,7 @@
#ifdef _KWQ_TIMING
double thisTime = CFAbsoluteTimeGetCurrent() - start;
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_TIMING, "%s draw seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_TIMING, "%s draw seconds = %f\n", widget->part()->baseURL().url().latin1(), thisTime);
#endif
}
}
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 2c8b701..55bd695 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -34,12 +34,12 @@
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
}
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)sender
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = -1;
@@ -50,7 +50,7 @@
- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)sender data: (NSData *)data
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = [data length];
@@ -61,7 +61,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
{
- WEBKITDEBUGLEVEL3 (WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
//FIXME: This is a temporary hack to make sure we don't load non-html content.
//Since the cache returns nil for contentType when the URL is in the cache (2892912),
@@ -85,7 +85,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDidFailLoadingWithResult:(int)result
{
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "url = %s, result = %d\n", [[[sender url] absoluteString] cString], result);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s, result = %d\n", [[[sender url] absoluteString] cString], result);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = [sender contentLength];
@@ -98,7 +98,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_REDIRECT, "url = %s\n", [[url absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_REDIRECT, "url = %s\n", [[url absoluteString] cString]);
part->setBaseURL([[url absoluteString] cString]);
[[dataSource controller] serverRedirectTo: url forDataSource: dataSource];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 2c8b701..55bd695 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -34,12 +34,12 @@
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
}
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)sender
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = -1;
@@ -50,7 +50,7 @@
- (void)IFURLHandleResourceDidFinishLoading:(IFURLHandle *)sender data: (NSData *)data
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = [data length];
@@ -61,7 +61,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
{
- WEBKITDEBUGLEVEL3 (WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
//FIXME: This is a temporary hack to make sure we don't load non-html content.
//Since the cache returns nil for contentType when the URL is in the cache (2892912),
@@ -85,7 +85,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDidFailLoadingWithResult:(int)result
{
- WEBKITDEBUGLEVEL2 (WEBKIT_LOG_LOADING, "url = %s, result = %d\n", [[[sender url] absoluteString] cString], result);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s, result = %d\n", [[[sender url] absoluteString] cString], result);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
loadProgress->totalToLoad = [sender contentLength];
@@ -98,7 +98,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
- WEBKITDEBUGLEVEL1 (WEBKIT_LOG_REDIRECT, "url = %s\n", [[url absoluteString] cString]);
+ WEBKITDEBUGLEVEL (WEBKIT_LOG_REDIRECT, "url = %s\n", [[url absoluteString] cString]);
part->setBaseURL([[url absoluteString] cString]);
[[dataSource controller] serverRedirectTo: url forDataSource: dataSource];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list