From 18cceefcaa7f064f82692ebb0e3912acd279f432 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 12 Oct 2009 18:27:24 -0400 Subject: [PATCH] Bug 521525. Make sure to reflow kids with percentage heights if our computed height changes from specified to auto. r=dbaron --- layout/generic/nsHTMLReflowState.cpp | 3 ++- layout/reftests/bugs/521525-1-ref.html | 7 +++++++ layout/reftests/bugs/521525-1.html | 7 +++++++ layout/reftests/bugs/521525-2-ref.html | 7 +++++++ layout/reftests/bugs/521525-2.html | 7 +++++++ layout/reftests/bugs/521539-1-ref.html | 5 +++++ layout/reftests/bugs/521539-1.html | 5 +++++ layout/reftests/bugs/reftest.list | 3 +++ 8 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 layout/reftests/bugs/521525-1-ref.html create mode 100644 layout/reftests/bugs/521525-1.html create mode 100644 layout/reftests/bugs/521525-2-ref.html create mode 100644 layout/reftests/bugs/521525-2.html create mode 100644 layout/reftests/bugs/521539-1-ref.html create mode 100644 layout/reftests/bugs/521539-1.html diff --git a/layout/generic/nsHTMLReflowState.cpp b/layout/generic/nsHTMLReflowState.cpp index 2a9e2c10cdd..1153601258c 100644 --- a/layout/generic/nsHTMLReflowState.cpp +++ b/layout/generic/nsHTMLReflowState.cpp @@ -378,8 +378,9 @@ nsHTMLReflowState::InitResizeFlags(nsPresContext* aPresContext) mCBReflowState) { mFlags.mVResize = mCBReflowState->mFlags.mVResize; } else { - mFlags.mVResize = mFlags.mHResize || NS_SUBTREE_DIRTY(frame); + mFlags.mVResize = mFlags.mHResize; } + mFlags.mVResize = mFlags.mVResize || NS_SUBTREE_DIRTY(frame); } else { // not 'auto' height mFlags.mVResize = frame->GetSize().height != diff --git a/layout/reftests/bugs/521525-1-ref.html b/layout/reftests/bugs/521525-1-ref.html new file mode 100644 index 00000000000..6cdf049e9af --- /dev/null +++ b/layout/reftests/bugs/521525-1-ref.html @@ -0,0 +1,7 @@ + + + + +
+ + diff --git a/layout/reftests/bugs/521525-1.html b/layout/reftests/bugs/521525-1.html new file mode 100644 index 00000000000..82af745995d --- /dev/null +++ b/layout/reftests/bugs/521525-1.html @@ -0,0 +1,7 @@ + + + + +
+ + diff --git a/layout/reftests/bugs/521525-2-ref.html b/layout/reftests/bugs/521525-2-ref.html new file mode 100644 index 00000000000..a7f8ef488f2 --- /dev/null +++ b/layout/reftests/bugs/521525-2-ref.html @@ -0,0 +1,7 @@ + + + + +
+ + diff --git a/layout/reftests/bugs/521525-2.html b/layout/reftests/bugs/521525-2.html new file mode 100644 index 00000000000..6ffdd97efef --- /dev/null +++ b/layout/reftests/bugs/521525-2.html @@ -0,0 +1,7 @@ + + + + +
+ + diff --git a/layout/reftests/bugs/521539-1-ref.html b/layout/reftests/bugs/521539-1-ref.html new file mode 100644 index 00000000000..96c5cf5bd78 --- /dev/null +++ b/layout/reftests/bugs/521539-1-ref.html @@ -0,0 +1,5 @@ + + + + + diff --git a/layout/reftests/bugs/521539-1.html b/layout/reftests/bugs/521539-1.html new file mode 100644 index 00000000000..4ab25cda9d7 --- /dev/null +++ b/layout/reftests/bugs/521539-1.html @@ -0,0 +1,5 @@ + + + + + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 9527b6d0a53..7bc3c900eeb 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1325,5 +1325,8 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs == 513318-1.xul 513318-1-ref.xul != 513318-2.xul 513318-2-ref.xul != 513318-3.xul 513318-3-ref.xul +== 521525-1.html 521525-1-ref.html +== 521525-2.html 521525-2-ref.html +== 521539-1.html 521539-1-ref.html == 520421-1.html 520421-1-ref.html == 521685-1.html 521685-1-ref.html