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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLMetaCharsetParser.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/HTMLMetaCharsetParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLMetaCharsetParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLMetaCharsetParser.cpp
index f60f9eb80749f4b0e18a2768979981519c120126..fac2787d72b76b130f52f21c7f825a3bf3c78e71 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLMetaCharsetParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLMetaCharsetParser.cpp
@@ -59,8 +59,9 @@ bool HTMLMetaCharsetParser::processMeta() {
return m_encoding.isValid();
}
-static const int bytesToCheckUnconditionally =
- 1024; // That many input bytes will be checked for meta charset even if <head> section is over.
+// That many input bytes will be checked for meta charset even if <head> section
+// is over.
+static const int bytesToCheckUnconditionally = 1024;
bool HTMLMetaCharsetParser::checkForMetaCharset(const char* data,
size_t length) {
@@ -69,23 +70,22 @@ bool HTMLMetaCharsetParser::checkForMetaCharset(const char* data,
ASSERT(!m_encoding.isValid());
- // We still don't have an encoding, and are in the head.
- // The following tags are allowed in <head>:
- // SCRIPT|STYLE|META|LINK|OBJECT|TITLE|BASE
+ // We still don't have an encoding, and are in the head. The following tags
+ // are allowed in <head>: SCRIPT|STYLE|META|LINK|OBJECT|TITLE|BASE
- // We stop scanning when a tag that is not permitted in <head>
- // is seen, rather when </head> is seen, because that more closely
- // matches behavior in other browsers; more details in
- // <http://bugs.webkit.org/show_bug.cgi?id=3590>.
+ // We stop scanning when a tag that is not permitted in <head> is seen, rather
+ // when </head> is seen, because that more closely matches behavior in other
+ // browsers; more details in <http://bugs.webkit.org/show_bug.cgi?id=3590>.
// Additionally, we ignore things that looks like tags in <title>, <script>
- // and <noscript>; see <http://bugs.webkit.org/show_bug.cgi?id=4560>,
- // <http://bugs.webkit.org/show_bug.cgi?id=12165> and
- // <http://bugs.webkit.org/show_bug.cgi?id=12389>.
-
- // Since many sites have charset declarations after <body> or other tags
- // that are disallowed in <head>, we don't bail out until we've checked at
- // least bytesToCheckUnconditionally bytes of input.
+ // and <noscript>; see:
+ // <http://bugs.webkit.org/show_bug.cgi?id=4560>
+ // <http://bugs.webkit.org/show_bug.cgi?id=12165>
+ // <http://bugs.webkit.org/show_bug.cgi?id=12389>
+
+ // Since many sites have charset declarations after <body> or other tags that
+ // are disallowed in <head>, we don't bail out until we've checked at least
+ // bytesToCheckUnconditionally bytes of input.
m_input.append(SegmentedString(m_assumedCodec->decode(data, length)));

Powered by Google App Engine
This is Rietveld 408576698