From 6f88448373372a606689f54efec12b2dd7bf39fe Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 19 Feb 2008 11:08:57 +0000 Subject: [PATCH] Bug 399852. #ifdef out logging code, since this checkin is going to stick git-svn-id: svn://10.0.0.236/trunk@245964 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/view/src/nsView.cpp | 4 ++++ mozilla/view/src/nsViewManager.cpp | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mozilla/view/src/nsView.cpp b/mozilla/view/src/nsView.cpp index 8645f4237eb..deff015d8a6 100644 --- a/mozilla/view/src/nsView.cpp +++ b/mozilla/view/src/nsView.cpp @@ -201,15 +201,19 @@ nsView::~nsView() MOZ_COUNT_DTOR(nsView); if (this == nsViewManager::GetViewFocusedBeforeSuppression()) { +#ifdef DEBUG_FOCUS_SUPPRESSION if (GetViewManager()->IsFocusSuppressed()) { printf("*** 0 INFO TODO [CPEARCE] destroying view focused before suppression, while suppressed\n"); } +#endif nsViewManager::SetViewFocusedBeforeSuppression(nsnull); } if (this == nsViewManager::GetCurrentlyFocusedView()) { +#ifdef DEBUG_FOCUS_SUPPRESSION if (GetViewManager()->IsFocusSuppressed()) { printf("*** 0 INFO TODO [CPEARCE] destroying view currently focused, while suppressed\n"); } +#endif nsViewManager::SetCurrentlyFocusedView(nsnull); } diff --git a/mozilla/view/src/nsViewManager.cpp b/mozilla/view/src/nsViewManager.cpp index e1b05eb7c0f..f484d2739fe 100644 --- a/mozilla/view/src/nsViewManager.cpp +++ b/mozilla/view/src/nsViewManager.cpp @@ -970,7 +970,9 @@ void nsViewManager::UnsuppressFocusEvents() if (GetViewFocusedBeforeSuppression()) { widget = GetViewFocusedBeforeSuppression()->GetWidget(); if (widget) { +#ifdef DEBUG_FOCUS_SUPPRESSION printf("*** 0 INFO TODO [CPEARCE] Unsuppressing, dispatching NS_LOSTFOCUS\n"); +#endif nsGUIEvent event(PR_TRUE, NS_LOSTFOCUS, widget); widget->DispatchEvent(&event, status); } @@ -982,7 +984,9 @@ void nsViewManager::UnsuppressFocusEvents() { widget = GetCurrentlyFocusedView()->GetWidget(); if (widget) { +#ifdef DEBUG_FOCUS_SUPPRESSION printf("*** 0 INFO TODO [CPEARCE] Unsuppressing, dispatching NS_GOTFOCUS\n"); +#endif nsGUIEvent event(PR_TRUE, NS_GOTFOCUS, widget); widget->DispatchEvent(&event, status); } @@ -1194,16 +1198,19 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS default: { if (aEvent->message == NS_GOTFOCUS) { +#ifdef DEBUG_FOCUS_SUPPRESSION printf("*** 0 INFO TODO [CPEARCE] Focus changing%s\n", - (nsViewManager::IsFocusSuppressed() ? " while suppressed" : "")); + (nsViewManager::IsFocusSuppressed() ? " while suppressed" : "")); +#endif SetCurrentlyFocusedView(nsView::GetViewFor(aEvent->widget)); } if ((aEvent->message == NS_GOTFOCUS || aEvent->message == NS_LOSTFOCUS) && nsViewManager::IsFocusSuppressed()) { +#ifdef DEBUG_FOCUS_SUPPRESSION printf("*** 0 INFO TODO [CPEARCE] Suppressing %s\n", (aEvent->message == NS_GOTFOCUS ? "NS_GOTFOCUS" : "NS_LOSTFOCUS")); - +#endif break; }