Bug 1340488 - Add a chrome-only previewValue attribute to <select> for showing preview text. r=baku,heycam
MozReview-Commit-ID: En8e0hO35Lj
This commit is contained in:
@@ -1932,6 +1932,26 @@ 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)
|
||||
{
|
||||
nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
|
||||
nsIComboboxControlFrame* comboFrame = do_QueryFrame(formControlFrame);
|
||||
if (comboFrame) {
|
||||
comboFrame->SetPreviewText(aValue);
|
||||
}
|
||||
}
|
||||
|
||||
JSObject*
|
||||
HTMLSelectElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user