From 3eedcc5861c1b185c546d957f6743b47faa310e8 Mon Sep 17 00:00:00 2001 From: Jae-Seong Lee-Russo Date: Fri, 12 Feb 2010 21:32:34 +1300 Subject: [PATCH] Bug 517553: Remove ==/!= PR_FALSE/PR_TRUE r=jst --- embedding/browser/activex/src/common/IWebBrowserImpl.h | 4 ++-- embedding/browser/activex/src/control/PromptService.cpp | 8 ++++---- .../browser/activex/src/control/WebBrowserContainer.cpp | 4 ++-- embedding/browser/gtk/src/EmbedContextMenuInfo.cpp | 2 +- embedding/browser/photon/src/EmbedDownload.cpp | 2 +- embedding/browser/photon/src/PtMozilla.cpp | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/embedding/browser/activex/src/common/IWebBrowserImpl.h b/embedding/browser/activex/src/common/IWebBrowserImpl.h index aee8520dba9d..e6227bb97e2a 100644 --- a/embedding/browser/activex/src/common/IWebBrowserImpl.h +++ b/embedding/browser/activex/src/common/IWebBrowserImpl.h @@ -149,7 +149,7 @@ public: PRBool aCanGoBack = PR_FALSE; webNav->GetCanGoBack(&aCanGoBack); - if (aCanGoBack == PR_TRUE) + if (aCanGoBack) { webNav->GoBack(); } @@ -164,7 +164,7 @@ public: PRBool aCanGoForward = PR_FALSE; webNav->GetCanGoForward(&aCanGoForward); - if (aCanGoForward == PR_TRUE) + if (aCanGoForward) { webNav->GoForward(); } diff --git a/embedding/browser/activex/src/control/PromptService.cpp b/embedding/browser/activex/src/control/PromptService.cpp index 08754997a39e..642471886263 100644 --- a/embedding/browser/activex/src/control/PromptService.cpp +++ b/embedding/browser/activex/src/control/PromptService.cpp @@ -202,7 +202,7 @@ nsresult PromptDlg::ConfirmEx( { NS_ENSURE_ARG_POINTER(checkValue); mCheckMessage = _tcsdup(W2T(checkMsg)); - mCheckValue = (*checkValue == PR_TRUE) ? TRUE : FALSE; + mCheckValue = *checkValue ? TRUE : FALSE; } // Turn the button flags into strings. The nsIPromptService flags @@ -284,7 +284,7 @@ PromptDlg::Prompt(HWND hwndParent, const PRUnichar *dialogTitle, { NS_ENSURE_ARG_POINTER(checkValue); mCheckMessage = _tcsdup(W2T(checkMsg)); - mCheckValue = (*checkValue == PR_TRUE) ? TRUE : FALSE; + mCheckValue = *checkValue ? TRUE : FALSE; } if (value) { @@ -342,7 +342,7 @@ PromptDlg::PromptUsernameAndPassword(HWND hwndParent, { NS_ENSURE_ARG_POINTER(checkValue); mCheckMessage = _tcsdup(W2T(checkMsg)); - mCheckValue = (*checkValue == PR_TRUE) ? TRUE : FALSE; + mCheckValue = *checkValue ? TRUE : FALSE; } if (username) { @@ -411,7 +411,7 @@ PromptDlg::PromptPassword(HWND hwndParent, { NS_ENSURE_ARG_POINTER(checkValue); mCheckMessage = _tcsdup(W2T(checkMsg)); - mCheckValue = (*checkValue == PR_TRUE) ? TRUE : FALSE; + mCheckValue = *checkValue ? TRUE : FALSE; } if (password) { diff --git a/embedding/browser/activex/src/control/WebBrowserContainer.cpp b/embedding/browser/activex/src/control/WebBrowserContainer.cpp index e872fe31609a..dd3c82ad601a 100644 --- a/embedding/browser/activex/src/control/WebBrowserContainer.cpp +++ b/embedding/browser/activex/src/control/WebBrowserContainer.cpp @@ -256,7 +256,7 @@ NS_IMETHODIMP CWebBrowserContainer::OnStateChange(nsIWebProgress* aWebProgress, VARIANT_BOOL bEnableForward = VARIANT_FALSE; PRBool aCanGoForward = PR_FALSE; webNav->GetCanGoForward(&aCanGoForward); - if (aCanGoForward == PR_TRUE) + if (aCanGoForward) { bEnableForward = VARIANT_TRUE; } @@ -266,7 +266,7 @@ NS_IMETHODIMP CWebBrowserContainer::OnStateChange(nsIWebProgress* aWebProgress, VARIANT_BOOL bEnableBack = VARIANT_FALSE; PRBool aCanGoBack = PR_FALSE; webNav->GetCanGoBack(&aCanGoBack); - if (aCanGoBack == PR_TRUE) + if (aCanGoBack) { bEnableBack = VARIANT_TRUE; } diff --git a/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp b/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp index f5a0d634f80b..e443833214d4 100644 --- a/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +++ b/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp @@ -416,7 +416,7 @@ EmbedContextMenuInfo::CheckDomHtmlNode(nsIDOMNode *aNode) if (NS_SUCCEEDED(rv) && area) { PRBool aNoHref = PR_FALSE; rv = area->GetNoHref(&aNoHref); - if (aNoHref == PR_FALSE) + if (!aNoHref) rv = area->GetHref(mCtxHref); else rv = area->GetTarget(mCtxHref); diff --git a/embedding/browser/photon/src/EmbedDownload.cpp b/embedding/browser/photon/src/EmbedDownload.cpp index 77c83daebfca..69a46f6fcde1 100644 --- a/embedding/browser/photon/src/EmbedDownload.cpp +++ b/embedding/browser/photon/src/EmbedDownload.cpp @@ -78,7 +78,7 @@ EmbedDownload::~EmbedDownload() mMozillaWidget->fDownload = NULL; } - if( mDone == PR_FALSE ) ReportDownload( Pt_WEB_DOWNLOAD_CANCEL, 0, 0, "" ); + if( !mDone ) ReportDownload( Pt_WEB_DOWNLOAD_CANCEL, 0, 0, "" ); } ///* ATENTIE */ printf( "after remove fDownloadCount=%d\n", mMozillaWidget->fDownloadCount ); diff --git a/embedding/browser/photon/src/PtMozilla.cpp b/embedding/browser/photon/src/PtMozilla.cpp index 8902ff20290b..79dfa28889f8 100644 --- a/embedding/browser/photon/src/PtMozilla.cpp +++ b/embedding/browser/photon/src/PtMozilla.cpp @@ -839,7 +839,7 @@ static void mozilla_get_pref( PtWidget_t *widget, char *option, char *value ) { else if( !strcmp( option, "bIgnoreDocumentAttributes" ) ) { PRBool val; pref->GetBoolPref( "browser.display.use_document_colors", &val ); - sprintf( value, "%s", val == PR_TRUE ? "FALSE" : "TRUE" ); + sprintf( value, "%s", val ? "FALSE" : "TRUE" ); } else if( !strcmp( option, "disable_new_windows" ) ) { sprintf( value, "%s", (moz->disable_new_windows == 1) ? "TRUE" : "FALSE" ); @@ -850,7 +850,7 @@ static void mozilla_get_pref( PtWidget_t *widget, char *option, char *value ) { else if( !strcmp( option, "bUnderlineLinks" ) ) { PRBool val; pref->GetBoolPref( "browser.underline_anchors", &val ); - sprintf( value, "%s", val == PR_TRUE ? "TRUE" : "FALSE" ); + sprintf( value, "%s", val ? "TRUE" : "FALSE" ); } else if( !strcmp( option, "iUserTextSize" ) ) { sprintf( value, "%d", moz->text_zoom ); @@ -942,7 +942,7 @@ static void mozilla_get_pref( PtWidget_t *widget, char *option, char *value ) { else if( !strcmp( option, "enable_disk_cache" ) ) { PRBool val; pref->GetBoolPref( "browser.cache.disk.enable", &val ); - sprintf( value, "%s", val == PR_TRUE ? "TRUE" : "FALSE" ); + sprintf( value, "%s", val ? "TRUE" : "FALSE" ); } else if( !strcmp( option, "dcache_verify_policy" ) ) { int n, voyager_value = 0;