bug 840906 - densISupportsify nsDOMRGBCSSColor r=mccr8

This commit is contained in:
Trevor Saunders 2013-02-13 16:39:23 -05:00
parent e9315113c2
commit 3e028f8788
3 changed files with 8 additions and 16 deletions

View File

@ -711,6 +711,7 @@ DOMInterfaces = {
},
'RGBColor': {
"nativeOwnership": "refcounted",
"nativeType": "nsDOMCSSRGBColor",
'resultNotAddRefed': [ "alpha", "blue", "green", "red" ]
},

View File

@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
/* -*- Mode: C++; 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/. */
@ -8,8 +7,6 @@
#include "nsDOMCSSRGBColor.h"
#include "mozilla/dom/RGBColorBinding.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIDOMCSSPrimitiveValue.h"
#include "nsContentUtils.h"
#include "nsROCSSPrimitiveValue.h"
@ -31,14 +28,10 @@ nsDOMCSSRGBColor::~nsDOMCSSRGBColor(void)
{
}
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMCSSRGBColor)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_4(nsDOMCSSRGBColor, mAlpha, mBlue, mGreen, mRed)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMCSSRGBColor)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMCSSRGBColor)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsDOMCSSRGBColor, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsDOMCSSRGBColor, Release)
JSObject*
nsDOMCSSRGBColor::WrapObject(JSContext *aCx, JSObject *aScope, bool *aTried)

View File

@ -10,13 +10,11 @@
#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsISupports.h"
#include "nsWrapperCache.h"
class nsROCSSPrimitiveValue;
class nsDOMCSSRGBColor : public nsISupports,
public nsWrapperCache
class nsDOMCSSRGBColor : public nsWrapperCache
{
public:
nsDOMCSSRGBColor(nsROCSSPrimitiveValue* aRed,
@ -27,9 +25,9 @@ public:
virtual ~nsDOMCSSRGBColor(void);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(nsDOMCSSRGBColor)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMCSSRGBColor)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(nsDOMCSSRGBColor)
bool HasAlpha() const { return mHasAlpha; }