From 039c96fb5268071884f5c29ac40da860bac2e389 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Wed, 3 Oct 2007 02:04:59 +0000 Subject: [PATCH] Make sure to restore state on form-less controls correctly. Bug 398243, r+sr+a=jst --- content/base/src/nsContentUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 9b677227e6c..509db75b888 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -1756,9 +1756,9 @@ nsContentUtils::GenerateStateKey(nsIContent* aContent, // Hash by index of control in doc (we are not in a form) // These are important as they are unique, and type/name may not be. - // Note that we've already flushed content, so there's no - // reason to flush it again. - index = htmlFormControls->IndexOf(aContent, PR_FALSE); + // We have to flush sink notifications at this point to make + // sure that htmlFormControls is up to date. + index = htmlFormControls->IndexOf(aContent, PR_TRUE); if (index > -1) { KeyAppendInt(index, aKey); generatedUniqueKey = PR_TRUE;