зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1460509 - part 45: Test if HTMLEditRules::PromoteRange() won't get range in Selection r=m_kato
PromoteRange() related methods do not change Selection nor the DOM tree. Therefore, they must be safe. However, only PromoteRange() takes an nsRange instance and modifies it. If it's in Selection, that causes selectionchange event. Therefore, we should check if given range is in Selection with MOZ_ASSERT(). MozReview-Commit-ID: AXkmHFB4P08 --HG-- extra : rebase_source : 539b39d0217a7dc06f76e70546096d30b2734c02
This commit is contained in:
Родитель
d388cab96a
Коммит
981ebf6352
|
@ -6661,6 +6661,7 @@ HTMLEditRules::PromoteRange(nsRange& aRange,
|
|||
EditAction aOperationType)
|
||||
{
|
||||
MOZ_ASSERT(IsEditorDataAvailable());
|
||||
MOZ_ASSERT(!aRange.IsInSelection());
|
||||
|
||||
if (!aRange.IsPositioned()) {
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче