зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1708422: part 5) Surround statements in `mozInlineSpellChecker::SpellCheckerTimeSlice::Execute` with curly braces. r=smaug
To match the style guide. Differential Revision: https://phabricator.services.mozilla.com/D114099
This commit is contained in:
Родитель
4e3d4abbad
Коммит
d99bbf18cb
|
@ -1341,7 +1341,9 @@ nsresult mozInlineSpellChecker::SpellCheckerTimeSlice::Execute() {
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (mStatus->mRange->Collapsed()) return NS_OK;
|
||||
if (mStatus->mRange->Collapsed()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// see if the selection has any ranges, if not, then we can optimize checking
|
||||
// range inclusion later (we have no ranges when we are initially checking or
|
||||
|
@ -1442,13 +1444,16 @@ nsresult mozInlineSpellChecker::SpellCheckerTimeSlice::Execute() {
|
|||
mSpellCheckSelection->GetRangesForInterval(
|
||||
*beginNode, beginOffset, *endNode, endOffset, true, ranges, erv);
|
||||
ENSURE_SUCCESS(erv, erv.StealNSResult());
|
||||
for (uint32_t i = 0; i < ranges.Length(); i++)
|
||||
for (uint32_t i = 0; i < ranges.Length(); i++) {
|
||||
mInlineSpellChecker.RemoveRange(mSpellCheckSelection, ranges[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// some words are special and don't need checking
|
||||
if (dontCheckWord) continue;
|
||||
if (dontCheckWord) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// some nodes we don't spellcheck
|
||||
if (!mInlineSpellChecker.ShouldSpellCheckNode(textEditor, beginNode)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче