Index: third_party/WebKit/Source/platform/text/TextDirection.h |
diff --git a/third_party/WebKit/Source/platform/text/TextDirection.h b/third_party/WebKit/Source/platform/text/TextDirection.h |
index 5d33442be96ad91de36119c70fa37b97d4f55fcb..fa6b7f68837e5602dedb9d5d0dd214955312327e 100644 |
--- a/third_party/WebKit/Source/platform/text/TextDirection.h |
+++ b/third_party/WebKit/Source/platform/text/TextDirection.h |
@@ -48,6 +48,10 @@ inline bool IsLtr(TextDirection direction) { |
inline bool IsRtl(TextDirection direction) { |
return direction != TextDirection::kLtr; |
} |
+ |
+inline TextDirection DirectionFromLevel(unsigned level) { |
+ return level & 1 ? TextDirection::kRtl : TextDirection::kLtr; |
+} |
} |
#endif |