Backed out changeset 32355c0d9d64 (bug 1014113) for suspicion of causing r2 perma failures

This commit is contained in:
Carsten "Tomcat" Book 2015-02-16 10:19:09 +01:00
parent 692535a0f2
commit 1df80942b9
2 changed files with 2 additions and 20 deletions

View File

@ -150,21 +150,8 @@ var FindHelper = {
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;
}
}

View File

@ -123,11 +123,6 @@ var ZoomHelper = {
* 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 = {