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

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

Issue 1923773002: Merge "Android: SELECT popups should not send notifications if a renderer asked to close it." to M5… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: 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 7d9e5c99b714864a67932719354b1b56675afd37..76ebbeb6ef00ab0051d733e51f134d7e003b0ab8 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
@@ -1471,7 +1471,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
private void hidePopups() {
hideSelectActionMode();
hidePastePopup();
- hideSelectPopup();
+ hideSelectPopupWithCancelMesage();
mPopupZoomer.hide(false);
if (mUnselectAllOnActionModeDismiss) dismissTextHandles();
}
@@ -2546,7 +2546,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