Bug 842100 - Restore the virtual keyboard in desktop builds r=cjones
authorFabrice Desré <fabrice@mozilla.com>
Sat, 16 Feb 2013 18:58:00 -0800
changeset 122158 4b3420ee0e2bb8d59a3d4db15cc486c455d5d377
parent 122157 86b0207c62d6f0baf4efb6f46e25dbcd92a2b254
child 122159 87478d6bb849ca2157b9942dd8d2a95595d3d62d
push id24320
push userryanvm@gmail.com
push dateSun, 17 Feb 2013 12:06:45 +0000
treeherdermozilla-central@5e137a87e84f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs842100
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 842100 - Restore the virtual keyboard in desktop builds r=cjones
b2g/components/Keyboard.jsm
--- a/b2g/components/Keyboard.jsm
+++ b/b2g/components/Keyboard.jsm
@@ -41,16 +41,26 @@ let Keyboard = {
     for (let name of this._messageNames)
       ppmm.addMessageListener('Keyboard:' + name, this);
   },
 
   observe: function keyboardObserve(subject, topic, data) {
     let frameLoader = subject.QueryInterface(Ci.nsIFrameLoader);
     let mm = frameLoader.messageManager;
     mm.addMessageListener('Forms:Input', this);
+
+    // When not running apps OOP, we need to load forms.js here since this
+    // won't happen from dom/ipc/preload.js
+    try {
+       if (Services.prefs.getBoolPref("dom.ipc.tabs.disabled") === true) {
+         mm.loadFrameScript(kFormsFrameScript, true);
+       }
+     } catch (e) {
+       dump('Error loading ' + kFormsFrameScript + ' as frame script: ' + e + '\n');
+     }
   },
 
   receiveMessage: function keyboardReceiveMessage(msg) {
     // If we get a 'Keyboard:XXX' message, check that the sender has the
     // keyboard permission.
     if (msg.name != 'Forms:Input') {
       let mm;
       try {