Bug 1492704 - 2. Don't update node during auto-fill focus event; r=droeh
authorJim Chen <nchen@mozilla.com>
Thu, 27 Sep 2018 10:59:50 -0400
changeset 486843 a44a660a15803c689e8b24245171ff38d363c5dc
parent 486842 bf4e7fd47d960061ebfd51accc1b1cb275944da9
child 486844 2188bef5515739adde624aa79b998ce72e4c90b7
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersdroeh
bugs1492704
milestone64.0a1
Bug 1492704 - 2. Don't update node during auto-fill focus event; r=droeh Don't update the focused node in the node cache during auto-fill focus events, because we don't necessarily know if the focused node should be in the node cahce (e.g. the focused node could be from another window than the one we're handling currently). Differential Revision: https://phabricator.services.mozilla.com/D6758
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
@@ -772,17 +772,16 @@ public class SessionAccessibility {
     /* package */ void onAutoFillFocus(final GeckoBundle message) {
         if (!Settings.isEnabled() || !(mView instanceof ViewParent) || mAutoFillNodes == null) {
             return;
         }
 
         final int id;
         if (message != null) {
             id = message.getInt("id");
-            mAutoFillNodes.put(id, message);
         } else {
             id = View.NO_ID;
         }
 
         if (DEBUG) {
             Log.d(LOGTAG, "onAutoFillFocus(" + id + ')');
         }
         if (mAutoFillFocusedId == id) {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
@@ -729,17 +729,16 @@ public final class SessionTextInput {
     /* package */ void onAutoFillFocus(@Nullable final GeckoBundle message) {
         if (mAutoFillRoots == null) {
             return;
         }
 
         final int id;
         if (message != null) {
             id = message.getInt("id");
-            mAutoFillNodes.put(id, message);
         } else {
             id = View.NO_ID;
         }
 
         if (DEBUG) {
             Log.d(LOGTAG, "onAutoFillFocus(" + id + ')');
         }
         if (mAutoFillFocusedId == id) {