author Jan de Mooij <jdemooij@mozilla.com>
Sat, 12 Jan 2019 10:50:04 +0000
changeset 453631 cfa1c48c717048f00eb4811b5719cd716eb1e5b3
parent 238087 1cde9e7658e5571eb195f62fb58dd84ebef87050
child 459392 0e0638c8ef27dea641754aae390213e829eb71f3
permissions -rw-r--r--
Bug 1518753 part 5 - Stop using JSProtoKey for initial shapes. r=tcampbell I added this optimization in bug 1299107 to share more shapes across compartments. Unfortunately this doesn't play well with same-compartment realms (ICs can misbehave) because it relies on compartments being isolated from each other. I think we should remove this optimization: * Fixing the IC issue is impossible without deoptimizing everything. * I added it mainly for chrome globals. The shared-JSM-global work has eliminated the need for this there. * Same-compartment realms win memory back by eliminating CCWs etc. * It's quite a lot of complicated code. Differential Revision: https://phabricator.services.mozilla.com/D16170

  <meta charset="utf-8">
  <title>Test for Bug 1151186</title>
  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="chrome://global/skin"/>
  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
  <script type="application/javascript">

  /** Test for Bug 1151186 **/

  document.addEventListener("focus", () => {

  function runTests()
    is(document.activeElement, document.getElementById("editor"),
       "The div element should be focused");
    var utils = SpecialPowers.getDOMWindowUtils(window);
    is(utils.IMEStatus, utils.IME_STATUS_ENABLED,
       "IME should be enabled");
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1151186">Mozilla Bug 1151186</a>
<p id="display"></p>
<div id="content" style="display: none">

<div id="editor" contenteditable="true"></div>
<pre id="test">