Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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___
8 #include "mozilla/Attributes.h"
9 #include "nsViewportFrame.h"
10 class nsPageFrame;
11 class nsSharedPageData;
13 // Page frame class used by the simple page sequence frame
14 class nsPageContentFrame : public ViewportFrame {
16 public:
17 NS_DECL_FRAMEARENA_HELPERS
19 friend nsIFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
20 friend class nsPageFrame;
22 // nsIFrame
23 virtual nsresult Reflow(nsPresContext* aPresContext,
24 nsHTMLReflowMetrics& aDesiredSize,
25 const nsHTMLReflowState& aMaxSize,
26 nsReflowStatus& aStatus) MOZ_OVERRIDE;
28 virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
29 {
30 return ViewportFrame::IsFrameOfType(aFlags &
31 ~(nsIFrame::eCanContainOverflowContainers));
32 }
34 virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; }
36 virtual bool HasTransformGetter() const MOZ_OVERRIDE { return true; }
38 /**
39 * Get the "type" of the frame
40 *
41 * @see nsGkAtoms::pageContentFrame
42 */
43 virtual nsIAtom* GetType() const MOZ_OVERRIDE;
45 #ifdef DEBUG_FRAME_DUMP
46 // Debugging
47 virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
48 #endif
50 protected:
51 nsPageContentFrame(nsStyleContext* aContext) : ViewportFrame(aContext) {}
53 nsSharedPageData* mPD;
54 };
56 #endif /* nsPageContentFrame_h___ */