Commit 2e50af68 authored by fmalita@chromium.org's avatar fmalita@chromium.org

Incorrect LocalFrame::paintIntoDragImage picture bounds

LocalFrame::paintIntoDragImage() translates the content to be origin-
aligned, but leaves the picture bounds unchanged => the picture content
lies outside the declared picture cull rect.

We need to also shift the picture bounds, to keep them aligned with its
content.

R=junov@chromium.org,mtklein@chromium.org
BUG=522143

Review URL: https://codereview.chromium.org/1303453003

git-svn-id: svn://svn.chromium.org/blink/trunk@200763 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 1721a3eb
......@@ -598,7 +598,10 @@ PassOwnPtr<DragImage> LocalFrame::paintIntoDragImage(
paintingRect.setWidth(paintingRect.width() * deviceScaleFactor);
paintingRect.setHeight(paintingRect.height() * deviceScaleFactor);
SkPictureBuilder pictureBuilder(paintingRect);
// The content is shifted to origin, to fit within the image bounds - which are the same
// as the picture bounds.
SkRect pictureBounds = SkRect::MakeIWH(paintingRect.width(), paintingRect.height());
SkPictureBuilder pictureBuilder(pictureBounds);
{
GraphicsContext& paintContext = pictureBuilder.context();
......
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