зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446343 part 1 - Expose GetOuterToInner{Width,Height}DifferenceInCSSPixels to script. r=bz
MozReview-Commit-ID: 8mjIxRATTPD --HG-- extra : rebase_source : fe4f25cf16cdff8c9651860a9adf606bd0cc6b0f
This commit is contained in:
Родитель
87c5ab8f3d
Коммит
8c8cef5c1d
|
@ -26,7 +26,7 @@ interface mozIDOMWindowProxy;
|
|||
|
||||
native LiveResizeListenerArray(nsTArray<RefPtr<mozilla::LiveResizeListener>>);
|
||||
|
||||
[scriptable, uuid(d6d7a014-e28d-4c9d-8727-1cf6d870619b)]
|
||||
[builtinclass, scriptable, uuid(d6d7a014-e28d-4c9d-8727-1cf6d870619b)]
|
||||
interface nsIXULWindow : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -70,8 +70,8 @@ interface nsIXULWindow : nsISupports
|
|||
* Returns the difference between the inner window size (client size) and the
|
||||
* outer window size, in CSS pixels.
|
||||
*/
|
||||
[noscript,notxpcom] uint32_t getOuterToInnerHeightDifferenceInCSSPixels();
|
||||
[noscript,notxpcom] uint32_t getOuterToInnerWidthDifferenceInCSSPixels();
|
||||
[infallible] readonly attribute unsigned long outerToInnerHeightDifferenceInCSSPixels;
|
||||
[infallible] readonly attribute unsigned long outerToInnerWidthDifferenceInCSSPixels;
|
||||
|
||||
/**
|
||||
* Tell this window that it has lost a child XUL window
|
||||
|
|
|
@ -361,16 +361,18 @@ GetOuterToInnerSizeDifferenceInCSSPixels(nsIWidget* aWindow)
|
|||
return RoundedToInt(devPixelSize / aWindow->GetDefaultScale());
|
||||
}
|
||||
|
||||
uint32_t
|
||||
nsXULWindow::GetOuterToInnerHeightDifferenceInCSSPixels()
|
||||
NS_IMETHODIMP
|
||||
nsXULWindow::GetOuterToInnerHeightDifferenceInCSSPixels(uint32_t* aResult)
|
||||
{
|
||||
return GetOuterToInnerSizeDifferenceInCSSPixels(mWindow).height;
|
||||
*aResult = GetOuterToInnerSizeDifferenceInCSSPixels(mWindow).height;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
nsXULWindow::GetOuterToInnerWidthDifferenceInCSSPixels()
|
||||
NS_IMETHODIMP
|
||||
nsXULWindow::GetOuterToInnerWidthDifferenceInCSSPixels(uint32_t* aResult)
|
||||
{
|
||||
return GetOuterToInnerSizeDifferenceInCSSPixels(mWindow).width;
|
||||
*aResult = GetOuterToInnerSizeDifferenceInCSSPixels(mWindow).width;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsTArray<RefPtr<mozilla::LiveResizeListener>>
|
||||
|
|
Загрузка…
Ссылка в новой задаче