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

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

Issue 2127043002: SegmentedString::prepend should know if the prepended string is new or previously consumed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/HTMLEntityParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp
index 43fc4ebf69ca3edd058567d9d60840ef62c76d54..cd8005abd05226d192a35e12f90e4ba89744afce 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp
@@ -97,7 +97,8 @@ static void unconsumeCharacters(SegmentedString& source, ConsumedCharacterBuffer
source.push(consumedCharacters[1]);
source.push(consumedCharacters[0]);
} else
- source.prepend(SegmentedString(String(consumedCharacters)));
+ source.prepend(SegmentedString(String(consumedCharacters)),
+ SegmentedString::PrependType::Unconsume);
}
static bool consumeNamedEntity(SegmentedString& source, DecodedHTMLEntity& decodedEntity, bool& notEnoughCharacters, UChar additionalAllowedCharacter, UChar& cc)

Powered by Google App Engine
This is Rietveld 408576698