2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
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"
|
2016-11-30 06:14:29 +03:00
|
|
|
#include "mozilla/ViewportFrame.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
|
2017-04-30 18:30:08 +03:00
|
|
|
class nsPageContentFrame final : public mozilla::ViewportFrame
|
|
|
|
{
|
2002-01-25 05:07:03 +03:00
|
|
|
public:
|
2017-05-26 13:11:11 +03:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsPageContentFrame)
|
2009-09-12 20:49:24 +04:00
|
|
|
|
2014-05-25 02:20:40 +04:00
|
|
|
friend nsPageContentFrame* NS_NewPageContentFrame(nsIPresShell* aPresShell,
|
2018-03-22 21:20:41 +03:00
|
|
|
ComputedStyle* aStyle);
|
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,
|
2016-07-21 13:36:38 +03:00
|
|
|
ReflowOutput& aDesiredSize,
|
2017-07-25 14:02:35 +03:00
|
|
|
const ReflowInput& aReflowInput,
|
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
|
|
|
|
2017-06-21 18:45:14 +03:00
|
|
|
/**
|
|
|
|
* Return our canvas frame.
|
|
|
|
*/
|
|
|
|
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
|
|
|
|
|
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:
|
2018-03-22 21:20:41 +03:00
|
|
|
explicit nsPageContentFrame(ComputedStyle* aStyle)
|
|
|
|
: ViewportFrame(aStyle, kClassID)
|
2017-04-30 18:30:08 +03:00
|
|
|
{}
|
2003-01-20 21:04:34 +03:00
|
|
|
|
|
|
|
nsSharedPageData* mPD;
|
2002-01-25 05:07:03 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsPageContentFrame_h___ */
|
|
|
|
|