Bug 876074: Soften flexbox assertion about out-of-order children, since it's not dangerous and it can be triggered by unrelated-to-flexbox tree mutations. r=bz
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 28 May 2013 09:39:02 -0700
changeset 133151 c1f64bd309b6da45e3c7897ab8ce7cc4cd683956
parent 133150 3cfe90065d890879bedff14e606778af125608bb
child 133152 c8005d83cbf4f3efec266bc5cf9968b912af3c93
push id28624
push userdholbert@mozilla.com
push dateTue, 28 May 2013 16:54:48 +0000
treeherdermozilla-inbound@c1f64bd309b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs876074
milestone24.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 876074: Soften flexbox assertion about out-of-order children, since it's not dangerous and it can be triggered by unrelated-to-flexbox tree mutations. r=bz
layout/generic/crashtests/876074-1.html
layout/generic/crashtests/crashtests.list
layout/generic/nsFlexContainerFrame.cpp
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/876074-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<script>
+
+function boom()
+{
+    document.getElementById("c").style.content = "'x'";
+}
+
+</script>
+</head>
+
+<body style="display: inline-flex;" onload="boom();"><div></div><div style="display: table-caption;"></div><canvas id="c"></canvas></body>
+
+</html>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -491,8 +491,9 @@ load 847208.html
 asserts(4) load 847209.html # bug 847368
 test-pref(layout.css.flexbox.enabled,true) load 847211-1.html
 load 849603.html
 test-pref(layout.css.flexbox.enabled,true) load 851396-1.html
 test-pref(layout.css.flexbox.enabled,true) load 854263-1.html
 test-pref(layout.css.flexbox.enabled,true) load 862947-1.html
 needs-focus pref(accessibility.browsewithcaret,true) load 868906.html
 test-pref(layout.css.flexbox.enabled,true) load 866547-1.html
+asserts(1-4) test-pref(layout.css.flexbox.enabled,true) load 876074-1.html # bug 876749
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1133,18 +1133,19 @@ GetDisplayFlagsForFlexItem(nsIFrame* aFr
   return nsIFrame::DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT;
 }
 
 void
 nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                        const nsRect&           aDirtyRect,
                                        const nsDisplayListSet& aLists)
 {
-  MOZ_ASSERT(nsLayoutUtils::IsFrameListSorted<IsOrderLEQWithDOMFallback>(mFrames),
-             "Frame list should've been sorted in reflow");
+  NS_ASSERTION(
+    nsLayoutUtils::IsFrameListSorted<IsOrderLEQWithDOMFallback>(mFrames),
+    "Child frames aren't sorted correctly");
 
   DisplayBorderBackgroundOutline(aBuilder, aLists);
 
   // Our children are all block-level, so their borders/backgrounds all go on
   // the BlockBorderBackgrounds list.
   nsDisplayListSet childLists(aLists, aLists.BlockBorderBackgrounds());
   for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
     BuildDisplayListForChild(aBuilder, e.get(), aDirtyRect, childLists,