mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 08:40:56 +00:00
Fix for bug 401288 (Crash in Composer [@ PresShell::GetSelection][@ nsCOMArray_base::InsertObjectAt]). r/sr=bz, a=endgame.
This commit is contained in:
parent
b62c7f8b03
commit
9d8d683515
@ -3737,7 +3737,7 @@ nsHTMLDocument::EndUpdate(nsUpdateType aUpdateType)
|
||||
{
|
||||
nsDocument::EndUpdate(aUpdateType);
|
||||
|
||||
if (mUpdateNestLevel == 0 && EditingShouldBeOn() != IsEditingOn()) {
|
||||
if (mUpdateNestLevel == 0 && mContentEditableCount > 0 != IsEditingOn()) {
|
||||
EditingStateChanged();
|
||||
}
|
||||
}
|
||||
@ -3752,7 +3752,7 @@ nsHTMLDocument::ChangeContentEditableCount(nsIContent *aElement,
|
||||
mContentEditableCount += aChange;
|
||||
|
||||
if (mParser ||
|
||||
(mUpdateNestLevel > 0 && EditingShouldBeOn() != IsEditingOn())) {
|
||||
(mUpdateNestLevel > 0 && mContentEditableCount > 0 != IsEditingOn())) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -212,15 +212,6 @@ public:
|
||||
mDisableCookieAccess = PR_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the document should be editable. This can be different from
|
||||
* IsEditingOn() (for example if we're delaying turning the editor on/off).
|
||||
*/
|
||||
PRBool EditingShouldBeOn()
|
||||
{
|
||||
return HasFlag(NODE_IS_EDITABLE) || mContentEditableCount > 0;
|
||||
}
|
||||
|
||||
void EndUpdate(nsUpdateType aUpdateType);
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsHTMLDocument, nsDocument)
|
||||
|
Loading…
x
Reference in New Issue
Block a user