diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp
index 9e05b6c0117..53c14726093 100644
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -882,6 +882,9 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
state.mComputedBorder.TopBottom();
aDesiredSize.mOverflowArea = nsRect(0, 0, aDesiredSize.width, aDesiredSize.height);
+
+ CheckInvalidateSizeChange(aDesiredSize);
+
FinishAndStoreOverflow(&aDesiredSize);
if (!InInitialReflow() && !mInner.mHadNonInitialReflow) {
diff --git a/layout/reftests/bugs/438537-1-ref.html b/layout/reftests/bugs/438537-1-ref.html
new file mode 100644
index 00000000000..16b8ce4724d
--- /dev/null
+++ b/layout/reftests/bugs/438537-1-ref.html
@@ -0,0 +1,10 @@
+
+
+
+ Testcase, bug 438537
+
+
+
+
+
+
diff --git a/layout/reftests/bugs/438537-1.html b/layout/reftests/bugs/438537-1.html
new file mode 100644
index 00000000000..169459ed540
--- /dev/null
+++ b/layout/reftests/bugs/438537-1.html
@@ -0,0 +1,18 @@
+
+
+
+ Testcase, bug 438537
+
+
+
+
+
+
+
diff --git a/layout/reftests/bugs/526463-1-ref.html b/layout/reftests/bugs/526463-1-ref.html
new file mode 100644
index 00000000000..caecd5e7202
--- /dev/null
+++ b/layout/reftests/bugs/526463-1-ref.html
@@ -0,0 +1,12 @@
+
+
+
+ Testcase, bug 526463
+
+
+
+ outer div
+
inner div
+
+
+
diff --git a/layout/reftests/bugs/526463-1.html b/layout/reftests/bugs/526463-1.html
new file mode 100644
index 00000000000..e7aec6bee5e
--- /dev/null
+++ b/layout/reftests/bugs/526463-1.html
@@ -0,0 +1,20 @@
+
+
+
+ Testcase, bug 526463
+
+
+
+
+ outer div
+
inner div
+
+
+
diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list
index 3695650125d..e1f0748dc80 100644
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1059,6 +1059,7 @@ fails == 428810-3e-rtl-insets.html 428810-empty-rtl-insets-ref.html # bug 179596
== 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
@@ -1340,6 +1341,7 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
== 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