mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1820449 - Make WhiteSpaceVisibilityKeeper
verify tracking point of start of right joining node after flushing the tracker r=m_kato
In the legacy mode, right node is not removed from the DOM tree, therefore, this bug was hidden. However, after enabling the new mode, the point will be out of the document. Therefore, the check will cause `NS_ERROR_EDITOR_UNEXPECTED_DOM_TREE` error and the joining code stops handling the deletion. Differential Revision: https://phabricator.services.mozilla.com/D171822
This commit is contained in:
parent
bf574a2158
commit
b68e3ef35e
@ -5008,6 +5008,7 @@ Result<EditActionResult, nsresult> HTMLEditor::AutoDeleteRangesHandler::
|
||||
"failed");
|
||||
return result;
|
||||
}
|
||||
trackStartOfRightBlock.FlushAndStopTracking();
|
||||
if (NS_WARN_IF(!startOfRightContent.IsSet()) ||
|
||||
NS_WARN_IF(!startOfRightContent.GetContainer()->IsInComposedDoc())) {
|
||||
return Err(NS_ERROR_EDITOR_UNEXPECTED_DOM_TREE);
|
||||
@ -5039,6 +5040,7 @@ Result<EditActionResult, nsresult> HTMLEditor::AutoDeleteRangesHandler::
|
||||
"MergeFirstLineOfRightBlockElementIntoLeftBlockElement() failed");
|
||||
return result;
|
||||
}
|
||||
trackStartOfRightBlock.FlushAndStopTracking();
|
||||
if (NS_WARN_IF(!startOfRightContent.IsSet()) ||
|
||||
NS_WARN_IF(!startOfRightContent.GetContainer()->IsInComposedDoc())) {
|
||||
return Err(NS_ERROR_EDITOR_UNEXPECTED_DOM_TREE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user