1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/nsPageContentFrame.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 +#ifndef nsPageContentFrame_h___ 1.9 +#define nsPageContentFrame_h___ 1.10 + 1.11 +#include "mozilla/Attributes.h" 1.12 +#include "nsViewportFrame.h" 1.13 +class nsPageFrame; 1.14 +class nsSharedPageData; 1.15 + 1.16 +// Page frame class used by the simple page sequence frame 1.17 +class nsPageContentFrame : public ViewportFrame { 1.18 + 1.19 +public: 1.20 + NS_DECL_FRAMEARENA_HELPERS 1.21 + 1.22 + friend nsIFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); 1.23 + friend class nsPageFrame; 1.24 + 1.25 + // nsIFrame 1.26 + virtual nsresult Reflow(nsPresContext* aPresContext, 1.27 + nsHTMLReflowMetrics& aDesiredSize, 1.28 + const nsHTMLReflowState& aMaxSize, 1.29 + nsReflowStatus& aStatus) MOZ_OVERRIDE; 1.30 + 1.31 + virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE 1.32 + { 1.33 + return ViewportFrame::IsFrameOfType(aFlags & 1.34 + ~(nsIFrame::eCanContainOverflowContainers)); 1.35 + } 1.36 + 1.37 + virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; } 1.38 + 1.39 + virtual bool HasTransformGetter() const MOZ_OVERRIDE { return true; } 1.40 + 1.41 + /** 1.42 + * Get the "type" of the frame 1.43 + * 1.44 + * @see nsGkAtoms::pageContentFrame 1.45 + */ 1.46 + virtual nsIAtom* GetType() const MOZ_OVERRIDE; 1.47 + 1.48 +#ifdef DEBUG_FRAME_DUMP 1.49 + // Debugging 1.50 + virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE; 1.51 +#endif 1.52 + 1.53 +protected: 1.54 + nsPageContentFrame(nsStyleContext* aContext) : ViewportFrame(aContext) {} 1.55 + 1.56 + nsSharedPageData* mPD; 1.57 +}; 1.58 + 1.59 +#endif /* nsPageContentFrame_h___ */ 1.60 +