mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 709492 - Part 1: Add a paintingSuppressed getter to nsIDOMWindowUtils. r=bz
This commit is contained in:
parent
27f33128b7
commit
2307e2060e
@ -2039,3 +2039,19 @@ nsDOMWindowUtils::GetPCCountScriptContents(PRInt32 script, JSContext* cx, nsAStr
|
||||
result = str;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetPaintingSuppressed(bool *aPaintingSuppressed)
|
||||
{
|
||||
NS_ENSURE_TRUE(mWindow, NS_ERROR_FAILURE);
|
||||
nsIDocShell *docShell = mWindow->GetDocShell();
|
||||
NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
docShell->GetPresShell(getter_AddRefs(presShell));
|
||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||
|
||||
*aPaintingSuppressed = presShell->IsPaintingSuppressed();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ interface nsIDOMBlob;
|
||||
interface nsIDOMFile;
|
||||
interface nsIFile;
|
||||
|
||||
[scriptable, uuid(9df58cf3-7094-4c8d-96f2-bebd765099fe)]
|
||||
[scriptable, uuid(c1fa9c82-acf2-4b27-8ca7-7d1864e606af)]
|
||||
interface nsIDOMWindowUtils : nsISupports {
|
||||
|
||||
/**
|
||||
@ -981,4 +981,10 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
*/
|
||||
[implicit_jscontext]
|
||||
AString getPCCountScriptContents(in long script);
|
||||
|
||||
/**
|
||||
* Returns true if painting is suppressed for this window and false
|
||||
* otherwise.
|
||||
*/
|
||||
readonly attribute boolean paintingSuppressed;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user