From f620f844c2102f12c2bc48a8c59fb7908188dbcd Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Tue, 4 May 2010 19:21:43 +0200 Subject: [PATCH] Layout the child unless the rects are exactly equal; both being empty does not count as equal here. b=563416 r=roc --- layout/xul/base/src/nsStackLayout.cpp | 2 +- layout/xul/test/Makefile.in | 1 + layout/xul/test/test_bug563416.html | 58 +++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 layout/xul/test/test_bug563416.html diff --git a/layout/xul/base/src/nsStackLayout.cpp b/layout/xul/base/src/nsStackLayout.cpp index 56abbfdbc2ed..187f6de2d662 100644 --- a/layout/xul/base/src/nsStackLayout.cpp +++ b/layout/xul/base/src/nsStackLayout.cpp @@ -279,7 +279,7 @@ nsStackLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) childRect.height = 0; nsRect oldRect(child->GetRect()); - PRBool sizeChanged = (oldRect != childRect); + PRBool sizeChanged = !oldRect.IsExactEqual(childRect); // only lay out dirty children or children whose sizes have changed if (sizeChanged || NS_SUBTREE_DIRTY(child)) { diff --git a/layout/xul/test/Makefile.in b/layout/xul/test/Makefile.in index a4e5602295bd..3465f0c55e5c 100644 --- a/layout/xul/test/Makefile.in +++ b/layout/xul/test/Makefile.in @@ -50,6 +50,7 @@ _TEST_FILES =\ test_bug394800.xhtml \ test_bug398982-1.xul \ test_bug398982-2.xul \ + test_bug563416.html \ $(NULL) libs:: $(_TEST_FILES) diff --git a/layout/xul/test/test_bug563416.html b/layout/xul/test/test_bug563416.html new file mode 100644 index 000000000000..363f34c92dab --- /dev/null +++ b/layout/xul/test/test_bug563416.html @@ -0,0 +1,58 @@ + + + + + Test for Bug 563416 + + + + + +Mozilla Bug 563416 +

+ +
+
+
+ +