summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webtextdirection.h
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 04:31:11 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 04:31:11 +0000
commit07f95333a47323bfbd65c8443e0fcc470956cb27 (patch)
tree9b49d3de4d7f454b03c59ba11ae33e09d2d06621 /webkit/glue/webtextdirection.h
parent039169f20b03406981e7417761f62dde08eb23ab (diff)
downloadchromium_src-07f95333a47323bfbd65c8443e0fcc470956cb27.zip
chromium_src-07f95333a47323bfbd65c8443e0fcc470956cb27.tar.gz
chromium_src-07f95333a47323bfbd65c8443e0fcc470956cb27.tar.bz2
A tricky fix for Issue 1845 (Take 2).
This is almost the same change as <http://codereview.chromium.org/39252/show>, which caused a build break on a Linux buildbot while compiling my new template function in "chrome/common/render_messages.h". Even though I was not able to reproduce the build errors on my Linux box, I removed this function and use the int type in my IPC message 'ViewMsg_SetTextDirection'. BUG=1845 Review URL: http://codereview.chromium.org/42495 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webtextdirection.h')
-rw-r--r--webkit/glue/webtextdirection.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/webkit/glue/webtextdirection.h b/webkit/glue/webtextdirection.h
new file mode 100644
index 0000000..822eb34
--- /dev/null
+++ b/webkit/glue/webtextdirection.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_WEBTEXTDIRECTION_H_
+#define WEBKIT_GLUE_WEBTEXTDIRECTION_H_
+
+// Represents text directions (or writing directions) of a DOM node.
+// This type is used as the input parameter of WebWidget::SetTextDirection().
+// This function converts these values to WebCore::WritingDirection values and
+// call the Editor::setBaseWritingDirection() function.
+// TODO(hbono): Add WEB_TEXT_DIRECTION_ORIGINAL that represents "revert the
+// previous changes and set back to the original one" and implement it.
+// TODO(hbono): Add WEB_TEXT_DIRECTION_TOGGLE that represents "toggle the text
+// direction" and implement it.
+enum WebTextDirection {
+ WEB_TEXT_DIRECTION_DEFAULT, // WebCore::NaturalWritingDirection
+ WEB_TEXT_DIRECTION_LTR, // WebCore::LeftToRightWritingDirection
+ WEB_TEXT_DIRECTION_RTL, // WebCore::RightToLeftWritingDirection
+};
+
+#endif // WEBKIT_GLUE_WEBTEXTDIRECTION_H_