2007-06-11 23:10:23 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsMathMLmspaceFrame_h___
|
|
|
|
#define nsMathMLmspaceFrame_h___
|
|
|
|
|
2012-09-14 09:10:08 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsMathMLContainerFrame.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// <mspace> -- space
|
|
|
|
//
|
|
|
|
|
|
|
|
class nsMathMLmspaceFrame : public nsMathMLContainerFrame {
|
|
|
|
public:
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
friend nsIFrame* NS_NewMathMLmspaceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
|
2011-03-24 20:38:59 -07:00
|
|
|
NS_IMETHOD
|
2013-05-14 09:33:23 -07:00
|
|
|
TransmitAutomaticData() MOZ_OVERRIDE {
|
2011-03-24 20:38:59 -07: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;
|
|
|
|
}
|
|
|
|
|
2013-05-14 09:33:23 -07:00
|
|
|
virtual bool IsLeaf() const MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_IMETHOD
|
|
|
|
Reflow(nsPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
2012-09-14 09:10:08 -07:00
|
|
|
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
|
|
|
|
virtual ~nsMathMLmspaceFrame();
|
|
|
|
|
2012-11-29 14:52:02 -08:00
|
|
|
virtual nsresult
|
|
|
|
MeasureForWidth(nsRenderingContext& aRenderingContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
private:
|
|
|
|
nscoord mWidth;
|
|
|
|
nscoord mHeight;
|
|
|
|
nscoord mDepth;
|
|
|
|
|
|
|
|
// helper method to initialize our member data
|
|
|
|
void
|
|
|
|
ProcessAttributes(nsPresContext* aPresContext);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmspaceFrame_h___ */
|