A quick fix for Issue 9762 and 9763.
This is caused by my change r12434 that does not check if there are any other keys pressed when a user presses left-control and left-shift keys (or right-control and right-shift keys).
To fix this issue, this change does not only add the above check, but also it adds code that cancels updating the text direction if a user presses another key while he/she is pressing control and shift keys.
BUG=9762 "Regression: Shift+Ctrl+Arrow selection combination also changes text direction in RTL UIs"
BUG=9763 "Ctrl+Shift text alignment depends of the sides of both the Ctrl and the Shift keys"
TEST=In a LTR <textarea> element, pressing a control key, pressing a right-shift key, releasing the right-shift key, and verify its text direction is changed to RTL.
TEST=In an RTL <textarea> element, pressing a control key, pressing a left-shift key, releasing the left-shift key, and verify its text direction is changed to LTR.
TEST=In a LTR <textarea> element, pressing a right-shift key, pressing a control key, releasing the right-shift key, and verify its text direction is still LTR.
TEST=In a LTR <textarea> element, pressing a control key, pressing a right-shift key, releasing the control key, and verify its text direction is changed to RTL.
TEST=In an RTL <textarea> element, pressing a left-shift key, pressing a control key, releasing the left-shift key, and verify its text direction is still RTL.
TEST=In an RTL <textarea> element, pressing a control key, pressing a left-shift key, releasing the control key, and verify its text direction is changed to LTR.
TEST=In a LTR <textarea> element, pressing a control key, pressing a right-shift key, pressing an arrow key, releasing the right-shift key, and verify its text direction is still LTR.
Review URL: http://codereview.chromium.org/63117
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13588 0039d316-1c4b-4281-b951-d872f2087c98
3 files changed