Bug 1181678 - Expose an attribute on DOMWindowUtils to see if APZ is enabled. r=botond

This commit is contained in:
Kartikaya Gupta 2015-07-09 09:53:54 -04:00
parent 5330df23cf
commit 2ac9fc7c20
2 changed files with 20 additions and 1 deletions

View File

@ -2439,6 +2439,18 @@ nsDOMWindowUtils::GetIsTestControllingRefreshes(bool *aResult)
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::GetAsyncPanZoomEnabled(bool *aResult)
{
nsIWidget* widget = GetWidget();
if (widget) {
*aResult = widget->AsyncPanZoomEnabled();
} else {
*aResult = gfxPlatform::AsyncPanZoomEnabled();
}
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::SetAsyncScrollOffset(nsIDOMNode* aNode,
int32_t aX, int32_t aY)

View File

@ -49,7 +49,7 @@ interface nsIJSRAIIHelper;
interface nsIContentPermissionRequest;
interface nsIObserver;
[scriptable, uuid(bbcb87fb-ce2e-4e05-906b-9258687664e2)]
[scriptable, uuid(7a37e173-ea6e-495e-8702-013f8063352a)]
interface nsIDOMWindowUtils : nsISupports {
/**
@ -1430,6 +1430,13 @@ interface nsIDOMWindowUtils : nsISupports {
*/
readonly attribute bool isTestControllingRefreshes;
/**
* Reports whether APZ is enabled on the widget that this window is attached
* to. If there is no widget it will report the default platform value of
* whether or not APZ is enabled.
*/
readonly attribute bool asyncPanZoomEnabled;
/**
* Set async scroll offset on an element. The next composite will render
* with that offset if async scrolling is enabled, and then the offset