bug 1057330 pt 3 - provide character property accessor for Vertical_Orientation. r=smontagu
authorJonathan Kew <jkew@mozilla.com>
Thu, 28 Aug 2014 16:00:03 +0100
changeset 223851 7f9a9cfeabe72b789884b0047860102929353153
parent 223850 e0933bde618b7674cf245648de41754989fecaf8
child 223852 d3636970a300be806482b9b5ad00db036166c67b
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1057330
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1057330 pt 3 - provide character property accessor for Vertical_Orientation. r=smontagu
intl/unicharutil/util/nsUnicodeProperties.h
--- a/intl/unicharutil/util/nsUnicodeProperties.h
+++ b/intl/unicharutil/util/nsUnicodeProperties.h
@@ -44,16 +44,28 @@ inline uint8_t GetScriptCode(uint32_t aC
 }
 
 uint32_t GetScriptTagForCode(int32_t aScriptCode);
 
 inline nsCharType GetBidiCat(uint32_t aCh) {
   return nsCharType(GetCharProps2(aCh).mBidiCategory);
 }
 
+/* This MUST match the values assigned by genUnicodePropertyData.pl! */
+enum VerticalOrientation {
+  VERTICAL_ORIENTATION_U  = 0,
+  VERTICAL_ORIENTATION_R  = 1,
+  VERTICAL_ORIENTATION_Tu = 2,
+  VERTICAL_ORIENTATION_Tr = 3
+};
+
+inline VerticalOrientation GetVerticalOrientation(uint32_t aCh) {
+  return VerticalOrientation(GetCharProps2(aCh).mVertOrient);
+}
+
 enum XidmodType {
   XIDMOD_INCLUSION,
   XIDMOD_RECOMMENDED,
   XIDMOD_DEFAULT_IGNORABLE,
   XIDMOD_HISTORIC,
   XIDMOD_LIMITED_USE,
   XIDMOD_NOT_NFKC,
   XIDMOD_NOT_XID,