layout/style/nsDOMCSSRect.h

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 /* DOM object representing rectangle values in DOM computed style */
     8 #ifndef nsDOMCSSRect_h_
     9 #define nsDOMCSSRect_h_
    11 #include "mozilla/Attributes.h"
    12 #include "nsIDOMRect.h"
    13 #include "nsAutoPtr.h"
    14 #include "nsCycleCollectionParticipant.h"
    15 #include "nsWrapperCache.h"
    17 class nsROCSSPrimitiveValue;
    19 class nsDOMCSSRect : public nsIDOMRect,
    20                      public nsWrapperCache
    21 {
    22 public:
    23   nsDOMCSSRect(nsROCSSPrimitiveValue* aTop,
    24                nsROCSSPrimitiveValue* aRight,
    25                nsROCSSPrimitiveValue* aBottom,
    26                nsROCSSPrimitiveValue* aLeft);
    27   virtual ~nsDOMCSSRect(void);
    29   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    30   NS_DECL_NSIDOMRECT
    32   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMCSSRect)
    34   nsROCSSPrimitiveValue* Top() const { return mTop; }
    35   nsROCSSPrimitiveValue* Right() const { return mRight; }
    36   nsROCSSPrimitiveValue* Bottom() const { return mBottom; }
    37   nsROCSSPrimitiveValue* Left() const { return mLeft; }
    39   nsISupports* GetParentObject() const { return nullptr; }
    41   virtual JSObject* WrapObject(JSContext* cx)
    42     MOZ_OVERRIDE MOZ_FINAL;
    44 private:
    45   nsRefPtr<nsROCSSPrimitiveValue> mTop;
    46   nsRefPtr<nsROCSSPrimitiveValue> mRight;
    47   nsRefPtr<nsROCSSPrimitiveValue> mBottom;
    48   nsRefPtr<nsROCSSPrimitiveValue> mLeft;
    49 };
    51 #endif /* nsDOMCSSRect_h_ */

mercurial