Bug 1419803 - Use GetComposedDoc instead of GetUncomposedDoc in ContentEventHandler. r=smaug

This commit is contained in:
Jessica Jong 2018-01-08 01:31:00 +02:00
Родитель d480d5e221
Коммит dd9a9b8c68
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -309,11 +309,11 @@ ContentEventHandler::InitRootContent(Selection* aNormalSelection)
}
// See bug 537041 comment 5, the range could have removed node.
if (NS_WARN_IF(startNode->GetUncomposedDoc() != mPresShell->GetDocument())) {
if (NS_WARN_IF(startNode->GetComposedDoc() != mPresShell->GetDocument())) {
return NS_ERROR_FAILURE;
}
NS_ASSERTION(startNode->GetUncomposedDoc() == endNode->GetUncomposedDoc(),
NS_ASSERTION(startNode->GetComposedDoc() == endNode->GetComposedDoc(),
"firstNormalSelectionRange crosses the document boundary");
mRootContent = startNode->GetSelectionRootContent(mPresShell);