Merge pull request #2231 from brendandahl/enable-iframe-find

Only use the integrated find if we aren't in an frame.
This commit is contained in:
Yury Delendik 2012-10-10 17:44:21 -07:00
commit 15f0e58b4f

View File

@ -343,7 +343,10 @@ ChromeActions.prototype = {
return getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false);
},
supportsIntegratedFind: function() {
return 'updateControlState' in getChromeWindow(this.domWindow).gFindBar;
// Integrated find is only supported when we're not in a frame and when the
// new find events code exists.
return this.domWindow.frameElement === null &&
'updateControlState' in getChromeWindow(this.domWindow).gFindBar;
},
fallback: function(url, sendResponse) {
var self = this;