зеркало из https://github.com/mozilla/gecko-dev.git
Fix problem in the formrewrite changes, the new code ends up doing a flush on the document from within DemoteContainer() in the sink which ends up notifying the document about some peices of content more than once. This causes duplicated content on some pages. r=jkeiser@iname.com. sr=myself.
This commit is contained in:
Родитель
b5ef014320
Коммит
0b2465e811
|
@ -1709,8 +1709,6 @@ SetDocumentInChildrenOf(nsIContent* aContent,
|
|||
nsresult
|
||||
SinkContext::DemoteContainer(const nsIParserNode& aNode)
|
||||
{
|
||||
mSink->mIsDemotingContainer = PR_TRUE;
|
||||
|
||||
nsresult result = NS_OK;
|
||||
nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType());
|
||||
|
||||
|
@ -1749,6 +1747,10 @@ SinkContext::DemoteContainer(const nsIParserNode& aNode)
|
|||
mSink->mInNotification--;
|
||||
}
|
||||
|
||||
// Set mIsDemotingContainer here so that the above FlushTags()
|
||||
// calls really flushes the tags.
|
||||
mSink->mIsDemotingContainer = PR_TRUE;
|
||||
|
||||
// Create a temp layoutHistoryState to store the childrens' state
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
nsCOMPtr<nsIPresContext> presContext;
|
||||
|
@ -2132,6 +2134,11 @@ SinkContext::AddText(const nsAReadableString& aText)
|
|||
nsresult
|
||||
SinkContext::FlushTags(PRBool aNotify)
|
||||
{
|
||||
// If we're demoting containers right now, don't flush.
|
||||
if (mSink->mIsDemotingContainer) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult result = NS_OK;
|
||||
|
||||
// Don't release last text node in case we need to add to it again
|
||||
|
|
Загрузка…
Ссылка в новой задаче