Bug 399852. #ifdef out logging code, since this checkin is going to stick
This commit is contained in:
Родитель
f45c11f7c8
Коммит
4b7d0ff521
|
@ -201,15 +201,19 @@ nsView::~nsView()
|
||||||
MOZ_COUNT_DTOR(nsView);
|
MOZ_COUNT_DTOR(nsView);
|
||||||
|
|
||||||
if (this == nsViewManager::GetViewFocusedBeforeSuppression()) {
|
if (this == nsViewManager::GetViewFocusedBeforeSuppression()) {
|
||||||
|
#ifdef DEBUG_FOCUS_SUPPRESSION
|
||||||
if (GetViewManager()->IsFocusSuppressed()) {
|
if (GetViewManager()->IsFocusSuppressed()) {
|
||||||
printf("*** 0 INFO TODO [CPEARCE] destroying view focused before suppression, while suppressed\n");
|
printf("*** 0 INFO TODO [CPEARCE] destroying view focused before suppression, while suppressed\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
nsViewManager::SetViewFocusedBeforeSuppression(nsnull);
|
nsViewManager::SetViewFocusedBeforeSuppression(nsnull);
|
||||||
}
|
}
|
||||||
if (this == nsViewManager::GetCurrentlyFocusedView()) {
|
if (this == nsViewManager::GetCurrentlyFocusedView()) {
|
||||||
|
#ifdef DEBUG_FOCUS_SUPPRESSION
|
||||||
if (GetViewManager()->IsFocusSuppressed()) {
|
if (GetViewManager()->IsFocusSuppressed()) {
|
||||||
printf("*** 0 INFO TODO [CPEARCE] destroying view currently focused, while suppressed\n");
|
printf("*** 0 INFO TODO [CPEARCE] destroying view currently focused, while suppressed\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
nsViewManager::SetCurrentlyFocusedView(nsnull);
|
nsViewManager::SetCurrentlyFocusedView(nsnull);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -970,7 +970,9 @@ void nsViewManager::UnsuppressFocusEvents()
|
||||||
if (GetViewFocusedBeforeSuppression()) {
|
if (GetViewFocusedBeforeSuppression()) {
|
||||||
widget = GetViewFocusedBeforeSuppression()->GetWidget();
|
widget = GetViewFocusedBeforeSuppression()->GetWidget();
|
||||||
if (widget) {
|
if (widget) {
|
||||||
|
#ifdef DEBUG_FOCUS_SUPPRESSION
|
||||||
printf("*** 0 INFO TODO [CPEARCE] Unsuppressing, dispatching NS_LOSTFOCUS\n");
|
printf("*** 0 INFO TODO [CPEARCE] Unsuppressing, dispatching NS_LOSTFOCUS\n");
|
||||||
|
#endif
|
||||||
nsGUIEvent event(PR_TRUE, NS_LOSTFOCUS, widget);
|
nsGUIEvent event(PR_TRUE, NS_LOSTFOCUS, widget);
|
||||||
widget->DispatchEvent(&event, status);
|
widget->DispatchEvent(&event, status);
|
||||||
}
|
}
|
||||||
|
@ -982,7 +984,9 @@ void nsViewManager::UnsuppressFocusEvents()
|
||||||
{
|
{
|
||||||
widget = GetCurrentlyFocusedView()->GetWidget();
|
widget = GetCurrentlyFocusedView()->GetWidget();
|
||||||
if (widget) {
|
if (widget) {
|
||||||
|
#ifdef DEBUG_FOCUS_SUPPRESSION
|
||||||
printf("*** 0 INFO TODO [CPEARCE] Unsuppressing, dispatching NS_GOTFOCUS\n");
|
printf("*** 0 INFO TODO [CPEARCE] Unsuppressing, dispatching NS_GOTFOCUS\n");
|
||||||
|
#endif
|
||||||
nsGUIEvent event(PR_TRUE, NS_GOTFOCUS, widget);
|
nsGUIEvent event(PR_TRUE, NS_GOTFOCUS, widget);
|
||||||
widget->DispatchEvent(&event, status);
|
widget->DispatchEvent(&event, status);
|
||||||
}
|
}
|
||||||
|
@ -1194,16 +1198,19 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (aEvent->message == NS_GOTFOCUS) {
|
if (aEvent->message == NS_GOTFOCUS) {
|
||||||
|
#ifdef DEBUG_FOCUS_SUPPRESSION
|
||||||
printf("*** 0 INFO TODO [CPEARCE] Focus changing%s\n",
|
printf("*** 0 INFO TODO [CPEARCE] Focus changing%s\n",
|
||||||
(nsViewManager::IsFocusSuppressed() ? " while suppressed" : ""));
|
(nsViewManager::IsFocusSuppressed() ? " while suppressed" : ""));
|
||||||
|
#endif
|
||||||
SetCurrentlyFocusedView(nsView::GetViewFor(aEvent->widget));
|
SetCurrentlyFocusedView(nsView::GetViewFor(aEvent->widget));
|
||||||
}
|
}
|
||||||
if ((aEvent->message == NS_GOTFOCUS || aEvent->message == NS_LOSTFOCUS) &&
|
if ((aEvent->message == NS_GOTFOCUS || aEvent->message == NS_LOSTFOCUS) &&
|
||||||
nsViewManager::IsFocusSuppressed())
|
nsViewManager::IsFocusSuppressed())
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_FOCUS_SUPPRESSION
|
||||||
printf("*** 0 INFO TODO [CPEARCE] Suppressing %s\n",
|
printf("*** 0 INFO TODO [CPEARCE] Suppressing %s\n",
|
||||||
(aEvent->message == NS_GOTFOCUS ? "NS_GOTFOCUS" : "NS_LOSTFOCUS"));
|
(aEvent->message == NS_GOTFOCUS ? "NS_GOTFOCUS" : "NS_LOSTFOCUS"));
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче