Call CheckInvalidateSizeChange for nsHTMLScrollFrames. (Bug 438537) r=roc
authorL. David Baron <dbaron@dbaron.org>
Sun, 13 Dec 2009 19:40:55 -0800
changeset 35704 894a8e2bddb2d9b4163384baed20d180736bff80
parent 35703 038564bc6eb70b434e7cf5574615584b4e77cc47
child 35705 5b15b904bde9aefe0ec11e67595e2ad685681ae2
push id10686
push userdbaron@mozilla.com
push dateMon, 14 Dec 2009 03:43:27 +0000
treeherdermozilla-central@4700e3c42868 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs438537
milestone1.9.3a1pre
Call CheckInvalidateSizeChange for nsHTMLScrollFrames. (Bug 438537) r=roc
layout/generic/nsGfxScrollFrame.cpp
layout/reftests/bugs/438537-1-ref.html
layout/reftests/bugs/438537-1.html
layout/reftests/bugs/526463-1-ref.html
layout/reftests/bugs/526463-1.html
layout/reftests/bugs/reftest.list
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -877,16 +877,19 @@ nsHTMLScrollFrame::Reflow(nsPresContext*
   }
 
   aDesiredSize.width = state.mInsideBorderSize.width +
     state.mComputedBorder.LeftRight();
   aDesiredSize.height = state.mInsideBorderSize.height +
     state.mComputedBorder.TopBottom();
 
   aDesiredSize.mOverflowArea = nsRect(0, 0, aDesiredSize.width, aDesiredSize.height);
+
+  CheckInvalidateSizeChange(aDesiredSize);
+
   FinishAndStoreOverflow(&aDesiredSize);
 
   if (!InInitialReflow() && !mInner.mHadNonInitialReflow) {
     mInner.mHadNonInitialReflow = PR_TRUE;
     if (mInner.mIsRoot) {
       // For viewports, record whether we needed a vertical scrollbar
       // after the first non-initial reflow.
       mInner.SaveVScrollbarStateToGlobalHistory();
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/438537-1-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Testcase, bug 438537</title>
+  </head>
+  <body>
+    <div style="height:40px;border:solid 2px black;-moz-border-radius: 8px;overflow:hidden">
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/438537-1.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <head>
+    <title>Testcase, bug 438537</title>
+    <script>
+      window.addEventListener("MozReftestInvalidate",
+        function() {
+          var div = document.getElementById("div");
+          div.style.height = "40px";
+          document.documentElement.className = "";
+        }, false);
+    </script>
+  </head>
+  <body>
+    <div id="div" style="height:20px;border:solid 2px black;-moz-border-radius: 8px;overflow:hidden">
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/526463-1-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Testcase, bug 526463</title>
+  </head>
+  <body>
+    <div style="-moz-border-radius: 50px;overflow:hidden;background:gold">
+      outer div
+      <div>inner div</div>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/526463-1.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+  <head>
+    <title>Testcase, bug 526463</title>
+    <script>
+      window.addEventListener("MozReftestInvalidate",
+        function() {
+          var div = document.getElementById("div");
+          div.style.display = "";
+          document.documentElement.className = "";
+        }, false);
+    </script>
+  </head>
+  <body>
+    <div style="-moz-border-radius: 50px;overflow:hidden;background:gold">
+      outer div
+      <div id="div" style="display:none">inner div</div>
+    </div>
+  </body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1054,16 +1054,17 @@ fails == 428810-3e-rtl-insets.html 42881
 == 430412-1.html 430412-1-ref.html
 == 430813-1.html 430813-1-ref.html
 == 430813-2.html 430813-2-ref.html
 == 430813-3.html 430813-3-ref.html
 == 431341-1.html 431341-1-ref.html
 == 431341-2.html 431341-2-ref.html
 == 431520-1.html 431520-1-ref.html
 == 431948-1.html 431948-1-ref.html
+== 438537-1.html 438537-1-ref.html
 == 440112.html 440112-ref.html
 == 433640-1.html 433640-1-ref.html
 == 433700.html 433700-ref.html
 == 436356-1.html 436356-1-ref.html
 == 436356-2.html 436356-2-ref.html
 == 438981-1.xhtml about:blank
 == 438987-1.html 438987-1-ref.html
 == 438987-2a.html 438987-2-ref.html
@@ -1335,16 +1336,17 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") ==
 == 521525-1.html 521525-1-ref.html
 == 521525-2.html 521525-2-ref.html
 == 521539-1.html 521539-1-ref.html
 == 521542-1.xhtml 521542-1-ref.xhtml
 == 521685-1.html 521685-1-ref.html
 == 523096-1.html 523096-1-ref.html
 == 523468-1.html 523468-1-ref.html
 == 524175-1.html 524175-1-ref.html
+== 526463-1.html 526463-1-ref.html
 == 527464-1.html 527464-ref.html
 == 528038-1a.html 528038-1-ref.html
 == 528038-1b.html 528038-1-ref.html
 == 528038-1c.html 528038-1-ref.html
 == 528038-1d.html 528038-1-ref.html
 == 528038-1e.html 528038-1-ref.html
 == 528038-1f.html 528038-1-ref.html
 == 528038-2.html 528038-2-ref.html