Bug 898120 - Fix leak of global variable in Metro selection code [r=jimm]

This commit is contained in:
Matt Brubeck 2013-07-26 14:34:02 -07:00
parent 0d1e1360f0
commit ad3a8d752b
3 changed files with 2 additions and 8 deletions

View File

@ -1,6 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/*
* SelectionPrototype - common base class used by both chrome and content selection logic.
@ -776,7 +777,7 @@ SelectionPrototype.prototype = {
}
// Store the client rect of target element
r = this._getTargetClientRect();
let r = this._getTargetClientRect();
seldata.element.left = r.left + this._contentOffset.x;
seldata.element.top = r.top + this._contentOffset.y;
seldata.element.right = r.right + this._contentOffset.x;

View File

@ -63,9 +63,6 @@ gTests.push({
yield waitForMs(100);
ok(SelectionHelperUI.isSelectionUIVisible, "selection ui active");
// taps on the urlbar-edit leak a ClientRect property on the window
delete window.r;
},
});
@ -89,7 +86,6 @@ gTests.push({
ok(edit.popup.popupOpen, "bug: popup should be showing");
clearSelection(edit);
delete window.r;
}
});
@ -119,7 +115,6 @@ gTests.push({
ok(SelectionHelperUI.isCaretUIVisible, "caret browsing enabled");
clearSelection(edit);
delete window.r;
}
});
@ -136,7 +131,6 @@ gTests.push({
edit.blur();
ok(!SelectionHelperUI.isSelectionUIVisible, "selection no longer enabled");
clearSelection(edit);
delete window.r;
}
});

View File

@ -109,7 +109,6 @@ function setUp() {
function tearDown() {
yield removeMockSearchDefault();
Browser.closeTab(Browser.selectedTab, { forceClose: true });
delete window.r;
}
gTests.push({