Merge m-i to m-c, a=merge
authorPhil Ringnalda <philringnalda@gmail.com>
Mon, 02 Jan 2017 10:54:20 -0800
changeset 375052 c91249f41e3766274131a84f9157a4d9d9949520
parent 375045 daa6d8c357580b3840e1057886b20154b85eb5ba (current diff)
parent 375051 3346ef79c433e6f01f6fb392a9d909a888af9a38 (diff)
child 375053 c7ce652655932785c40843f979a3f1e964e56f21
child 375060 f4b3cc1c100caaf6a0d6e332cebf1ba5969cea7b
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone53.0a1
first release with
nightly linux32
c91249f41e37 / 53.0a1 / 20170103030204 / files
nightly linux64
c91249f41e37 / 53.0a1 / 20170103030204 / files
nightly mac
c91249f41e37 / 53.0a1 / 20170103030204 / files
nightly win32
c91249f41e37 / 53.0a1 / 20170103030204 / files
nightly win64
c91249f41e37 / 53.0a1 / 20170103030204 / 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
Merge m-i to m-c, a=merge MozReview-Commit-ID: AqAUP3ETNr
--- a/dom/animation/test/crashtests/crashtests.list
+++ b/dom/animation/test/crashtests/crashtests.list
@@ -1,18 +1,18 @@
 pref(dom.animations-api.core.enabled,true) load 1239889-1.html
 asserts-if(stylo,3) pref(dom.animations-api.core.enabled,true) load 1244595-1.html # bug 1324696
-asserts-if(stylo,3-4) pref(dom.animations-api.core.enabled,true) load 1216842-1.html # bug 1324695
-asserts-if(stylo,3-5) pref(dom.animations-api.core.enabled,true) load 1216842-2.html # bug 1324695
+asserts-if(stylo,3-10) pref(dom.animations-api.core.enabled,true) load 1216842-1.html # bug 1324695
+asserts-if(stylo,3-10) pref(dom.animations-api.core.enabled,true) load 1216842-2.html # bug 1324695
 asserts-if(stylo,3) pref(dom.animations-api.core.enabled,true) load 1216842-3.html # bug 1324691
 asserts-if(stylo,3) pref(dom.animations-api.core.enabled,true) load 1216842-4.html # bug 1324691
-asserts-if(stylo,4-5) pref(dom.animations-api.core.enabled,true) load 1216842-5.html # bug 1324693
-asserts-if(stylo,4-5) pref(dom.animations-api.core.enabled,true) load 1216842-6.html # bug 1324693
-asserts-if(stylo,3-5) pref(dom.animations-api.core.enabled,true) load 1272475-1.html # bug 1324693
-asserts-if(stylo,4-7) pref(dom.animations-api.core.enabled,true) load 1272475-2.html # bug 1324693
+asserts-if(stylo,4-10) pref(dom.animations-api.core.enabled,true) load 1216842-5.html # bug 1324693
+asserts-if(stylo,4-10) pref(dom.animations-api.core.enabled,true) load 1216842-6.html # bug 1324693
+asserts-if(stylo,3-10) pref(dom.animations-api.core.enabled,true) load 1272475-1.html # bug 1324693
+asserts-if(stylo,4-10) pref(dom.animations-api.core.enabled,true) load 1272475-2.html # bug 1324693
 asserts-if(stylo,5) pref(dom.animations-api.core.enabled,true) load 1278485-1.html # bug 1324691
 asserts-if(stylo,31) pref(dom.animations-api.core.enabled,true) load 1277272-1.html # bug 1324694
 asserts-if(stylo,2) pref(dom.animations-api.core.enabled,true) load 1290535-1.html # bug 1324690
 pref(dom.animations-api.core.enabled,true) load 1304886-1.html
 pref(dom.animations-api.core.enabled,true) load 1322382-1.html
 skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1322291-1.html # bug 1323733
-pref(dom.animations-api.core.enabled,true) load 1323114-1.html
-pref(dom.animations-api.core.enabled,true) load 1323114-2.html
+asserts-if(stylo,0-5) pref(dom.animations-api.core.enabled,true) load 1323114-1.html # bug 1324690
+asserts-if(stylo,0-5) pref(dom.animations-api.core.enabled,true) load 1323114-2.html # bug 1324690
--- a/dom/base/crashtests/crashtests.list
+++ b/dom/base/crashtests/crashtests.list
@@ -1,9 +1,9 @@
-load 43040-1.html
+asserts-if(stylo,0-1) load 43040-1.html # bug 1324691
 load 90613-1.html
 load 116848-1.html
 load 149320-1.html
 load 205225-1.html
 load 231475-1.html
 load 244933-1.html
 load 275912-1.html
 load 293388-1.html
@@ -188,17 +188,17 @@ load 852381.html
 load 863950.html
 load 864448.html
 load 886213.html
 load 898906.html
 load 930250.html
 load 942979.html
 load 973401.html
 load 978646.html
-asserts-if(stylo,3) pref(dom.webcomponents.enabled,true) load 1024428-1.html # bug 1324671
+asserts-if(stylo,1-11) pref(dom.webcomponents.enabled,true) load 1024428-1.html # bug 1324671
 load 1026714.html
 pref(dom.webcomponents.enabled,true) load 1027461-1.html
 pref(dom.webcomponents.enabled,true) load 1029710.html
 load 1154598.xhtml
 load 1157995.html
 load 1158412.html
 load 1181619.html
 load structured_clone_container_throws.html
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -650,17 +650,17 @@ skip-if = (toolkit == 'android') # Andro
 [test_iframe_referrer.html]
 [test_iframe_referrer_changing.html]
 [test_iframe_referrer_invalid.html]
 [test_Image_constructor.html]
 [test_img_referrer.html]
 [test_innersize_scrollport.html]
 [test_integer_attr_with_leading_zero.html]
 [test_intersectionobservers.html]
-skip-if = (os == "android") # Timing issues
+skip-if = true # Track Bug 1320704
 [test_link_prefetch.html]
 skip-if = !e10s # Track Bug 1281415
 [test_link_stylesheet.html]
 [test_messagemanager_targetchain.html]
 [test_meta_viewport0.html]
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
 [test_meta_viewport1.html]
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
--- a/dom/canvas/WebGLContextFramebufferOperations.cpp
+++ b/dom/canvas/WebGLContextFramebufferOperations.cpp
@@ -32,18 +32,20 @@ WebGLContext::Clear(GLbitfield mask)
         GenerateWarning("Calling gl.clear() with RASTERIZER_DISCARD enabled has no effects.");
     }
 
     if (mBoundDrawFramebuffer) {
         if (!mBoundDrawFramebuffer->ValidateAndInitAttachments(funcName))
             return;
 
         if (mask & LOCAL_GL_COLOR_BUFFER_BIT) {
-            const auto& resolvedData = mBoundDrawFramebuffer->ResolvedCompleteData();
-            for (const auto& cur : resolvedData->colorDrawBuffers) {
+            for (const auto& cur : mBoundDrawFramebuffer->ColorDrawBuffers()) {
+                if (!cur->IsDefined())
+                    continue;
+
                 switch (cur->Format()->format->componentType) {
                 case webgl::ComponentType::Float:
                 case webgl::ComponentType::NormInt:
                 case webgl::ComponentType::NormUInt:
                     break;
 
                 default:
                     ErrorInvalidOperation("%s: Color draw buffers must be floating-point"
--- a/dom/canvas/WebGLFramebuffer.cpp
+++ b/dom/canvas/WebGLFramebuffer.cpp
@@ -874,22 +874,21 @@ WebGLFramebuffer::ValidateAndInitAttachm
 bool
 WebGLFramebuffer::ValidateClearBufferType(const char* funcName, GLenum buffer,
                                           uint32_t drawBuffer, GLenum funcType) const
 {
     if (buffer != LOCAL_GL_COLOR)
         return true;
 
     const auto& attach = mColorAttachments[drawBuffer];
-    if (!count(mResolvedCompleteData->colorDrawBuffers.begin(),
-               mResolvedCompleteData->colorDrawBuffers.end(),
-               &attach))
-    {
+    if (!attach.IsDefined())
+        return true;
+
+    if (!count(mColorDrawBuffers.begin(), mColorDrawBuffers.end(), &attach))
         return true; // DRAW_BUFFERi set to NONE.
-    }
 
     GLenum attachType;
     switch (attach.Format()->format->componentType) {
     case webgl::ComponentType::Int:
         attachType = LOCAL_GL_INT;
         break;
     case webgl::ComponentType::UInt:
         attachType = LOCAL_GL_UNSIGNED_INT;
@@ -1076,42 +1075,24 @@ WebGLFramebuffer::ResolveAttachmentData(
             cur->SetImageDataStatus(WebGLImageDataStatus::InitializedImageData);
         }
     }
 
     return true;
 }
 
 WebGLFramebuffer::ResolvedData::ResolvedData(const WebGLFramebuffer& parent)
-    : hasSampleBuffers(false)
-    , depthBuffer(nullptr)
-    , stencilBuffer(nullptr)
 {
-    if (parent.mDepthAttachment.IsDefined()) {
-        depthBuffer = &parent.mDepthAttachment;
-    }
-    if (parent.mStencilAttachment.IsDefined()) {
-        stencilBuffer = &parent.mStencilAttachment;
-    }
-    if (parent.mDepthStencilAttachment.IsDefined()) {
-        depthBuffer = &parent.mDepthStencilAttachment;
-        stencilBuffer = &parent.mDepthStencilAttachment;
-    }
 
-    ////
-
-    colorDrawBuffers.reserve(parent.mColorDrawBuffers.size());
     texDrawBuffers.reserve(parent.mColorDrawBuffers.size() + 2); // +2 for depth+stencil.
 
     const auto fnCommon = [&](const WebGLFBAttachPoint& attach) {
         if (!attach.IsDefined())
             return false;
 
-        hasSampleBuffers |= bool(attach.Samples());
-
         if (attach.Texture()) {
             texDrawBuffers.push_back(&attach);
         }
         return true;
     };
 
     ////
 
@@ -1130,17 +1111,16 @@ WebGLFramebuffer::ResolvedData::Resolved
     ////
 
     for (const auto& pAttach : parent.mColorDrawBuffers) {
         const auto& attach = *pAttach;
         if (!fnCommon(attach))
             return;
 
         drawSet.insert(WebGLFBAttachPoint::Ordered(attach));
-        colorDrawBuffers.push_back(&attach);
     }
 
     if (parent.mColorReadBuffer) {
         const auto& attach = *parent.mColorReadBuffer;
         if (!fnCommon(attach))
             return;
 
         readSet.insert(WebGLFBAttachPoint::Ordered(attach));
@@ -1623,87 +1603,125 @@ GetBackbufferFormats(const WebGLContext*
 WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl,
                                   const WebGLFramebuffer* srcFB, GLint srcX0, GLint srcY0,
                                   GLint srcX1, GLint srcY1,
                                   const WebGLFramebuffer* dstFB, GLint dstX0, GLint dstY0,
                                   GLint dstX1, GLint dstY1,
                                   GLbitfield mask, GLenum filter)
 {
     const char funcName[] = "blitFramebuffer";
-    auto& gl = webgl->gl;
-
+    const auto& gl = webgl->gl;
 
     ////
     // Collect data
 
-    const auto fnGetFormat = [](const WebGLFBAttachPoint* cur) -> const webgl::FormatInfo*
+    const auto fnGetDepthAndStencilAttach = [](const WebGLFramebuffer* fb,
+                                               const WebGLFBAttachPoint** const out_depth,
+                                               const WebGLFBAttachPoint** const out_stencil)
     {
-        if (!cur)
-            return nullptr;
+        *out_depth = nullptr;
+        *out_stencil = nullptr;
+
+        if (!fb)
+            return;
 
-        MOZ_ASSERT(cur->IsDefined());
-        return cur->Format()->format;
+        if (fb->mDepthStencilAttachment.IsDefined()) {
+            *out_depth = *out_stencil = &fb->mDepthStencilAttachment;
+            return;
+        }
+        if (fb->mDepthAttachment.IsDefined()) {
+            *out_depth = &fb->mDepthAttachment;
+        }
+        if (fb->mStencilAttachment.IsDefined()) {
+            *out_stencil = &fb->mStencilAttachment;
+        }
     };
 
-    bool srcSampleBuffers;
-    const webgl::FormatInfo* srcColorFormat;
-    const webgl::FormatInfo* srcDepthFormat;
-    const webgl::FormatInfo* srcStencilFormat;
-
-    if (srcFB) {
-        srcSampleBuffers = srcFB->mResolvedCompleteData->hasSampleBuffers;
-
-        srcColorFormat = fnGetFormat(srcFB->mColorReadBuffer);
-        srcDepthFormat = fnGetFormat(srcFB->mResolvedCompleteData->depthBuffer);
-        srcStencilFormat = fnGetFormat(srcFB->mResolvedCompleteData->stencilBuffer);
-    } else {
-        srcSampleBuffers = false; // Always false.
-
-        GetBackbufferFormats(webgl, &srcColorFormat, &srcDepthFormat, &srcStencilFormat);
-    }
+    const WebGLFBAttachPoint* srcDepthAttach;
+    const WebGLFBAttachPoint* srcStencilAttach;
+    fnGetDepthAndStencilAttach(srcFB, &srcDepthAttach, &srcStencilAttach);
+    const WebGLFBAttachPoint* dstDepthAttach;
+    const WebGLFBAttachPoint* dstStencilAttach;
+    fnGetDepthAndStencilAttach(dstFB, &dstDepthAttach, &dstStencilAttach);
 
     ////
 
-    bool dstSampleBuffers;
-    const webgl::FormatInfo* dstDepthFormat;
-    const webgl::FormatInfo* dstStencilFormat;
-    bool dstHasColor = false;
-    bool colorFormatsMatch = true;
-    bool colorTypesMatch = true;
+    const auto fnGetFormat = [](const WebGLFBAttachPoint* cur,
+                                bool* const out_hasSamples) -> const webgl::FormatInfo*
+    {
+        if (!cur || !cur->IsDefined())
+            return nullptr;
+
+        *out_hasSamples |= bool(cur->Samples());
+        return cur->Format()->format;
+    };
 
     const auto fnNarrowComponentType = [&](const webgl::FormatInfo* format) {
         switch (format->componentType) {
         case webgl::ComponentType::NormInt:
         case webgl::ComponentType::NormUInt:
             return webgl::ComponentType::Float;
 
         default:
             return format->componentType;
         }
     };
 
+    bool srcHasSamples;
+    const webgl::FormatInfo* srcColorFormat;
+    webgl::ComponentType srcColorType = webgl::ComponentType::None;
+    const webgl::FormatInfo* srcDepthFormat;
+    const webgl::FormatInfo* srcStencilFormat;
+
+    if (srcFB) {
+        srcHasSamples = false;
+        srcColorFormat = fnGetFormat(srcFB->mColorReadBuffer, &srcHasSamples);
+        srcDepthFormat = fnGetFormat(srcDepthAttach, &srcHasSamples);
+        srcStencilFormat = fnGetFormat(srcStencilAttach, &srcHasSamples);
+    } else {
+        srcHasSamples = false; // Always false.
+
+        GetBackbufferFormats(webgl, &srcColorFormat, &srcDepthFormat, &srcStencilFormat);
+    }
+
+    if (srcColorFormat) {
+        srcColorType = fnNarrowComponentType(srcColorFormat);
+    }
+
+    ////
+
+    bool dstHasSamples;
+    const webgl::FormatInfo* dstDepthFormat;
+    const webgl::FormatInfo* dstStencilFormat;
+    bool dstHasColor = false;
+    bool colorFormatsMatch = true;
+    bool colorTypesMatch = true;
+
     const auto fnCheckColorFormat = [&](const webgl::FormatInfo* dstFormat) {
         MOZ_ASSERT(dstFormat->r || dstFormat->g || dstFormat->b || dstFormat->a);
         dstHasColor = true;
         colorFormatsMatch &= (dstFormat == srcColorFormat);
-        colorTypesMatch &= ( fnNarrowComponentType(dstFormat) ==
-                             fnNarrowComponentType(srcColorFormat) );
+        colorTypesMatch &= ( fnNarrowComponentType(dstFormat) == srcColorType );
     };
 
     if (dstFB) {
-        dstSampleBuffers = dstFB->mResolvedCompleteData->hasSampleBuffers;
+        dstHasSamples = false;
 
-        dstDepthFormat = fnGetFormat(dstFB->mResolvedCompleteData->depthBuffer);
-        dstStencilFormat = fnGetFormat(dstFB->mResolvedCompleteData->stencilBuffer);
+        for (const auto& cur : dstFB->mColorDrawBuffers) {
+            const auto& format = fnGetFormat(cur, &dstHasSamples);
+            if (!format)
+                continue;
 
-        for (const auto& cur : dstFB->mResolvedCompleteData->colorDrawBuffers) {
-            fnCheckColorFormat(cur->Format()->format);
+            fnCheckColorFormat(format);
         }
+
+        dstDepthFormat = fnGetFormat(dstDepthAttach, &dstHasSamples);
+        dstStencilFormat = fnGetFormat(dstStencilAttach, &dstHasSamples);
     } else {
-        dstSampleBuffers = bool(gl->Screen()->Samples());
+        dstHasSamples = bool(gl->Screen()->Samples());
 
         const webgl::FormatInfo* dstColorFormat;
         GetBackbufferFormats(webgl, &dstColorFormat, &dstDepthFormat, &dstStencilFormat);
 
         fnCheckColorFormat(dstColorFormat);
     }
 
     ////
@@ -1767,43 +1785,43 @@ WebGLFramebuffer::BlitFramebuffer(WebGLC
      *   mask includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, and the source
      *   and destination depth and stencil buffer formats do not match.
      *
      * jgilbert: The wording is such that if only DEPTH_BUFFER_BIT is specified,
      * the stencil formats must match. This seems wrong. It could be a spec bug,
      * or I could be missing an interaction in one of the earlier paragraphs.
      */
     if (mask & LOCAL_GL_DEPTH_BUFFER_BIT &&
-        dstDepthFormat != srcDepthFormat)
+        dstDepthFormat && dstDepthFormat != srcDepthFormat)
     {
         webgl->ErrorInvalidOperation("%s: Depth buffer formats must match if selected.",
                                      funcName);
         return;
     }
 
     if (mask & LOCAL_GL_STENCIL_BUFFER_BIT &&
-        dstStencilFormat != srcStencilFormat)
+        dstStencilFormat && dstStencilFormat != srcStencilFormat)
     {
         webgl->ErrorInvalidOperation("%s: Stencil buffer formats must match if selected.",
                                      funcName);
         return;
     }
 
     ////
 
-    if (dstSampleBuffers) {
+    if (dstHasSamples) {
         webgl->ErrorInvalidOperation("%s: DRAW_FRAMEBUFFER may not have multiple"
                                      " samples.",
                                      funcName);
         return;
     }
 
-    if (srcSampleBuffers) {
+    if (srcHasSamples) {
         if (mask & LOCAL_GL_COLOR_BUFFER_BIT &&
-            !colorFormatsMatch)
+            dstHasColor && !colorFormatsMatch)
         {
             webgl->ErrorInvalidOperation("%s: Color buffer formats must match if"
                                          " selected, when reading from a multisampled"
                                          " source.",
                                          funcName);
             return;
         }
 
@@ -1821,37 +1839,35 @@ WebGLFramebuffer::BlitFramebuffer(WebGLC
 
     ////
     // Check for feedback
 
     if (srcFB && dstFB) {
         const WebGLFBAttachPoint* feedback = nullptr;
 
         if (mask & LOCAL_GL_COLOR_BUFFER_BIT) {
-            for (const auto& cur : dstFB->mResolvedCompleteData->colorDrawBuffers) {
-                if (srcFB->mColorReadBuffer->IsEquivalent(*cur)) {
+            MOZ_ASSERT(srcFB->mColorReadBuffer->IsDefined());
+            for (const auto& cur : dstFB->mColorDrawBuffers) {
+                if (srcFB->mColorReadBuffer->IsEquivalentForFeedback(*cur)) {
                     feedback = cur;
+                    break;
                 }
             }
         }
 
-        const auto& srcDepthBuffer = srcFB->mResolvedCompleteData->depthBuffer;
-        const auto& dstDepthBuffer = dstFB->mResolvedCompleteData->depthBuffer;
         if (mask & LOCAL_GL_DEPTH_BUFFER_BIT &&
-            srcDepthBuffer->IsEquivalent(*dstDepthBuffer))
+            srcDepthAttach->IsEquivalentForFeedback(*dstDepthAttach))
         {
-            feedback = dstDepthBuffer;
+            feedback = dstDepthAttach;
         }
 
-        const auto& srcStencilBuffer = srcFB->mResolvedCompleteData->stencilBuffer;
-        const auto& dstStencilBuffer = dstFB->mResolvedCompleteData->stencilBuffer;
         if (mask & LOCAL_GL_STENCIL_BUFFER_BIT &&
-            srcStencilBuffer->IsEquivalent(*dstStencilBuffer))
+            srcStencilAttach->IsEquivalentForFeedback(*dstStencilAttach))
         {
-            feedback = dstStencilBuffer;
+            feedback = dstStencilAttach;
         }
 
         if (feedback) {
             webgl->ErrorInvalidOperation("%s: Feedback detected into DRAW_FRAMEBUFFER's"
                                          " 0x%04x attachment.",
                                          funcName, feedback->mAttachmentPoint);
             return;
         }
--- a/dom/canvas/WebGLFramebuffer.h
+++ b/dom/canvas/WebGLFramebuffer.h
@@ -97,18 +97,19 @@ public:
     void Resolve(gl::GLContext* gl) const;
 
     JS::Value GetParameter(const char* funcName, WebGLContext* webgl, JSContext* cx,
                            GLenum target, GLenum attachment, GLenum pname,
                            ErrorResult* const out_error) const;
 
     void OnBackingStoreRespecified() const;
 
-    bool IsEquivalent(const WebGLFBAttachPoint& other) const {
-        MOZ_ASSERT(IsDefined() && other.IsDefined());
+    bool IsEquivalentForFeedback(const WebGLFBAttachPoint& other) const {
+        if (!IsDefined() || !other.IsDefined())
+            return false;
 
 #define _(X) X == other.X
         return ( _(mRenderbufferPtr) &&
                  _(mTexturePtr) &&
                  _(mTexImageTarget.get()) &&
                  _(mTexImageLevel) &&
                  _(mTexImageLayer) );
 #undef _
@@ -178,22 +179,16 @@ protected:
     ////
 
     std::vector<const WebGLFBAttachPoint*> mColorDrawBuffers; // Non-null
     const WebGLFBAttachPoint* mColorReadBuffer; // Null if NONE
 
     ////
 
     struct ResolvedData {
-        // BlitFramebuffer
-        bool hasSampleBuffers;
-        std::vector<const WebGLFBAttachPoint*> colorDrawBuffers; // Non-null, defined
-        const WebGLFBAttachPoint* depthBuffer; // null if not defined
-        const WebGLFBAttachPoint* stencilBuffer; // null if not defined
-
         // IsFeedback
         std::vector<const WebGLFBAttachPoint*> texDrawBuffers; // Non-null
         std::set<WebGLFBAttachPoint::Ordered> drawSet;
         std::set<WebGLFBAttachPoint::Ordered> readSet;
 
         explicit ResolvedData(const WebGLFramebuffer& parent);
     };
 
--- a/dom/gamepad/windows/WindowsGamepad.cpp
+++ b/dom/gamepad/windows/WindowsGamepad.cpp
@@ -324,30 +324,59 @@ public:
   decltype(HidP_GetUsages) *mHidP_GetUsages;
   decltype(HidP_GetUsageValue) *mHidP_GetUsageValue;
   decltype(HidP_GetScaledUsageValue) *mHidP_GetScaledUsageValue;
 
 private:
   HMODULE mModule;
 };
 
+HWND sHWnd = nullptr;
+
+static void
+DirectInputMessageLoopOnceCallback(nsITimer *aTimer, void* aClosure)
+{
+  MOZ_ASSERT(NS_GetCurrentThread() == gMonitorThread);
+  MSG msg;
+  while (PeekMessageW(&msg, sHWnd, 0, 0, PM_REMOVE) > 0) {
+    TranslateMessage(&msg);
+    DispatchMessage(&msg);
+  }
+  aTimer->Cancel();
+  if (!sIsShutdown) {
+    aTimer->InitWithFuncCallback(DirectInputMessageLoopOnceCallback,
+                                 nullptr, kWindowsGamepadPollInterval,
+                                 nsITimer::TYPE_ONE_SHOT);
+  }
+}
+
 class WindowsGamepadService
 {
  public:
   WindowsGamepadService()
   {
+    mDirectInputTimer = do_CreateInstance("@mozilla.org/timer;1");
     mXInputTimer = do_CreateInstance("@mozilla.org/timer;1");
     mDeviceChangeTimer = do_CreateInstance("@mozilla.org/timer;1");
   }
   virtual ~WindowsGamepadService()
   {
     Cleanup();
   }
 
   void DevicesChanged(bool aIsStablizing);
+
+  void StartMessageLoop()
+  {
+    MOZ_ASSERT(mDirectInputTimer);
+    mDirectInputTimer->InitWithFuncCallback(DirectInputMessageLoopOnceCallback,
+                                            nullptr, kWindowsGamepadPollInterval,
+                                            nsITimer::TYPE_ONE_SHOT);
+  }
+
   void Startup();
   void Shutdown();
   // Parse gamepad input from a WM_INPUT message.
   bool HandleRawInput(HRAWINPUT handle);
 
   static void XInputMessageLoopOnceCallback(nsITimer *aTimer, void* aClosure);
   static void DevicesChangeCallback(nsITimer *aTimer, void* aService);
 
@@ -368,16 +397,17 @@ class WindowsGamepadService
   void Cleanup();
 
   // List of connected devices.
   nsTArray<Gamepad> mGamepads;
 
   HIDLoader mHID;
   XInputLoader mXInput;
 
+  nsCOMPtr<nsITimer> mDirectInputTimer;
   nsCOMPtr<nsITimer> mXInputTimer;
   nsCOMPtr<nsITimer> mDeviceChangeTimer;
 };
 
 
 void
 WindowsGamepadService::ScanForRawInputDevices()
 {
@@ -887,16 +917,19 @@ WindowsGamepadService::Shutdown()
 {
   Cleanup();
 }
 
 void
 WindowsGamepadService::Cleanup()
 {
   mIsXInputMonitoring = false;
+  if (mDirectInputTimer) {
+    mDirectInputTimer->Cancel();
+  }
   if (mXInputTimer) {
     mXInputTimer->Cancel();
   }
   if (mDeviceChangeTimer) {
     mDeviceChangeTimer->Cancel();
   }
   mGamepads.Clear();
 }
@@ -909,18 +942,16 @@ WindowsGamepadService::DevicesChanged(bo
     mDeviceChangeTimer->InitWithFuncCallback(DevicesChangeCallback, this,
                                              kDevicesChangedStableDelay,
                                              nsITimer::TYPE_ONE_SHOT);
   } else {
     ScanForDevices();
   }
 }
 
-HWND sHWnd = nullptr;
-
 bool
 RegisterRawInput(HWND hwnd, bool enable)
 {
   nsTArray<RAWINPUTDEVICE> rid(ArrayLength(kUsagePages));
   rid.SetLength(ArrayLength(kUsagePages));
 
   for (unsigned i = 0; i < rid.Length(); i++) {
     rid[i].usUsagePage = kUsagePages[i].usagePage;
@@ -959,39 +990,16 @@ GamepadWindowProc(HWND hwnd, UINT msg, W
     if (gService) {
       gService->HandleRawInput(reinterpret_cast<HRAWINPUT>(lParam));
     }
     break;
   }
   return DefWindowProc(hwnd, msg, wParam, lParam);
 }
 
-class WindowGamepadMessageLoopOnceRunnable final : public Runnable
-{
-public:
-  WindowGamepadMessageLoopOnceRunnable() {}
-  NS_IMETHOD Run() override
-  {
-    MOZ_ASSERT(NS_GetCurrentThread() == gMonitorThread);
-    MSG msg;
-    while (PeekMessageW(&msg, sHWnd, 0, 0, PM_REMOVE) > 0) {
-      TranslateMessage(&msg);
-      DispatchMessage(&msg);
-    }
-    if (!sIsShutdown) {
-      nsCOMPtr<nsIRunnable> runnable = new WindowGamepadMessageLoopOnceRunnable();
-      NS_DelayedDispatchToCurrentThread(runnable.forget(),
-                                        kWindowsGamepadPollInterval);
-    }
-    return NS_OK;
-  }
-private:
-  ~WindowGamepadMessageLoopOnceRunnable() {}
-};
-
 class StartWindowsGamepadServiceRunnable final : public Runnable
 {
 public:
   StartWindowsGamepadServiceRunnable() {}
 
   NS_IMETHOD Run() override
   {
     MOZ_ASSERT(NS_GetCurrentThread() == gMonitorThread);
@@ -1012,17 +1020,17 @@ public:
 
       sHWnd = CreateWindowW(L"MozillaGamepadClass", L"Gamepad Watcher",
         0, 0, 0, 0, 0,
         nullptr, nullptr, hSelf, nullptr);
       RegisterRawInput(sHWnd, true);
     }
 
     // Explicitly start the message loop
-    NS_DispatchToCurrentThread(new WindowGamepadMessageLoopOnceRunnable());
+    gService->StartMessageLoop();
 
     return NS_OK;
   }
 private:
   ~StartWindowsGamepadServiceRunnable() {}
 };
 
 class StopWindowsGamepadServiceRunnable final : public Runnable
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -614,19 +614,19 @@ var interfaceNamesInGlobalScope =
     {name: "ImageCaptureErrorEvent", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "ImageData",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "InputEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "InstallTrigger",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "IntersectionObserver",
+    {name: "IntersectionObserver", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "IntersectionObserverEntry",
+    {name: "IntersectionObserverEntry", disabled: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "KeyEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "KeyboardEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "KeyframeEffectReadOnly", release: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "KeyframeEffect", release: false},
--- a/editor/libeditor/crashtests/crashtests.list
+++ b/editor/libeditor/crashtests/crashtests.list
@@ -1,10 +1,10 @@
 load 336081-1.xhtml
-asserts-if(stylo,2) load 336104.html # bug 1324669
+asserts-if(stylo,2-3) load 336104.html # bug 1324669
 skip-if(stylo) load 382527-1.html # bug 1323649
 load 382778-1.html
 asserts-if(stylo,1) load 402172-1.html # bug 1324663
 load 403965-1.xhtml
 load 407074-1.html
 load 407079-1.html
 load 407256-1.html
 load 407277-1.html
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -98,17 +98,17 @@ load 341382-1.html
 load 341382-2.html
 load 341858-1.html
 load 342145-1.xhtml
 asserts-if(stylo,6-16) load 343293-1.xhtml # bug 1324663
 asserts-if(stylo,3) load 343293-2.xhtml # bug 1324663
 load 343540-1.html
 load 344057-1.xhtml
 load 344064-1.html
-asserts-if(stylo,9) load 344300-1.html # bug 1324673
+asserts-if(stylo,1-9) load 344300-1.html # bug 1324673
 load 344300-2.html
 load 344340-1.xul
 load 347898-1.html
 load 348126-1.html
 load 348688-1.html
 load 348708-1.xhtml
 asserts(2) load 348729-1.html # bug 548836
 load 349095-1.xhtml
@@ -132,17 +132,17 @@ load 365909-2.xhtml
 skip-if(stylo) load 366128-1.xhtml # bug 1323654
 load 366271-1.html
 asserts-if(stylo,4) load 366967-1.html # bug 1324663
 asserts-if(stylo,1) load 367015-1.html # bug 1324663
 load 367243-1.html
 load 367498-1.html
 load 367498-2.html
 load 369176-1.html
-asserts-if(stylo,8-22) load 369547-1.html # bug 1324663
+asserts-if(stylo,0-22) load 369547-1.html # bug 1324663
 load 369547-2.html
 load 369945-1.xhtml
 load 371681-1.xhtml
 load 372237-1.html
 load 372475-1.xhtml
 load 372550-1.html
 load 372576.xul
 asserts-if(stylo,10-14) load 373628-1.html # bug 1324633
@@ -455,17 +455,17 @@ asserts-if(stylo,1) load 931450.html # b
 load 931460-1.html
 load 931464.html
 load 935765-1.html
 load 936988-1.html
 asserts-if(stylo,2) load 942690.html # bug 1324705
 load 973390-1.html
 load 1001237.html
 load 1009036.html
-load 1043163-1.html
+asserts-if(stylo,1) load 1043163-1.html # bug 1324647
 load 1061028.html
 asserts-if(stylo,3-4) load 1107508-1.html # bug 1324669
 load 1116104.html
 load 1127198-1.html
 skip-if(stylo) load 1140198.html # bug 1323662
 load 1143535.html
 pref(layout.css.grid.enabled,true) load 1156588.html
 load 1162813.xul
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -77,17 +77,17 @@ load 368568.html
 load 368752.html
 load 368860-1.html
 load 368863-1.html
 load 369038-1.xhtml
 load 369150-1.html
 load 369150-2.html
 load 369227-1.xhtml
 load 369542-1.html
-asserts-if(stylo,2) load 369542-2.html # bug 1324646
+load 369542-2.html
 load 369547-1.html
 load 370174-1.html
 load 370174-2.html
 load 370174-3.html
 load 370174-4.html
 asserts-if(stylo,4) load 370699-1.html # bug 1324633
 load 370794-1.html
 load 370866-1.xhtml
@@ -355,17 +355,17 @@ load 493111-1.html
 load 493118-1.html
 load 493649.html
 load 494283-1.xhtml
 load 494283-2.html
 load 494300-1.xul
 load 494332-1.html
 load 495875-1.html
 load 495875-2.html
-asserts-if(stylo,4-12) load 496742.html # bug 1324633
+asserts-if(stylo,4-14) load 496742.html # bug 1324633
 load 499138.html
 load 499857-1.html
 load 499862-1.html
 asserts(0-3) load 499885-1.xhtml # Bug 1220265
 asserts-if(stylo,8) load 501535-1.html # bug 1324671
 asserts-if(stylo,1) load 503961-1.xhtml # bug 1324663
 asserts-if(stylo,1) load 503961-2.html # bug 1324663
 load 505912-1.html
@@ -609,17 +609,17 @@ load 1229437-1.html
 load 1229437-2.html
 load details-containing-only-text.html
 load details-display-none-summary-1.html
 load details-display-none-summary-2.html
 load details-display-none-summary-3.html
 load details-open-overflow-auto.html
 load details-open-overflow-hidden.html
 load details-three-columns.html
-asserts-if(stylo,10) load first-letter-638937-1.html # bug 1324663
+load first-letter-638937-1.html
 load first-letter-638937-2.html
 load flex-nested-abspos-1.html
 pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) asserts(0-100) load font-inflation-762332.html # bug 762332
 load outline-on-frameset.xhtml
 load summary-position-out-of-flow.html
 asserts-if(stylo,1) load text-overflow-bug666751-1.html # bug 1324663
 asserts-if(stylo,1) load text-overflow-bug666751-2.html # bug 1324663
 load text-overflow-bug670564.xhtml
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5553,9 +5553,9 @@ pref("dom.storageManager.enabled", false
 // be blocked (automatically canceled) for that page. The counter resets
 // when the page is reloaded. To turn this feature off, just set the limit to 0.
 pref("prompts.authentication_dialog_abuse_limit", 3);
 
 // Enable the Storage management in about:preferences and persistent-storage permission request
 // To enable the DOM implementation, turn on "dom.storageManager.enabled"
 pref("browser.storageManager.enabled", false);
 
-pref("dom.IntersectionObserver.enabled", true);
+pref("dom.IntersectionObserver.enabled", false);
--- a/old-configure.in
+++ b/old-configure.in
@@ -41,17 +41,17 @@ dnl ====================================
 _SUBDIR_HOST_CFLAGS="$HOST_CFLAGS"
 _SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS"
 _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
 _SUBDIR_CONFIG_ARGS="$ac_configure_args"
 
 dnl Set the version number of the libs included with mozilla
 dnl ========================================================
 MOZJPEG=62
-MOZPNG=10625
+MOZPNG=10627
 NSPR_VERSION=4
 NSPR_MINVER=4.13.1
 NSS_VERSION=3
 
 dnl Set the minimum version of toolkit libs used by mozilla
 dnl ========================================================
 GLIB_VERSION=2.22
 # 2_26 is the earliest version we can set GLIB_VERSION_MIN_REQUIRED.