Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 1907443004: Android: SELECT popups should not send notifications if a renderer asked to close it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put if-return in one line Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 554ab09cbff1b135b48e8de8b8445378ef5f9bec..9388031434b768b5b9d73a3a5127fa4257568f55 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -1476,7 +1476,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
private void hidePopups() {
hideSelectActionMode();
hidePastePopup();
- hideSelectPopup();
+ hideSelectPopupWithCancelMesage();
mPopupZoomer.hide(false);
if (mUnselectAllOnActionModeDismiss) dismissTextHandles();
}
@@ -2551,7 +2551,18 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
*/
@CalledByNative
private void hideSelectPopup() {
- if (mSelectPopup != null) mSelectPopup.hide();
+ if (mSelectPopup == null) return;
+ mSelectPopup.hide(false);
+ mSelectPopup = null;
+ mNativeSelectPopupSourceFrame = 0;
+ }
+
+ /**
+ * Called when the <select> popup needs to be hidden. This calls
+ * nativeSelectPopupMenuItems() with null indices.
+ */
+ private void hideSelectPopupWithCancelMesage() {
+ if (mSelectPopup != null) mSelectPopup.hide(true);
}
/**
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698