diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 04:23:18 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 04:23:18 +0000 |
commit | 9defbadcf3f4b51b959f3e9a5972ca651e8578fe (patch) | |
tree | 3932f38d3d2e8ea9c5c09cbb1ea371092fbf9b24 /views/view_text_utils.cc | |
parent | ec8f51164d477d8d83726fe61c68977d17b03149 (diff) | |
download | chromium_src-9defbadcf3f4b51b959f3e9a5972ca651e8578fe.zip chromium_src-9defbadcf3f4b51b959f3e9a5972ca651e8578fe.tar.gz chromium_src-9defbadcf3f4b51b959f3e9a5972ca651e8578fe.tar.bz2 |
Clean up RTL methods.
No one used the non-RTL version of GetBounds(), so I renamed it GetMirroredBounds() and got rid of the enum.
Same for GetX(), consolidated with MirroredX() into GetMirroredX().
GetPosition() already took into account mirroring, so renamed GetMirroredPosition() for symmetry.
Renamed the other functions to be getters. De-inlined a few that were doing complex looking stuff.
http://crbug.com/72040
TEST=none
Review URL: http://codereview.chromium.org/6334152
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_text_utils.cc')
-rw-r--r-- | views/view_text_utils.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/views/view_text_utils.cc b/views/view_text_utils.cc index c75b8e4..0a3fc33 100644 --- a/views/view_text_utils.cc +++ b/views/view_text_utils.cc @@ -122,8 +122,7 @@ void DrawTextStartingFrom(gfx::Canvas* canvas, // If we exceed the boundaries, we need to wrap. WrapIfWordDoesntFit(w, font.GetHeight(), position, bounds); - int x = label->MirroredXCoordinateInsideView(position->width()) + - bounds.x(); + int x = label->GetMirroredXInView(position->width()) + bounds.x(); if (text_direction_is_rtl) { x -= w; // When drawing LTR strings inside RTL text we need to make sure we |