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

Unified Diff: LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html

Issue 1147363009: Use replacedContentBox for LayoutHTMLCanvas when deciding PaintLayer's contentBox. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated the test Created 5 years, 6 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
Index: LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html
diff --git a/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html b/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..a717fa4b4dd36f431d2917cefe917b125e33f9ac
--- /dev/null
+++ b/LayoutTests/compositing/canvas-with-object-fit-contain-in-composited-layer-expected.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<style>
+canvas {
+ background-color: gray;
+ width: 200px;
+ height: 200px;
+}
+</style>
+<p>Test passes if a green square inside an orange rectanlge is shown up without a distortion.
+<div>
+ <canvas width='200' height='200'></canvas>
+</div>
+<script>
+function paintCanvas(canvas)
+{
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = 'orange';
+ ctx.fillRect(50, 0, 100, 200);
+
+ ctx.fillStyle = 'green';
+ ctx.fillRect(75, 75, 50, 50);
+}
+
+paintCanvas(document.querySelector('canvas'));
+</script>

Powered by Google App Engine
This is Rietveld 408576698