(Fork) MR1 Fix for crash in <select> drop down

Bug 11653861

Apply a safe spot fix for class cast exception. This makes the select
dialog at least useable.

Change-Id: Idfcc62fac65bb34abbe8ba74b26a6a26c2b34035
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java b/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
index 360f928..0de8a70 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
@@ -81,8 +81,10 @@
             if (mItemEnabled[position] != POPUP_ITEM_TYPE_ENABLED) {
                 if (mItemEnabled[position] == POPUP_ITEM_TYPE_GROUP) {
                     // Currently select_dialog_multichoice & select_dialog_multichoice use
-                    // CheckedTextViews. If that changes, the class cast will no longer be valid.
-                    ((CheckedTextView) convertView).setCheckMarkDrawable(null);
+                    // CheckedTextViews in chrome but not in WebView.
+                    if (convertView instanceof CheckedTextView) {
+                        ((CheckedTextView) convertView).setCheckMarkDrawable(null);
+                    }
                 } else {
                     // Draw the disabled element in a disabled state.
                     convertView.setEnabled(false);