Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Unified Diff: third_party/WebKit/Source/core/layout/ListMarkerText.cpp

Issue 2400333003: Enforce comment formatting in core/layout as well. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ListMarkerText.cpp
diff --git a/third_party/WebKit/Source/core/layout/ListMarkerText.cpp b/third_party/WebKit/Source/core/layout/ListMarkerText.cpp
index 251ad7eb4d1970cd8745f5d14fce53b2c30c9cf7..cdf58eed9e5ed02a242be34bba8009c9d8d30051 100644
--- a/third_party/WebKit/Source/core/layout/ListMarkerText.cpp
+++ b/third_party/WebKit/Source/core/layout/ListMarkerText.cpp
@@ -1,7 +1,8 @@
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
+ * reserved.
* Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
* Copyright (C) 2010 Daniel Bates (dbates@intudata.com)
*
@@ -69,8 +70,9 @@ static String toRoman(int number, bool upper) {
return String(&letters[lettersSize - length], length);
}
-// The typedef is needed because taking sizeof(number) in the const expression below doesn't work with some compilers.
-// This is likely the case because of the template.
+// The typedef is needed because taking sizeof(number) in the const expression
+// below doesn't work with some compilers. This is likely the case because of
+// the template.
typedef int numberType;
template <typename CharacterType>
@@ -80,9 +82,8 @@ static inline String toAlphabeticOrNumeric(numberType number,
SequenceType type) {
ASSERT(sequenceSize >= 2);
- const int lettersSize =
- sizeof(numberType) * 8 +
- 1; // Binary is the worst case; requires one character per bit plus a minus sign.
+ // Binary is the worst case; requires one character per bit plus a minus sign.
+ const int lettersSize = sizeof(numberType) * 8 + 1;
CharacterType letters[lettersSize];
@@ -123,7 +124,8 @@ static String toSymbolic(int number,
unsigned numberShadow = number;
--numberShadow;
- // The asterisks list-style-type is the worst case; we show |numberShadow| asterisks.
+ // The asterisks list-style-type is the worst case; we show |numberShadow|
+ // asterisks.
StringBuilder letters;
letters.append(symbols[numberShadow % symbolsSize]);
unsigned numSymbols = numberShadow / symbolsSize;
@@ -167,7 +169,8 @@ static inline String toSymbolic(int number,
static void toHebrewUnder1000(int number, Vector<UChar>& letters) {
// FIXME: CSS3 mentions various refinements not implemented here.
- // FIXME: Should take a look at Mozilla's HebrewToText function (in nsBulletFrame).
+ // FIXME: Should take a look at Mozilla's HebrewToText function (in
+ // nsBulletFrame).
ASSERT(number >= 0 && number < 1000);
int fourHundreds = number / 400;
for (int i = 0; i < fourHundreds; i++)
@@ -309,7 +312,8 @@ enum CJKLang { Chinese = 1, Korean, Japanese };
enum CJKStyle { Formal, Informal };
// The table uses the order from the CSS3 specification:
-// first 3 group markers, then 3 digit markers, then ten digits, then negative symbols.
+// first 3 group markers, then 3 digit markers, then ten digits, then negative
+// symbols.
static String toCJKIdeographic(int number,
const UChar table[26],
CJKStyle cjkStyle) {
@@ -528,7 +532,8 @@ static EListStyleType effectiveListMarkerType(EListStyleType type, int count) {
UChar suffix(EListStyleType type, int count) {
// If the list-style-type cannot represent |count| because it's outside its
- // ordinal range then we fall back to some list style that can represent |count|.
+ // ordinal range then we fall back to some list style that can represent
+ // |count|.
EListStyleType effectiveType = effectiveListMarkerType(type, count);
// Note, the following switch statement has been explicitly
@@ -601,8 +606,9 @@ UChar suffix(EListStyleType type, int count) {
}
String text(EListStyleType type, int count) {
- // If the list-style-type, say hebrew, cannot represent |count| because it's outside
- // its ordinal range then we fallback to some list style that can represent |count|.
+ // If the list-style-type, say hebrew, cannot represent |count| because it's
+ // outside its ordinal range then we fallback to some list style that can
+ // represent |count|.
switch (effectiveListMarkerType(type, count)) {
case NoneListStyle:
return "";
@@ -917,8 +923,8 @@ String text(EListStyleType type, int count) {
case Armenian:
case UpperArmenian:
// CSS3 says "armenian" means "lower-armenian".
- // But the CSS2.1 test suite contains uppercase test results for "armenian",
- // so we'll match the test suite.
+ // But the CSS2.1 test suite contains uppercase test results for
+ // "armenian", so we'll match the test suite.
return toArmenian(count, true);
case LowerArmenian:
return toArmenian(count, false);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698