diff --git a/dom/html/HTMLTextAreaElement.cpp b/dom/html/HTMLTextAreaElement.cpp index 937696726f28..5d55547abdd4 100644 --- a/dom/html/HTMLTextAreaElement.cpp +++ b/dom/html/HTMLTextAreaElement.cpp @@ -721,9 +721,8 @@ HTMLTextAreaElement::SetSelectionStart(const Nullable& aSelectionStart } nsAutoString direction; - nsresult rv = GetSelectionDirection(direction); - if (NS_FAILED(rv)) { - aError.Throw(rv); + GetSelectionDirection(direction, aError); + if (aError.Failed()) { return; } int32_t start, end; @@ -735,7 +734,7 @@ HTMLTextAreaElement::SetSelectionStart(const Nullable& aSelectionStart if (end < start) { end = start; } - rv = SetSelectionRange(start, end, direction); + nsresult rv = SetSelectionRange(start, end, direction); if (NS_FAILED(rv)) { aError.Throw(rv); } @@ -764,9 +763,8 @@ HTMLTextAreaElement::SetSelectionEnd(const Nullable& aSelectionEnd, } nsAutoString direction; - nsresult rv = GetSelectionDirection(direction); - if (NS_FAILED(rv)) { - aError.Throw(rv); + GetSelectionDirection(direction, aError); + if (aError.Failed()) { return; } int32_t start, end; @@ -778,7 +776,7 @@ HTMLTextAreaElement::SetSelectionEnd(const Nullable& aSelectionEnd, if (start > end) { start = end; } - rv = SetSelectionRange(start, end, direction); + nsresult rv = SetSelectionRange(start, end, direction); if (NS_FAILED(rv)) { aError.Throw(rv); } @@ -806,14 +804,6 @@ DirectionToName(nsITextControlFrame::SelectionDirection dir, nsAString& aDirecti } } -nsresult -HTMLTextAreaElement::GetSelectionDirection(nsAString& aDirection) -{ - ErrorResult error; - GetSelectionDirection(aDirection, error); - return error.StealNSResult(); -} - void HTMLTextAreaElement::GetSelectionDirection(nsAString& aDirection, ErrorResult& aError) { @@ -836,14 +826,6 @@ HTMLTextAreaElement::GetSelectionDirection(nsAString& aDirection, ErrorResult& a aError.Throw(rv); } -NS_IMETHODIMP -HTMLTextAreaElement::SetSelectionDirection(const nsAString& aDirection) -{ - ErrorResult error; - SetSelectionDirection(aDirection, error); - return error.StealNSResult(); -} - void HTMLTextAreaElement::SetSelectionDirection(const nsAString& aDirection, ErrorResult& aError) diff --git a/dom/interfaces/html/nsIDOMHTMLTextAreaElement.idl b/dom/interfaces/html/nsIDOMHTMLTextAreaElement.idl index 6e1d324bd672..38bdfd3a4f47 100644 --- a/dom/interfaces/html/nsIDOMHTMLTextAreaElement.idl +++ b/dom/interfaces/html/nsIDOMHTMLTextAreaElement.idl @@ -55,7 +55,6 @@ interface nsIDOMHTMLTextAreaElement : nsISupports void select(); void setSelectionRange(in long selectionStart, in long selectionEnd, [optional] in DOMString direction); - attribute DOMString selectionDirection; // Mozilla extensions