зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1687263: part 2) Add `NodeOffsetRange::operator==(const nsRange& aRange)`. r=smaug
The fix of bug 1687263 will require determining which `nsRange`s of a previous time slice to keep and for which `NodeOffsetRange`s to create new `nsRange`s. The operator will be used in a following review. Differential Revision: https://phabricator.services.mozilla.com/D116094
This commit is contained in:
Родитель
ed9c8cebed
Коммит
80b835b192
|
@ -113,6 +113,10 @@ bool NodeOffset::operator==(
|
|||
(*rangeBoundaryOffset == static_cast<uint32_t>(mOffset));
|
||||
}
|
||||
|
||||
bool NodeOffsetRange::operator==(const nsRange& aRange) const {
|
||||
return mBegin == aRange.StartRef() && mEnd == aRange.EndRef();
|
||||
}
|
||||
|
||||
// static
|
||||
Maybe<mozInlineSpellWordUtil> mozInlineSpellWordUtil::Create(
|
||||
const TextEditor& aTextEditor) {
|
||||
|
|
|
@ -60,6 +60,8 @@ class NodeOffsetRange {
|
|||
NodeOffsetRange(NodeOffset b, NodeOffset e)
|
||||
: mBegin(std::move(b)), mEnd(std::move(e)) {}
|
||||
|
||||
bool operator==(const nsRange& aRange) const;
|
||||
|
||||
const NodeOffset& Begin() const { return mBegin; }
|
||||
|
||||
const NodeOffset& End() const { return mEnd; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче