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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user