mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-07 11:56:51 +00:00
Make nsHTMLContentSink respond to BeginUpdate and EndUpdate even when not in
script, since the script could be running in some other frame/window. Removes mInScript, since it's no longer used. Bug 155504, r=heikki, sr=jst
This commit is contained in:
parent
6895b31905
commit
724a6d8835
@ -301,7 +301,6 @@ public:
|
||||
#endif
|
||||
|
||||
PRBool IsTimeToNotify();
|
||||
PRBool IsInScript();
|
||||
|
||||
nsresult SetDocumentTitle(const nsAString& aTitle);
|
||||
nsresult AddAttributes(const nsIParserNode& aNode, nsIHTMLContent* aContent,
|
||||
@ -376,7 +375,6 @@ public:
|
||||
PRPackedBool mScrolledToRefAlready;
|
||||
PRPackedBool mNeedToBlockParser;
|
||||
|
||||
PRInt32 mInScript;
|
||||
PRInt32 mInNotification;
|
||||
nsCOMPtr<nsIDOMHTMLFormElement> mCurrentForm;
|
||||
nsCOMPtr<nsIHTMLContent> mCurrentMap;
|
||||
@ -5391,7 +5389,7 @@ HTMLContentSink::BeginUpdate(nsIDocument *aDocument)
|
||||
// notification to occur. Since this could result in frame
|
||||
// creation, make sure we've flushed everything before we
|
||||
// continue
|
||||
if (mInScript && !mInNotification && mCurrentContext) {
|
||||
if (!mInNotification && mCurrentContext) {
|
||||
result = mCurrentContext->FlushTags(PR_TRUE);
|
||||
}
|
||||
|
||||
@ -5406,7 +5404,7 @@ HTMLContentSink::EndUpdate(nsIDocument *aDocument)
|
||||
// something else in the script processing caused the
|
||||
// notification to occur. Update our notion of how much
|
||||
// has been flushed to include any new content.
|
||||
if (mInScript && !mInNotification) {
|
||||
if (!mInNotification) {
|
||||
UpdateAllContexts();
|
||||
}
|
||||
|
||||
@ -5515,25 +5513,15 @@ HTMLContentSink::PreEvaluateScript()
|
||||
mCurrentContext->FlushTags(PR_FALSE);
|
||||
mCurrentContext->SetPreAppend(PR_TRUE);
|
||||
|
||||
mInScript++;
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLContentSink::PostEvaluateScript()
|
||||
{
|
||||
mInScript--;
|
||||
|
||||
mCurrentContext->SetPreAppend(PR_FALSE);
|
||||
}
|
||||
|
||||
PRBool
|
||||
HTMLContentSink::IsInScript()
|
||||
{
|
||||
return mInScript > 0;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLContentSink::ScriptAvailable(nsresult aResult,
|
||||
nsIDOMHTMLScriptElement *aElement,
|
||||
|
Loading…
Reference in New Issue
Block a user