| Index: chrome/browser/renderer_host/render_widget_host_view_win.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 20851)
|
| +++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
|
| @@ -42,6 +42,7 @@
|
| using WebKit::WebInputEvent;
|
| using WebKit::WebInputEventFactory;
|
| using WebKit::WebMouseEvent;
|
| +using WebKit::WebTextDirection;
|
|
|
| namespace {
|
|
|
| @@ -112,6 +113,7 @@
|
| // If only a control key and a right-shift key are down.
|
| // * WEB_TEXT_DIRECTION_LTR
|
| // If only a control key and a left-shift key are down.
|
| +
|
| static bool GetNewTextDirection(WebTextDirection* direction) {
|
| uint8_t keystate[256];
|
| if (!GetKeyboardState(&keystate[0]))
|
| @@ -131,10 +133,10 @@
|
|
|
| if (keystate[VK_RSHIFT] & kKeyDownMask) {
|
| keystate[VK_RSHIFT] = 0;
|
| - *direction = WEB_TEXT_DIRECTION_RTL;
|
| + *direction = WebKit::WebTextDirectionRightToLeft;
|
| } else if (keystate[VK_LSHIFT] & kKeyDownMask) {
|
| keystate[VK_LSHIFT] = 0;
|
| - *direction = WEB_TEXT_DIRECTION_LTR;
|
| + *direction = WebKit::WebTextDirectionLeftToRight;
|
| } else {
|
| return false;
|
| }
|
| @@ -941,7 +943,7 @@
|
| ImeComposition composition;
|
| if (ime_input_.GetResult(m_hWnd, lparam, &composition)) {
|
| Send(new ViewMsg_ImeSetComposition(render_widget_host_->routing_id(),
|
| - 1,
|
| + WebKit::WebCompositionCommandConfirm,
|
| composition.cursor_position,
|
| composition.target_start,
|
| composition.target_end,
|
| @@ -956,7 +958,7 @@
|
| // composition and send it to a renderer process.
|
| if (ime_input_.GetComposition(m_hWnd, lparam, &composition)) {
|
| Send(new ViewMsg_ImeSetComposition(render_widget_host_->routing_id(),
|
| - 0,
|
| + WebKit::WebCompositionCommandSet,
|
| composition.cursor_position,
|
| composition.target_start,
|
| composition.target_end,
|
| @@ -977,7 +979,8 @@
|
| // of the renderer process.
|
| std::wstring empty_string;
|
| Send(new ViewMsg_ImeSetComposition(render_widget_host_->routing_id(),
|
| - -1, -1, -1, -1, empty_string));
|
| + WebKit::WebCompositionCommandDiscard,
|
| + -1, -1, -1, empty_string));
|
| ime_input_.ResetComposition(m_hWnd);
|
| }
|
| ime_input_.DestroyImeWindow(m_hWnd);
|
|
|