Bug 1620952: part 8) Rename nsFrameSelection::IsDirty. r=jfkthame

The new name is clearer.

Differential Revision: https://phabricator.services.mozilla.com/D66060

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mirko Brodesser 2020-03-11 09:18:10 +00:00
parent 1535e53831
commit c8fbeec19d
2 changed files with 7 additions and 3 deletions

View File

@ -3037,7 +3037,7 @@ nsresult Selection::NotifySelectionListeners() {
RefPtr<nsFrameSelection> frameSelection = mFrameSelection;
if (frameSelection->GetBatching()) {
frameSelection->SetDirty();
frameSelection->SetChangesDuringBatchingFlag();
return NS_OK;
}
if (mSelectionListeners.IsEmpty()) {

View File

@ -7,6 +7,7 @@
#ifndef nsFrameSelection_h___
#define nsFrameSelection_h___
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/EventForwards.h"
#include "mozilla/dom/Selection.h"
@ -781,8 +782,11 @@ class nsFrameSelection final {
void SetDesiredPos(nsPoint aPos); // set the mDesiredPos.mValue
uint32_t GetBatching() const { return mBatching.mCounter; }
void SetDirty(bool aDirty = true) {
if (mBatching.mCounter) mBatching.mChangesDuringBatching = aDirty;
void SetChangesDuringBatchingFlag() {
MOZ_ASSERT(mBatching.mCounter > 0);
mBatching.mChangesDuringBatching = true;
}
// nsFrameSelection may get deleted when calling this,