Allow grid groups to contain other grid groups, to fix mail compose window and other <listbox> bustage. b=317480

This commit is contained in:
dbaron%dbaron.org 2005-11-22 23:35:57 +00:00
parent 0aabcad6c8
commit 6a21a28fbe

View File

@ -111,7 +111,8 @@ public:
* Return whether this grid part is an appropriate parent for the argument.
*/
PRBool CanContain(nsIGridPart* aPossibleChild) {
return GetType() + 1 == aPossibleChild->GetType();
Type thisType = GetType(), childType = aPossibleChild->GetType();
return thisType + 1 == childType || (thisType == eRowGroup && childType == eRowGroup);
}
};