Backed out changeset 32355c0d9d64 (bug 1014113) for suspicion of causing r2 perma failures
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 16 Feb 2015 10:19:09 +0100
changeset 256161 d522b57c3cb7282a513418e214083d5a8c1eab9b
parent 256160 1900ac4cdf15ef9f8ff6bdb9105033c851d7aad1
child 256162 2fa362f5b1b8f4ebdf0c4e9dd0f34018869e3f91
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1014113
milestone38.0a1
backs out32355c0d9d645fb8d4d4b69790b9da77730d87a9
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
Backed out changeset 32355c0d9d64 (bug 1014113) for suspicion of causing r2 perma failures
mobile/android/chrome/content/FindHelper.js
mobile/android/chrome/content/ZoomHelper.js
--- a/mobile/android/chrome/content/FindHelper.js
+++ b/mobile/android/chrome/content/FindHelper.js
@@ -145,27 +145,14 @@ var FindHelper = {
           // this should never happen
           Cu.reportError("Warning: selected tab changed during find!");
           // fall through and restore viewport on the initial tab anyway
         }
         this._targetTab.setViewport(JSON.parse(this._initialViewport));
         this._targetTab.sendViewportUpdate();
       }
     } else {
-      // Defines the space around the highlighted element as a factor of the element's size.
-      const spacingFactor = 6;
-
-      // We replace the start of the zoom rect to keep the highlighted word in the middle.
-      // We divide this offset by two to consider a spacing on each side of the rect.
-      let x = aData.rect.x + (aData.rect.width * (1 - spacingFactor)) / 2;
-      let y = aData.rect.y + (aData.rect.height * (1 - spacingFactor)) / 2;
-
-      let rect = new Rect(Math.max(x, 0),
-                          Math.max(y, 0),
-                          // we use a bigger viewport than just the highlighted word
-                          aData.rect.width * spacingFactor,
-                          aData.rect.height * spacingFactor);
-
-      ZoomHelper.zoomToRect(rect);
+      // Disabled until bug 1014113 is fixed
+      // ZoomHelper.zoomToRect(aData.rect);
       this._viewportChanged = true;
     }
   }
 };
--- a/mobile/android/chrome/content/ZoomHelper.js
+++ b/mobile/android/chrome/content/ZoomHelper.js
@@ -118,21 +118,16 @@ var ZoomHelper = {
     }
   },
 
   /* Zoom to a specific part of the screen defined by a rect,
    * optionally keeping a particular part of it in view
    * if it is really tall.
    */
   zoomToRect: function(aRect, aClickY = -1) {
-    if(aRect.isEmpty()) {
-      // Protect from empty or negative-sized rects & potentials NaN in following calculations
-      return;
-    }
-
     let viewport = BrowserApp.selectedTab.getViewport();
 
     let rect = {
       x: aRect.x,
       y: aRect.y,
       w: aRect.width,
       h: Math.min(aRect.width * viewport.cssHeight / viewport.cssWidth, aRect.height)
     };