/src/mozilla-central/layout/style/nsDOMCSSRect.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | /* DOM object representing rectangle values in DOM computed style */ |
8 | | |
9 | | #ifndef nsDOMCSSRect_h_ |
10 | | #define nsDOMCSSRect_h_ |
11 | | |
12 | | #include "mozilla/Attributes.h" |
13 | | #include "mozilla/RefCounted.h" |
14 | | #include "mozilla/RefPtr.h" |
15 | | |
16 | | class nsROCSSPrimitiveValue; |
17 | | |
18 | | class nsDOMCSSRect final : public mozilla::RefCounted<nsDOMCSSRect> |
19 | | { |
20 | | public: |
21 | | MOZ_DECLARE_REFCOUNTED_TYPENAME(nsDOMCSSRect); |
22 | | |
23 | | nsDOMCSSRect(nsROCSSPrimitiveValue* aTop, |
24 | | nsROCSSPrimitiveValue* aRight, |
25 | | nsROCSSPrimitiveValue* aBottom, |
26 | | nsROCSSPrimitiveValue* aLeft); |
27 | | |
28 | 0 | nsROCSSPrimitiveValue* Top() const { return mTop; } |
29 | 0 | nsROCSSPrimitiveValue* Right() const { return mRight; } |
30 | 0 | nsROCSSPrimitiveValue* Bottom() const { return mBottom; } |
31 | 0 | nsROCSSPrimitiveValue* Left() const { return mLeft; } |
32 | | |
33 | | ~nsDOMCSSRect(); |
34 | | |
35 | | private: |
36 | | RefPtr<nsROCSSPrimitiveValue> mTop; |
37 | | RefPtr<nsROCSSPrimitiveValue> mRight; |
38 | | RefPtr<nsROCSSPrimitiveValue> mBottom; |
39 | | RefPtr<nsROCSSPrimitiveValue> mLeft; |
40 | | }; |
41 | | |
42 | | #endif /* nsDOMCSSRect_h_ */ |