mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-07 11:56:51 +00:00
bug 821593 - GetRGBColorValue() should return nsDOMCSSRGBColor* r=bz
This commit is contained in:
parent
6316ea3cdf
commit
f66d567a5c
@ -149,7 +149,8 @@ DOMInterfaces = {
|
||||
},
|
||||
|
||||
"CSSPrimitiveValue": {
|
||||
"nativeType": "nsROCSSPrimitiveValue"
|
||||
"nativeType": "nsROCSSPrimitiveValue",
|
||||
"resultNotAddRefed": ["GetRGBColorValue"]
|
||||
},
|
||||
|
||||
'CSSStyleDeclaration': {
|
||||
|
@ -495,19 +495,19 @@ NS_IMETHODIMP
|
||||
nsROCSSPrimitiveValue::GetRGBColorValue(nsIDOMRGBColor** aColor)
|
||||
{
|
||||
ErrorResult error;
|
||||
*aColor = GetRGBColorValue(error).get();
|
||||
NS_IF_ADDREF(*aColor = GetRGBColorValue(error));
|
||||
return error.ErrorCode();
|
||||
}
|
||||
|
||||
already_AddRefed<nsIDOMRGBColor>
|
||||
nsDOMCSSRGBColor*
|
||||
nsROCSSPrimitiveValue::GetRGBColorValue(ErrorResult& aRv)
|
||||
{
|
||||
if (mType != CSS_RGBCOLOR) {
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mValue.mColor, "mValue.mColor should never be null");
|
||||
NS_ADDREF(mValue.mColor);
|
||||
return mValue.mColor;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
mozilla::ErrorResult& aRv);
|
||||
already_AddRefed<nsIDOMCounter> GetCounterValue(mozilla::ErrorResult& aRv);
|
||||
already_AddRefed<nsIDOMRect> GetRectValue(mozilla::ErrorResult& aRv);
|
||||
already_AddRefed<nsIDOMRGBColor> GetRGBColorValue(mozilla::ErrorResult& aRv);
|
||||
nsDOMCSSRGBColor *GetRGBColorValue(mozilla::ErrorResult& aRv);
|
||||
|
||||
// nsROCSSPrimitiveValue
|
||||
nsROCSSPrimitiveValue();
|
||||
|
Loading…
Reference in New Issue
Block a user