зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1343037 part 7. Get rid of nsIDOMHTMLTextareaElement's selectionDirection attribute. r=ehsan
MozReview-Commit-ID: EQWxjgTdloR
This commit is contained in:
Родитель
5ae7da9d14
Коммит
be3f78fea8
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче