layout/style/nsDOMCSSRGBColor.cpp

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 /* -*- 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
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 /* DOM object representing color values in DOM computed style */
     7 #include "nsDOMCSSRGBColor.h"
     9 #include "mozilla/dom/RGBColorBinding.h"
    10 #include "nsROCSSPrimitiveValue.h"
    12 using namespace mozilla;
    14 nsDOMCSSRGBColor::nsDOMCSSRGBColor(nsROCSSPrimitiveValue* aRed,
    15                                    nsROCSSPrimitiveValue* aGreen,
    16                                    nsROCSSPrimitiveValue* aBlue,
    17                                    nsROCSSPrimitiveValue* aAlpha,
    18                                    bool aHasAlpha)
    19   : mRed(aRed), mGreen(aGreen), mBlue(aBlue), mAlpha(aAlpha)
    20   , mHasAlpha(aHasAlpha)
    21 {
    22   SetIsDOMBinding();
    23 }
    25 nsDOMCSSRGBColor::~nsDOMCSSRGBColor(void)
    26 {
    27 }
    29 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_4(nsDOMCSSRGBColor, mAlpha,  mBlue, mGreen, mRed)
    31 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsDOMCSSRGBColor, AddRef)
    32 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsDOMCSSRGBColor, Release)
    34 JSObject*
    35 nsDOMCSSRGBColor::WrapObject(JSContext *aCx)
    36 {
    37   return dom::RGBColorBinding::Wrap(aCx, this);
    38 }

mercurial