mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 875610 - Find in page throws r=mbrubeck
--HG-- extra : rebase_source : 84798bac6fb2a9c7ee03bd11e311bc7bbc66f2e9
This commit is contained in:
parent
e261036137
commit
0f7894bf64
@ -40,6 +40,9 @@ var FindHandler = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this._fastFind.currentWindow)
|
||||||
|
return;
|
||||||
|
|
||||||
let selection = this._fastFind.currentWindow.getSelection();
|
let selection = this._fastFind.currentWindow.getSelection();
|
||||||
if (!selection.rangeCount || selection.isCollapsed) {
|
if (!selection.rangeCount || selection.isCollapsed) {
|
||||||
// The selection can be into an input or a textarea element
|
// The selection can be into an input or a textarea element
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
/* We don't support zooming yet, disable Animated zoom by clamping it to the default zoom. */
|
||||||
|
const kBrowserFindZoomLevelMin = 1;
|
||||||
|
const kBrowserFindZoomLevelMax = 1;
|
||||||
|
|
||||||
var FindHelperUI = {
|
var FindHelperUI = {
|
||||||
type: "find",
|
type: "find",
|
||||||
commands: {
|
commands: {
|
||||||
@ -175,8 +179,8 @@ var FindHelperUI = {
|
|||||||
|
|
||||||
// Clamp the zoom level relatively to the default zoom level of the page
|
// Clamp the zoom level relatively to the default zoom level of the page
|
||||||
let defaultZoomLevel = Browser.selectedTab.getDefaultZoomLevel();
|
let defaultZoomLevel = Browser.selectedTab.getDefaultZoomLevel();
|
||||||
zoomLevel = Util.clamp(zoomLevel, (defaultZoomLevel * kBrowserFormZoomLevelMin),
|
zoomLevel = Util.clamp(zoomLevel, (defaultZoomLevel * kBrowserFindZoomLevelMin),
|
||||||
(defaultZoomLevel * kBrowserFormZoomLevelMax));
|
(defaultZoomLevel * kBrowserFindZoomLevelMax));
|
||||||
zoomLevel = Browser.selectedTab.clampZoomLevel(zoomLevel);
|
zoomLevel = Browser.selectedTab.clampZoomLevel(zoomLevel);
|
||||||
|
|
||||||
let zoomRect = Browser._getZoomRectForPoint(aElementRect.center().x, aElementRect.y, zoomLevel);
|
let zoomRect = Browser._getZoomRectForPoint(aElementRect.center().x, aElementRect.y, zoomLevel);
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
* - Provides autocomplete box for input fields.
|
* - Provides autocomplete box for input fields.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const kBrowserFormZoomLevelMin = 0.8;
|
|
||||||
const kBrowserFormZoomLevelMax = 2.0;
|
|
||||||
|
|
||||||
var FormHelperUI = {
|
var FormHelperUI = {
|
||||||
_debugEvents: false,
|
_debugEvents: false,
|
||||||
_currentBrowser: null,
|
_currentBrowser: null,
|
||||||
|
Loading…
Reference in New Issue
Block a user