layout/reftests/canvas/749467-1-ref.html
author Petru Lingurar <petru.lingurar@softvision.ro>
Fri, 21 Jun 2019 06:24:43 +0000
changeset 539442 819d3061b8fb3cbc3143ac68e8f521b7e32f362c
parent 96643 877276e291b847d84b43cbacf41351cdbb36a81e
permissions -rw-r--r--
Bug 1551614 - Call BrowserApp's onCreate() before finish(); r=VladBaicu Fix for the following scenario: - "Don't keep activities" checked - Change system language Upon detecting a locale change in BrowserApp's onCreate() we would call finish() and then return before calling super.onCreate(). This patch introdues the call to super.onCreate() before returning and ensures that the app will die cleanly so that upon restarting Gecko can reinit add-ons that touch the UI. Differential Revision: https://phabricator.services.mozilla.com/D35402

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><canvas width="500" height="200" id="c"></canvas></p>
<script type="text/javascript">

  var canvas = document.getElementById('c');
  var ctx = canvas.getContext('2d');

  ctx.beginPath();

  ctx.lineWidth = 20;
  ctx.strokeStyle = 'rgb(0,0,0)';

  ctx.moveTo(10, 30);
  ctx.lineTo(50, 50);

  ctx.stroke();

  ctx.lineTo(80, 80);
  ctx.stroke();

</script>
</body>
</html>