From b74f5de179e2d1aed15c5b040b5cf58355e20868 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Mon, 11 Oct 2021 07:38:27 +0000 Subject: [PATCH] No bug - fix spelling of internal constant name: s/Carridge/Carriage/. r=masayuki DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D127972 --- editor/libeditor/HTMLEditUtils.h | 6 +++--- editor/libeditor/HTMLEditorDataTransfer.cpp | 2 +- editor/libeditor/InternetCiter.cpp | 6 +++--- editor/libeditor/WSRunObject.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/editor/libeditor/HTMLEditUtils.h b/editor/libeditor/HTMLEditUtils.h index d41f91205443..9f837f16064e 100644 --- a/editor/libeditor/HTMLEditUtils.h +++ b/editor/libeditor/HTMLEditUtils.h @@ -38,7 +38,7 @@ class HTMLEditUtils final { public: static constexpr char16_t kNewLine = '\n'; - static constexpr char16_t kCarridgeReturn = '\r'; + static constexpr char16_t kCarriageReturn = '\r'; static constexpr char16_t kTab = '\t'; static constexpr char16_t kSpace = ' '; static constexpr char16_t kNBSP = 0x00A0; @@ -1595,7 +1595,7 @@ class HTMLEditUtils final { // and `CharAt` needs to check it everytime. switch (textFragment.CharAt(AssertedCast(i - 1))) { case HTMLEditUtils::kSpace: - case HTMLEditUtils::kCarridgeReturn: + case HTMLEditUtils::kCarriageReturn: case HTMLEditUtils::kTab: if (!isWhiteSpaceCollapsible) { return Some(i - 1); @@ -1667,7 +1667,7 @@ class HTMLEditUtils final { // and `CharAt` needs to check it everytime. switch (textFragment.CharAt(AssertedCast(i))) { case HTMLEditUtils::kSpace: - case HTMLEditUtils::kCarridgeReturn: + case HTMLEditUtils::kCarriageReturn: case HTMLEditUtils::kTab: if (!isWhiteSpaceCollapsible) { return Some(i); diff --git a/editor/libeditor/HTMLEditorDataTransfer.cpp b/editor/libeditor/HTMLEditorDataTransfer.cpp index 297f8aee4d31..9abaf6985791 100644 --- a/editor/libeditor/HTMLEditorDataTransfer.cpp +++ b/editor/libeditor/HTMLEditorDataTransfer.cpp @@ -2680,7 +2680,7 @@ nsresult HTMLEditor::InsertTextWithQuotationsInternal( // there aren't any there: #ifdef DEBUG nsAString::const_iterator dbgStart(hunkStart); - if (FindCharInReadable(HTMLEditUtils::kCarridgeReturn, dbgStart, strEnd)) { + if (FindCharInReadable(HTMLEditUtils::kCarriageReturn, dbgStart, strEnd)) { NS_ASSERTION( false, "Return characters in DOM! InsertTextWithQuotations may be wrong"); diff --git a/editor/libeditor/InternetCiter.cpp b/editor/libeditor/InternetCiter.cpp index 96b323bd32a8..5681732ad022 100644 --- a/editor/libeditor/InternetCiter.cpp +++ b/editor/libeditor/InternetCiter.cpp @@ -33,7 +33,7 @@ nsresult InternetCiter::GetCiteString(const nsAString& aInString, nsReadingIterator beginIter, endIter; aInString.BeginReading(beginIter); aInString.EndReading(endIter); - while (beginIter != endIter && (*endIter == HTMLEditUtils::kCarridgeReturn || + while (beginIter != endIter && (*endIter == HTMLEditUtils::kCarriageReturn || *endIter == HTMLEditUtils::kNewLine)) { --endIter; } @@ -83,7 +83,7 @@ static inline void BreakLine(nsAString& aOutString, uint32_t& outStringCol, static inline bool IsSpace(char16_t c) { return (nsCRT::IsAsciiSpace(c) || (c == HTMLEditUtils::kNewLine) || - (c == HTMLEditUtils::kCarridgeReturn) || (c == HTMLEditUtils::kNBSP)); + (c == HTMLEditUtils::kCarriageReturn) || (c == HTMLEditUtils::kNBSP)); } nsresult InternetCiter::Rewrap(const nsAString& aInString, uint32_t aWrapCol, @@ -92,7 +92,7 @@ nsresult InternetCiter::Rewrap(const nsAString& aInString, uint32_t aWrapCol, // There shouldn't be returns in this string, only dom newlines. // Check to make sure: #ifdef DEBUG - int32_t crPosition = aInString.FindChar(HTMLEditUtils::kCarridgeReturn); + int32_t crPosition = aInString.FindChar(HTMLEditUtils::kCarriageReturn); NS_ASSERTION(crPosition < 0, "Rewrap: CR in string gotten from DOM!\n"); #endif /* DEBUG */ diff --git a/editor/libeditor/WSRunObject.cpp b/editor/libeditor/WSRunObject.cpp index 67e793dc8a35..5fa7cf1829ca 100644 --- a/editor/libeditor/WSRunObject.cpp +++ b/editor/libeditor/WSRunObject.cpp @@ -1527,7 +1527,7 @@ Maybe WSRunScanner:: WSType wsTypeOfNonCollapsibleChar; switch (textFragment.CharAt(AssertedCast(i - 1))) { case HTMLEditUtils::kSpace: - case HTMLEditUtils::kCarridgeReturn: + case HTMLEditUtils::kCarriageReturn: case HTMLEditUtils::kTab: if (isWhiteSpaceCollapsible) { continue; // collapsible white-space or invisible white-space. @@ -1666,7 +1666,7 @@ Maybe WSRunScanner:: WSType wsTypeOfNonCollapsibleChar; switch (textFragment.CharAt(AssertedCast(i))) { case HTMLEditUtils::kSpace: - case HTMLEditUtils::kCarridgeReturn: + case HTMLEditUtils::kCarriageReturn: case HTMLEditUtils::kTab: if (isWhiteSpaceCollapsible) { continue; // collapsible white-space or invisible white-space.