Chromium Code Reviews| Index: chrome/browser/ui/views/frame/glass_browser_frame_view.cc |
| diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc |
| index 96e3143a1539801394f11a2b08afbf58cd11d36f..0f4d3c0a30efa47c425565dad427a1981bb679b9 100644 |
| --- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc |
| +++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc |
| @@ -478,10 +478,8 @@ void GlassBrowserFrameView::PaintClientEdge(gfx::Canvas* canvas) const { |
| const gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds()); |
| const int y = |
| client_bounds.y() + (md ? toolbar_bounds.y() : toolbar_bounds.bottom()); |
| - const int w = client_bounds.width(); |
| const int right = client_bounds.right(); |
| const int bottom = std::max(y, height() - ClientBorderThickness(false)); |
| - const int height = bottom - y; |
| // Draw the client edge images. For non-MD, we fill the toolbar color |
| // underneath these images so they will lighten/darken it appropriately to |
| @@ -491,19 +489,23 @@ void GlassBrowserFrameView::PaintClientEdge(gfx::Canvas* canvas) const { |
| const SkColor toolbar_color = tp->GetColor(ThemeProperties::COLOR_TOOLBAR); |
| if (!md) |
| FillClientEdgeRects(x, y, right, bottom, toolbar_color, canvas); |
| - const gfx::ImageSkia* const right_image = |
| - tp->GetImageSkiaNamed(IDR_CONTENT_RIGHT_SIDE); |
| - const int img_w = right_image->width(); |
| - canvas->TileImageInt(*right_image, right, y, img_w, height); |
| - canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_RIGHT_CORNER), |
| - right, bottom); |
| - const gfx::ImageSkia* const bottom_image = |
| - tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_CENTER); |
| - canvas->TileImageInt(*bottom_image, x, bottom, w, bottom_image->height()); |
| - canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER), |
| - x - img_w, bottom); |
| - canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_LEFT_SIDE), x - img_w, |
| - y, img_w, height); |
| + if (!md || (base::win::GetVersion() < base::win::VERSION_WIN10)) { |
|
Peter Kasting
2016/06/16 20:21:26
This isn't a visible behavior change, it just turn
|
| + const gfx::ImageSkia* const right_image = |
| + tp->GetImageSkiaNamed(IDR_CONTENT_RIGHT_SIDE); |
| + const int img_w = right_image->width(); |
| + const int height = bottom - y; |
| + canvas->TileImageInt(*right_image, right, y, img_w, height); |
| + canvas->DrawImageInt( |
| + *tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_RIGHT_CORNER), right, bottom); |
| + const gfx::ImageSkia* const bottom_image = |
| + tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_CENTER); |
| + canvas->TileImageInt(*bottom_image, x, bottom, client_bounds.width(), |
| + bottom_image->height()); |
| + canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER), |
| + x - img_w, bottom); |
| + canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_LEFT_SIDE), |
| + x - img_w, y, img_w, height); |
| + } |
| if (md) |
| FillClientEdgeRects(x, y, right, bottom, toolbar_color, canvas); |
| } |