Bug 1374207 - part1: nsTextEditorState should use mozilla::TextEditor instead of editor interfaces r=smaug

Using concrete class rather than interface classes (nsI*Editor) will allow to reduce QI and some virtual calls.  Therefore, Editor classes should be used as concrete class as far as possible.

Unfortunately, if classes referring editor are initialized via scriptable interface, we cannot do this because nsI*Editor is still not marked as builtinclass.  Therefore, their editor may be implemented by JS.  E.g., inline nsIInlineSpellChecker.init() and nsIDocShell.editor.  Such remaining cases should be fixed after nsI*Editor classes are marked as builtinclass.

Note that this patch also creates nsIdentifierMapEntry.h which is separated from nsDocument.h because ShadowRoot.h needs the class but exposing nsDocument.h to the global and includes it causes bustage on Linux and Android.  Therefore, for fixing the include hell, this patch touches them and ContentChild.cpp.

MozReview-Commit-ID: i6fLWw6Qeo
This commit is contained in:
Masayuki Nakano
2017-06-20 22:57:08 +09:00
parent 45c80d8b6c
commit e0a2ff6005
14 changed files with 420 additions and 356 deletions

View File

@@ -2620,7 +2620,7 @@ HTMLInputElement::GetEditor()
{
nsTextEditorState* state = GetEditorState();
if (state) {
return state->GetEditor();
return state->GetTextEditor();
}
return nullptr;
}