Bug 694227 nsIBaseWindow::blurSuppression is unusued, r-bsmedbeg,sr=bz

This commit is contained in:
Neil Deakin 2011-10-14 14:11:22 -04:00
parent 0e6d746781
commit a613d39bb5
10 changed files with 1 additions and 115 deletions

View File

@ -4951,20 +4951,6 @@ nsDocShell::SetEnabled(bool aEnabled)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocShell::GetBlurSuppression(bool *aBlurSuppression)
{
NS_ENSURE_ARG_POINTER(aBlurSuppression);
*aBlurSuppression = PR_FALSE;
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocShell::SetBlurSuppression(bool aBlurSuppression)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocShell::SetFocus()
{

View File

@ -7220,17 +7220,6 @@ nsGlobalWindow::UpdateCommands(const nsAString& anAction)
return NS_OK;
}
bool
nsGlobalWindow::GetBlurSuppression()
{
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin;
GetTreeOwner(getter_AddRefs(treeOwnerAsWin));
bool suppress = false;
if (treeOwnerAsWin)
treeOwnerAsWin->GetBlurSuppression(&suppress);
return suppress;
}
NS_IMETHODIMP
nsGlobalWindow::GetSelection(nsISelection** aSelection)
{

View File

@ -652,20 +652,6 @@ nsDocShellTreeOwner::SetEnabled(bool aEnabled)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocShellTreeOwner::GetBlurSuppression(bool *aBlurSuppression)
{
NS_ENSURE_ARG_POINTER(aBlurSuppression);
*aBlurSuppression = PR_FALSE;
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocShellTreeOwner::SetBlurSuppression(bool aBlurSuppression)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocShellTreeOwner::GetMainWidget(nsIWidget** aMainWidget)
{

View File

@ -1454,20 +1454,6 @@ NS_IMETHODIMP nsWebBrowser::SetEnabled(bool aEnabled)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsWebBrowser::GetBlurSuppression(bool *aBlurSuppression)
{
NS_ENSURE_ARG_POINTER(aBlurSuppression);
*aBlurSuppression = PR_FALSE;
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsWebBrowser::SetBlurSuppression(bool aBlurSuppression)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsWebBrowser::GetMainWidget(nsIWidget** mainWidget)
{
NS_ENSURE_ARG_POINTER(mainWidget);

View File

@ -256,14 +256,10 @@ nsFilePicker.prototype = {
dump("file picker couldn't get base window\n"+ex+"\n");
}
try {
if (parentWin)
parentWin.blurSuppression = true;
parent.openDialog("chrome://global/content/filepicker.xul",
"",
"chrome,modal,titlebar,resizable=yes,dependent=yes",
o);
if (parentWin)
parentWin.blurSuppression = false;
this.mFilterIndex = o.retvals.filterIndex;
this.mFilesEnumerator = o.retvals.files;

View File

@ -54,7 +54,7 @@ typedef voidPtr nativeWindow;
* but rather a common set that nearly all windowed objects support.
*/
[scriptable, uuid(046BC8A0-8015-11d3-AF70-00A024FFC08C)]
[scriptable, uuid(7144AC8B-6702-4A4B-A73D-D1D4E9717E46)]
interface nsIBaseWindow : nsISupports
{
/*
@ -198,13 +198,6 @@ interface nsIBaseWindow : nsISupports
*/
attribute boolean enabled;
/** set blurSuppression to true to suppress handling of blur events.
* set it false to re-enable them. query it to determine whether
* blur events are suppressed. The implementation should allow
* for blur events to be suppressed multiple times.
*/
attribute boolean blurSuppression;
/*
Allows you to find out what the widget is of a given object. Depending
on the object, this may return the parent widget in which this object

View File

@ -480,18 +480,6 @@ NS_IMETHODIMP nsChromeTreeOwner::SetEnabled(bool aEnable)
return mXULWindow->SetEnabled(aEnable);
}
NS_IMETHODIMP nsChromeTreeOwner::GetBlurSuppression(bool *aBlurSuppression)
{
NS_ENSURE_STATE(mXULWindow);
return mXULWindow->GetBlurSuppression(aBlurSuppression);
}
NS_IMETHODIMP nsChromeTreeOwner::SetBlurSuppression(bool aBlurSuppression)
{
NS_ENSURE_STATE(mXULWindow);
return mXULWindow->SetBlurSuppression(aBlurSuppression);
}
NS_IMETHODIMP nsChromeTreeOwner::GetMainWidget(nsIWidget** aMainWidget)
{
NS_ENSURE_ARG_POINTER(aMainWidget);

View File

@ -694,18 +694,6 @@ NS_IMETHODIMP nsContentTreeOwner::SetEnabled(bool aEnable)
return mXULWindow->SetEnabled(aEnable);
}
NS_IMETHODIMP nsContentTreeOwner::GetBlurSuppression(bool *aBlurSuppression)
{
NS_ENSURE_STATE(mXULWindow);
return mXULWindow->GetBlurSuppression(aBlurSuppression);
}
NS_IMETHODIMP nsContentTreeOwner::SetBlurSuppression(bool aBlurSuppression)
{
NS_ENSURE_STATE(mXULWindow);
return mXULWindow->SetBlurSuppression(aBlurSuppression);
}
NS_IMETHODIMP nsContentTreeOwner::GetMainWidget(nsIWidget** aMainWidget)
{
NS_ENSURE_ARG_POINTER(aMainWidget);

View File

@ -146,7 +146,6 @@ nsXULWindow::nsXULWindow(PRUint32 aChromeFlags)
mChromeFlagsFrozen(PR_FALSE),
mIgnoreXULSizeMode(PR_FALSE),
mContextFlags(0),
mBlurSuppressionLevel(0),
mPersistentAttributesDirty(0),
mPersistentAttributesMask(0),
mChromeFlags(aChromeFlags),
@ -854,30 +853,6 @@ NS_IMETHODIMP nsXULWindow::SetEnabled(bool aEnable)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULWindow::GetBlurSuppression(bool *aBlurSuppression)
{
NS_ENSURE_ARG_POINTER(aBlurSuppression);
*aBlurSuppression = mBlurSuppressionLevel > 0;
return NS_OK;
}
NS_IMETHODIMP nsXULWindow::SetBlurSuppression(bool aBlurSuppression)
{
if (aBlurSuppression)
++mBlurSuppressionLevel;
else {
NS_ASSERTION(mBlurSuppressionLevel > 0, "blur over-allowed");
if (mBlurSuppressionLevel > 0)
--mBlurSuppressionLevel;
}
return NS_OK;
/* XXX propagate this information to the widget? It has its own
independent concept of blur suppression. Each is used on
a different platform, so at time of writing it's not necessary
to keep them in sync. (And there's no interface for doing so.) */
}
NS_IMETHODIMP nsXULWindow::GetMainWidget(nsIWidget** aMainWidget)
{
NS_ENSURE_ARG_POINTER(aMainWidget);

View File

@ -173,7 +173,6 @@ protected:
bool mChromeFlagsFrozen;
bool mIgnoreXULSizeMode;
PRUint32 mContextFlags;
PRUint32 mBlurSuppressionLevel;
PRUint32 mPersistentAttributesDirty; // persistentAttributes
PRUint32 mPersistentAttributesMask;
PRUint32 mChromeFlags;