Bug 358106: Make ranges use nsIMutationObserver rather than their own notification system. r/sr=jst

git-svn-id: svn://10.0.0.236/trunk@214666 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cvshook%sicking.cc
2006-11-03 21:51:01 +00:00
parent de00af7251
commit 78a449be36
24 changed files with 243 additions and 791 deletions

View File

@@ -460,12 +460,6 @@ nsGenericDOMDataNode::SetTextInternal(PRUint32 aOffset, PRUint32 aCount,
SetBidiStatus();
// inform any enclosed ranges of change
const nsVoidArray *rangeList = GetRangeList();
if (rangeList) {
nsRange::TextOwnerChanged(this, rangeList, aOffset, endOffset, aLength);
}
// Notify observers
if (aNotify) {
if (haveMutationListeners) {
@@ -481,7 +475,13 @@ nsGenericDOMDataNode::SetTextInternal(PRUint32 aOffset, PRUint32 aCount,
nsEventDispatcher::Dispatch(this, nsnull, &mutation);
}
nsNodeUtils::CharacterDataChanged(this, aOffset == textLength);
CharacterDataChangeInfo info = {
aOffset == textLength,
aOffset,
endOffset,
aLength
};
nsNodeUtils::CharacterDataChanged(this, &info);
}
return NS_OK;