mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1427512 - Part 25: Remove nsIDOMRect. r=xidorn,bz
Although this is changing nsIDOMCSSPrimitiveValue, that interface will go away a couple of patches later. MozReview-Commit-ID: GSisnYWZhHy
This commit is contained in:
parent
0ec0b4a768
commit
3c29060132
@ -60,7 +60,6 @@ interface nsIDOMHTMLHeadElement;
|
||||
interface nsIDOMCSSValue;
|
||||
interface nsIDOMCSSPrimitiveValue;
|
||||
interface nsIDOMCSSStyleDeclaration;
|
||||
interface nsIDOMRect;
|
||||
|
||||
// Range
|
||||
interface nsIDOMRange;
|
||||
|
@ -12,7 +12,6 @@ XPIDL_SOURCES += [
|
||||
'nsIDOMCSSStyleDeclaration.idl',
|
||||
'nsIDOMCSSValue.idl',
|
||||
'nsIDOMCSSValueList.idl',
|
||||
'nsIDOMRect.idl',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'dom_css'
|
||||
|
@ -55,6 +55,4 @@ interface nsIDOMCSSPrimitiveValue : nsIDOMCSSValue
|
||||
raises(DOMException);
|
||||
DOMString getStringValue()
|
||||
raises(DOMException);
|
||||
nsIDOMRect getRectValue()
|
||||
raises(DOMException);
|
||||
};
|
||||
|
@ -1,15 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "domstubs.idl"
|
||||
|
||||
[uuid(71735f62-ac5c-4236-9a1f-5ffb280d531c)]
|
||||
interface nsIDOMRect : nsISupports
|
||||
{
|
||||
readonly attribute nsIDOMCSSPrimitiveValue top;
|
||||
readonly attribute nsIDOMCSSPrimitiveValue right;
|
||||
readonly attribute nsIDOMCSSPrimitiveValue bottom;
|
||||
readonly attribute nsIDOMCSSPrimitiveValue left;
|
||||
};
|
@ -26,7 +26,6 @@ nsDOMCSSRect::~nsDOMCSSRect(void)
|
||||
}
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMCSSRect)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMRect)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_END
|
||||
@ -41,39 +40,3 @@ nsDOMCSSRect::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
|
||||
{
|
||||
return dom::RectBinding::Wrap(cx, this, aGivenProto);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSRect::GetTop(nsIDOMCSSPrimitiveValue** aTop)
|
||||
{
|
||||
NS_ENSURE_TRUE(mTop, NS_ERROR_NOT_INITIALIZED);
|
||||
*aTop = mTop;
|
||||
NS_ADDREF(*aTop);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSRect::GetRight(nsIDOMCSSPrimitiveValue** aRight)
|
||||
{
|
||||
NS_ENSURE_TRUE(mRight, NS_ERROR_NOT_INITIALIZED);
|
||||
*aRight = mRight;
|
||||
NS_ADDREF(*aRight);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSRect::GetBottom(nsIDOMCSSPrimitiveValue** aBottom)
|
||||
{
|
||||
NS_ENSURE_TRUE(mBottom, NS_ERROR_NOT_INITIALIZED);
|
||||
*aBottom = mBottom;
|
||||
NS_ADDREF(*aBottom);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSRect::GetLeft(nsIDOMCSSPrimitiveValue** aLeft)
|
||||
{
|
||||
NS_ENSURE_TRUE(mLeft, NS_ERROR_NOT_INITIALIZED);
|
||||
*aLeft = mLeft;
|
||||
NS_ADDREF(*aLeft);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
#define nsDOMCSSRect_h_
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIDOMRect.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
class nsROCSSPrimitiveValue;
|
||||
|
||||
class nsDOMCSSRect final : public nsIDOMRect,
|
||||
class nsDOMCSSRect final : public nsISupports,
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
@ -26,8 +25,6 @@ public:
|
||||
nsROCSSPrimitiveValue* aLeft);
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_NSIDOMRECT
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMCSSRect)
|
||||
|
||||
nsROCSSPrimitiveValue* Top() const { return mTop; }
|
||||
|
@ -171,38 +171,25 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText)
|
||||
{
|
||||
NS_ASSERTION(mValue.mRect, "mValue.mRect should never be null");
|
||||
NS_NAMED_LITERAL_STRING(comma, ", ");
|
||||
nsCOMPtr<nsIDOMCSSPrimitiveValue> sideCSSValue;
|
||||
nsAutoString sideValue;
|
||||
tmpStr.AssignLiteral("rect(");
|
||||
// get the top
|
||||
result = mValue.mRect->GetTop(getter_AddRefs(sideCSSValue));
|
||||
if (NS_FAILED(result))
|
||||
break;
|
||||
result = sideCSSValue->GetCssText(sideValue);
|
||||
result = mValue.mRect->Top()->GetCssText(sideValue);
|
||||
if (NS_FAILED(result))
|
||||
break;
|
||||
tmpStr.Append(sideValue + comma);
|
||||
// get the right
|
||||
result = mValue.mRect->GetRight(getter_AddRefs(sideCSSValue));
|
||||
if (NS_FAILED(result))
|
||||
break;
|
||||
result = sideCSSValue->GetCssText(sideValue);
|
||||
result = mValue.mRect->Right()->GetCssText(sideValue);
|
||||
if (NS_FAILED(result))
|
||||
break;
|
||||
tmpStr.Append(sideValue + comma);
|
||||
// get the bottom
|
||||
result = mValue.mRect->GetBottom(getter_AddRefs(sideCSSValue));
|
||||
if (NS_FAILED(result))
|
||||
break;
|
||||
result = sideCSSValue->GetCssText(sideValue);
|
||||
result = mValue.mRect->Bottom()->GetCssText(sideValue);
|
||||
if (NS_FAILED(result))
|
||||
break;
|
||||
tmpStr.Append(sideValue + comma);
|
||||
// get the left
|
||||
result = mValue.mRect->GetLeft(getter_AddRefs(sideCSSValue));
|
||||
if (NS_FAILED(result))
|
||||
break;
|
||||
result = sideCSSValue->GetCssText(sideValue);
|
||||
result = mValue.mRect->Left()->GetCssText(sideValue);
|
||||
if (NS_FAILED(result))
|
||||
break;
|
||||
tmpStr.Append(sideValue + NS_LITERAL_STRING(")"));
|
||||
@ -499,14 +486,6 @@ nsROCSSPrimitiveValue::GetRectValue(ErrorResult& aRv)
|
||||
return mValue.mRect;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsROCSSPrimitiveValue::GetRectValue(nsIDOMRect** aRect)
|
||||
{
|
||||
ErrorResult error;
|
||||
NS_IF_ADDREF(*aRect = GetRectValue(error));
|
||||
return error.StealNSResult();
|
||||
}
|
||||
|
||||
nsDOMCSSRGBColor*
|
||||
nsROCSSPrimitiveValue::GetRGBColorValue(ErrorResult& aRv)
|
||||
{
|
||||
|
@ -64,7 +64,6 @@
|
||||
#include "nsIDOMParser.h"
|
||||
#include "nsIDOMProcessingInstruction.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIDOMRect.h"
|
||||
#include "nsIDOMScreen.h"
|
||||
#include "nsIDOMScrollAreaEvent.h"
|
||||
#include "nsIDOMSerializer.h"
|
||||
@ -307,7 +306,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMParser, DOMParser),
|
||||
DEFINE_SHIM(ProcessingInstruction),
|
||||
DEFINE_SHIM(Range),
|
||||
DEFINE_SHIM(Rect),
|
||||
DEFINE_SHIM(Screen),
|
||||
DEFINE_SHIM(ScrollAreaEvent),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject),
|
||||
|
Loading…
Reference in New Issue
Block a user