Bug 1322385 Part 1: Make BrowserUtils.shouldFastFind avoid triggering on iframes. r=mconley
authorBrad Werth <bwerth@mozilla.com>
Thu, 16 May 2019 18:32:29 +0000
changeset 533048 c3954692e846bb23528d8838ff736977e0e678f5
parent 533047 2968b165e90c0c0dd77eebc06d43a3255f1527c3
child 533049 b38eabe183170953e88e5a91d367ca2eb044e62f
push id11276
push userrgurzau@mozilla.com
push dateMon, 20 May 2019 13:11:24 +0000
treeherdermozilla-beta@847755a7c325 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1322385
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1322385 Part 1: Make BrowserUtils.shouldFastFind avoid triggering on iframes. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D28920
toolkit/modules/BrowserUtils.jsm
--- a/toolkit/modules/BrowserUtils.jsm
+++ b/toolkit/modules/BrowserUtils.jsm
@@ -300,16 +300,22 @@ var BrowserUtils = {
       if (elt.isContentEditable || win.document.designMode == "on")
         return false;
 
       if (elt instanceof win.HTMLTextAreaElement ||
           elt instanceof win.HTMLSelectElement ||
           elt instanceof win.HTMLObjectElement ||
           elt instanceof win.HTMLEmbedElement)
         return false;
+
+      if (elt instanceof win.HTMLIFrameElement && elt.mozbrowser) {
+        // If we're targeting a mozbrowser iframe, it should be allowed to
+        // handle FastFind itself.
+        return false;
+      }
     }
 
     return true;
   },
 
   /**
    * Returns true if we can show a find bar, including FAYT, for the specified
    * document location. The location must not be in a blacklist of specific