mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 32355c0d9d64 (bug 1014113) for suspicion of causing r2 perma failures
This commit is contained in:
parent
692535a0f2
commit
1df80942b9
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user