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

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

Issue 1308573006: [reland] SegmentedString::push() should always push a char in front (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test / accept yosin@ suggestion Created 5 years, 4 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 | « Source/core/html/parser/HTMLEntityParser.h ('k') | Source/core/html/parser/HTMLEntityParserTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLEntityParser.cpp
diff --git a/Source/core/html/parser/HTMLEntityParser.cpp b/Source/core/html/parser/HTMLEntityParser.cpp
index dc30c83715f4f72ba2b92a598ad4d987b51370c8..62167ef4103e2cb8f0c29c8f2ecc792389b364a8 100644
--- a/Source/core/html/parser/HTMLEntityParser.cpp
+++ b/Source/core/html/parser/HTMLEntityParser.cpp
@@ -95,8 +95,8 @@ static void unconsumeCharacters(SegmentedString& source, ConsumedCharacterBuffer
if (consumedCharacters.size() == 1)
source.push(consumedCharacters[0]);
else if (consumedCharacters.size() == 2) {
- source.push(consumedCharacters[0]);
source.push(consumedCharacters[1]);
+ source.push(consumedCharacters[0]);
} else
source.prepend(SegmentedString(String(consumedCharacters)));
}
@@ -212,8 +212,8 @@ bool consumeHTMLEntity(SegmentedString& source, DecodedHTMLEntity& decodedEntity
entityState = Hex;
continue;
}
- source.push('#');
source.push('x');
+ source.push('#');
return false;
}
case MaybeHexUpperCaseX: {
@@ -221,8 +221,8 @@ bool consumeHTMLEntity(SegmentedString& source, DecodedHTMLEntity& decodedEntity
entityState = Hex;
continue;
}
- source.push('#');
source.push('X');
+ source.push('#');
return false;
}
case Hex: {
« no previous file with comments | « Source/core/html/parser/HTMLEntityParser.h ('k') | Source/core/html/parser/HTMLEntityParserTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698