mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 541078 - Turn editing off in BeginLoad(). r=bzbarsky.
--HG-- extra : rebase_source : 8bb4f1acfb1659d55f48651ff5e236c964c2d01e
This commit is contained in:
parent
6e07d9b952
commit
1abf796204
@ -1069,6 +1069,21 @@ nsHTMLDocument::DocumentWriteTerminationFunc(nsISupports *aRef)
|
||||
htmldoc->EndLoad();
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLDocument::BeginLoad()
|
||||
{
|
||||
if (IsEditingOn()) {
|
||||
// Reset() blows away all event listeners in the document, and our
|
||||
// editor relies heavily on those. Midas is turned on, to make it
|
||||
// work, re-initialize it to give it a chance to add its event
|
||||
// listeners again.
|
||||
|
||||
TurnEditingOff();
|
||||
EditingStateChanged();
|
||||
}
|
||||
nsDocument::BeginLoad();
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLDocument::EndLoad()
|
||||
{
|
||||
@ -1985,16 +2000,6 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
|
||||
mDocumentBaseURI = baseURI;
|
||||
}
|
||||
|
||||
if (IsEditingOn()) {
|
||||
// Reset() blows away all event listeners in the document, and our
|
||||
// editor relies heavily on those. Midas is turned on, to make it
|
||||
// work, re-initialize it to give it a chance to add its event
|
||||
// listeners again.
|
||||
|
||||
TurnEditingOff();
|
||||
EditingStateChanged();
|
||||
}
|
||||
|
||||
// Store the security info of the caller now that we're done
|
||||
// resetting the document.
|
||||
mSecurityInfo = securityInfo;
|
||||
|
@ -101,6 +101,8 @@ public:
|
||||
nsIContentSink* aSink = nsnull);
|
||||
virtual void StopDocumentLoad();
|
||||
|
||||
virtual void BeginLoad();
|
||||
|
||||
virtual void EndLoad();
|
||||
|
||||
virtual nsresult AddImageMap(nsIDOMHTMLMapElement* aMap);
|
||||
|
Loading…
Reference in New Issue
Block a user