Bug 1343037 part 7. Get rid of nsIDOMHTMLTextareaElement's selectionDirection attribute. r=ehsan

MozReview-Commit-ID: EQWxjgTdloR
This commit is contained in:
Boris Zbarsky 2017-03-09 14:44:04 -05:00
Родитель 5ae7da9d14
Коммит be3f78fea8
2 изменённых файлов: 6 добавлений и 25 удалений

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

@ -721,9 +721,8 @@ HTMLTextAreaElement::SetSelectionStart(const Nullable<uint32_t>& 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<uint32_t>& 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<uint32_t>& 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<uint32_t>& 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)

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

@ -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