Bug 1194027, add a flag to select elements to indicate if the parent process has the popup open, r=mrbkap

This commit is contained in:
Neil Deakin
2016-08-03 07:45:46 -04:00
parent bfb111f98a
commit 28758779ab
8 changed files with 57 additions and 5 deletions

View File

@@ -1885,6 +1885,28 @@ HTMLSelectElement::UpdateSelectedOptions()
}
}
bool
HTMLSelectElement::OpenInParentProcess()
{
nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
nsIComboboxControlFrame* comboFrame = do_QueryFrame(formControlFrame);
if (comboFrame) {
return comboFrame->IsOpenInParentProcess();
}
return false;
}
void
HTMLSelectElement::SetOpenInParentProcess(bool aVal)
{
nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
nsIComboboxControlFrame* comboFrame = do_QueryFrame(formControlFrame);
if (comboFrame) {
comboFrame->SetOpenInParentProcess(aVal);
}
}
JSObject*
HTMLSelectElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{