Fix InitData classes to init themselves properly to avoid latent unitialized memory bugs

git-svn-id: svn://10.0.0.236/trunk@13272 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com 1998-10-21 20:10:22 +00:00
parent 7c8f78f13e
commit 6d28021460
5 changed files with 28 additions and 1 deletions

View File

@ -32,6 +32,11 @@
*/
struct nsComboBoxInitData : public nsWidgetInitData {
nsComboBoxInitData()
: mDropDownHeight(0)
{
}
PRUint32 mDropDownHeight; // in pixels
};

View File

@ -38,6 +38,11 @@ enum nsLabelAlignment {
};
struct nsLabelInitData : public nsWidgetInitData {
nsLabelInitData()
: mAlignment(eAlign_Left)
{
}
nsLabelAlignment mAlignment;
};

View File

@ -32,6 +32,11 @@
*/
struct nsListBoxInitData : public nsWidgetInitData {
nsListBoxInitData()
: mMultiSelect(PR_FALSE)
{
}
PRBool mMultiSelect;
};

View File

@ -27,6 +27,12 @@
struct nsTextWidgetInitData : public nsWidgetInitData {
nsTextWidgetInitData()
: mIsPassword(PR_FALSE),
mIsReadOnly(PR_FALSE)
{
}
PRBool mIsPassword;
PRBool mIsReadOnly;
};

View File

@ -116,7 +116,13 @@ enum nsCursor { ///(normal cursor, usually rendered as an arrow)
*/
struct nsWidgetInitData {
PRPackedBool clipChildren; // when painting exclude area occupied by child windows
nsWidgetInitData()
: clipChildren(PR_FALSE)
{
}
// when painting exclude area occupied by child windows
PRPackedBool clipChildren;
};
/**