2007-06-12 06:10:23 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
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/. */
|
1999-09-21 02:12:01 +00:00
|
|
|
|
2002-08-16 21:36:31 +00:00
|
|
|
#ifndef nsMathMLTokenFrame_h___
|
|
|
|
#define nsMathMLTokenFrame_h___
|
1999-09-21 02:12:01 +00:00
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
1999-09-21 02:12:01 +00:00
|
|
|
#include "nsMathMLContainerFrame.h"
|
|
|
|
|
|
|
|
//
|
2002-08-16 21:36:31 +00:00
|
|
|
// Base class to handle token elements
|
1999-09-21 02:12:01 +00:00
|
|
|
//
|
|
|
|
|
2002-08-16 21:36:31 +00:00
|
|
|
class nsMathMLTokenFrame : public nsMathMLContainerFrame {
|
1999-09-21 02:12:01 +00:00
|
|
|
public:
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2006-03-26 21:30:36 +00:00
|
|
|
friend nsIFrame* NS_NewMathMLTokenFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1999-09-21 02:12:01 +00:00
|
|
|
|
2011-03-25 03:38:59 +00:00
|
|
|
NS_IMETHOD
|
2013-05-14 16:33:23 +00:00
|
|
|
TransmitAutomaticData() MOZ_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;
|
|
|
|
if (mContent->Tag() == nsGkAtoms::mtext_) {
|
|
|
|
mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
|
|
|
|
}
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2011-05-12 21:37:03 +00:00
|
|
|
NS_IMETHOD
|
2013-05-14 16:33:23 +00:00
|
|
|
InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
|
2011-05-12 21:37:03 +00:00
|
|
|
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual eMathMLFrameType GetMathMLFrameType() MOZ_OVERRIDE;
|
2002-08-16 21:36:31 +00:00
|
|
|
|
2014-05-28 19:36:58 +00:00
|
|
|
virtual void
|
2011-08-24 20:54:30 +00:00
|
|
|
SetInitialChildList(ChildListID aListID,
|
2012-09-14 16:10:08 +00:00
|
|
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
2000-01-07 14:49:46 +00:00
|
|
|
|
2014-05-28 19:36:58 +00:00
|
|
|
virtual void
|
2012-08-31 01:32:02 +00:00
|
|
|
AppendFrames(ChildListID aListID,
|
2012-09-14 16:10:08 +00:00
|
|
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
2012-08-31 01:32:02 +00:00
|
|
|
|
2014-05-28 19:36:58 +00:00
|
|
|
virtual void
|
2012-08-31 01:32:02 +00:00
|
|
|
InsertFrames(ChildListID aListID,
|
|
|
|
nsIFrame* aPrevFrame,
|
2012-09-14 16:10:08 +00:00
|
|
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
2012-08-31 01:32:02 +00:00
|
|
|
|
2014-05-13 00:47:52 +00:00
|
|
|
virtual void
|
2004-07-31 23:15:21 +00:00
|
|
|
Reflow(nsPresContext* aPresContext,
|
2000-01-07 14:49:46 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
2012-09-14 16:10:08 +00:00
|
|
|
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
2000-01-07 14:49:46 +00:00
|
|
|
|
2008-03-18 04:52:48 +00:00
|
|
|
virtual nsresult
|
2011-04-08 01:04:40 +00:00
|
|
|
Place(nsRenderingContext& aRenderingContext,
|
2011-09-29 06:19:26 +00:00
|
|
|
bool aPlaceOrigin,
|
2012-09-14 16:10:08 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
|
2000-01-07 14:49:46 +00:00
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
protected:
|
2014-09-01 03:36:37 +00:00
|
|
|
explicit nsMathMLTokenFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
|
2002-08-16 21:36:31 +00:00
|
|
|
virtual ~nsMathMLTokenFrame();
|
2002-02-07 04:38:08 +00:00
|
|
|
|
2013-09-30 15:55:51 +00:00
|
|
|
void MarkTextFramesAsTokenMathML();
|
1999-09-21 02:12:01 +00:00
|
|
|
};
|
|
|
|
|
2002-08-16 21:36:31 +00:00
|
|
|
#endif /* nsMathMLTokentFrame_h___ */
|