bug 146164: removing style can remove too much. r=glazman, sr=kin

This commit is contained in:
jfrancis%netscape.com 2002-06-12 14:04:47 +00:00
Родитель d134079d01
Коммит 955eda1dde
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -545,13 +545,10 @@ nsresult nsHTMLEditor::SplitStyleAboveRange(nsIDOMRange *inRange,
PRBool sameNode = (startNode==endNode);
// split any matching style nodes above the start of range
res = SplitStyleAbovePoint(address_of(startNode), &startOffset, aProperty, aAttribute);
if (NS_FAILED(res)) return res;
if (sameNode && (startNode != origStartNode))
{
// our startNode got split. This changes the offset of the end of our range.
endOffset -= origStartOffset;
nsAutoTrackDOMPoint tracker(mRangeUpdater, address_of(endNode), &endOffset);
res = SplitStyleAbovePoint(address_of(startNode), &startOffset, aProperty, aAttribute);
if (NS_FAILED(res)) return res;
}
// second verse, same as the first...