Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 901a7c23 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Remove call to rebuildWebTextView from handling selection change.

The call was originally added to fix bug 2431351, where touching
a <textarea> sent a message with the new selection, but the UI
thread had not yet updated the WebTextView, so the new selection
was ignored.  However, since then,
https://android-git.corp.google.com/g/#change,45476 was submitted
to pass the selection and open the keyboard at the same time. So
when UPDATE_TEXT_SELECTION_MSG_ID is received, we no longer need
to worry about the case where the WebTextView is not set up yet.

Bug 2600847

Change-Id: I19eb102a7188e6edafaa5ac17b19ebd4ab5764f0
parent 3c0f1aed
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -6375,14 +6375,8 @@ public class WebView extends AbsoluteLayout
                    break;
                case REQUEST_KEYBOARD_WITH_SELECTION_MSG_ID:
                    displaySoftKeyboard(true);
                    updateTextSelectionFromMessage(msg.arg1, msg.arg2,
                            (WebViewCore.TextSelectionData) msg.obj);
                    break;
                    // fall through to UPDATE_TEXT_SELECTION_MSG_ID
                case UPDATE_TEXT_SELECTION_MSG_ID:
                    // If no textfield was in focus, and the user touched one,
                    // causing it to send this message, then WebTextView has not
                    // been set up yet.  Rebuild it so it can set its selection.
                    rebuildWebTextView();
                    updateTextSelectionFromMessage(msg.arg1, msg.arg2,
                            (WebViewCore.TextSelectionData) msg.obj);
                    break;