2013-02-13 13:39:23 -08:00
|
|
|
/* -*- 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
|
2012-05-21 04:12:37 -07:00
|
|
|
* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* DOM object representing color values in DOM computed style */
|
|
|
|
|
2012-12-13 23:51:39 -08:00
|
|
|
#include "nsDOMCSSRGBColor.h"
|
|
|
|
|
2013-03-02 16:31:48 -08:00
|
|
|
#include "mozilla/dom/RGBColorBinding.h"
|
2012-10-20 11:04:36 -07:00
|
|
|
#include "nsROCSSPrimitiveValue.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-12-13 23:51:39 -08:00
|
|
|
using namespace mozilla;
|
|
|
|
|
2012-10-20 11:04:36 -07:00
|
|
|
nsDOMCSSRGBColor::nsDOMCSSRGBColor(nsROCSSPrimitiveValue* aRed,
|
|
|
|
nsROCSSPrimitiveValue* aGreen,
|
|
|
|
nsROCSSPrimitiveValue* aBlue,
|
|
|
|
nsROCSSPrimitiveValue* aAlpha,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aHasAlpha)
|
2007-03-22 10:30:00 -07:00
|
|
|
: mRed(aRed), mGreen(aGreen), mBlue(aBlue), mAlpha(aAlpha)
|
|
|
|
, mHasAlpha(aHasAlpha)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
nsDOMCSSRGBColor::~nsDOMCSSRGBColor(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-04-29 01:57:00 -07:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsDOMCSSRGBColor, mAlpha, mBlue, mGreen, mRed)
|
2013-02-13 13:39:23 -08:00
|
|
|
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsDOMCSSRGBColor, AddRef)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsDOMCSSRGBColor, Release)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-12-13 23:51:39 -08:00
|
|
|
JSObject*
|
2014-04-08 15:27:18 -07:00
|
|
|
nsDOMCSSRGBColor::WrapObject(JSContext *aCx)
|
2012-12-13 23:51:39 -08:00
|
|
|
{
|
Bug 991742 part 6. Remove the "aScope" argument of binding Wrap() methods. r=bholley
This patch was mostly generated with this command:
find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""
plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
2014-04-08 15:27:17 -07:00
|
|
|
return dom::RGBColorBinding::Wrap(aCx, this);
|
2012-12-13 23:51:39 -08:00
|
|
|
}
|
|
|
|
|