#534: M1499028 M1510471

This commit is contained in:
Cameron Kaiser 2018-11-29 08:10:15 -08:00
parent 8126d332a5
commit 3cf019ddc6
2 changed files with 8 additions and 2 deletions

View File

@ -1925,6 +1925,7 @@ var currencyDigits = {
TND: 3,
UGX: 0,
UYI: 0,
UYW: 4,
VND: 0,
VUV: 0,
XAF: 0,

View File

@ -1035,6 +1035,10 @@ nsComboboxControlFrame::HandleRedisplayTextEvent()
mRedisplayTextEvent.Forget();
ActuallyDisplayText(true);
if (!weakThis.IsAlive()) {
return;
}
// XXXbz This should perhaps be eResize. Check.
PresContext()->PresShell()->FrameNeedsReflow(mDisplayFrame,
nsIPresShell::eStyleChange,
@ -1046,13 +1050,14 @@ nsComboboxControlFrame::HandleRedisplayTextEvent()
void
nsComboboxControlFrame::ActuallyDisplayText(bool aNotify)
{
nsCOMPtr<nsIContent> displayContent = mDisplayContent;
if (mDisplayedOptionText.IsEmpty()) {
// Have to use a non-breaking space for line-block-size calculations
// to be right
static const char16_t space = 0xA0;
mDisplayContent->SetText(&space, 1, aNotify);
displayContent->SetText(&space, 1, aNotify);
} else {
mDisplayContent->SetText(mDisplayedOptionText, aNotify);
displayContent->SetText(mDisplayedOptionText, aNotify);
}
}