dom/inputmethod/mochitest/file_inputmethod.html
author Bob Owen <bobowencode@gmail.com>
Tue, 05 Jan 2016 10:08:57 +0000
changeset 278418 d765b7934fae4c1389ec4d860988a21437aed075
parent 192969 ef6233bc854adce180ccba0413e0c8404eca1e98
permissions -rw-r--r--
Bug 1156742 Part 7: Refactor nsDeviceContext.cpp to use printing surface for size and nsIDeviceContextSpec for DPI and scale. r=roc These changes are to make using an off screen surface behind our DrawTarget in the child easier. It still creates the real printing surface for some of the calculations, removing this will be required for future tightening of the sandbox.

<html>
<body>
<script>
  var im = navigator.mozInputMethod;
  if (im) {
    im.oninputcontextchange = onIcc;

    if (im.inputcontext) {
      onIcc();
    }
  }

  function onIcc() {
    var ctx = im.inputcontext;
    if (ctx) {
      ctx.replaceSurroundingText(location.hash).then(function() {
        /* Happy flow */
      }, function(err) {
        dump('ReplaceSurroundingText failed ' + err + '\n');
      });
    }
  }
</script>
</body>
</html>