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

Unified Diff: Source/core/html/track/WebVTTTokenizer.cpp

Issue 66503013: Support the 'lrm', 'rlm' and 'nbsp' entities in the WebVTTTokenizer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « LayoutTests/media/track/track-webvtt-tc022-entities-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/WebVTTTokenizer.cpp
diff --git a/Source/core/html/track/WebVTTTokenizer.cpp b/Source/core/html/track/WebVTTTokenizer.cpp
index f290cb67e272ee517297d3703ada8d2b429d9cd1..b799dbf7719637a5ea6f2968d068aab7ed5b1b52 100644
--- a/Source/core/html/track/WebVTTTokenizer.cpp
+++ b/Source/core/html/track/WebVTTTokenizer.cpp
@@ -33,6 +33,7 @@
#include "core/html/track/WebVTTTokenizer.h"
#include "core/xml/parser/MarkupTokenizerInlines.h"
+#include "wtf/unicode/CharacterNames.h"
namespace WebCore {
@@ -107,6 +108,12 @@ bool WebVTTTokenizer::nextToken(SegmentedString& source, WebVTTToken& token)
bufferCharacter('<');
else if (vectorEqualsString(m_buffer, "&gt"))
bufferCharacter('>');
+ else if (vectorEqualsString(m_buffer, "&lrm"))
+ bufferCharacter(leftToRightMark);
+ else if (vectorEqualsString(m_buffer, "&rlm"))
+ bufferCharacter(rightToLeftMark);
+ else if (vectorEqualsString(m_buffer, "&nbsp"))
+ bufferCharacter(noBreakSpace);
else {
m_buffer.append(static_cast<LChar>(cc));
m_token->appendToCharacter(m_buffer);
« no previous file with comments | « LayoutTests/media/track/track-webvtt-tc022-entities-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698