Bug 42892: Split FlushPendingNotifications in to content and content+frames cases (speed up content list access), r=jst@netscape.com, sr=vidur@netscape.com

git-svn-id: svn://10.0.0.236/trunk@86318 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pollmann%netscape.com
2001-02-06 05:46:46 +00:00
parent 31c1059829
commit 2d0d3de45d
16 changed files with 58 additions and 60 deletions

View File

@@ -125,7 +125,7 @@ static PRBool gPlugDetector = PR_FALSE;
#include "prmem.h"
#include "prtime.h"
// Find/Serach Includes
// Find/Search Includes
const PRInt32 kForward = 0;
const PRInt32 kBackward = 1;
@@ -1348,7 +1348,7 @@ nsHTMLDocument::ContentRemoved(nsIContent* aContainer,
}
NS_IMETHODIMP
nsHTMLDocument::FlushPendingNotifications()
nsHTMLDocument::FlushPendingNotifications(PRBool aFlushReflows)
{
// Determine if it is safe to flush the sink
// by determining if it safe to flush all the presshells.
@@ -1356,8 +1356,8 @@ nsHTMLDocument::FlushPendingNotifications()
PRInt32 i = 0, n = mPresShells.Count();
while ((i < n) && (isSafeToFlush)) {
nsIPresShell* shell = NS_STATIC_CAST(nsIPresShell*, mPresShells[i]);
if (nsnull != shell) {
nsresult rv = shell->IsSafeToFlush(isSafeToFlush);
if (shell) {
shell->IsSafeToFlush(isSafeToFlush);
}
i++;
}
@@ -1373,7 +1373,7 @@ nsHTMLDocument::FlushPendingNotifications()
}
}
if (NS_SUCCEEDED(result)) {
result = nsDocument::FlushPendingNotifications();
result = nsDocument::FlushPendingNotifications(aFlushReflows);
}
return result;
@@ -2229,9 +2229,6 @@ nsHTMLDocument::WriteCommon(const nsAReadableString& aText,
NS_ConvertASCIItoUCS2("text/html"), PR_FALSE,
(!mIsWriting || (mWriteLevel > 1)));
mWriteLevel--;
if (NS_OK != result) {
return result;
}
return result;
}
@@ -2256,7 +2253,6 @@ nsHTMLDocument::ScriptWriteCommon(JSContext *cx,
{
nsresult result = NS_OK;
nsXPIDLCString spec;
if (!mDocumentURL ||
(NS_SUCCEEDED(mDocumentURL->GetSpec(getter_Copies(spec))) &&
@@ -2327,9 +2323,6 @@ nsHTMLDocument::ScriptWriteCommon(JSContext *cx,
NS_ConvertASCIItoUCS2("text/html"), PR_FALSE,
(!mIsWriting || (mWriteLevel > 1)));
mWriteLevel--;
if (NS_OK != result) {
return result;
}
}
return result;