2007-06-12 10:10:23 +04: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/. */
|
2000-01-27 15:31:12 +03:00
|
|
|
|
|
|
|
#ifndef nsMathMLmspaceFrame_h___
|
|
|
|
#define nsMathMLmspaceFrame_h___
|
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-01-27 15:31:12 +03:00
|
|
|
#include "nsMathMLContainerFrame.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// <mspace> -- space
|
|
|
|
//
|
|
|
|
|
|
|
|
class nsMathMLmspaceFrame : public nsMathMLContainerFrame {
|
|
|
|
public:
|
2009-09-12 20:49:24 +04:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2006-03-27 01:30:36 +04:00
|
|
|
friend nsIFrame* NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2000-01-27 15:31:12 +03:00
|
|
|
|
2011-03-25 06:38:59 +03:00
|
|
|
NS_IMETHOD
|
2015-03-21 19:28:04 +03:00
|
|
|
TransmitAutomaticData() override {
|
2011-03-25 06:38:59 +03: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;
|
|
|
|
}
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool IsLeaf() const override;
|
2006-01-21 05:46:19 +03:00
|
|
|
|
2014-05-13 04:47:52 +04:00
|
|
|
virtual void
|
2004-08-01 03:15:21 +04:00
|
|
|
Reflow(nsPresContext* aPresContext,
|
2000-01-27 15:31:12 +03:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsReflowStatus& aStatus) override;
|
2000-01-27 15:31:12 +03:00
|
|
|
|
|
|
|
protected:
|
2014-09-01 07:36:37 +04:00
|
|
|
explicit nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
|
2000-01-27 15:31:12 +03:00
|
|
|
virtual ~nsMathMLmspaceFrame();
|
|
|
|
|
2012-11-30 02:52:02 +04:00
|
|
|
virtual nsresult
|
2015-12-16 00:56:41 +03:00
|
|
|
MeasureForWidth(DrawTarget* aDrawTarget,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize) override;
|
2012-11-30 02:52:02 +04:00
|
|
|
|
2000-01-27 15:31:12 +03:00
|
|
|
private:
|
|
|
|
nscoord mWidth;
|
|
|
|
nscoord mHeight;
|
|
|
|
nscoord mDepth;
|
2002-02-07 07:38:08 +03:00
|
|
|
|
|
|
|
// helper method to initialize our member data
|
|
|
|
void
|
2004-08-01 03:15:21 +04:00
|
|
|
ProcessAttributes(nsPresContext* aPresContext);
|
2000-01-27 15:31:12 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmspaceFrame_h___ */
|