Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@81885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -122,6 +122,11 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
#include "nsIPopupSetFrame.h"
|
||||
#include "nsIWalletService.h"
|
||||
#include "nslog.h"
|
||||
|
||||
NS_IMPL_LOG(nsWebShellWindowLog)
|
||||
#define PRINTF NS_LOG_PRINTF(nsWebShellWindowLog)
|
||||
#define FLUSH NS_LOG_FLUSH(nsWebShellWindowLog)
|
||||
|
||||
/* Define Class IDs */
|
||||
static NS_DEFINE_CID(kWindowCID, NS_WINDOW_CID);
|
||||
@@ -449,7 +454,7 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
|
||||
|
||||
case NS_ACTIVATE: {
|
||||
#ifdef DEBUG_saari
|
||||
printf("nsWebShellWindow::NS_ACTIVATE\n");
|
||||
PRINTF("nsWebShellWindow::NS_ACTIVATE\n");
|
||||
#endif
|
||||
// Sucky platform specific code to get around event dispatch ordering
|
||||
#ifdef WIN32
|
||||
@@ -487,7 +492,7 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
|
||||
|
||||
case NS_DEACTIVATE: {
|
||||
#ifdef DEBUG_saari
|
||||
printf("nsWebShellWindow::NS_DEACTIVATE\n");
|
||||
PRINTF("nsWebShellWindow::NS_DEACTIVATE\n");
|
||||
#endif
|
||||
|
||||
void* data;
|
||||
@@ -522,7 +527,7 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
|
||||
|
||||
case NS_GOTFOCUS: {
|
||||
#ifdef DEBUG_saari
|
||||
printf("nsWebShellWindow::GOTFOCUS\n");
|
||||
PRINTF("nsWebShellWindow::GOTFOCUS\n");
|
||||
#endif
|
||||
void* data;
|
||||
aEvent->widget->GetClientData(data);
|
||||
@@ -760,13 +765,13 @@ NS_IMETHODIMP nsWebShellWindow::LoadMenuItem(
|
||||
pnsMenuItem->AddMenuListener(listener);
|
||||
|
||||
#ifdef DEBUG_MENUSDEL
|
||||
printf("Adding menu listener to [%s]\n", menuitemName.ToNewCString());
|
||||
PRINTF("Adding menu listener to [%s]\n", menuitemName.ToNewCString());
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG_MENUSDEL
|
||||
else
|
||||
{
|
||||
printf("*** NOT Adding menu listener to [%s]\n", menuitemName.ToNewCString());
|
||||
PRINTF("*** NOT Adding menu listener to [%s]\n", menuitemName.ToNewCString());
|
||||
}
|
||||
#endif
|
||||
NS_RELEASE(icmd);
|
||||
@@ -786,7 +791,7 @@ void nsWebShellWindow::LoadSubMenu(
|
||||
{
|
||||
nsString menuName;
|
||||
menuElement->GetAttribute(NS_ConvertASCIItoUCS2("value"), menuName);
|
||||
//printf("Creating Menu [%s] \n", menuName.ToNewCString()); // this leaks
|
||||
//PRINTF("Creating Menu [%s] \n", menuName.ToNewCString()); // this leaks
|
||||
|
||||
// Create nsMenu
|
||||
nsIMenu * pnsMenu = nsnull;
|
||||
@@ -840,7 +845,7 @@ void nsWebShellWindow::LoadSubMenu(
|
||||
menuitemElement->GetNodeName(menuitemNodeType);
|
||||
|
||||
#ifdef DEBUG_saari
|
||||
printf("Type [%s] %d\n", menuitemNodeType.ToNewCString(), menuitemNodeType.Equals("menuseparator"));
|
||||
PRINTF("Type [%s] %d\n", menuitemNodeType.ToNewCString(), menuitemNodeType.Equals("menuseparator"));
|
||||
#endif
|
||||
|
||||
if (menuitemNodeType.EqualsWithConversion("menuitem")) {
|
||||
@@ -987,7 +992,7 @@ void nsWebShellWindow::LoadMenus(nsIDOMDocument * aDOMDoc, nsIWidget * aParentWi
|
||||
menuElement->GetAttribute(NS_ConvertASCIItoUCS2("value"), menuName);
|
||||
|
||||
#ifdef DEBUG_rods
|
||||
printf("Creating Menu [%s] \n", menuName.ToNewCString()); // this leaks
|
||||
PRINTF("Creating Menu [%s] \n", menuName.ToNewCString()); // this leaks
|
||||
#endif
|
||||
CreateMenu(pnsMenuBar, menuNode, menuName);
|
||||
}
|
||||
@@ -1232,7 +1237,7 @@ nsWebShellWindow::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
nsIChannel* channel, nsresult aStatus)
|
||||
{
|
||||
#ifdef DEBUG_MENUSDEL
|
||||
printf("OnEndDocumentLoad\n");
|
||||
PRINTF("OnEndDocumentLoad\n");
|
||||
#endif
|
||||
|
||||
/* We get notified every time a page/Frame is loaded. But we need to
|
||||
@@ -1339,7 +1344,7 @@ nsCOMPtr<nsIDOMNode> nsWebShellWindow::FindNamedDOMNode(const nsString &aName, n
|
||||
while (node) {
|
||||
nsString name;
|
||||
node->GetNodeName(name);
|
||||
//printf("FindNamedDOMNode[%s]==[%s] %d == %d\n", aName.ToNewCString(), name.ToNewCString(), aCount+1, aEndCount); //this leaks
|
||||
//PRINTF("FindNamedDOMNode[%s]==[%s] %d == %d\n", aName.ToNewCString(), name.ToNewCString(), aCount+1, aEndCount); //this leaks
|
||||
if (name.Equals(aName)) {
|
||||
aCount++;
|
||||
if (aCount == aEndCount)
|
||||
@@ -1592,7 +1597,7 @@ nsWebShellWindow::AttributeChanged(nsIDocument *aDocument,
|
||||
PRInt32 aHint)
|
||||
{
|
||||
#if 0
|
||||
//printf("AttributeChanged\n");
|
||||
//PRINTF("AttributeChanged\n");
|
||||
PRInt32 i;
|
||||
for (i=0;i<mMenuDelegates.Count();i++) {
|
||||
nsIXULCommand * cmd = (nsIXULCommand *)mMenuDelegates[i];
|
||||
|
||||
Reference in New Issue
Block a user