layout/generic/nsPageContentFrame.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:51874cec1144
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsPageContentFrame_h___
6 #define nsPageContentFrame_h___
7
8 #include "mozilla/Attributes.h"
9 #include "nsViewportFrame.h"
10 class nsPageFrame;
11 class nsSharedPageData;
12
13 // Page frame class used by the simple page sequence frame
14 class nsPageContentFrame : public ViewportFrame {
15
16 public:
17 NS_DECL_FRAMEARENA_HELPERS
18
19 friend nsIFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
20 friend class nsPageFrame;
21
22 // nsIFrame
23 virtual nsresult Reflow(nsPresContext* aPresContext,
24 nsHTMLReflowMetrics& aDesiredSize,
25 const nsHTMLReflowState& aMaxSize,
26 nsReflowStatus& aStatus) MOZ_OVERRIDE;
27
28 virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
29 {
30 return ViewportFrame::IsFrameOfType(aFlags &
31 ~(nsIFrame::eCanContainOverflowContainers));
32 }
33
34 virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; }
35
36 virtual bool HasTransformGetter() const MOZ_OVERRIDE { return true; }
37
38 /**
39 * Get the "type" of the frame
40 *
41 * @see nsGkAtoms::pageContentFrame
42 */
43 virtual nsIAtom* GetType() const MOZ_OVERRIDE;
44
45 #ifdef DEBUG_FRAME_DUMP
46 // Debugging
47 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
48 #endif
49
50 protected:
51 nsPageContentFrame(nsStyleContext* aContext) : ViewportFrame(aContext) {}
52
53 nsSharedPageData* mPD;
54 };
55
56 #endif /* nsPageContentFrame_h___ */
57

mercurial