зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1447889 part 10. Remove nsIDOMRange::DeleteContents. r=mystor
MozReview-Commit-ID: IoXz0pS6zAa
This commit is contained in:
Родитель
1731f12f9d
Коммит
86c4629290
|
@ -2401,12 +2401,6 @@ nsRange::CutContents(DocumentFragment** aFragment)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRange::DeleteContents()
|
||||
{
|
||||
return CutContents(nullptr);
|
||||
}
|
||||
|
||||
void
|
||||
nsRange::DeleteContents(ErrorResult& aRv)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,6 @@ interface nsIDOMRange : nsISupports
|
|||
void setEndBefore(in nsIDOMNode refNode);
|
||||
void setEndAfter(in nsIDOMNode refNode);
|
||||
|
||||
void deleteContents();
|
||||
nsIDOMDocumentFragment extractContents();
|
||||
nsIDOMDocumentFragment cloneContents();
|
||||
void insertNode(in nsIDOMNode newNode);
|
||||
|
|
|
@ -2839,8 +2839,6 @@ nsFrameSelection::SetAncestorLimiter(nsIContent *aLimiter)
|
|||
nsresult
|
||||
nsFrameSelection::DeleteFromDocument()
|
||||
{
|
||||
nsresult res;
|
||||
|
||||
// If we're already collapsed, then we do nothing (bug 719503).
|
||||
bool isCollapsed;
|
||||
int8_t index = GetIndexFromSelectionType(SelectionType::eNormal);
|
||||
|
@ -2856,9 +2854,11 @@ nsFrameSelection::DeleteFromDocument()
|
|||
RefPtr<Selection> selection = mDomSelections[index];
|
||||
for (uint32_t rangeIdx = 0; rangeIdx < selection->RangeCount(); ++rangeIdx) {
|
||||
RefPtr<nsRange> range = selection->GetRangeAt(rangeIdx);
|
||||
res = range->DeleteContents();
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
ErrorResult res;
|
||||
range->DeleteContents(res);
|
||||
if (res.Failed()) {
|
||||
return res.StealNSResult();
|
||||
}
|
||||
}
|
||||
|
||||
// Collapse to the new location.
|
||||
|
|
Загрузка…
Ссылка в новой задаче