mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix for bug 395340 (Crash [@ nsINode::GetNodeParent] with CSS counters and contentEditable). r/sr=bz, a=endgame.
This commit is contained in:
parent
7da74668a1
commit
c22071e55e
@ -792,6 +792,9 @@ protected:
|
||||
|
||||
nsString mBaseTarget;
|
||||
|
||||
// Our update nesting level
|
||||
PRUint32 mUpdateNestLevel;
|
||||
|
||||
private:
|
||||
friend class nsUnblockOnloadEvent;
|
||||
|
||||
@ -833,9 +836,6 @@ private:
|
||||
|
||||
// Member to store out last-selected stylesheet set.
|
||||
nsString mLastStyleSheetSet;
|
||||
|
||||
// Our update nesting level
|
||||
PRUint32 mUpdateNestLevel;
|
||||
};
|
||||
|
||||
|
||||
|
@ -3732,6 +3732,16 @@ nsHTMLDocument::GetDesignMode(nsAString & aDesignMode)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLDocument::EndUpdate(nsUpdateType aUpdateType)
|
||||
{
|
||||
nsDocument::EndUpdate(aUpdateType);
|
||||
|
||||
if (mUpdateNestLevel == 0 && EditingShouldBeOn() != IsEditingOn()) {
|
||||
EditingStateChanged();
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLDocument::ChangeContentEditableCount(nsIContent *aElement,
|
||||
PRInt32 aChange)
|
||||
@ -3741,7 +3751,8 @@ nsHTMLDocument::ChangeContentEditableCount(nsIContent *aElement,
|
||||
|
||||
mContentEditableCount += aChange;
|
||||
|
||||
if (mParser) {
|
||||
if (mParser ||
|
||||
(mUpdateNestLevel > 0 && EditingShouldBeOn() != IsEditingOn())) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -212,6 +212,17 @@ 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)
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user