Bug 276079 - fix couple coding style in IsJustifiableCharacter.
MozReview-Commit-ID: Hf13sGzwdDl
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -2964,27 +2964,30 @@ nsTextFrame::GetTrimmedOffsets(const nsT
return offsets;
}
static bool IsJustifiableCharacter(const nsTextFragment* aFrag, int32_t aPos,
bool aLangIsCJ)
{
NS_ASSERTION(aPos >= 0, "negative position?!");
char16_t ch = aFrag->CharAt(aPos);
- if (ch == '\n' || ch == '\t' || ch == '\r')
+ if (ch == '\n' || ch == '\t' || ch == '\r') {
return true;
+ }
if (ch == ' ' || ch == CH_NBSP) {
// Don't justify spaces that are combined with diacriticals
- if (!aFrag->Is2b())
+ if (!aFrag->Is2b()) {
return true;
+ }
return !nsTextFrameUtils::IsSpaceCombiningSequenceTail(
- aFrag->Get2b() + aPos + 1, aFrag->GetLength() - (aPos + 1));
- }
- if (ch < 0x2150u)
+ aFrag->Get2b() + aPos + 1, aFrag->GetLength() - (aPos + 1));
+ }
+ if (ch < 0x2150u) {
return false;
+ }
if (aLangIsCJ) {
if ((0x2150u <= ch && ch <= 0x22ffu) || // Number Forms, Arrows, Mathematical Operators
(0x2460u <= ch && ch <= 0x24ffu) || // Enclosed Alphanumerics
(0x2580u <= ch && ch <= 0x27bfu) || // Block Elements, Geometric Shapes, Miscellaneous Symbols, Dingbats
(0x27f0u <= ch && ch <= 0x2bffu) || // Supplemental Arrows-A, Braille Patterns, Supplemental Arrows-B,
// Miscellaneous Mathematical Symbols-B, Supplemental Mathematical Operators,
// Miscellaneous Symbols and Arrows
(0x2e80u <= ch && ch <= 0x312fu) || // CJK Radicals Supplement, CJK Radicals Supplement,