Bug 1340483 - Part 1. Create empty anonymous node for autofill preview. r=heycam

MozReview-Commit-ID: GTVgIPoogp9
This commit is contained in:
Ray Lin
2017-03-20 11:53:40 +08:00
parent 31db30d502
commit 78ff382026
8 changed files with 118 additions and 27 deletions

View File

@@ -2891,6 +2891,27 @@ HTMLInputElement::GetPlaceholderVisibility()
return state->GetPlaceholderVisibility();
}
NS_IMETHODIMP_(Element*)
HTMLInputElement::CreatePreviewNode()
{
nsTextEditorState* state = GetEditorState();
if (state) {
NS_ENSURE_SUCCESS(state->CreatePreviewNode(), nullptr);
return state->GetPreviewNode();
}
return nullptr;
}
NS_IMETHODIMP_(Element*)
HTMLInputElement::GetPreviewNode()
{
nsTextEditorState* state = GetEditorState();
if (state) {
return state->GetPreviewNode();
}
return nullptr;
}
void
HTMLInputElement::GetDisplayFileName(nsAString& aValue) const
{