mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
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:
parent
91f0344d40
commit
324ad8b2e7
@ -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>`
|
||||
|
Loading…
Reference in New Issue
Block a user