Fix RenderTextWin base direction; remove test exceptions; etc.

Use the first strong character's direction to set SCRIPT_STATE.uBidiLevel.
RenderTextWin::GetTextDirection returns this calculated base direction.

Fix RenderTextWin::AdjacentCharSelectionModel:
Handle all out-of-bounds run indicies as invalid runs.
Use the visual ordering of runs (implicit on Linux) to determine edges.

Add new RenderTextTest.GetTextDirection unit test.
Add SetRTL test utility function which works with GTK.
Fix RenderTextTest.DisplayRectShowsCursorRTL on linux with SetRTL.
Remove relevant Windows-specific unit test exceptions.

TODO(msw): Cleanup canvas_skia.cc in a followup CL.
TODO(msw): Use UI dir by default in GetFirstStrongCharacterDirection.

BUG=134746,134009
TEST=Updated unit tests; no RTL/LTR regressions.
TBR=sky@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10693061

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145476 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed