Start out with our display textnode in the right state so we don't require

two-pass reflow (which printing can't handle) to display comboboxes right. Bug
311380, r+sr=roc
This commit is contained in:
bzbarsky@mit.edu
2005-10-20 23:19:22 +00:00
parent da7043a1ca
commit 1b631fbf82

View File

@@ -2086,8 +2086,10 @@ nsComboboxControlFrame::CreateAnonymousContent(nsPresContext* aPresContext,
if (labelContent) {
// set the value of the text node
mDisplayContent.swap(labelContent);
mDisplayedIndex = -1;
mDisplayedOptionText.Truncate();
mListControlFrame->GetSelectedIndex(&mDisplayedIndex);
if (mDisplayedIndex != -1) {
mListControlFrame->GetOptionText(mDisplayedIndex, mDisplayedOptionText);
}
ActuallyDisplayText(PR_FALSE);
nsCOMPtr<nsINodeInfo> nodeInfo;