Bug 1455674 part 7. Simplify HTMLEditor::GetFocusedNode. r=masayuki

This commit is contained in:
Boris Zbarsky 2018-04-26 23:35:19 -04:00
Родитель 42cb3dbf9d
Коммит 9e59f290d1
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -4948,6 +4948,11 @@ HTMLEditor::GetFocusedNode()
return nullptr;
}
// focusedContent might be non-null even fm->GetFocusedContent() is
// null. That's the designMode case, and in that case our
// FocusedContent() returns the root element, but we want to return
// the document.
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
NS_ASSERTION(fm, "Focus manager is null");
nsCOMPtr<nsIDOMElement> focusedElement;