Commit 966f31b6 authored by Andrew Xu's avatar Andrew Xu Committed by Chromium LUCI CQ

[Multipaste] Remove paddings of img placeholder

Now the placeholder image's bounds are smaller than the available
drawing area. It brings white lines around the placeholder image, which
might be caused by the rendering code (note that we draw the placeholder
image through gfx::Canvas's APIs) The specific reason is unknown yet,
still under investigation. Given that the paddings of the placeholder
image are not really needed, they are removed by this CL.

Bug: 1163621
Change-Id: Ibe309ea5044ab2c411917bb4ffd9d58c9d33bc5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627433
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Auto-Submit: Andrew Xu <andrewxu@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843132}
parent bacb19ba
......@@ -31,7 +31,6 @@ namespace ash {
namespace {
constexpr int kPlaceholderImageEdgePadding = 5;
constexpr int kPlaceholderImageWidth = 234;
constexpr int kPlaceholderImageHeight = 74;
constexpr int kPlaceholderImageOutlineCornerRadius = 8;
......@@ -69,9 +68,7 @@ class UnrenderedHTMLPlaceholderImage : public gfx::CanvasImageSource {
flags.setAntiAlias(true);
flags.setColor(gfx::kGoogleGrey100);
canvas->DrawRoundRect(
{kPlaceholderImageEdgePadding, kPlaceholderImageEdgePadding,
kPlaceholderImageWidth - 2 * kPlaceholderImageEdgePadding,
kPlaceholderImageHeight - 2 * kPlaceholderImageEdgePadding},
/*rect=*/{kPlaceholderImageWidth, kPlaceholderImageHeight},
kPlaceholderImageOutlineCornerRadius, flags);
flags = cc::PaintFlags();
......
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