commit 3a5fb243e637a1c669efeac48649a4070e25fde5 Author: Ehsan Akhgari Date: Tue Jun 5 14:38:54 2012 -0400 Make sure to reflow when {min,max}-width changes diff --git a/layout/reftests/position-dynamic-changes/max-width-ref.html b/layout/reftests/position-dynamic-changes/max-width-ref.html new file mode 100644 index 0000000..d1f2edb --- /dev/null +++ b/layout/reftests/position-dynamic-changes/max-width-ref.html @@ -0,0 +1,10 @@ + + + + +
+
+ + diff --git a/layout/reftests/position-dynamic-changes/max-width.html b/layout/reftests/position-dynamic-changes/max-width.html new file mode 100644 index 0000000..e9ae39b --- /dev/null +++ b/layout/reftests/position-dynamic-changes/max-width.html @@ -0,0 +1,17 @@ + + + + + +
+
+ + diff --git a/layout/reftests/position-dynamic-changes/min-width-ref.html b/layout/reftests/position-dynamic-changes/min-width-ref.html new file mode 100644 index 0000000..7131d97 --- /dev/null +++ b/layout/reftests/position-dynamic-changes/min-width-ref.html @@ -0,0 +1,13 @@ + + + + +
+
+
+
+ + diff --git a/layout/reftests/position-dynamic-changes/min-width.html b/layout/reftests/position-dynamic-changes/min-width.html new file mode 100644 index 0000000..e6ac082 --- /dev/null +++ b/layout/reftests/position-dynamic-changes/min-width.html @@ -0,0 +1,20 @@ + + + + + +
+
+
+
+ + diff --git a/layout/reftests/position-dynamic-changes/reftest.list b/layout/reftests/position-dynamic-changes/reftest.list index b218e22..5f2175f 100644 --- a/layout/reftests/position-dynamic-changes/reftest.list +++ b/layout/reftests/position-dynamic-changes/reftest.list @@ -6,3 +6,5 @@ include relative/reftest.list == multiple-changes.html multiple-changes-ref.html == shrink-wrap.html shrink-wrap-ref.html +== max-width.html max-width-ref.html +== min-width.html min-width-ref.html diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 11defae..b7e2574 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -1174,7 +1174,9 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons // then return the respective hints so that we would hopefully be able to // avoid reflowing. if (mWidth == aOther.mWidth && - mHeight == aOther.mHeight) { + mHeight == aOther.mHeight && + mMinWidth == aOther.mMinWidth && + mMaxWidth == aOther.mMaxWidth) { // Note that it is possible that we'll need to reflow when processing // restyles, but we don't have enough information to make a good decision // right now.