massive checkin for selection. adjusting nsIDOMSelection api and nsIFrameSelection. many "small" changes. this is not as bad as it looks. layout will not be affected other than "getter" calls for selection. and all consumers of selection should be in good shape.
git-svn-id: svn://10.0.0.236/trunk@39971 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -61,9 +61,9 @@ NS_IMETHODIMP DeleteTableRowTxn::Do(void)
|
||||
nsresult res = NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMSelection> selection;
|
||||
res = mPresShell->GetSelection(getter_AddRefs(selection));
|
||||
res = mPresShell->GetSelection(SELECTION_NORMAL, getter_AddRefs(selection));
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
res = selection->Collapse(mElement, 0 /*mOffset+1*/ /*+mStringToInsert.Length()*/, SELECTION_NORMAL);
|
||||
res = selection->Collapse(mElement, 0 /*mOffset+1*/ /*+mStringToInsert.Length()*/);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -77,9 +77,9 @@ NS_IMETHODIMP DeleteTableRowTxn::Undo(void)
|
||||
if (NS_SUCCEEDED(result))
|
||||
{ // set the selection to the insertion point where the string was removed
|
||||
nsCOMPtr<nsIDOMSelection> selection;
|
||||
result = mPresShell->GetSelection(getter_AddRefs(selection));
|
||||
result = mPresShell->GetSelection(SELECTION_NORMAL, getter_AddRefs(selection));
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
result = selection->Collapse(mElement, mOffset, SELECTION_NORMAL);
|
||||
result = selection->Collapse(mElement, mOffset);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user