Bug 1464165 - Relax assertion for isize not being nscoord_MAX in nsListControlFrame. r=dholbert draft
authorMihir Iyer <miyer@mozilla.com>
Tue, 29 May 2018 17:14:27 -0700
changeset 801748 e823da407c01
parent 800719 35aa0dde259f
child 801750 8bb05dc021c3
push id111725
push userbmo:miyer@mozilla.com
push dateWed, 30 May 2018 17:59:18 +0000
reviewersdholbert
bugs1464165
milestone62.0a1
Bug 1464165 - Relax assertion for isize not being nscoord_MAX in nsListControlFrame. r=dholbert MozReview-Commit-ID: A9PRG3uI2h
layout/forms/crashtests/1464165-1.html
layout/forms/crashtests/crashtests.list
layout/forms/nsListControlFrame.cpp
new file mode 100644
--- /dev/null
+++ b/layout/forms/crashtests/1464165-1.html
@@ -0,0 +1,14 @@
+<html>
+  <head>
+    <script>
+      function start () {
+        try { o1 = document.createElementNS('http://www.w3.org/1999/xhtml', 'select') } catch(e) { }
+        try { o2 = document.createElementNS('http://www.w3.org/1999/xhtml', 'style') } catch(e) { }
+        try { document.documentElement.appendChild(o1) } catch(e) { }
+        try { document.documentElement.appendChild(o2) } catch(e) { }
+        try { o2.sheet.insertRule('* { border-left: green; -moz-padding-start: 5% !important; padding: 171798691; -moz-border-end: solid;', 0) } catch(e) { }
+      }
+      document.addEventListener('DOMContentLoaded', start)
+    </script>
+  </head>
+</html>
--- a/layout/forms/crashtests/crashtests.list
+++ b/layout/forms/crashtests/crashtests.list
@@ -68,8 +68,9 @@ load 1212688.html
 load 1228670.xhtml
 load 1279354.html
 load 1388230-1.html
 load 1388230-2.html
 load 1405830.html
 load 1418477.html
 load 1432853.html
 asserts(2-4) load 1460787-1.html
+load 1464165-1.html
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -363,18 +363,18 @@ nsListControlFrame::GetMinISize(gfxConte
 
 void
 nsListControlFrame::Reflow(nsPresContext*           aPresContext,
                            ReflowOutput&     aDesiredSize,
                            const ReflowInput& aReflowInput,
                            nsReflowStatus&          aStatus)
 {
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
-  MOZ_ASSERT(aReflowInput.ComputedISize() != NS_UNCONSTRAINEDSIZE,
-             "Must have a computed inline size");
+  NS_WARNING_ASSERTION(aReflowInput.ComputedISize() != NS_UNCONSTRAINEDSIZE,
+                       "Must have a computed inline size");
 
   SchedulePaint();
 
   mHasPendingInterruptAtStartOfReflow = aPresContext->HasPendingInterrupt();
 
   // If all the content and frames are here
   // then initialize it before reflow
   if (mIsAllContentHere && !mHasBeenInitialized) {