Line data Source code
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 : /* base class for rendering objects that need child lists but behave like leaf */
8 :
9 : #ifndef nsAtomicContainerFrame_h___
10 : #define nsAtomicContainerFrame_h___
11 :
12 : #include "nsContainerFrame.h"
13 :
14 : /**
15 : * This class is for frames which need child lists but act like a leaf
16 : * frame. In general, all frames of elements laid out according to the
17 : * CSS box model would need child list for ::backdrop in case they are
18 : * in fullscreen, while some of them still want leaf frame behavior.
19 : */
20 2 : class nsAtomicContainerFrame : public nsContainerFrame
21 : {
22 : public:
23 : NS_DECL_ABSTRACT_FRAME(nsAtomicContainerFrame)
24 :
25 : // Bypass the nsContainerFrame/nsSplittableFrame impl of the following
26 : // methods so we behave like a leaf frame.
27 0 : FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) override
28 : {
29 0 : return nsFrame::PeekOffsetNoAmount(aForward, aOffset);
30 : }
31 : FrameSearchResult
32 0 : PeekOffsetCharacter(bool aForward, int32_t* aOffset,
33 : PeekOffsetCharacterOptions aOptions =
34 : PeekOffsetCharacterOptions()) override
35 : {
36 0 : return nsFrame::PeekOffsetCharacter(aForward, aOffset, aOptions);
37 : }
38 0 : nsSplittableType GetSplittableType() const override
39 : {
40 0 : return nsFrame::GetSplittableType();
41 : }
42 :
43 : protected:
44 3 : nsAtomicContainerFrame(nsStyleContext* aContext, ClassID aID)
45 3 : : nsContainerFrame(aContext, aID)
46 3 : {}
47 : };
48 :
49 : #endif // nsAtomicContainerFrame_h___
|