Comment #42 on issue 1845 by bugdro...@chromium.org: cant alignt text to the right using right shift and right ctrl http://code.google.com/p/chromium/issues/detail?id=1845
The following revision refers to this bug: http://src.chromium.org/viewvc/chrome?view=rev&revision=11953 ------------------------------------------------------------------------ r11953 | hb...@chromium.org | 2009-03-17 22:46:29 -0700 (Tue, 17 Mar 2009) | 14 lines Changed paths: M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/renderer_host/render_widget_host.cc?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/renderer_host/render_widget_host.h?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/renderer_host/render_widget_host_view_win.cc?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/render_messages.h?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/render_messages_internal.h?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/render_view.h?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/render_view_unittest.cc?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/render_widget.cc?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/render_widget.h?r1=11953&r2=11952 A http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/webtextdirection.h M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/webview_impl.cc?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/webview_impl.h?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/webwidget.h?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/webwidget_impl.cc?r1=11953&r2=11952 M http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/webwidget_impl.h?r1=11953&r2=11952 A tricky fix for Issue 1845. This change is a very tricky fix for Issue 1845 in chromium: cant alignt text to the right using right shift and right ctrl.This change consists of two parts listed below. 1. Emulating the implementation of Safari that changes the text-direction of an input element. Safari uses context menus to change the text direction. This change adds an IPC message 'ViewMsg_SetTextDirection', which notifies the new text direction. Also, it adds two functions: RenderWidgetHost::UpdateTextDirection() and RenderWidgetHost::NotifyTextDirection(). They encapsulate the new IPC message so that we can use them both when we presses a set of keys and when we add context-menu items which change the text direction. 2. Calling the above interface when pressing right-shift and right-control keys, or when left-shift and left-control keys. This modifies the RenderWidgetHostViewWin::OnKeyEvent() function and call the above text-direction interfaces when a user finishes pressing the keys. As you can imagine, if we send an IPC message every time when we receive a WM_KEYDOWN event, we continue sending IPC messages while a user is pressing the keys. BUG=1845 Review URL: http://codereview.chromium.org/39252 ------------------------------------------------------------------------ -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ Automated mail from issue updates at http://crbug.com/ Subscription options: http://groups.google.com/group/chromium-bugs -~----------~----~----~----~------~----~------~--~---