2013-02-14 01:39:23 +04: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 15:12:37 +04: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/. */
|
2002-03-22 23:18:42 +03:00
|
|
|
|
2006-03-25 08:47:31 +03:00
|
|
|
/* DOM object representing color values in DOM computed style */
|
|
|
|
|
2012-12-14 11:51:39 +04:00
|
|
|
#include "nsDOMCSSRGBColor.h"
|
|
|
|
|
2013-03-03 04:31:48 +04:00
|
|
|
#include "mozilla/dom/RGBColorBinding.h"
|
2012-10-20 22:04:36 +04:00
|
|
|
#include "nsROCSSPrimitiveValue.h"
|
2002-03-22 23:18:42 +03:00
|
|
|
|
2012-12-14 11:51:39 +04:00
|
|
|
using namespace mozilla;
|
|
|
|
|
2012-10-20 22:04:36 +04:00
|
|
|
nsDOMCSSRGBColor::nsDOMCSSRGBColor(nsROCSSPrimitiveValue* aRed,
|
|
|
|
nsROCSSPrimitiveValue* aGreen,
|
|
|
|
nsROCSSPrimitiveValue* aBlue,
|
|
|
|
nsROCSSPrimitiveValue* aAlpha,
|
2011-09-29 10:19:26 +04:00
|
|
|
bool aHasAlpha)
|
2007-01-25 05:03:02 +03:00
|
|
|
: mRed(aRed), mGreen(aGreen), mBlue(aBlue), mAlpha(aAlpha)
|
|
|
|
, mHasAlpha(aHasAlpha)
|
2002-03-22 23:18:42 +03:00
|
|
|
{
|
2012-12-14 11:51:39 +04:00
|
|
|
SetIsDOMBinding();
|
2002-03-22 23:18:42 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
nsDOMCSSRGBColor::~nsDOMCSSRGBColor(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-12-14 10:40:52 +04:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_4(nsDOMCSSRGBColor, mAlpha, mBlue, mGreen, mRed)
|
2013-02-14 01:39:23 +04:00
|
|
|
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsDOMCSSRGBColor, AddRef)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsDOMCSSRGBColor, Release)
|
2002-03-22 23:18:42 +03:00
|
|
|
|
2012-12-14 11:51:39 +04:00
|
|
|
JSObject*
|
2013-04-25 20:29:54 +04:00
|
|
|
nsDOMCSSRGBColor::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aScope)
|
2012-12-14 11:51:39 +04: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-09 02:27:17 +04:00
|
|
|
return dom::RGBColorBinding::Wrap(aCx, this);
|
2012-12-14 11:51:39 +04:00
|
|
|
}
|
|
|
|
|