Commit 49940ecb authored by David Black's avatar David Black Committed by Chromium LUCI CQ

Fix label mask for holding space item chip views in RTL.

Previously the label mask canvas was not flipped for RTL so the wrong
end of the label was being faded out.

Bug: 1166270
Change-Id: Ib3afc1c6dd676788eb58ed16eacb18cb65141fd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627979Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#843169}
parent 6e46908a
......@@ -13,6 +13,7 @@
#include "ash/system/holding_space/holding_space_item_view.h"
#include "ash/system/holding_space/holding_space_util.h"
#include "ui/compositor/paint_recorder.h"
#include "ui/gfx/scoped_canvas.h"
#include "ui/gfx/skia_paint_util.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
......@@ -96,6 +97,10 @@ class HoldingSpaceItemChipView::LabelMaskLayerOwner : public ui::LayerDelegate {
static_cast<float>(paint_recording_size.height()) / size.height(),
/*cache*/ nullptr);
// Flip canvas for RTL.
gfx::ScopedCanvas canvas(recorder.canvas());
canvas.FlipIfRTL(size.width());
cc::PaintFlags flags;
flags.setAntiAlias(false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment