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/. */
7 /* base class for rendering objects that need child lists but behave like leaf
10 #ifndef nsAtomicContainerFrame_h___
11 #define nsAtomicContainerFrame_h___
13 #include "nsContainerFrame.h"
16 * This class is for frames which need child lists but act like a leaf
17 * frame. In general, all frames of elements laid out according to the
18 * CSS box model would need child list for ::backdrop in case they are
19 * in fullscreen, while some of them still want leaf frame behavior.
21 class nsAtomicContainerFrame
: public nsContainerFrame
{
23 NS_DECL_ABSTRACT_FRAME(nsAtomicContainerFrame
)
25 // Bypass the nsContainerFrame/nsSplittableFrame impl of the following
26 // methods so we behave like a leaf frame.
27 FrameSearchResult
PeekOffsetNoAmount(bool aForward
,
28 int32_t* aOffset
) override
{
29 return nsIFrame::PeekOffsetNoAmount(aForward
, aOffset
);
31 FrameSearchResult
PeekOffsetCharacter(
32 bool aForward
, int32_t* aOffset
,
33 PeekOffsetCharacterOptions aOptions
=
34 PeekOffsetCharacterOptions()) override
{
35 return nsIFrame::PeekOffsetCharacter(aForward
, aOffset
, aOptions
);
39 nsAtomicContainerFrame(ComputedStyle
* aStyle
, nsPresContext
* aPresContext
,
41 : nsContainerFrame(aStyle
, aPresContext
, aID
) {}
44 #endif // nsAtomicContainerFrame_h___