layout/reftests/image-element/canvas-outside-document-invalidate-02.html

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

michael@0 1 <!--
michael@0 2 Any copyright is dedicated to the Public Domain.
michael@0 3 http://creativecommons.org/licenses/publicdomain/
michael@0 4
michael@0 5 Test that a complete redraw of the context invalidates the rendering observer, too.
michael@0 6 (mozDrawText calls nsCanvasRenderingContext2D::Redraw() without a dirty rect to invalidate everything.)
michael@0 7 -->
michael@0 8 <!DOCTYPE html>
michael@0 9 <html class="reftest-wait">
michael@0 10 <meta charset="utf-8">
michael@0 11 <body style="background: -moz-element(#e) white">
michael@0 12
michael@0 13 <script>
michael@0 14
michael@0 15 var canvas = document.createElement("canvas");
michael@0 16 canvas.width = canvas.height = 1;
michael@0 17 var ctx = canvas.getContext('2d');
michael@0 18 ctx.fillStyle = "red";
michael@0 19 ctx.fillRect(0, 0, 1, 1);
michael@0 20 window.addEventListener("MozReftestInvalidate", function () {
michael@0 21 ctx.strokeStyle = "white";
michael@0 22 ctx.font = "50px bold Arial";
michael@0 23 ctx.translate(-8, 18);
michael@0 24 ctx.lineWidth = 50;
michael@0 25 ctx.strokeText("•", 0, 0);
michael@0 26 document.documentElement.className = "";
michael@0 27 }, false);
michael@0 28
michael@0 29 document.mozSetImageElement("e", canvas);
michael@0 30
michael@0 31 </script>
michael@0 32 </body>
michael@0 33 </html>

mercurial