2002-01-11 00:09:01 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* 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-01-11 00:09:01 +00:00
|
|
|
|
2006-03-25 05:47:31 +00:00
|
|
|
/* DOM object representing rectangle values in DOM computed style */
|
|
|
|
|
|
|
|
#ifndef nsDOMCSSRect_h_
|
|
|
|
#define nsDOMCSSRect_h_
|
2002-01-11 00:09:01 +00:00
|
|
|
|
2012-12-26 12:26:36 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2002-01-11 00:09:01 +00:00
|
|
|
#include "nsIDOMRect.h"
|
2012-12-26 02:51:33 +00:00
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsWrapperCache.h"
|
2012-12-26 02:48:28 +00:00
|
|
|
|
|
|
|
class nsROCSSPrimitiveValue;
|
2002-01-11 00:09:01 +00:00
|
|
|
|
2012-12-26 02:51:33 +00:00
|
|
|
class nsDOMCSSRect : public nsIDOMRect,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
2002-01-11 00:09:01 +00:00
|
|
|
public:
|
2012-12-26 02:48:28 +00:00
|
|
|
nsDOMCSSRect(nsROCSSPrimitiveValue* aTop,
|
|
|
|
nsROCSSPrimitiveValue* aRight,
|
|
|
|
nsROCSSPrimitiveValue* aBottom,
|
|
|
|
nsROCSSPrimitiveValue* aLeft);
|
2002-01-11 00:09:01 +00:00
|
|
|
virtual ~nsDOMCSSRect(void);
|
|
|
|
|
2012-12-26 02:51:33 +00:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2002-01-11 00:09:01 +00:00
|
|
|
NS_DECL_NSIDOMRECT
|
|
|
|
|
2012-12-26 02:51:33 +00:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMCSSRect)
|
|
|
|
|
2012-12-26 03:12:15 +00:00
|
|
|
nsROCSSPrimitiveValue* Top() const { return mTop; }
|
|
|
|
nsROCSSPrimitiveValue* Right() const { return mRight; }
|
|
|
|
nsROCSSPrimitiveValue* Bottom() const { return mBottom; }
|
|
|
|
nsROCSSPrimitiveValue* Left() const { return mLeft; }
|
|
|
|
|
2012-12-26 12:26:36 +00:00
|
|
|
nsISupports* GetParentObject() const { return nullptr; }
|
|
|
|
|
2014-04-08 22:27:18 +00:00
|
|
|
virtual JSObject* WrapObject(JSContext* cx)
|
2012-12-26 12:26:36 +00:00
|
|
|
MOZ_OVERRIDE MOZ_FINAL;
|
|
|
|
|
2002-01-11 00:09:01 +00:00
|
|
|
private:
|
2012-12-26 02:48:28 +00:00
|
|
|
nsRefPtr<nsROCSSPrimitiveValue> mTop;
|
|
|
|
nsRefPtr<nsROCSSPrimitiveValue> mRight;
|
|
|
|
nsRefPtr<nsROCSSPrimitiveValue> mBottom;
|
|
|
|
nsRefPtr<nsROCSSPrimitiveValue> mLeft;
|
2002-01-11 00:09:01 +00:00
|
|
|
};
|
|
|
|
|
2006-03-25 05:47:31 +00:00
|
|
|
#endif /* nsDOMCSSRect_h_ */
|