Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: Source/core/frame/LocalFrame.cpp

Issue 1303453003: Incorrect LocalFrame::paintIntoDragImage picture bounds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalFrame.cpp
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
index 7ed8d9ff198221cafefd844dcdc2f2e789412270..837b38ac87116e94034b5d2e352d1f74c51ad0f4 100644
--- a/Source/core/frame/LocalFrame.cpp
+++ b/Source/core/frame/LocalFrame.cpp
@@ -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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698