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

Side by Side Diff: LayoutTests/css3/images/pixelated-downscaled-expected.html

Issue 754083003: Make image-rendering:pixelated use nearest neighbor when downscaling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Sync and rebase Created 6 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 canvas {
4 width: 100px;
5 height: 100px;
6 image-rendering: auto;
7 }
8 img {
9 width: 100px;
10 height: 100px;
11 image-rendering: auto;
12 }
13 svg {
14 width: 100px;
15 height: 100px;
16 }
17 image {
18 image-rendering: auto;
19 }
20 </style>
21 <body>
22 <!-- Since all images are being downscaled, this should look the same with a nd without "image-rendering: pixelated" -->
23 <canvas width="512" height="512"></canvas>
24 <img onload="drawImageToCanvas()" src="resources/radial-lines.png">
25 <svg><image width="100" height="100" xlink:href="resources/radial-lines.png" /></svg>
26 </body>
27 <script>
28 // Ignore the render tree.
29 if (window.testRunner)
30 window.testRunner.dumpAsTextWithPixelResults();
31
32 function drawImageToCanvas() {
33 var image = document.getElementsByTagName("img")[0];
34 var canvas = document.getElementsByTagName("canvas")[0].getContext("2d") ;
35 canvas.drawImage(image, 0, 0);
36 }
37 </script>
OLDNEW
« no previous file with comments | « LayoutTests/css3/images/pixelated-downscaled.html ('k') | LayoutTests/css3/images/resources/radial-lines.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698