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

Unified Diff: Source/platform/text/BidiContext.h

Issue 58383002: Update BidiResolver's max level depth to 125 per tr9r29 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | « no previous file | Source/platform/text/BidiResolver.h » ('j') | Source/platform/text/BidiResolver.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/BidiContext.h
diff --git a/Source/platform/text/BidiContext.h b/Source/platform/text/BidiContext.h
index 50b2e4c7fceb1156021b6e4c595303b2cc842b72..7b10a182c055fd7bdb4523e1d920d1b6b20e9b49 100644
--- a/Source/platform/text/BidiContext.h
+++ b/Source/platform/text/BidiContext.h
@@ -48,6 +48,12 @@ public:
BidiEmbeddingSource source() const { return static_cast<BidiEmbeddingSource>(m_source); }
PassRefPtr<BidiContext> copyStackRemovingUnicodeEmbeddingContexts();
+
+ // http://www.unicode.org/reports/tr9/#Modifications
+ // 6.3 raised the limit from 61 to 125.
+ // http://unicode.org/reports/tr9/#BD2
+ static const short kMaxLevel = 125;
+
private:
BidiContext(unsigned char level, WTF::Unicode::Direction direction, bool override, BidiEmbeddingSource source, BidiContext* parent)
: m_level(level)
@@ -60,7 +66,7 @@ private:
static PassRefPtr<BidiContext> createUncached(unsigned char level, WTF::Unicode::Direction, bool override, BidiEmbeddingSource, BidiContext* parent);
- unsigned m_level : 6; // The maximium bidi level is 62: http://unicode.org/reports/tr9/#Explicit_Levels_and_Directions
+ unsigned m_level : 7; // The maximium bidi level is 125: http://unicode.org/reports/tr9/#Explicit_Levels_and_Directions
unsigned m_direction : 5; // Direction
unsigned m_override : 1;
unsigned m_source : 1; // BidiEmbeddingSource
« no previous file with comments | « no previous file | Source/platform/text/BidiResolver.h » ('j') | Source/platform/text/BidiResolver.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698