mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix for bug 401288 (Crash in Composer [@ PresShell::GetSelection][@ nsCOMArray_base::InsertObjectAt]). r/sr=bz, a=endgame.
This commit is contained in:
parent
b26ca6fd26
commit
86ecd29446
@ -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…
Reference in New Issue
Block a user