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/. */
|
1999-09-21 06:12:01 +04:00
|
|
|
|
|
|
|
#ifndef nsMathMLmoFrame_h___
|
|
|
|
#define nsMathMLmoFrame_h___
|
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2002-08-17 01:36:31 +04:00
|
|
|
#include "nsMathMLTokenFrame.h"
|
2013-08-31 01:37:12 +04:00
|
|
|
#include "nsMathMLChar.h"
|
1999-09-21 06:12:01 +04:00
|
|
|
|
|
|
|
//
|
|
|
|
// <mo> -- operator, fence, or separator
|
|
|
|
//
|
|
|
|
|
2002-08-17 01:36:31 +04:00
|
|
|
class nsMathMLmoFrame : public nsMathMLTokenFrame {
|
1999-09-21 06:12:01 +04:00
|
|
|
public:
|
2009-09-12 20:49:24 +04:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2006-03-27 01:30:36 +04:00
|
|
|
friend nsIFrame* NS_NewMathMLmoFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2000-03-28 13:38:24 +04:00
|
|
|
|
2013-05-14 20:33:23 +04:00
|
|
|
virtual eMathMLFrameType GetMathMLFrameType() MOZ_OVERRIDE;
|
2002-08-13 03:30:35 +04:00
|
|
|
|
2003-02-22 03:32:13 +03:00
|
|
|
virtual void
|
2012-08-22 19:56:38 +04:00
|
|
|
SetAdditionalStyleContext(int32_t aIndex,
|
2013-05-14 20:33:23 +04:00
|
|
|
nsStyleContext* aStyleContext) MOZ_OVERRIDE;
|
2003-02-22 03:32:13 +03:00
|
|
|
virtual nsStyleContext*
|
2013-05-14 20:33:23 +04:00
|
|
|
GetAdditionalStyleContext(int32_t aIndex) const MOZ_OVERRIDE;
|
2000-03-28 13:38:24 +04:00
|
|
|
|
2013-02-14 15:12:27 +04:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
1999-09-21 06:12:01 +04:00
|
|
|
|
2002-04-02 08:15:22 +04:00
|
|
|
NS_IMETHOD
|
2012-09-14 20:10:08 +04:00
|
|
|
InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
|
2002-04-02 08:15:22 +04:00
|
|
|
|
2002-02-07 07:38:08 +03:00
|
|
|
NS_IMETHOD
|
2012-09-14 20:10:08 +04:00
|
|
|
TransmitAutomaticData() MOZ_OVERRIDE;
|
2002-02-07 07:38:08 +03:00
|
|
|
|
2014-02-18 11:47:48 +04:00
|
|
|
virtual nsresult
|
2013-12-02 20:50:10 +04:00
|
|
|
SetInitialChildList(ChildListID aListID,
|
|
|
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
|
|
|
|
2014-05-13 04:47:52 +04:00
|
|
|
virtual void
|
2004-08-01 03:15:21 +04:00
|
|
|
Reflow(nsPresContext* aPresContext,
|
2000-01-07 17:49:46 +03:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
2012-09-14 20:10:08 +04:00
|
|
|
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
2000-01-07 17:49:46 +03:00
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
|
2002-02-02 08:43:03 +03:00
|
|
|
|
2013-11-25 18:20:20 +04:00
|
|
|
virtual void
|
|
|
|
GetIntrinsicWidthMetrics(nsRenderingContext* aRenderingContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
|
2008-02-27 13:47:43 +03:00
|
|
|
|
2014-02-18 11:47:48 +04:00
|
|
|
virtual nsresult
|
2012-08-22 19:56:38 +04:00
|
|
|
AttributeChanged(int32_t aNameSpaceID,
|
2002-02-08 03:57:39 +03:00
|
|
|
nsIAtom* aAttribute,
|
2012-09-14 20:10:08 +04:00
|
|
|
int32_t aModType) MOZ_OVERRIDE;
|
2002-02-08 03:57:39 +03:00
|
|
|
|
1999-09-21 06:12:01 +04:00
|
|
|
// This method is called by the parent frame to ask <mo>
|
|
|
|
// to stretch itself.
|
|
|
|
NS_IMETHOD
|
2011-04-08 05:04:40 +04:00
|
|
|
Stretch(nsRenderingContext& aRenderingContext,
|
1999-11-17 03:49:37 +03:00
|
|
|
nsStretchDirection aStretchDirection,
|
2000-03-28 13:38:24 +04:00
|
|
|
nsBoundingMetrics& aContainerSize,
|
2012-09-14 20:10:08 +04:00
|
|
|
nsHTMLReflowMetrics& aDesiredStretchSize) MOZ_OVERRIDE;
|
1999-09-21 06:12:01 +04:00
|
|
|
|
2013-12-02 20:50:10 +04:00
|
|
|
virtual nsresult
|
|
|
|
ChildListChanged(int32_t aModType) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
ProcessTextData();
|
|
|
|
return nsMathMLContainerFrame::ChildListChanged(aModType);
|
|
|
|
}
|
|
|
|
|
1999-09-21 06:12:01 +04:00
|
|
|
protected:
|
2006-03-27 01:30:36 +04:00
|
|
|
nsMathMLmoFrame(nsStyleContext* aContext) : nsMathMLTokenFrame(aContext) {}
|
1999-09-21 06:12:01 +04:00
|
|
|
virtual ~nsMathMLmoFrame();
|
|
|
|
|
2000-03-28 13:38:24 +04:00
|
|
|
nsMathMLChar mMathMLChar; // Here is the MathMLChar that will deal with the operator.
|
|
|
|
nsOperatorFlags mFlags;
|
|
|
|
float mMinSize;
|
|
|
|
float mMaxSize;
|
2002-02-07 07:38:08 +03:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool UseMathMLChar();
|
2008-03-14 07:05:43 +03:00
|
|
|
|
2002-08-17 01:36:31 +04:00
|
|
|
// overload the base method so that we can setup our nsMathMLChar
|
2013-12-02 20:50:10 +04:00
|
|
|
void ProcessTextData();
|
2002-02-07 07:38:08 +03:00
|
|
|
|
|
|
|
// helper to get our 'form' and lookup in the Operator Dictionary to fetch
|
|
|
|
// our default data that may come from there, and to complete the setup
|
|
|
|
// using attributes that we may have
|
|
|
|
void
|
2005-02-07 04:57:50 +03:00
|
|
|
ProcessOperatorData();
|
2002-04-02 08:15:22 +04:00
|
|
|
|
|
|
|
// helper to double check thar our char should be rendered as a selected char
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2005-02-07 04:57:50 +03:00
|
|
|
IsFrameInSelection(nsIFrame* aFrame);
|
1999-09-21 06:12:01 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmoFrame_h___ */
|