/src/mozilla-central/layout/generic/nsPageContentFrame.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 | | #ifndef nsPageContentFrame_h___ |
7 | | #define nsPageContentFrame_h___ |
8 | | |
9 | | #include "mozilla/Attributes.h" |
10 | | #include "mozilla/ViewportFrame.h" |
11 | | |
12 | | class nsPageFrame; |
13 | | class nsSharedPageData; |
14 | | |
15 | | // Page frame class used by the simple page sequence frame |
16 | | class nsPageContentFrame final : public mozilla::ViewportFrame |
17 | | { |
18 | | public: |
19 | | NS_DECL_FRAMEARENA_HELPERS(nsPageContentFrame) |
20 | | |
21 | | friend nsPageContentFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell, |
22 | | ComputedStyle* aStyle); |
23 | | friend class nsPageFrame; |
24 | | |
25 | | // nsIFrame |
26 | | virtual void Reflow(nsPresContext* aPresContext, |
27 | | ReflowOutput& aDesiredSize, |
28 | | const ReflowInput& aReflowInput, |
29 | | nsReflowStatus& aStatus) override; |
30 | | |
31 | | virtual bool IsFrameOfType(uint32_t aFlags) const override |
32 | 0 | { |
33 | 0 | return ViewportFrame::IsFrameOfType(aFlags & |
34 | 0 | ~(nsIFrame::eCanContainOverflowContainers)); |
35 | 0 | } |
36 | | |
37 | 0 | virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; } |
38 | | |
39 | 0 | virtual bool HasTransformGetter() const override { return true; } |
40 | | |
41 | | /** |
42 | | * Return our canvas frame. |
43 | | */ |
44 | | void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override; |
45 | | |
46 | | #ifdef DEBUG_FRAME_DUMP |
47 | | // Debugging |
48 | | virtual nsresult GetFrameName(nsAString& aResult) const override; |
49 | | #endif |
50 | | |
51 | | protected: |
52 | | explicit nsPageContentFrame(ComputedStyle* aStyle) |
53 | | : ViewportFrame(aStyle, kClassID) |
54 | 0 | {} |
55 | | |
56 | | nsSharedPageData* mPD; |
57 | | }; |
58 | | |
59 | | #endif /* nsPageContentFrame_h___ */ |
60 | | |