layout/generic/nsIFrameInlines.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:7a42c10018a1
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 sw=2 et tw=78: */
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 #ifndef nsIFrameInlines_h___
8 #define nsIFrameInlines_h___
9
10 #include "nsIFrame.h"
11 #include "nsStyleStructInlines.h"
12
13 bool
14 nsIFrame::IsFlexItem() const
15 {
16 return mParent &&
17 mParent->GetType() == nsGkAtoms::flexContainerFrame &&
18 !(GetStateBits() & NS_FRAME_OUT_OF_FLOW);
19 }
20
21 bool
22 nsIFrame::IsFloating() const
23 {
24 return StyleDisplay()->IsFloating(this);
25 }
26
27 bool
28 nsIFrame::IsPositioned() const
29 {
30 return StyleDisplay()->IsPositioned(this);
31 }
32
33 bool
34 nsIFrame::IsRelativelyPositioned() const
35 {
36 return StyleDisplay()->IsRelativelyPositioned(this);
37 }
38
39 bool
40 nsIFrame::IsAbsolutelyPositioned() const
41 {
42 return StyleDisplay()->IsAbsolutelyPositioned(this);
43 }
44
45 bool
46 nsIFrame::IsBlockInside() const
47 {
48 return StyleDisplay()->IsBlockInside(this);
49 }
50
51 bool
52 nsIFrame::IsBlockOutside() const
53 {
54 return StyleDisplay()->IsBlockOutside(this);
55 }
56
57 bool
58 nsIFrame::IsInlineOutside() const
59 {
60 return StyleDisplay()->IsInlineOutside(this);
61 }
62
63 uint8_t
64 nsIFrame::GetDisplay() const
65 {
66 return StyleDisplay()->GetDisplay(this);
67 }
68
69 #endif

mercurial