diff --git a/xpfe/appshell/nsIXULWindow.idl b/xpfe/appshell/nsIXULWindow.idl index 9dc0d7c62863..3147aa111679 100644 --- a/xpfe/appshell/nsIXULWindow.idl +++ b/xpfe/appshell/nsIXULWindow.idl @@ -26,7 +26,7 @@ interface mozIDOMWindowProxy; native LiveResizeListenerArray(nsTArray>); -[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 diff --git a/xpfe/appshell/nsXULWindow.cpp b/xpfe/appshell/nsXULWindow.cpp index c4ec0ca22237..f7b45e6d2ddd 100644 --- a/xpfe/appshell/nsXULWindow.cpp +++ b/xpfe/appshell/nsXULWindow.cpp @@ -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>