2007-06-11 23:10:23 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 12:12:37 +01: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
|
|
|
|
|
|
|
#ifndef nsMathMLmpaddedFrame_h___
|
|
|
|
#define nsMathMLmpaddedFrame_h___
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsMathMLContainerFrame.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// <mpadded> -- adjust space around content
|
|
|
|
//
|
|
|
|
|
|
|
|
class nsMathMLmpaddedFrame : public nsMathMLContainerFrame {
|
|
|
|
public:
|
2009-09-12 17:49:24 +01:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2006-03-26 21:30:36 +00:00
|
|
|
friend nsIFrame* NS_NewMathMLmpaddedFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1999-09-21 02:12:01 +00:00
|
|
|
|
2002-02-01 15:10:50 +00:00
|
|
|
NS_IMETHOD
|
2005-02-07 01:57:50 +00:00
|
|
|
InheritAutomaticData(nsIFrame* aParent);
|
2002-02-01 15:10:50 +00:00
|
|
|
|
2011-03-25 16:38:59 +13:00
|
|
|
NS_IMETHOD
|
|
|
|
TransmitAutomaticData() {
|
|
|
|
return TransmitAutomaticDataForMrowLikeElement();
|
|
|
|
}
|
|
|
|
|
2000-01-27 12:35:30 +00:00
|
|
|
NS_IMETHOD
|
2004-07-31 23:15:21 +00:00
|
|
|
Reflow(nsPresContext* aPresContext,
|
2000-01-27 12:35:30 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
2008-03-17 21:52:48 -07:00
|
|
|
virtual nsresult
|
2011-04-07 18:04:40 -07:00
|
|
|
Place(nsRenderingContext& aRenderingContext,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aPlaceOrigin,
|
2007-12-28 15:04:19 -08:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize);
|
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
protected:
|
2006-03-26 21:30:36 +00:00
|
|
|
nsMathMLmpaddedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
|
1999-09-21 02:12:01 +00:00
|
|
|
virtual ~nsMathMLmpaddedFrame();
|
|
|
|
|
2012-08-09 09:09:40 +02:00
|
|
|
virtual int GetSkipSides() const { return 0; }
|
2000-01-27 12:35:30 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
nsCSSValue mWidth;
|
|
|
|
nsCSSValue mHeight;
|
|
|
|
nsCSSValue mDepth;
|
2010-01-05 11:22:31 +01:00
|
|
|
nsCSSValue mLeadingSpace;
|
2011-07-03 09:54:01 +02:00
|
|
|
nsCSSValue mVerticalOffset;
|
2000-01-27 12:35:30 +00:00
|
|
|
|
|
|
|
PRInt32 mWidthSign;
|
|
|
|
PRInt32 mHeightSign;
|
|
|
|
PRInt32 mDepthSign;
|
2010-01-05 11:22:31 +01:00
|
|
|
PRInt32 mLeadingSpaceSign;
|
2011-07-03 09:54:01 +02:00
|
|
|
PRInt32 mVerticalOffsetSign;
|
2000-01-27 12:35:30 +00:00
|
|
|
|
|
|
|
PRInt32 mWidthPseudoUnit;
|
|
|
|
PRInt32 mHeightPseudoUnit;
|
|
|
|
PRInt32 mDepthPseudoUnit;
|
2010-01-05 11:22:31 +01:00
|
|
|
PRInt32 mLeadingSpacePseudoUnit;
|
2011-07-03 09:54:01 +02:00
|
|
|
PRInt32 mVerticalOffsetPseudoUnit;
|
2000-01-27 12:35:30 +00:00
|
|
|
|
|
|
|
// helpers to process the attributes
|
2002-02-07 04:38:08 +00:00
|
|
|
void
|
2005-02-07 01:57:50 +00:00
|
|
|
ProcessAttributes();
|
2002-02-07 04:38:08 +00:00
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool
|
2000-01-27 12:35:30 +00:00
|
|
|
ParseAttribute(nsString& aString,
|
|
|
|
PRInt32& aSign,
|
|
|
|
nsCSSValue& aCSSValue,
|
|
|
|
PRInt32& aPseudoUnit);
|
|
|
|
|
2007-12-28 15:04:19 -08:00
|
|
|
void
|
2008-01-02 20:33:21 -08:00
|
|
|
UpdateValue(PRInt32 aSign,
|
|
|
|
PRInt32 aPseudoUnit,
|
|
|
|
const nsCSSValue& aCSSValue,
|
|
|
|
const nsBoundingMetrics& aBoundingMetrics,
|
|
|
|
nscoord& aValueToUpdate) const;
|
1999-09-21 02:12:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmpaddedFrame_h___ */
|