Bumping manifests a=b2g-bump
[gecko.git] / layout / generic / nsIFrameInlines.h
blobf6f029e2a46e0f9cd983476bc0f0617308a65bd3
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/. */
7 #ifndef nsIFrameInlines_h___
8 #define nsIFrameInlines_h___
10 #include "nsContainerFrame.h"
11 #include "nsStyleStructInlines.h"
13 bool
14 nsIFrame::IsFlexItem() const
16 return GetParent() &&
17 GetParent()->GetType() == nsGkAtoms::flexContainerFrame &&
18 !(GetStateBits() & NS_FRAME_OUT_OF_FLOW);
21 bool
22 nsIFrame::IsFlexOrGridItem() const
24 if (GetParent()) {
25 nsIAtom* t = GetParent()->GetType();
26 return (t == nsGkAtoms::flexContainerFrame ||
27 t == nsGkAtoms::gridContainerFrame) &&
28 !(GetStateBits() & NS_FRAME_OUT_OF_FLOW);
30 return false;
33 bool
34 nsIFrame::IsFloating() const
36 return StyleDisplay()->IsFloating(this);
39 bool
40 nsIFrame::IsPositioned() const
42 return StyleDisplay()->IsPositioned(this);
45 bool
46 nsIFrame::IsRelativelyPositioned() const
48 return StyleDisplay()->IsRelativelyPositioned(this);
51 bool
52 nsIFrame::IsAbsolutelyPositioned() const
54 return StyleDisplay()->IsAbsolutelyPositioned(this);
57 bool
58 nsIFrame::IsBlockInside() const
60 return StyleDisplay()->IsBlockInside(this);
63 bool
64 nsIFrame::IsBlockOutside() const
66 return StyleDisplay()->IsBlockOutside(this);
69 bool
70 nsIFrame::IsInlineOutside() const
72 return StyleDisplay()->IsInlineOutside(this);
75 uint8_t
76 nsIFrame::GetDisplay() const
78 return StyleDisplay()->GetDisplay(this);
81 #endif