2017-10-27 17:33:53 +00: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 11:12:37 +00: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/. */
|
2000-01-27 12:31:12 +00:00
|
|
|
|
|
|
|
#ifndef nsMathMLmspaceFrame_h___
|
|
|
|
#define nsMathMLmspaceFrame_h___
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-01-27 12:31:12 +00:00
|
|
|
#include "nsMathMLContainerFrame.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// <mspace> -- space
|
|
|
|
//
|
|
|
|
|
|
|
|
class nsMathMLmspaceFrame : public nsMathMLContainerFrame {
|
|
|
|
public:
|
2017-05-26 10:11:11 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsMathMLmspaceFrame)
|
2009-09-12 16:49:24 +00:00
|
|
|
|
2006-03-26 21:30:36 +00:00
|
|
|
friend nsIFrame* NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2000-01-27 12:31:12 +00:00
|
|
|
|
2011-03-25 03:38:59 +00:00
|
|
|
NS_IMETHOD
|
2015-03-21 16:28:04 +00:00
|
|
|
TransmitAutomaticData() override {
|
2011-03-25 03:38:59 +00:00
|
|
|
// The REC defines the following elements to be space-like:
|
|
|
|
// * an mtext, mspace, maligngroup, or malignmark element;
|
|
|
|
mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2014-05-13 00:47:52 +00:00
|
|
|
virtual void
|
2004-07-31 23:15:21 +00:00
|
|
|
Reflow(nsPresContext* aPresContext,
|
2016-07-21 10:36:38 +00:00
|
|
|
ReflowOutput& aDesiredSize,
|
2016-07-21 10:36:39 +00:00
|
|
|
const ReflowInput& aReflowInput,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsReflowStatus& aStatus) override;
|
2017-07-06 12:00:35 +00:00
|
|
|
|
2000-01-27 12:31:12 +00:00
|
|
|
protected:
|
2017-05-06 03:47:00 +00:00
|
|
|
explicit nsMathMLmspaceFrame(nsStyleContext* aContext) :
|
2017-05-26 10:11:11 +00:00
|
|
|
nsMathMLContainerFrame(aContext, kClassID), mWidth(0), mHeight(0), mDepth(0) {}
|
2000-01-27 12:31:12 +00:00
|
|
|
virtual ~nsMathMLmspaceFrame();
|
|
|
|
|
2012-11-29 22:52:02 +00:00
|
|
|
virtual nsresult
|
2015-12-15 21:56:41 +00:00
|
|
|
MeasureForWidth(DrawTarget* aDrawTarget,
|
2016-07-21 10:36:38 +00:00
|
|
|
ReflowOutput& aDesiredSize) override;
|
2012-11-29 22:52:02 +00:00
|
|
|
|
2000-01-27 12:31:12 +00:00
|
|
|
private:
|
|
|
|
nscoord mWidth;
|
|
|
|
nscoord mHeight;
|
|
|
|
nscoord mDepth;
|
2002-02-07 04:38:08 +00:00
|
|
|
|
|
|
|
// helper method to initialize our member data
|
2017-07-06 12:00:35 +00:00
|
|
|
void
|
2004-07-31 23:15:21 +00:00
|
|
|
ProcessAttributes(nsPresContext* aPresContext);
|
2000-01-27 12:31:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmspaceFrame_h___ */
|