/src/mozilla-central/layout/generic/nsAtomicContainerFrame.h
Line | Count | Source (jump to first uncovered line) |
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 | | 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 | | FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) override |
28 | 0 | { |
29 | 0 | return nsFrame::PeekOffsetNoAmount(aForward, aOffset); |
30 | 0 | } |
31 | | FrameSearchResult |
32 | | PeekOffsetCharacter(bool aForward, int32_t* aOffset, |
33 | | PeekOffsetCharacterOptions aOptions = |
34 | | PeekOffsetCharacterOptions()) override |
35 | 0 | { |
36 | 0 | return nsFrame::PeekOffsetCharacter(aForward, aOffset, aOptions); |
37 | 0 | } |
38 | | nsSplittableType GetSplittableType() const override |
39 | 0 | { |
40 | 0 | return nsFrame::GetSplittableType(); |
41 | 0 | } |
42 | | |
43 | | protected: |
44 | | nsAtomicContainerFrame(ComputedStyle* aStyle, ClassID aID) |
45 | | : nsContainerFrame(aStyle, aID) |
46 | 0 | {} |
47 | | }; |
48 | | |
49 | | #endif // nsAtomicContainerFrame_h___ |