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 02:21:13 +00:00
parent dabdc0abc8
commit b797dc2dbc
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()) {