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

Unified Diff: Source/core/page/DragController.cpp

Issue 886323005: Pass InterpolationQuality into DragImage to respect image-rendering:pixelated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 | Source/platform/DragImage.h » ('j') | Source/platform/DragImage.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DragController.cpp
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
index 054eabfc828fe99260e516de398edafe243d4c38..7799f38a239ebb52c70a193a513606f73f20d533 100644
--- a/Source/core/page/DragController.cpp
+++ b/Source/core/page/DragController.cpp
@@ -826,8 +826,9 @@ static PassOwnPtr<DragImage> dragImageForImage(Element* element, Image* image, c
OwnPtr<DragImage> dragImage;
IntPoint origin;
+ DragImage::ResizeMethod resizeMethod = element->computedStyle()->imageRendering() == ImageRenderingPixelated ? DragImage::ResizeMethod::RESIZE_BOX : DragImage::ResizeMethod::RESIZE_LANCZOS3;
Justin Novosad 2015/02/05 05:06:24 RESIZE_BOX does not exactly match how "image-rende
if (image->size().height() * image->size().width() <= MaxOriginalImageArea
- && (dragImage = DragImage::create(image, element->renderer() ? element->renderer()->shouldRespectImageOrientation() : DoNotRespectImageOrientation))) {
+ && (dragImage = DragImage::create(image, element->renderer() ? element->renderer()->shouldRespectImageOrientation() : DoNotRespectImageOrientation, 1 /* deviceScaleFactor */, resizeMethod))) {
IntSize originalSize = imageRect.size();
origin = imageRect.location();
« no previous file with comments | « no previous file | Source/platform/DragImage.h » ('j') | Source/platform/DragImage.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698