Added methods for getting a frame's current font and

for calculating the nsIFormControlFrame's NavQuirks size
Added two methods for getting the "wrap" property and andded a new enum
for for testing against instead of a string
Added a method for calculating the size when in NavQuirks modes, this currently
duplicates the algorithms for for input text and textareas
r=kmcclusk, Bug #3040,11285


git-svn-id: svn://10.0.0.236/trunk@51128 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com
1999-10-19 11:58:50 +00:00
parent 4df3a52095
commit 94117fe06b
4 changed files with 454 additions and 32 deletions

View File

@@ -111,9 +111,21 @@ public:
static void GetFont(nsIFormControlFrame * aFormFrame,
nsIPresContext* aPresContext,
nsIStyleContext * aStyleContext,
nsIStyleContext * aStyleContext,
nsFont& aFont);
// returns the an addref'ed FontMetrics for the default font for the frame
static void GetFrameFontFM(nsIPresContext& aPresContext,
nsIFormControlFrame * aFrame,
nsIFontMetrics** aFontMet);
static nscoord CalcNavQuirkSizing(nsIPresContext& aPresContext,
nsIRenderingContext* aRendContext,
nsIFontMetrics* aFontMet,
nsIFormControlFrame* aFrame,
PRInt32 aLength,
nsSize& aSize);
static void ForceDrawFrame(nsIFrame * aFrame);
static nsresult GetValue(nsIContent* aContent, nsString* aResult);
@@ -144,6 +156,20 @@ public:
static nsCompatibility GetRepChars(nsIPresContext& aPresContext, char& char1, char& char2);
typedef enum {
eHTMLTextWrap_Unknown = 0,
eHTMLTextWrap_Off = 1,
eHTMLTextWrap_Hard = 2,
eHTMLTextWrap_Soft = 3,
} nsHTMLTextWrap;
/** returns the value of the "wrap" property in aOutValue
* returns NS_CONTENT_ATTR_NOT_THERE if the property does not exist for this
*/
static nsresult GetWrapProperty(nsIContent * aContent, nsString &aOutValue);
static nsresult GetWrapPropertyEnum(nsIContent * aContent, nsHTMLTextWrap& aWrapProp);
//
//-------------------------------------------------------------------------------------
// Utility methods for managing checkboxes and radiobuttons