Backed out 5 changesets (bug 1015871, bug 1020257, bug 1015887, bug 1005888, bug 1015894) for desktop B2G mochitest failures on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 04 Jun 2014 16:07:06 -0400
changeset 206987 616163ca1aa528b7b418fe2edb84ac11973b851d
parent 206986 ad91b00b5af9d4299d5b6d043b70d59d416c31df
child 206988 e0d90520150195e627e2e37745b60e5c82d9fbaa
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1015871, 1020257, 1015887, 1005888, 1015894
milestone32.0a1
backs outdbcb9974b640b6846647b44c7995844c612eb0bb
3220b7b2efc9022dde350eaa21528d065e6c7db9
4e23647ae2470a3022a17a2f2e065d9fdac013d1
59df0cdacc15bfec459c8e8e0c989bc164caed5c
e7124b07804b86f825ae2e991832b32cf69ae11c
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
Backed out 5 changesets (bug 1015871, bug 1020257, bug 1015887, bug 1005888, bug 1015894) for desktop B2G mochitest failures on a CLOSED TREE. Backed out changeset dbcb9974b640 (bug 1020257) Backed out changeset 3220b7b2efc9 (bug 1015894) Backed out changeset 4e23647ae247 (bug 1015887) Backed out changeset 59df0cdacc15 (bug 1015871) Backed out changeset e7124b07804b (bug 1005888)
b2g/chrome/content/devtools.js
b2g/components/ContentPermissionPrompt.js
b2g/components/SystemAppProxy.jsm
b2g/components/test/mochitest/systemapp_helper.js
dom/base/nsGlobalWindow.h
dom/webidl/Window.webidl
gfx/thebes/gfxFT2FontList.cpp
gfx/thebes/gfxFT2FontList.h
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/xpcprivate.h
js/xpconnect/wrappers/XrayWrapper.cpp
widget/nsGUIEventIPC.h
--- a/b2g/chrome/content/devtools.js
+++ b/b2g/chrome/content/devtools.js
@@ -267,24 +267,17 @@ Target.prototype = {
    * widgets.
    */
   destroy: function target_destroy() {
     delete this.metrics;
     this._send({});
   },
 
   _send: function target_send(data) {
-    let frame = this.frame;
-
-    let systemapp = document.querySelector('#systemapp');
-    if (this.frame === systemapp) {
-      frame = getContentWindow();
-    }
-
-    shell.sendEvent(frame, 'developer-hud-update', Cu.cloneInto(data, target));
+    shell.sendEvent(this.frame, 'developer-hud-update', Cu.cloneInto(data, this.frame));
   }
 
 };
 
 
 /**
  * The Console Watcher tracks the following metrics in apps: reflows, warnings,
  * and errors, with security errors reported separately.
--- a/b2g/components/ContentPermissionPrompt.js
+++ b/b2g/components/ContentPermissionPrompt.js
@@ -415,34 +415,17 @@ ContentPermissionPrompt.prototype = {
       isApp: isApp,
       remember: remember,
       isGranted: isGranted,
     };
 
     if (isApp) {
       details.manifestURL = DOMApplicationRegistry.getManifestURLByLocalId(principal.appId);
     }
-
-    // request.element is defined for OOP content, while request.window
-    // is defined for In-Process content.
-    // In both cases the message needs to be dispatched to the top-level
-    // <iframe mozbrowser> container in the system app.
-    // So the above code iterates over window.realFrameElement in order
-    // to crosss mozbrowser iframes boundaries and find the top-level
-    // one in the system app.
-    // window.realFrameElement will be |null| if the code try to cross
-    // content -> chrome boundaries.
-    let targetElement = request.element;
-    let targetWindow = request.window || targetElement.ownerDocument.defaultView;
-    while (targetWindow.realFrameElement) {
-      targetElement = targetWindow.realFrameElement;
-      targetWindow = targetElement.ownerDocument.defaultView;
-    }
-
-    SystemAppProxy.dispatchEvent(details, targetElement);
+    SystemAppProxy.dispatchEvent(details);
   },
 
   classID: Components.ID("{8c719f03-afe0-4aac-91ff-6c215895d467}"),
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionPrompt])
 };
 
 (function() {
--- a/b2g/components/SystemAppProxy.jsm
+++ b/b2g/components/SystemAppProxy.jsm
@@ -53,20 +53,17 @@ let SystemAppProxy = {
    *     event.details == 'bar'
    *   });
    *
    *   @param type      The custom event type.
    *   @param details   The event details.
    *   @param noPending Set to true to emit this event even before the system
    *                    app is ready.
    */
-  _sendCustomEvent: function systemApp_sendCustomEvent(type,
-                                                       details,
-                                                       noPending,
-                                                       target) {
+  _sendCustomEvent: function systemApp_sendCustomEvent(type, details, noPending) {
     let content = this._frame ? this._frame.contentWindow : null;
 
     // If the system app isn't ready yet,
     // queue events until someone calls setIsReady
     if (!content || (!this._isReady && !noPending)) {
       this._pendingEvents.push([type, details]);
       return null;
     }
@@ -78,24 +75,24 @@ let SystemAppProxy = {
     // we consider the caller already wrapped (correctly) the object.
     if ('__exposedProps__' in details) {
       payload = details;
     } else {
       payload = details ? Cu.cloneInto(details, content) : {};
     }
 
     event.initCustomEvent(type, true, false, payload);
-    (target || content).dispatchEvent(event);
+    content.dispatchEvent(event);
 
     return event;
   },
 
   // Now deprecated, use sendCustomEvent with a custom event name
-  dispatchEvent: function systemApp_sendChromeEvent(details, target) {
-    return this._sendCustomEvent('mozChromeEvent', details, false, target);
+  dispatchEvent: function systemApp_sendChromeEvent(details) {
+    return this._sendCustomEvent('mozChromeEvent', details);
   },
 
   // Listen for dom events on the system app
   addEventListener: function systemApp_addEventListener() {
     let content = this._frame ? this._frame.contentWindow : null;
     if (!content) {
       this._pendingListeners.push(arguments);
       return false;
--- a/b2g/components/test/mochitest/systemapp_helper.js
+++ b/b2g/components/test/mochitest/systemapp_helper.js
@@ -3,17 +3,16 @@ const Cu = Components.utils;
 const { Services } = Cu.import("resource://gre/modules/Services.jsm");
 
 // Load a duplicated copy of the jsm to prevent messing with the currently running one
 let scope = {};
 Services.scriptloader.loadSubScript("resource://gre/modules/SystemAppProxy.jsm", scope);
 const { SystemAppProxy } = scope;
 
 let frame;
-let customEventTarget;
 
 let index = -1;
 function next() {
   index++;
   if (index >= steps.length) {
     assert.ok(false, "Shouldn't get here!");
     return;
   }
@@ -43,20 +42,16 @@ function listener(event) {
 
     next(); // call checkEventDispatching
   } else if (n == 3) {
     assert.equal(event.type, "custom");
     assert.equal(event.detail.name, "third");
   } else if (n == 4) {
     assert.equal(event.type, "mozChromeEvent");
     assert.equal(event.detail.name, "fourth");
-  } else if (n == 5) {
-    assert.equal(event.type, "mozChromeEvent");
-    assert.equal(event.detail.name, "fifth");
-    assert.equal(event.target, customEventTarget);
 
     next(); // call checkEventListening();
   } else {
     assert.ok(false, "Unexpected event of type " + event.type);
   }
 }
 
 
@@ -79,18 +74,16 @@ let steps = [
 
   function createFrame() {
     // Create a fake system app frame
     let win = Services.wm.getMostRecentWindow("navigator:browser");
     let doc = win.document;
     frame = doc.createElement("iframe");
     doc.documentElement.appendChild(frame);
 
-    customEventTarget = frame.contentDocument.body;
-
     // Ensure that events are correctly sent to the frame.
     // `listener` is going to call next()
     frame.contentWindow.addEventListener("mozChromeEvent", listener);
     frame.contentWindow.addEventListener("custom", listener);
 
     // Ensure that listener being registered before the system app is ready
     // are correctly removed from the pending list
     function removedListener() {
@@ -120,18 +113,17 @@ let steps = [
     frame.setAttribute("src", "data:text/html,system app");
   },
 
   function checkEventDispatching() {
     // Send events after the iframe is ready,
     // they should be dispatched right away
     SystemAppProxy._sendCustomEvent("custom", { name: "third" });
     SystemAppProxy.dispatchEvent({ name: "fourth" });
-    SystemAppProxy._sendCustomEvent("custom", { name: "fifth" }, false, customEventTarget);
-    // Once this 5th event is received, we will run checkEventListening
+    // Once this 4th event is received, we will run checkEventListening
   },
 
   function checkEventListening() {
     SystemAppProxy.addEventListener("mozContentEvent", function onContentEvent(event) {
       assert.equal(event.detail.name, "first-content", "received a system app event");
       SystemAppProxy.removeEventListener("mozContentEvent", onContentEvent);
 
       next();
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -962,17 +962,16 @@ public:
                                       mozilla::ErrorResult& aError)
   {
     return CancelAnimationFrame(aHandle, aError);
   }
   int64_t GetMozAnimationStartTime(mozilla::ErrorResult& aError);
   void SizeToContent(mozilla::ErrorResult& aError);
   nsIDOMCrypto* GetCrypto(mozilla::ErrorResult& aError);
   nsIControllers* GetControllers(mozilla::ErrorResult& aError);
-  mozilla::dom::Element* GetRealFrameElement(mozilla::ErrorResult& aError);
   float GetMozInnerScreenX(mozilla::ErrorResult& aError);
   float GetMozInnerScreenY(mozilla::ErrorResult& aError);
   float GetDevicePixelRatio(mozilla::ErrorResult& aError);
   int32_t GetScrollMaxX(mozilla::ErrorResult& aError);
   int32_t GetScrollMaxY(mozilla::ErrorResult& aError);
   bool GetFullScreen(mozilla::ErrorResult& aError);
   void SetFullScreen(bool aFullScreen, mozilla::ErrorResult& aError);
   void Back(mozilla::ErrorResult& aError);
@@ -1370,16 +1369,18 @@ protected:
   // Returns device pixels.  Outer windows only.
   nsIntPoint GetScreenXY(mozilla::ErrorResult& aError);
 
   int32_t RequestAnimationFrame(const nsIDocument::FrameRequestCallbackHolder& aCallback,
                                 mozilla::ErrorResult& aError);
 
   nsGlobalWindow* InnerForSetTimeoutOrInterval(mozilla::ErrorResult& aError);
 
+  mozilla::dom::Element* GetRealFrameElement(mozilla::ErrorResult& aError);
+
   void PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,
                       const nsAString& aTargetOrigin,
                       JS::Handle<JS::Value> aTransfer,
                       mozilla::ErrorResult& aError);
 
   already_AddRefed<nsIVariant>
     ShowModalDialog(const nsAString& aUrl, nsIVariant* aArgument,
                     const nsAString& aOptions, mozilla::ErrorResult& aError);
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -280,18 +280,16 @@ partial interface Window {
   /**
    * Method for sizing this window to the content in the window.
    */
   [Throws] void             sizeToContent();
 
   // XXX Shouldn't this be in nsIDOMChromeWindow?
   [ChromeOnly, Replaceable, Throws] readonly attribute MozControllers controllers;
 
-  [ChromeOnly, Throws] readonly attribute Element? realFrameElement;
-
   [Throws] readonly attribute float               mozInnerScreenX;
   [Throws] readonly attribute float               mozInnerScreenY;
   [Throws] readonly attribute float               devicePixelRatio;
 
   /* The maximum offset that the window can be scrolled to
      (i.e., the document width/height minus the scrollport width/height) */
   [Replaceable, Throws] readonly attribute long   scrollMaxX;
   [Replaceable, Throws] readonly attribute long   scrollMaxY;
--- a/gfx/thebes/gfxFT2FontList.cpp
+++ b/gfx/thebes/gfxFT2FontList.cpp
@@ -1,27 +1,41 @@
 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * 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/. */
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/MemoryReporting.h"
 
+#if (MOZ_WIDGET_GTK == 2)
+#include "gfxPlatformGtk.h"
+#define gfxToolkitPlatform gfxPlatformGtk
+#elif defined(MOZ_WIDGET_QT)
+#include <qfontinfo.h>
+#include "gfxQtPlatform.h"
+#define gfxToolkitPlatform gfxQtPlatform
+#elif defined(XP_WIN)
+#include "gfxWindowsPlatform.h"
+#define gfxToolkitPlatform gfxWindowsPlatform
+#elif defined(ANDROID)
 #include "mozilla/dom/ContentChild.h"
 #include "gfxAndroidPlatform.h"
 #include "mozilla/Omnijar.h"
 #include "nsIInputStream.h"
 #include "nsNetUtil.h"
 #define gfxToolkitPlatform gfxAndroidPlatform
+#endif
 
+#ifdef ANDROID
 #include "nsXULAppAPI.h"
 #include <dirent.h>
 #include <android/log.h>
 #define ALOG(args...)  __android_log_print(ANDROID_LOG_INFO, "Gecko" , ## args)
+#endif
 
 #include "ft2build.h"
 #include FT_FREETYPE_H
 #include FT_TRUETYPE_TAGS_H
 #include FT_TRUETYPE_TABLES_H
 #include "cairo-ft.h"
 
 #include "gfxFT2FontList.h"
@@ -39,16 +53,21 @@
 #include "nsISimpleEnumerator.h"
 #include "nsIMemory.h"
 #include "gfxFontConstants.h"
 
 #include "mozilla/Preferences.h"
 #include "mozilla/scache/StartupCache.h"
 #include <sys/stat.h>
 
+#ifdef XP_WIN
+#include "nsIWindowsRegKey.h"
+#include <windows.h>
+#endif
+
 using namespace mozilla;
 
 #ifdef PR_LOGGING
 static PRLogModuleInfo *
 GetFontInfoLog()
 {
     static PRLogModuleInfo *sLog;
     if (!sLog)
@@ -61,16 +80,20 @@ GetFontInfoLog()
 #define LOG(args) PR_LOG(GetFontInfoLog(), PR_LOG_DEBUG, args)
 #define LOG_ENABLED() PR_LOG_TEST(GetFontInfoLog(), PR_LOG_DEBUG)
 
 static cairo_user_data_key_t sFTUserFontDataKey;
 
 static __inline void
 BuildKeyNameFromFontName(nsAString &aName)
 {
+#ifdef XP_WIN
+    if (aName.Length() >= LF_FACESIZE)
+        aName.Truncate(LF_FACESIZE - 1);
+#endif
     ToLowerCase(aName);
 }
 
 // Helper to access the FT_Face for a given FT2FontEntry,
 // creating a temporary face if the entry does not have one yet.
 // This allows us to read font names, tables, etc if necessary
 // without permanently instantiating a freetype face and consuming
 // memory long-term.
@@ -935,17 +958,21 @@ gfxFT2FontList::AppendFacesFromFontFile(
     if (!faceList.IsEmpty() && 0 == statRetval &&
         s.st_mtime == timestamp && s.st_size == filesize)
     {
         LOG(("using cached font info for %s", aFileName.get()));
         AppendFacesFromCachedFaceList(aFileName, aStdFile, faceList);
         return;
     }
 
+#ifdef XP_WIN
+    FT_Library ftLibrary = gfxWindowsPlatform::GetPlatform()->GetFTLibrary();
+#elif defined(ANDROID)
     FT_Library ftLibrary = gfxAndroidPlatform::GetPlatform()->GetFTLibrary();
+#endif
     FT_Face dummy;
     if (FT_Err_Ok == FT_New_Face(ftLibrary, aFileName.get(), -1, &dummy)) {
         LOG(("reading font info via FreeType for %s", aFileName.get()));
         nsCString faceList;
         timestamp = s.st_mtime;
         filesize = s.st_size;
         for (FT_Long i = 0; i < dummy->num_faces; i++) {
             FT_Face face;
@@ -1138,16 +1165,60 @@ FinalizeFamilyMemberList(nsStringHashKey
     family->CheckForSimpleFamily();
 
     return PL_DHASH_NEXT;
 }
 
 void
 gfxFT2FontList::FindFonts()
 {
+#ifdef XP_WIN
+    nsTArray<nsString> searchPaths(3);
+    nsTArray<nsString> fontPatterns(3);
+    fontPatterns.AppendElement(NS_LITERAL_STRING("\\*.ttf"));
+    fontPatterns.AppendElement(NS_LITERAL_STRING("\\*.ttc"));
+    fontPatterns.AppendElement(NS_LITERAL_STRING("\\*.otf"));
+    wchar_t pathBuf[256];
+    SHGetSpecialFolderPathW(0, pathBuf, CSIDL_WINDOWS, 0);
+    searchPaths.AppendElement(pathBuf);
+    SHGetSpecialFolderPathW(0, pathBuf, CSIDL_FONTS, 0);
+    searchPaths.AppendElement(pathBuf);
+    nsCOMPtr<nsIFile> resDir;
+    NS_GetSpecialDirectory(NS_APP_RES_DIR, getter_AddRefs(resDir));
+    if (resDir) {
+        resDir->Append(NS_LITERAL_STRING("fonts"));
+        nsAutoString resPath;
+        resDir->GetPath(resPath);
+        searchPaths.AppendElement(resPath);
+    }
+    WIN32_FIND_DATAW results;
+    for (uint32_t i = 0;  i < searchPaths.Length(); i++) {
+        const nsString& path(searchPaths[i]);
+        for (uint32_t j = 0; j < fontPatterns.Length(); j++) { 
+            nsAutoString pattern(path);
+            pattern.Append(fontPatterns[j]);
+            HANDLE handle = FindFirstFileExW(pattern.get(),
+                                             FindExInfoStandard,
+                                             &results,
+                                             FindExSearchNameMatch,
+                                             nullptr,
+                                             0);
+            bool moreFiles = handle != INVALID_HANDLE_VALUE;
+            while (moreFiles) {
+                nsAutoString filePath(path);
+                filePath.Append('\\');
+                filePath.Append(results.cFileName);
+                AppendFacesFromFontFile(NS_ConvertUTF16toUTF8(filePath));
+                moreFiles = FindNextFile(handle, &results);
+            }
+            if (handle != INVALID_HANDLE_VALUE)
+                FindClose(handle);
+        }
+    }
+#elif defined(ANDROID)
     gfxFontCache *fc = gfxFontCache::GetCache();
     if (fc)
         fc->AgeAllGenerations();
     mPrefFonts.Clear();
     mCodepointsWithNoFonts.reset();
 
     mCodepointsWithNoFonts.SetRange(0,0x1f);     // C0 controls
     mCodepointsWithNoFonts.SetRange(0x7f,0x9f);  // C1 controls
@@ -1183,16 +1254,17 @@ gfxFT2FontList::FindFonts()
     root.AppendLiteral("/fonts");
 
     FindFontsInDir(root, &fnc);
 
     if (mFontFamilies.Count() == 0) {
         // if we can't find/read the font directory, we are doomed!
         NS_RUNTIMEABORT("Could not read the system fonts directory");
     }
+#endif // XP_WIN && ANDROID
 
     // Look for fonts stored in omnijar, unless we're on a low-memory
     // device where we don't want to spend the RAM to decompress them.
     // (Prefs may disable this, or force-enable it even with low memory.)
     bool lowmem;
     nsCOMPtr<nsIMemory> mem = nsMemory::GetGlobalMemoryService();
     if ((NS_SUCCEEDED(mem->IsLowMemoryPlatform(&lowmem)) && !lowmem &&
          Preferences::GetBool("gfx.bundled_fonts.enabled")) ||
@@ -1214,16 +1286,17 @@ gfxFT2FontList::FindFonts()
     }
 
     // Finalize the families by sorting faces into standard order
     // and marking "simple" families.
     // Passing non-null userData here says that we want faces to be sorted.
     mFontFamilies.Enumerate(FinalizeFamilyMemberList, this);
 }
 
+#ifdef ANDROID
 void
 gfxFT2FontList::FindFontsInDir(const nsCString& aDir, FontNameCache *aFNC)
 {
     static const char* sStandardFonts[] = {
         "DroidSans.ttf",
         "DroidSans-Bold.ttf",
         "DroidSerif-Regular.ttf",
         "DroidSerif-Bold.ttf",
@@ -1270,16 +1343,17 @@ gfxFT2FontList::FindFontsInDir(const nsC
             // and the file is unchanged, we won't actually need to read it.
             // If the file is new/changed, this will update the FontNameCache.
             AppendFacesFromFontFile(s, isStdFont, aFNC);
         }
     }
 
     closedir(d);
 }
+#endif
 
 void
 gfxFT2FontList::AppendFaceFromFontListEntry(const FontListEntry& aFLE,
                                             bool aStdFile)
 {
     FT2FontEntry* fe = FT2FontEntry::CreateFontEntry(aFLE);
     if (fe) {
         fe->mStandardFace = aStdFile;
@@ -1427,17 +1501,26 @@ gfxFT2FontList::LookupLocalFont(const gf
     }
 
     return fe;
 }
 
 gfxFontFamily*
 gfxFT2FontList::GetDefaultFont(const gfxFontStyle* aStyle)
 {
-#ifdef MOZ_WIDGET_GONK
+#ifdef XP_WIN
+    HGDIOBJ hGDI = ::GetStockObject(SYSTEM_FONT);
+    LOGFONTW logFont;
+    if (hGDI && ::GetObjectW(hGDI, sizeof(logFont), &logFont)) {
+        nsAutoString resolvedName;
+        if (ResolveFontName(nsDependentString(logFont.lfFaceName), resolvedName)) {
+            return FindFamily(resolvedName);
+        }
+    }
+#elif defined(MOZ_WIDGET_GONK)
     nsAutoString resolvedName;
     if (ResolveFontName(NS_LITERAL_STRING("Fira Sans OT"), resolvedName)) {
         return FindFamily(resolvedName);
     }
 #elif defined(MOZ_WIDGET_ANDROID)
     nsAutoString resolvedName;
     if (ResolveFontName(NS_LITERAL_STRING("Roboto"), resolvedName) ||
         ResolveFontName(NS_LITERAL_STRING("Droid Sans"), resolvedName)) {
--- a/gfx/thebes/gfxFT2FontList.h
+++ b/gfx/thebes/gfxFT2FontList.h
@@ -2,16 +2,21 @@
  * 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/. */
 
 #ifndef GFX_FT2FONTLIST_H
 #define GFX_FT2FONTLIST_H
 
 #include "mozilla/MemoryReporting.h"
+
+#ifdef XP_WIN
+#include "gfxWindowsPlatform.h"
+#include <windows.h>
+#endif
 #include "gfxPlatformFontList.h"
 
 namespace mozilla {
     namespace dom {
         class FontListEntry;
     };
 };
 using mozilla::dom::FontListEntry;
@@ -143,14 +148,16 @@ protected:
 
     void AddFaceToList(const nsCString& aEntryName, uint32_t aIndex,
                        bool aStdFile, FT_Face aFace, nsCString& aFaceList);
 
     void FindFonts();
 
     void FindFontsInOmnijar(FontNameCache *aCache);
 
+#ifdef ANDROID
     void FindFontsInDir(const nsCString& aDir, FontNameCache* aFNC);
+#endif
 
     nsTHashtable<nsStringHashKey> mSkipSpaceLookupCheckFamilies;
 };
 
 #endif /* GFX_FT2FONTLIST_H */
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -76,17 +76,16 @@ const char* const XPCJSRuntime::mStrings
     "prototype",            // IDX_PROTOTYPE
     "createInstance",       // IDX_CREATE_INSTANCE
     "item",                 // IDX_ITEM
     "__proto__",            // IDX_PROTO
     "__iterator__",         // IDX_ITERATOR
     "__exposedProps__",     // IDX_EXPOSEDPROPS
     "eval",                 // IDX_EVAL
     "controllers",           // IDX_CONTROLLERS
-    "realFrameElement",     // IDX_REALFRAMEELEMENT
 };
 
 /***************************************************************************/
 
 static mozilla::Atomic<bool> sDiscardSystemSource(false);
 
 bool
 xpc::ShouldDiscardSystemSource() { return sDiscardSystemSource; }
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -474,17 +474,16 @@ public:
         IDX_PROTOTYPE               ,
         IDX_CREATE_INSTANCE         ,
         IDX_ITEM                    ,
         IDX_PROTO                   ,
         IDX_ITERATOR                ,
         IDX_EXPOSEDPROPS            ,
         IDX_EVAL                    ,
         IDX_CONTROLLERS             ,
-        IDX_REALFRAMEELEMENT        ,
         IDX_TOTAL_COUNT // just a count of the above
     };
 
     JS::HandleId GetStringID(unsigned index) const
     {
         MOZ_ASSERT(index < IDX_TOTAL_COUNT, "index out of range");
         // fromMarkedLocation() is safe because the string is interned.
         return JS::HandleId::fromMarkedLocation(&mStrIDs[index]);
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "XrayWrapper.h"
 #include "AccessCheck.h"
 #include "WrapperFactory.h"
 
 #include "nsIContent.h"
 #include "nsIControllers.h"
-#include "mozilla/dom/Element.h"
 #include "nsContentUtils.h"
 
 #include "XPCWrapper.h"
 #include "xpcprivate.h"
 
 #include "jsapi.h"
 #include "jsprf.h"
 #include "nsJSUtils.h"
@@ -1086,38 +1085,16 @@ XPCWrappedNativeXrayTraits::resolveNativ
             JS_ReportError(cx, "Failed to invoke GetControllers via Xrays");
             return false;
         }
 
         desc.object().set(wrapper);
         return true;
     }
 
-    // The |realFrameElement| property is accessible as a [ChromeOnly] property
-    // on Window.WebIDL, and [noscript] in XPIDL. Chrome needs to see this over
-    // Xray, so we need to special-case it until we move |Window| to WebIDL.
-    if (id == GetRTIdByIndex(cx, XPCJSRuntime::IDX_REALFRAMEELEMENT) &&
-        AccessCheck::isChrome(wrapper) &&
-        (win = AsWindow(cx, wrapper)))
-    {
-        ErrorResult rv;
-        Element* f = win->GetRealFrameElement(rv);
-        if (!f) {
-          desc.object().set(nullptr);
-          return true;
-        }
-
-        if (!WrapNewBindingObject(cx, f, desc.value())) {
-          return false;
-        }
-
-        desc.object().set(wrapper);
-        return true;
-    }
-
     XPCNativeInterface *iface;
     XPCNativeMember *member;
     XPCWrappedNative *wn = getWN(wrapper);
 
     if (ccx.GetWrapper() != wn || !wn->IsValid()) {
         // Something is wrong. If the wrapper is not even valid let's not risk
         // calling resolveDOMCollectionProperty.
         return true;
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -255,17 +255,17 @@ struct ParamTraits<mozilla::WidgetTouchE
       WriteParam(aMsg, touch->mRadius);
       WriteParam(aMsg, touch->mRotationAngle);
       WriteParam(aMsg, touch->mForce);
     }
   }
 
   static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
   {
-    size_t numTouches;
+    uint32_t numTouches;
     if (!ReadParam(aMsg, aIter,
                    static_cast<mozilla::WidgetInputEvent*>(aResult)) ||
         !ReadParam(aMsg, aIter, &numTouches)) {
       return false;
     }
     for (uint32_t i = 0; i < numTouches; ++i) {
         int32_t identifier;
         mozilla::LayoutDeviceIntPoint refPoint;