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

Unified Diff: third_party/WebKit/Source/platform/text/TextDirection.h

Issue 2940153002: [LayoutNG] Implement more text-align values and BiDi base direction (Closed)
Patch Set: eae review Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698