layout/style/nsDOMCSSRect.h

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.

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

mercurial