Bug 1385788 - Move the ownership of preview value from PresState to HTMLSelectElement. r=bz
MozReview-Commit-ID: 9NC8h6SyWdh
This commit is contained in:
@@ -1931,23 +1931,15 @@ HTMLSelectElement::SetOpenInParentProcess(bool aVal)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
HTMLSelectElement::GetPreviewValue(nsAString& aValue)
|
||||
{
|
||||
nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
|
||||
nsIComboboxControlFrame* comboFrame = do_QueryFrame(formControlFrame);
|
||||
if (comboFrame) {
|
||||
comboFrame->GetPreviewText(aValue);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
HTMLSelectElement::SetPreviewValue(const nsAString& aValue)
|
||||
{
|
||||
mPreviewValue = aValue;
|
||||
nsContentUtils::RemoveNewlines(mPreviewValue);
|
||||
nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
|
||||
nsIComboboxControlFrame* comboFrame = do_QueryFrame(formControlFrame);
|
||||
if (comboFrame) {
|
||||
comboFrame->SetPreviewText(aValue);
|
||||
comboFrame->RedisplaySelectedText();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user