mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
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:
parent
d388cab96a
commit
981ebf6352
@ -6661,6 +6661,7 @@ HTMLEditRules::PromoteRange(nsRange& aRange,
|
||||
EditAction aOperationType)
|
||||
{
|
||||
MOZ_ASSERT(IsEditorDataAvailable());
|
||||
MOZ_ASSERT(!aRange.IsInSelection());
|
||||
|
||||
if (!aRange.IsPositioned()) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user