Bug 1434399 part 6. Remove nsIDOMXULDocument's width/height attributes. r=mystor

MozReview-Commit-ID: 1pYKNXwqnGq
This commit is contained in:
Boris Zbarsky 2018-01-31 14:49:27 -05:00
parent ee62abf47b
commit cf38d244a2
2 changed files with 6 additions and 25 deletions

View File

@ -13,9 +13,6 @@ interface nsIBoxObject;
[uuid(7790d4c3-e8f0-4e29-9887-d683ed2b2a44)]
interface nsIDOMXULDocument : nsIDOMDocument
{
readonly attribute long width;
readonly attribute long height;
nsIDOMNodeList getElementsByAttribute(in DOMString name,
in DOMString value);

View File

@ -1282,37 +1282,21 @@ XULDocument::GetViewportSize(int32_t* aWidth,
return NS_OK;
}
NS_IMETHODIMP
XULDocument::GetWidth(int32_t* aWidth)
{
NS_ENSURE_ARG_POINTER(aWidth);
int32_t height;
return GetViewportSize(aWidth, &height);
}
int32_t
XULDocument::GetWidth(ErrorResult& aRv)
{
int32_t width;
aRv = GetWidth(&width);
int32_t width = 0;
int32_t height = 0;
aRv = GetViewportSize(&width, &height);
return width;
}
NS_IMETHODIMP
XULDocument::GetHeight(int32_t* aHeight)
{
NS_ENSURE_ARG_POINTER(aHeight);
int32_t width;
return GetViewportSize(&width, aHeight);
}
int32_t
XULDocument::GetHeight(ErrorResult& aRv)
{
int32_t height;
aRv = GetHeight(&height);
int32_t width = 0;
int32_t height = 0;
aRv = GetViewportSize(&width, &height);
return height;
}