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

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: Sync and rebase 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 | « LayoutTests/fast/images/drag-image-expected.txt ('k') | Source/platform/DragImage.h » ('j') | no next file with comments »
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 2c50e0c11ed3a5960657e9742b326a1bb8b0bb3f..2821d88b7da8164c08c75dcc35ec58f8c5daccb2 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;
+ InterpolationQuality interpolationQuality = element->computedStyle()->imageRendering() == ImageRenderingPixelated ? InterpolationNone : InterpolationHigh;
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 */, interpolationQuality))) {
IntSize originalSize = imageRect.size();
origin = imageRect.location();
« no previous file with comments | « LayoutTests/fast/images/drag-image-expected.txt ('k') | Source/platform/DragImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698