Bug 1649121: part 17) Correct style for previous commit. r=masayuki

Separate commit to reduce possibility for typos.

Differential Revision: https://phabricator.services.mozilla.com/D82148
This commit is contained in:
Mirko Brodesser 2020-07-03 09:55:37 +00:00
Родитель 91f0344d40
Коммит 324ad8b2e7
1 изменённых файлов: 5 добавлений и 5 удалений

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

@ -201,19 +201,19 @@ nsresult HTMLEditor::InsertHTMLAsAction(const nsAString& aInString,
}
EditorDOMPoint HTMLEditor::GetNewCaretPointAfterInsertingHTML(
const EditorDOMPoint& lastInsertedPoint) const {
const EditorDOMPoint& aLastInsertedPoint) const {
EditorDOMPoint pointToPutCaret;
// but don't cross tables
nsIContent* containerContent = nullptr;
if (!HTMLEditUtils::IsTable(lastInsertedPoint.GetChild())) {
containerContent = GetLastEditableLeaf(*lastInsertedPoint.GetChild());
if (!HTMLEditUtils::IsTable(aLastInsertedPoint.GetChild())) {
containerContent = GetLastEditableLeaf(*aLastInsertedPoint.GetChild());
if (containerContent) {
Element* mostDistantInclusiveAncestorTableElement = nullptr;
for (Element* maybeTableElement =
containerContent->GetAsElementOrParentElement();
maybeTableElement &&
maybeTableElement != lastInsertedPoint.GetChild();
maybeTableElement != aLastInsertedPoint.GetChild();
maybeTableElement = maybeTableElement->GetParentElement()) {
if (HTMLEditUtils::IsTable(maybeTableElement)) {
mostDistantInclusiveAncestorTableElement = maybeTableElement;
@ -229,7 +229,7 @@ EditorDOMPoint HTMLEditor::GetNewCaretPointAfterInsertingHTML(
// If we are not in table elements, we should put caret in the last inserted
// node.
if (!containerContent) {
containerContent = lastInsertedPoint.GetChild();
containerContent = aLastInsertedPoint.GetChild();
}
// If the container is a text node or a container element except `<table>`