Bug 1679460 - Call Get/SetSelectionRange even when cached r=masayuki

No need to special case here as both already use cached selection. This makes it consistent with SetSelectionStart etc.

Differential Revision: https://phabricator.services.mozilla.com/D98185
This commit is contained in:
Kagami Sascha Rosylight
2020-12-02 19:26:49 +00:00
parent cf1b536d67
commit 3816a65f30
2 changed files with 14 additions and 6 deletions

View File

@@ -2212,11 +2212,6 @@ void TextControlState::SetSelectionDirection(const nsAString& aDirection,
nsITextControlFrame::SelectionDirection dir =
DirectionStringToSelectionDirection(aDirection);
if (IsSelectionCached()) {
GetSelectionProperties().SetDirection(dir);
return;
}
uint32_t start, end;
GetSelectionRange(&start, &end, aRv);
if (aRv.Failed()) {