| Index: chrome/renderer/render_widget.cc
|
| ===================================================================
|
| --- chrome/renderer/render_widget.cc (revision 12427)
|
| +++ chrome/renderer/render_widget.cc (working copy)
|
| @@ -21,6 +21,7 @@
|
| #endif // defined(OS_POSIX)
|
|
|
| #include "webkit/glue/webinputevent.h"
|
| +#include "webkit/glue/webtextdirection.h"
|
| #include "webkit/glue/webwidget.h"
|
|
|
| RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable)
|
| @@ -119,6 +120,7 @@
|
| IPC_MESSAGE_HANDLER(ViewMsg_ImeSetInputMode, OnImeSetInputMode)
|
| IPC_MESSAGE_HANDLER(ViewMsg_ImeSetComposition, OnImeSetComposition)
|
| IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnMsgRepaint)
|
| + IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
|
| IPC_MESSAGE_UNHANDLED_ERROR()
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -644,6 +646,20 @@
|
| DidInvalidateRect(webwidget_, repaint_rect);
|
| }
|
|
|
| +void RenderWidget::OnSetTextDirection(int direction) {
|
| + if (!webwidget_)
|
| + return;
|
| +
|
| + WebTextDirection new_direction = static_cast<WebTextDirection>(direction);
|
| + if (new_direction == WEB_TEXT_DIRECTION_DEFAULT ||
|
| + new_direction == WEB_TEXT_DIRECTION_LTR ||
|
| + new_direction == WEB_TEXT_DIRECTION_RTL) {
|
| + webwidget_->SetTextDirection(new_direction);
|
| + } else {
|
| + NOTREACHED();
|
| + }
|
| +}
|
| +
|
| bool RenderWidget::next_paint_is_resize_ack() const {
|
| return ViewHostMsg_PaintRect_Flags::is_resize_ack(next_paint_flags_);
|
| }
|
|
|