2002-01-25 05:07:03 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2002-01-25 05:07:03 +03:00
|
|
|
#ifndef nsPageContentFrame_h___
|
|
|
|
#define nsPageContentFrame_h___
|
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2003-01-20 21:04:34 +03:00
|
|
|
#include "nsViewportFrame.h"
|
2002-01-25 05:07:03 +03:00
|
|
|
class nsPageFrame;
|
2002-09-20 01:45:07 +04:00
|
|
|
class nsSharedPageData;
|
2002-01-25 05:07:03 +03:00
|
|
|
|
|
|
|
// Page frame class used by the simple page sequence frame
|
2003-01-20 21:04:34 +03:00
|
|
|
class nsPageContentFrame : public ViewportFrame {
|
2002-01-25 05:07:03 +03:00
|
|
|
|
|
|
|
public:
|
2009-09-12 20:49:24 +04:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2014-05-25 02:20:40 +04:00
|
|
|
friend nsPageContentFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell,
|
|
|
|
nsStyleContext* aContext);
|
2002-01-25 05:07:03 +03:00
|
|
|
friend class nsPageFrame;
|
|
|
|
|
|
|
|
// nsIFrame
|
2014-05-13 04:47:52 +04:00
|
|
|
virtual void Reflow(nsPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aMaxSize,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsReflowStatus& aStatus) override;
|
2002-01-25 05:07:03 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
2010-04-12 22:36:58 +04:00
|
|
|
{
|
|
|
|
return ViewportFrame::IsFrameOfType(aFlags &
|
|
|
|
~(nsIFrame::eCanContainOverflowContainers));
|
|
|
|
}
|
2002-01-25 05:07:03 +03:00
|
|
|
|
2002-09-20 01:45:07 +04:00
|
|
|
virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; }
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool HasTransformGetter() const override { return true; }
|
2012-10-03 09:55:50 +04:00
|
|
|
|
2002-01-25 05:07:03 +03:00
|
|
|
/**
|
|
|
|
* Get the "type" of the frame
|
|
|
|
*
|
2008-04-08 17:06:12 +04:00
|
|
|
* @see nsGkAtoms::pageContentFrame
|
2002-01-25 05:07:03 +03:00
|
|
|
*/
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIAtom* GetType() const override;
|
2002-01-25 05:07:03 +03:00
|
|
|
|
2014-01-06 03:31:14 +04:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2002-01-25 05:07:03 +03:00
|
|
|
// Debugging
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsresult GetFrameName(nsAString& aResult) const override;
|
2002-01-25 05:07:03 +03:00
|
|
|
#endif
|
|
|
|
|
2002-01-31 17:24:06 +03:00
|
|
|
protected:
|
2014-09-01 07:36:37 +04:00
|
|
|
explicit nsPageContentFrame(nsStyleContext* aContext) : ViewportFrame(aContext) {}
|
2003-01-20 21:04:34 +03:00
|
|
|
|
|
|
|
nsSharedPageData* mPD;
|
2002-01-25 05:07:03 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsPageContentFrame_h___ */
|
|
|
|
|