| Index: chrome/browser/ui/views/toolbar/app_menu.cc
|
| diff --git a/chrome/browser/ui/views/toolbar/app_menu.cc b/chrome/browser/ui/views/toolbar/app_menu.cc
|
| index 059863a7c7a08b3f00b5647e3f3cdee189c19990..91638c5e469bc2280f05f6c512ea5504c1bd0e72 100644
|
| --- a/chrome/browser/ui/views/toolbar/app_menu.cc
|
| +++ b/chrome/browser/ui/views/toolbar/app_menu.cc
|
| @@ -54,6 +54,7 @@
|
| #include "ui/gfx/font_list.h"
|
| #include "ui/gfx/image/image.h"
|
| #include "ui/gfx/image/image_skia_source.h"
|
| +#include "ui/gfx/scoped_canvas.h"
|
| #include "ui/gfx/skia_util.h"
|
| #include "ui/gfx/text_utils.h"
|
| #include "ui/views/background.h"
|
| @@ -162,10 +163,10 @@ class InMenuButtonBackground : public views::Background {
|
| // layout is RTL and the button isn't mirroring itself.
|
| gfx::Rect bounds(view->GetLocalBounds());
|
| if (type_ == LEADING_BORDER) {
|
| - gfx::Rect rect = view->FlipCanvasOnPaintForRTLUI()
|
| - ? gfx::Rect(0, 0, 1, h)
|
| - : gfx::Rect(view->GetMirroredXWithWidthInView(0, 1), 0, 1, h);
|
| - canvas->FillRect(rect, BorderColor(view, views::Button::STATE_NORMAL));
|
| + gfx::ScopedRTLFlipCanvas scoped_canvas(
|
| + canvas, view->width(), view->flip_canvas_on_paint_for_rtl_ui());
|
| + canvas->FillRect(gfx::Rect(0, 0, 1, h),
|
| + BorderColor(view, views::Button::STATE_NORMAL));
|
| bounds.Inset(gfx::Insets(0, 1, 0, 0));
|
| }
|
|
|
|
|