From 7587dd2afc2eb45fa399ff91d70eb35562ab2274 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Wed, 29 Sep 2004 01:44:29 +0000 Subject: [PATCH] Bug 62384. Invalidate cached height when it's not equal to the current height. r+sr=roc, patch by Hideo Saito. git-svn-id: svn://10.0.0.236/trunk@162928 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsComboboxControlFrame.cpp | 5 +++++ mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index 10c4ef03735..3d04dc45765 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -1518,6 +1518,11 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext, size.height = firstPassState.mComputedHeight; } + if (mCacheSize.height != size.height) { + // if the cached height is not equal to the current height, + // the cached height is reset. + mCacheSize.height = kSizeNotSet; + } // this reflows and makes and last minute adjustments ReflowCombobox(aPresContext, firstPassState, aDesiredSize, aStatus, diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index 10c4ef03735..3d04dc45765 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -1518,6 +1518,11 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext, size.height = firstPassState.mComputedHeight; } + if (mCacheSize.height != size.height) { + // if the cached height is not equal to the current height, + // the cached height is reset. + mCacheSize.height = kSizeNotSet; + } // this reflows and makes and last minute adjustments ReflowCombobox(aPresContext, firstPassState, aDesiredSize, aStatus,