Backed out changeset f2ed6b24269a (bug 932151) for causing bug 936324
authorEd Morley <emorley@mozilla.com>
Fri, 08 Nov 2013 10:59:31 +0000
changeset 154117 f003c386c77aa5b104f76f5f824c1ed88d33c5dc
parent 154084 70f21fad60a4761d0501a8566459854b2018be29
child 154118 a6e7f0663458f10e9977f319b7d12433a95f8b63
push id35990
push usercbook@mozilla.com
push dateFri, 08 Nov 2013 14:07:57 +0000
treeherdermozilla-inbound@427ddcc398de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs932151, 936324
milestone28.0a1
backs outf2ed6b24269a48a6bc483e1e0635dbadf36f7659
first release with
nightly linux32
f003c386c77a / 28.0a1 / 20131108030204 / files
nightly linux64
f003c386c77a / 28.0a1 / 20131108030204 / files
nightly mac
f003c386c77a / 28.0a1 / 20131108030204 / files
nightly win32
f003c386c77a / 28.0a1 / 20131108030204 / files
nightly win64
f003c386c77a / 28.0a1 / 20131108030204 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset f2ed6b24269a (bug 932151) for causing bug 936324
b2g/chrome/content/forms.js
b2g/chrome/jar.mn
dom/browser-element/BrowserElementChild.js
dom/inputmethod/Keyboard.jsm
dom/inputmethod/forms.js
dom/inputmethod/jar.mn
dom/ipc/preload.js
rename from dom/inputmethod/forms.js
rename to b2g/chrome/content/forms.js
--- a/b2g/chrome/jar.mn
+++ b/b2g/chrome/jar.mn
@@ -5,16 +5,17 @@
 
 
 chrome.jar:
 % content branding %content/branding/
 % content browser %content/
 
   content/arrow.svg                     (content/arrow.svg)
 * content/dbg-browser-actors.js         (content/dbg-browser-actors.js)
+  content/forms.js                      (content/forms.js)
 * content/settings.js                   (content/settings.js)
 * content/shell.html                    (content/shell.html)
 * content/shell.js                      (content/shell.js)
 #ifndef ANDROID
   content/screen.js                     (content/screen.js)
   content/runapp.js                     (content/runapp.js)
 #endif
 * content/content.css                   (content/content.css)
--- a/dom/browser-element/BrowserElementChild.js
+++ b/dom/browser-element/BrowserElementChild.js
@@ -19,24 +19,19 @@ docShell.isActive = true;
 
 let infos = sendSyncMessage('browser-element-api:call',
                             { 'msg_name': 'hello' })[0];
 docShell.QueryInterface(Ci.nsIDocShellTreeItem).name = infos.name;
 docShell.setFullscreenAllowed(infos.fullscreenAllowed);
 
 
 if (!('BrowserElementIsPreloaded' in this)) {
-  try {
-    if (Services.prefs.getBoolPref("dom.mozInputMethod.enabled")) {
-      Services.scriptloader.loadSubScript("chrome://global/content/forms.js", global);
-    }
-  } catch (e) {
-  }
   // Those are produc-specific files that's sometimes unavailable.
   try {
+    Services.scriptloader.loadSubScript("chrome://browser/content/forms.js");
     Services.scriptloader.loadSubScript("chrome://browser/content/ErrorPage.js");
   } catch (e) {
   }
   Services.scriptloader.loadSubScript("chrome://global/content/BrowserElementPanning.js");
   Services.scriptloader.loadSubScript("chrome://global/content/BrowserElementChildPreload.js");
 }
 
 var BrowserElementIsReady = true;
--- a/dom/inputmethod/Keyboard.jsm
+++ b/dom/inputmethod/Keyboard.jsm
@@ -4,17 +4,17 @@
 
 'use strict';
 
 this.EXPORTED_SYMBOLS = ['Keyboard'];
 
 const Cu = Components.utils;
 const Cc = Components.classes;
 const Ci = Components.interfaces;
-const kFormsFrameScript = 'chrome://global/content/forms.js';
+const kFormsFrameScript = 'chrome://browser/content/forms.js';
 
 Cu.import('resource://gre/modules/Services.jsm');
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "ppmm",
   "@mozilla.org/parentprocessmessagemanager;1", "nsIMessageBroadcaster");
 
 this.Keyboard = {
@@ -59,41 +59,37 @@ this.Keyboard = {
 
     if (topic == 'oop-frameloader-crashed') {
       if (this.messageManager == mm) {
         // The application has been closed unexpectingly. Let's tell the
         // keyboard app that the focus has been lost.
         ppmm.broadcastAsyncMessage('Keyboard:FocusChange', { 'type': 'blur' });
       }
     } else {
-      this.initFormsFrameScript(mm);
-    }
-  },
+      mm.addMessageListener('Forms:Input', this);
+      mm.addMessageListener('Forms:SelectionChange', this);
+      mm.addMessageListener('Forms:GetText:Result:OK', this);
+      mm.addMessageListener('Forms:GetText:Result:Error', this);
+      mm.addMessageListener('Forms:SetSelectionRange:Result:OK', this);
+      mm.addMessageListener('Forms:ReplaceSurroundingText:Result:OK', this);
+      mm.addMessageListener('Forms:SendKey:Result:OK', this);
+      mm.addMessageListener('Forms:SequenceError', this);
+      mm.addMessageListener('Forms:GetContext:Result:OK', this);
+      mm.addMessageListener('Forms:SetComposition:Result:OK', this);
+      mm.addMessageListener('Forms:EndComposition:Result:OK', this);
 
-  initFormsFrameScript: function(mm) {
-    mm.addMessageListener('Forms:Input', this);
-    mm.addMessageListener('Forms:SelectionChange', this);
-    mm.addMessageListener('Forms:GetText:Result:OK', this);
-    mm.addMessageListener('Forms:GetText:Result:Error', this);
-    mm.addMessageListener('Forms:SetSelectionRange:Result:OK', this);
-    mm.addMessageListener('Forms:ReplaceSurroundingText:Result:OK', this);
-    mm.addMessageListener('Forms:SendKey:Result:OK', this);
-    mm.addMessageListener('Forms:SequenceError', this);
-    mm.addMessageListener('Forms:GetContext:Result:OK', this);
-    mm.addMessageListener('Forms:SetComposition:Result:OK', this);
-    mm.addMessageListener('Forms:EndComposition:Result:OK', 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);
+      // 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');
       }
-    } 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
     // input permission.
     if (msg.name.indexOf("Keyboard:") != -1) {
       if (!this.messageManager) {
deleted file mode 100644
--- a/dom/inputmethod/jar.mn
+++ /dev/null
@@ -1,6 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-toolkit.jar:
-  content/global/forms.js                      (forms.js)
--- a/dom/ipc/preload.js
+++ b/dom/ipc/preload.js
@@ -82,25 +82,19 @@ const BrowserElementIsPreloaded = true;
 
   try {
     if (Services.prefs.getBoolPref("dom.sysmsg.enabled")) {
       Cc["@mozilla.org/system-message-manager;1"].getService(Ci["nsIDOMNavigatorSystemMessages"]);
     }
   } catch(e) {
   }
 
-  try {
-    if (Services.prefs.getBoolPref("dom.mozInputMethod.enabled")) {
-      Services.scriptloader.loadSubScript("chrome://global/content/forms.js", global);
-    }
-  } catch (e) {
-  }
-
   // Those are produc-specific files that's sometimes unavailable.
   try {
+    Services.scriptloader.loadSubScript("chrome://browser/content/forms.js", global);
     Services.scriptloader.loadSubScript("chrome://browser/content/ErrorPage.js", global);
   } catch (e) {
   }
   Services.scriptloader.loadSubScript("chrome://global/content/BrowserElementPanning.js", global);
   Services.scriptloader.loadSubScript("chrome://global/content/BrowserElementChildPreload.js", global);
 
   Services.io.getProtocolHandler("app");
   Services.io.getProtocolHandler("default");