зеркало из https://github.com/mozilla/gecko-dev.git
Bug 563850 - Add scriptable interfaces for EnterModalState et al. r+sr=jst
This commit is contained in:
Родитель
0e03f80863
Коммит
4eef333b53
|
@ -1267,6 +1267,27 @@ nsDOMWindowUtils::GetVisitedDependentComputedStyle(
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::EnterModalState()
|
||||
{
|
||||
mWindow->EnterModalState();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::LeaveModalState()
|
||||
{
|
||||
mWindow->LeaveModalState();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::IsInModalState(PRBool *retval)
|
||||
{
|
||||
*retval = mWindow->IsInModalState();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetParent()
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ interface nsIDOMEvent;
|
|||
interface nsITransferable;
|
||||
interface nsIQueryContentEventResult;
|
||||
|
||||
[scriptable, uuid(0da97f1f-ad20-43e5-9793-61df63cc9c9a)]
|
||||
[scriptable, uuid(a6dbdbc9-5564-4e52-820a-4056c698f699)]
|
||||
interface nsIDOMWindowUtils : nsISupports {
|
||||
|
||||
/**
|
||||
|
@ -674,4 +674,21 @@ interface nsIDOMWindowUtils : nsISupports {
|
|||
* is no current inner window, throws NS_ERROR_NOT_AVAILABLE.
|
||||
*/
|
||||
readonly attribute unsigned long long currentInnerWindowID;
|
||||
|
||||
/**
|
||||
* Put the window into a state where scripts are frozen and events
|
||||
* suppressed, for use when the window has launched a modal prompt.
|
||||
*/
|
||||
void enterModalState();
|
||||
|
||||
/**
|
||||
* Resume normal window state, where scripts can run and events are
|
||||
* delivered.
|
||||
*/
|
||||
void leaveModalState();
|
||||
|
||||
/**
|
||||
* Is the window is in a modal state? [See enterModalState()]
|
||||
*/
|
||||
boolean isInModalState();
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче