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

Unified Diff: Source/core/html/parser/HTMLParserIdioms.cpp

Issue 18031012: parseHTMLInteger shouldn't bloatCharacters() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLParserIdioms.cpp
diff --git a/Source/core/html/parser/HTMLParserIdioms.cpp b/Source/core/html/parser/HTMLParserIdioms.cpp
index d91ea4605459f43788118c9942b4da67ce033239..6baada93f07f4e0bb4a458db87adfb4c8e836e70 100644
--- a/Source/core/html/parser/HTMLParserIdioms.cpp
+++ b/Source/core/html/parser/HTMLParserIdioms.cpp
@@ -207,12 +207,12 @@ bool parseHTMLInteger(const String& input, int& value)
// Step 1
// Step 2
unsigned length = input.length();
- if (length && input.is8Bit()) {
+ if (!length || input.is8Bit()) {
const LChar* start = input.characters8();
return parseHTMLIntegerInternal(start, start + length, value);
}
- const UChar* start = input.bloatedCharacters();
+ const UChar* start = input.characters16();
return parseHTMLIntegerInternal(start, start + length, value);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698