Bug 564505 - Form helper badly functioning on translate.google.com [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Thu, 20 May 2010 09:30:37 -0400
changeset 66237 b753e8ac13fd5d9cb7cc81fe56ea3de25f9ae8c7
parent 66236 56ae6a09a05b3cce5f87121ef4bd33ade1004b1e
child 66238 7021ea212f2ed297fe6a32ff18cfd13c0d7f0c15
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs564505
Bug 564505 - Form helper badly functioning on translate.google.com [r=mfinkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -1499,16 +1499,19 @@ var FormHelper = {
   },
 
   _isValidSelectElement: function(aElement) {
     return SelectHelper.canShowUIFor(aElement);
   },
 
   _isElementVisible: function(aElement) {
     let style = aElement.ownerDocument.defaultView.getComputedStyle(aElement, null);
+    if (!style)
+      return false;
+
     let isVisible = (style.getPropertyValue("visibility") != "hidden");
     let isOpaque = (style.getPropertyValue("opacity") != 0);
 
     let rect = aElement.getBoundingClientRect();
     return isVisible && isOpaque && (rect.height != 0 || rect.width != 0);
   },
 
   _getAll: function() {