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

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: Updated per leviw's review 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') | no next file with comments »
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..3b79c10543ce369e2d45914a518707cda73e8f31 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 unsigned char kMaxLevel = 125;
+
private:
BidiContext(unsigned char level, WTF::Unicode::Direction direction, bool override, BidiEmbeddingSource source, BidiContext* parent)
: m_level(level)
@@ -56,11 +62,12 @@ private:
, m_source(source)
, m_parent(parent)
{
+ ASSERT(level <= kMaxLevel);
}
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698