summaryrefslogtreecommitdiffstats
path: root/ash/desktop_background
diff options
context:
space:
mode:
authoroshima <oshima@chromium.org>2015-02-14 12:40:24 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-14 20:40:53 +0000
commit2782babc433cb5f42af07679cb1905e0c72f9083 (patch)
tree9b0e63809ee99374fa9eb396a68dd7301ae08540 /ash/desktop_background
parent0d1b5306cb40e9c6c078c9a33f6a082cc4f47bd4 (diff)
downloadchromium_src-2782babc433cb5f42af07679cb1905e0c72f9083.zip
chromium_src-2782babc433cb5f42af07679cb1905e0c72f9083.tar.gz
chromium_src-2782babc433cb5f42af07679cb1905e0c72f9083.tar.bz2
Apply RTL transform to the background layer
This is a workaround for views layer bug (458753) BUG=379777 TEST=maual Review URL: https://codereview.chromium.org/929653002 Cr-Commit-Position: refs/heads/master@{#316399}
Diffstat (limited to 'ash/desktop_background')
-rw-r--r--ash/desktop_background/desktop_background_view.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index 43e5f18..464d802 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -64,6 +64,9 @@ class LayerControlView : public views::View {
views::View* child = child_at(0);
child->SetBounds(0, 0, rounded_size.width(), rounded_size.height());
gfx::Transform transform;
+ // Apply RTL transform explicitly becacuse Views layer code
+ // doesn't handle RTL. crbug.com/458753.
+ transform.Translate(-child->GetMirroredX(), 0);
transform.Scale(ui_scale, ui_scale);
child->SetTransform(transform);
}