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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp

Issue 2386893002: Reformat comments in core/html/parser (Closed)
Patch Set: self review 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
Index: third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
index cd1c78bc20227ce090703e76fed33a6d9b78e1ae..900b93dbabf0727c563c0f280f9598a263ef1e35 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp
@@ -116,7 +116,8 @@ static void appendDescriptorAndReset(const CharType* attributeStart,
template <typename CharType>
static void appendCharacter(const CharType* descriptorStart,
const CharType* position) {
- // Since we don't copy the tokens, this just set the point where the descriptor tokens start.
+ // Since we don't copy the tokens, this just set the point where the
+ // descriptor tokens start.
if (!descriptorStart)
descriptorStart = position;
}
@@ -221,8 +222,8 @@ static bool parseDescriptors(const CharType* attribute,
}
result.setResourceWidth(resourceWidth);
} else if (c == 'h') {
- // This is here only for future compat purposes.
- // The value of the 'h' descriptor is not used.
+ // This is here only for future compat purposes. The value of the 'h'
+ // descriptor is not used.
if (result.hasDensity() || result.hasHeight()) {
srcsetError(document,
"it has multiple 'h' descriptors or a mix of 'x' and 'h' "
@@ -284,15 +285,18 @@ static void parseImageCandidatesFromSrcsetAttribute(
const CharType* attributeEnd = position + length;
while (position < attributeEnd) {
- // 4. Splitting loop: Collect a sequence of characters that are space characters or U+002C COMMA characters.
+ // 4. Splitting loop: Collect a sequence of characters that are space
+ // characters or U+002C COMMA characters.
skipWhile<CharType, isHTMLSpaceOrComma<CharType>>(position, attributeEnd);
if (position == attributeEnd) {
- // Contrary to spec language - descriptor parsing happens on each candidate, so when we reach the attributeEnd, we can exit.
+ // Contrary to spec language - descriptor parsing happens on each
+ // candidate, so when we reach the attributeEnd, we can exit.
break;
}
const CharType* imageURLStart = position;
- // 6. Collect a sequence of characters that are not space characters, and let that be url.
+ // 6. Collect a sequence of characters that are not space characters, and
+ // let that be url.
skipUntil<CharType, isHTMLSpace<CharType>>(position, attributeEnd);
const CharType* imageURLEnd = position;
@@ -312,8 +316,9 @@ static void parseImageCandidatesFromSrcsetAttribute(
Vector<DescriptorToken> descriptorTokens;
tokenizeDescriptors(attributeStart, position, attributeEnd,
descriptorTokens);
- // Contrary to spec language - descriptor parsing happens on each candidate.
- // This is a black-box equivalent, to avoid storing descriptor lists for each candidate.
+ // Contrary to spec language - descriptor parsing happens on each
+ // candidate. This is a black-box equivalent, to avoid storing descriptor
+ // lists for each candidate.
if (!parseDescriptors(attribute, descriptorTokens, result, document)) {
if (document) {
UseCounter::count(document, UseCounter::SrcsetDroppedCandidate);
@@ -432,7 +437,8 @@ static ImageCandidate pickBestImageCandidate(
winner, document);
float winningDensity = deDupedImageCandidates[winner]->density();
- // 16. If an entry b in candidates has the same associated ... pixel density as an earlier entry a in candidates,
+ // 16. If an entry b in candidates has the same associated ... pixel density
+ // as an earlier entry a in candidates,
// then remove entry b
while ((winner > 0) &&
(deDupedImageCandidates[winner - 1]->density() == winningDensity))

Powered by Google App Engine
This is Rietveld 408576698