layout/generic/test/file_bug449653_1.html
author L. David Baron <dbaron@dbaron.org>
Sat, 13 Sep 2014 06:17:36 -0700
changeset 228423 c81eb3a1336b2ab5f4e83b8b5df394dfea8be37e
parent 163380 f8787963a4389c4795a2ba0561c6e5cfcc272b07
permissions -rw-r--r--
Bug 977991 patch 1 - Expose variant of RulesMatching on nsHTMLCSSStyleSheet that is less work to call. r=birtles This allows nsStyleSet::RuleNodeWithReplacement to call it without constructing an entire (and unnecessary) ElementRuleProcessorData, which will happen in patch 3.

<html><head>
<title>Bug 449653 - drawWindow on canvas fails on load, draws white instead of specified region</title>
<style>
html, body {
margin: 0px;
padding: 0px;
}
</style>
</head><body>
<div style="width: 100px; height: 100px; background-color: lime;"></div>
<br>
<canvas id="canvas" width="100" height="100" style="background-color: red;"></canvas>
<script>
   var canvas = document.getElementById("canvas");
   var ctx = canvas.getContext("2d");
   SpecialPowers.wrap(ctx).drawWindow(window, 0, 0, 100, 100, "white");
</script>
</body></html>