bug 824970 - nsROCSSPrimitiveValue::GetRectValue() should return nsDOMCSSRect* r=bz

This commit is contained in:
Trevor Saunders 2012-12-26 12:02:37 -05:00
parent fec9d2daa0
commit e6efa7865a
3 changed files with 4 additions and 5 deletions

View File

@ -158,7 +158,7 @@ DOMInterfaces = {
"CSSPrimitiveValue": {
"nativeType": "nsROCSSPrimitiveValue",
"resultNotAddRefed": ["GetRGBColorValue"]
"resultNotAddRefed": ["getRGBColorValue", "getRectValue"]
},
'CSSStyleDeclaration': {

View File

@ -458,7 +458,7 @@ nsROCSSPrimitiveValue::GetCounterValue(ErrorResult& aRv)
return nullptr;
}
already_AddRefed<nsDOMCSSRect>
nsDOMCSSRect*
nsROCSSPrimitiveValue::GetRectValue(ErrorResult& aRv)
{
if (mType != CSS_RECT) {
@ -467,7 +467,6 @@ nsROCSSPrimitiveValue::GetRectValue(ErrorResult& aRv)
}
NS_ASSERTION(mValue.mRect, "mValue.mRect should never be null");
NS_ADDREF(mValue.mRect);
return mValue.mRect;
}
@ -475,7 +474,7 @@ NS_IMETHODIMP
nsROCSSPrimitiveValue::GetRectValue(nsIDOMRect** aRect)
{
ErrorResult error;
*aRect = GetRectValue(error).get();
NS_IF_ADDREF(*aRect = GetRectValue(error));
return error.ErrorCode();
}

View File

@ -55,7 +55,7 @@ public:
void SetStringValue(uint16_t aUnitType, const nsAString& aString,
mozilla::ErrorResult& aRv);
already_AddRefed<nsIDOMCounter> GetCounterValue(mozilla::ErrorResult& aRv);
already_AddRefed<nsDOMCSSRect> GetRectValue(mozilla::ErrorResult& aRv);
nsDOMCSSRect* GetRectValue(mozilla::ErrorResult& aRv);
nsDOMCSSRGBColor *GetRGBColorValue(mozilla::ErrorResult& aRv);
// nsROCSSPrimitiveValue