зеркало из https://github.com/mozilla/gecko-dev.git
Bug 805670 - Introduce nsIDOMWindowUtils.getResolution. r=dholbert sr=smaug
This commit is contained in:
Родитель
ad8c94f6fc
Коммит
dacf45fe5c
|
@ -414,6 +414,23 @@ nsDOMWindowUtils::SetResolution(float aXResolution, float aYResolution)
|
|||
: NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetResolution(float* aXResolution, float* aYResolution)
|
||||
{
|
||||
if (!nsContentUtils::IsCallerChrome()) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
|
||||
nsIPresShell* presShell = GetPresShell();
|
||||
|
||||
if (presShell) {
|
||||
*aXResolution = presShell->GetXResolution();
|
||||
*aYResolution = presShell->GetYResolution();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::SetIsFirstPaint(bool aIsFirstPaint)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ interface nsIDOMTouch;
|
|||
interface nsIDOMClientRect;
|
||||
interface nsIURI;
|
||||
|
||||
[scriptable, uuid(020deb5a-cba6-41dd-8551-72a880d01970)]
|
||||
[scriptable, uuid(b3a3589d-cc9d-4123-9b21-51c66e88b436)]
|
||||
interface nsIDOMWindowUtils : nsISupports {
|
||||
|
||||
/**
|
||||
|
@ -174,6 +174,8 @@ interface nsIDOMWindowUtils : nsISupports {
|
|||
*/
|
||||
void setResolution(in float aXResolution, in float aYResolution);
|
||||
|
||||
void getResolution(out float aXResolution, out float aYResolution);
|
||||
|
||||
/**
|
||||
* Whether the next paint should be flagged as the first paint for a document.
|
||||
* This gives a way to track the next paint that occurs after the flag is
|
||||
|
|
Загрузка…
Ссылка в новой задаче