michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* DOM object representing rectangle values in DOM computed style */ michael@0: michael@0: #ifndef nsDOMCSSRect_h_ michael@0: #define nsDOMCSSRect_h_ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "nsIDOMRect.h" michael@0: #include "nsAutoPtr.h" michael@0: #include "nsCycleCollectionParticipant.h" michael@0: #include "nsWrapperCache.h" michael@0: michael@0: class nsROCSSPrimitiveValue; michael@0: michael@0: class nsDOMCSSRect : public nsIDOMRect, michael@0: public nsWrapperCache michael@0: { michael@0: public: michael@0: nsDOMCSSRect(nsROCSSPrimitiveValue* aTop, michael@0: nsROCSSPrimitiveValue* aRight, michael@0: nsROCSSPrimitiveValue* aBottom, michael@0: nsROCSSPrimitiveValue* aLeft); michael@0: virtual ~nsDOMCSSRect(void); michael@0: michael@0: NS_DECL_CYCLE_COLLECTING_ISUPPORTS michael@0: NS_DECL_NSIDOMRECT michael@0: michael@0: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMCSSRect) michael@0: michael@0: nsROCSSPrimitiveValue* Top() const { return mTop; } michael@0: nsROCSSPrimitiveValue* Right() const { return mRight; } michael@0: nsROCSSPrimitiveValue* Bottom() const { return mBottom; } michael@0: nsROCSSPrimitiveValue* Left() const { return mLeft; } michael@0: michael@0: nsISupports* GetParentObject() const { return nullptr; } michael@0: michael@0: virtual JSObject* WrapObject(JSContext* cx) michael@0: MOZ_OVERRIDE MOZ_FINAL; michael@0: michael@0: private: michael@0: nsRefPtr mTop; michael@0: nsRefPtr mRight; michael@0: nsRefPtr mBottom; michael@0: nsRefPtr mLeft; michael@0: }; michael@0: michael@0: #endif /* nsDOMCSSRect_h_ */