Bug 77834: Fix problem where form control state is being restored to the wrong form control or not restored at all when going back and forth through session history. The problem was that the hash key we used was the content ID, which was not consistent from page load to page load. The fix was to key instead by index of form in document / index of control in form, with logic to fall back to content ID if we are unable to do this. r=nisheeth@netscape.com, sr=jst@netscape.com, a=drivers@mozilla.org (blizzard@mozilla.org)
git-svn-id: svn://10.0.0.236/trunk@96057 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2791,6 +2791,19 @@ HTMLContentSink::OpenHead(const nsIParserNode& aNode)
|
||||
SINK_TRACE_NODE(SINK_TRACE_CALLS,
|
||||
"HTMLContentSink::OpenHead", aNode, 0, this);
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// Flush everything in the current context so that we don't have
|
||||
// to worry about insertions resulting in inconsistent frame creation.
|
||||
//
|
||||
// Try to do this only if needed (costly), i.e., only if we are sure
|
||||
// we are changing contexts from some other context to the head.
|
||||
//
|
||||
// PERF: This call causes approximately a 2% slowdown in page load time
|
||||
// according to jrgm's page load tests, but seems to be a necessary evil
|
||||
if (mCurrentContext && (mCurrentContext != mHeadContext)) {
|
||||
mCurrentContext->FlushTags(PR_TRUE);
|
||||
}
|
||||
|
||||
if (nsnull == mHeadContext) {
|
||||
mHeadContext = new SinkContext(this);
|
||||
if (nsnull == mHeadContext) {
|
||||
|
||||
Reference in New Issue
Block a user