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:
parent
7c8f78f13e
commit
6d28021460
@ -32,6 +32,11 @@
|
||||
*/
|
||||
|
||||
struct nsComboBoxInitData : public nsWidgetInitData {
|
||||
nsComboBoxInitData()
|
||||
: mDropDownHeight(0)
|
||||
{
|
||||
}
|
||||
|
||||
PRUint32 mDropDownHeight; // in pixels
|
||||
};
|
||||
|
||||
|
||||
@ -38,6 +38,11 @@ enum nsLabelAlignment {
|
||||
};
|
||||
|
||||
struct nsLabelInitData : public nsWidgetInitData {
|
||||
nsLabelInitData()
|
||||
: mAlignment(eAlign_Left)
|
||||
{
|
||||
}
|
||||
|
||||
nsLabelAlignment mAlignment;
|
||||
};
|
||||
|
||||
|
||||
@ -32,6 +32,11 @@
|
||||
*/
|
||||
|
||||
struct nsListBoxInitData : public nsWidgetInitData {
|
||||
nsListBoxInitData()
|
||||
: mMultiSelect(PR_FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
PRBool mMultiSelect;
|
||||
};
|
||||
|
||||
|
||||
@ -27,6 +27,12 @@
|
||||
|
||||
|
||||
struct nsTextWidgetInitData : public nsWidgetInitData {
|
||||
nsTextWidgetInitData()
|
||||
: mIsPassword(PR_FALSE),
|
||||
mIsReadOnly(PR_FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
PRBool mIsPassword;
|
||||
PRBool mIsReadOnly;
|
||||
};
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user