зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1633448: part 10) Add `StyledRanges::Clear`. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D73433
This commit is contained in:
Родитель
d0cba89c40
Коммит
2d12323c40
|
@ -1115,7 +1115,7 @@ nsresult Selection::Clear(nsPresContext* aPresContext) {
|
|||
for (uint32_t i = 0; i < mStyledRanges.Length(); ++i) {
|
||||
SelectFrames(aPresContext, mStyledRanges.mRanges[i].mRange, false);
|
||||
}
|
||||
mStyledRanges.mRanges.Clear();
|
||||
mStyledRanges.Clear();
|
||||
|
||||
// Reset direction so for more dependable table selection range handling
|
||||
SetDirection(eDirNext);
|
||||
|
@ -1758,6 +1758,8 @@ void Selection::StyledRanges::UnregisterSelection() {
|
|||
}
|
||||
}
|
||||
|
||||
void Selection::StyledRanges::Clear() { mRanges.Clear(); }
|
||||
|
||||
StyledRange* Selection::StyledRanges::FindRangeData(nsRange* aRange) {
|
||||
NS_ENSURE_TRUE(aRange, nullptr);
|
||||
for (uint32_t i = 0; i < mRanges.Length(); i++) {
|
||||
|
|
|
@ -756,6 +756,8 @@ class Selection final : public nsSupportsWeakReference,
|
|||
void Disconnect();
|
||||
|
||||
struct StyledRanges {
|
||||
void Clear();
|
||||
|
||||
StyledRange* FindRangeData(nsRange* aRange);
|
||||
|
||||
using Elements = AutoTArray<StyledRange, 1>;
|
||||
|
|
Загрузка…
Ссылка в новой задаче