Merge inbound to mozilla-central a=merge
authorarthur.iakab <aiakab@mozilla.com>
Thu, 04 Apr 2019 19:08:32 +0300
changeset 467988 20ab49faf0e10232b3cc78249d4aa02e752c9293
parent 467987 aa623df2ae8f9b62bf02072dd00f50688def477f (current diff)
parent 467906 4f7bfdae524639e28a6e3d46bfc811251da84617 (diff)
child 467989 230bb363f2f35c8f435af1dd0889956f0df2007c
child 468028 220cb2c1a0e5d563cae87af10d3d675223b5398f
push id112667
push useraiakab@mozilla.com
push dateThu, 04 Apr 2019 16:12:45 +0000
treeherdermozilla-inbound@230bb363f2f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone68.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
Merge inbound to mozilla-central a=merge
dom/xbl/nsXBLService.cpp
--- a/dom/xbl/nsXBLService.cpp
+++ b/dom/xbl/nsXBLService.cpp
@@ -491,16 +491,18 @@ nsresult nsXBLService::LoadBindings(Elem
   nsCOMPtr<Document> document = aElement->OwnerDoc();
 
   nsAutoCString urlspec;
   nsresult rv = aURL->GetSpec(urlspec);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
+  AutoStyleElement styleElement(aElement, aResolveStyle);
+
   if (binding) {
     FlushStyleBindings(aElement);
     binding = nullptr;
   }
 
   bool ready;
   RefPtr<nsXBLBinding> newBinding;
   if (NS_FAILED(rv = GetBinding(aElement, aURL, false, aOriginPrincipal, &ready,
@@ -520,18 +522,16 @@ nsresult nsXBLService::LoadBindings(Elem
 #endif
     return NS_OK;
   }
 
   if (::IsAncestorBinding(document, aURL, aElement)) {
     return NS_ERROR_ILLEGAL_VALUE;
   }
 
-  AutoStyleElement styleElement(aElement, aResolveStyle);
-
   // We loaded a style binding.  It goes on the end.
   // Install the binding on the content node.
   aElement->SetXBLBinding(newBinding);
 
   {
     nsAutoScriptBlocker scriptBlocker;
 
     // Set the binding's bound element.
--- a/layout/base/tests/test_bug114649.html
+++ b/layout/base/tests/test_bug114649.html
@@ -15,53 +15,64 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script type="application/javascript">
 
 /** Test for Bug 114649 **/
 
 var gIFrame;
 var gCurrentWidth = 500;
 var gGotEventsAt = [];
 var gInterval;
+var gFinished = false;
 
 function run() {
     SimpleTest.waitForExplicitFinish();
-    SimpleTest.requestFlakyTimeout("untriaged");
+    SimpleTest.requestFlakyTimeout("Simulating dragging to resize a window");
 
     gIFrame = document.getElementById("display");
 
     var subdoc = gIFrame.contentDocument;
     subdoc.open();
-    subdoc.write("<body onresize='window.parent.handle_child_resize()'>");
+    subdoc.write("<body onresize='window.parent.handle_resize_event()'>");
     subdoc.close();
 
-    gInterval = window.setInterval(do_a_resize, 50);
+    setTimeout(do_a_resize, 50);
 }
 
 function do_a_resize()
 {
     // decrease the width by 10 until we hit 400, then stop
     gCurrentWidth -= 10;
     gIFrame.style.width = gCurrentWidth + "px";
 
+    if (gCurrentWidth > 400) {
+        setTimeout(do_a_resize, 50);
+    }
+}
+
+function handle_resize_event()
+{
+    gGotEventsAt.push(gCurrentWidth);
+
     if (gCurrentWidth == 400) {
-        window.clearInterval(gInterval);
-        window.setTimeout(check_for_resize_events, 250);
-        return;
+        check_resize_events();
     }
 }
 
-function handle_child_resize()
+function check_resize_events()
 {
-    gGotEventsAt.push(gCurrentWidth);
-}
-
-function check_for_resize_events()
-{
-	ok(gGotEventsAt.length >= 2, "got continuous events");
-	isnot(gGotEventsAt[0], 400, "got continuous events");
-	is(gGotEventsAt[gGotEventsAt.length - 1], 400, "got last event");
-	SimpleTest.finish();
+    if (gFinished) {
+        // We can get here when the browser can't process the resizes and
+        // dispatch resize events as fast as we're doing the resizing.  We can
+        // then end up with multiple resize events queued up after we set our
+        // final size.  This return makes sure that in that case we avoid
+        // calling SimpleTest.finish() more than once.
+        return;
+    }
+    gFinished = true;
+    ok(gGotEventsAt.length >= 2, "We should get more than one event");
+    isnot(gGotEventsAt[0], 400, "The first event shouldn't be for the final size");
+    SimpleTest.finish();
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -3200,17 +3200,18 @@ pref("layout.display-list.dump", false);
 pref("layout.display-list.dump-content", false);
 pref("layout.display-list.dump-parent", false);
 
 // Toggle retaining display lists between paints
 #if !defined(ANDROID)
 pref("layout.display-list.retain", true);
 pref("layout.display-list.retain.chrome", false);
 #else
-pref("layout.display-list.retain", false);
+pref("layout.display-list.retain", true);
+pref("layout.display-list.retain.chrome", true);
 #endif
 
 // Set the maximum amount of modified frames allowed before doing a full
 // display list rebuild.
 pref("layout.display-list.rebuild-frame-limit", 500);
 
 // pref to control whether layout warnings that are hit quite often are enabled
 pref("layout.spammy_warnings.enabled", false);
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/CSS2/backgrounds/background-attachment-applies-to-012.xht.ini
@@ -0,0 +1,3 @@
+[background-attachment-applies-to-012.xht]
+  expected:
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/CSS2/backgrounds/background-attachment-applies-to-014.xht.ini
@@ -0,0 +1,3 @@
+[background-attachment-applies-to-014.xht]
+  expected:
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL
--- a/testing/web-platform/meta/css/css-backgrounds/child-move-reveals-parent-background.html.ini
+++ b/testing/web-platform/meta/css/css-backgrounds/child-move-reveals-parent-background.html.ini
@@ -1,6 +1,7 @@
 [child-move-reveals-parent-background.html]
   expected:
     if not debug and not webrender and e10s and (os == "win") and (version == "10.0.17134") and (processor == "x86_64") and (bits == 64): FAIL
     if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
     if debug and not webrender and e10s and (os == "win") and (version == "10.0.17134") and (processor == "x86_64") and (bits == 64): FAIL
     if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
+    if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL