1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/nsIFrameInlines.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,69 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set ts=2 sw=2 et tw=78: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#ifndef nsIFrameInlines_h___ 1.11 +#define nsIFrameInlines_h___ 1.12 + 1.13 +#include "nsIFrame.h" 1.14 +#include "nsStyleStructInlines.h" 1.15 + 1.16 +bool 1.17 +nsIFrame::IsFlexItem() const 1.18 +{ 1.19 + return mParent && 1.20 + mParent->GetType() == nsGkAtoms::flexContainerFrame && 1.21 + !(GetStateBits() & NS_FRAME_OUT_OF_FLOW); 1.22 +} 1.23 + 1.24 +bool 1.25 +nsIFrame::IsFloating() const 1.26 +{ 1.27 + return StyleDisplay()->IsFloating(this); 1.28 +} 1.29 + 1.30 +bool 1.31 +nsIFrame::IsPositioned() const 1.32 +{ 1.33 + return StyleDisplay()->IsPositioned(this); 1.34 +} 1.35 + 1.36 +bool 1.37 +nsIFrame::IsRelativelyPositioned() const 1.38 +{ 1.39 + return StyleDisplay()->IsRelativelyPositioned(this); 1.40 +} 1.41 + 1.42 +bool 1.43 +nsIFrame::IsAbsolutelyPositioned() const 1.44 +{ 1.45 + return StyleDisplay()->IsAbsolutelyPositioned(this); 1.46 +} 1.47 + 1.48 +bool 1.49 +nsIFrame::IsBlockInside() const 1.50 +{ 1.51 + return StyleDisplay()->IsBlockInside(this); 1.52 +} 1.53 + 1.54 +bool 1.55 +nsIFrame::IsBlockOutside() const 1.56 +{ 1.57 + return StyleDisplay()->IsBlockOutside(this); 1.58 +} 1.59 + 1.60 +bool 1.61 +nsIFrame::IsInlineOutside() const 1.62 +{ 1.63 + return StyleDisplay()->IsInlineOutside(this); 1.64 +} 1.65 + 1.66 +uint8_t 1.67 +nsIFrame::GetDisplay() const 1.68 +{ 1.69 + return StyleDisplay()->GetDisplay(this); 1.70 +} 1.71 + 1.72 +#endif