author | Yuri Khan <yuri.v.khan@gmail.com> |
Sun, 28 Jan 2018 18:22:22 +0700 | |
changeset 402585 | 256247373b45b3599feb86ee570004633587f864 |
parent 402584 | 95245d5d7560d1a858c0ec80c4da820dfb182063 |
child 402586 | ff8ae0661153a0fe72cf7eead67060b4248e8372 |
push id | 33393 |
push user | rgurzau@mozilla.com |
push date | Tue, 06 Feb 2018 21:54:26 +0000 |
treeherder | mozilla-central@0790ec12200d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | adw |
bugs | 1394304 |
milestone | 60.0a1 |
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
|
--- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -513,16 +513,35 @@ file, You can obtain one at http://mozil } // tell widget to revert to last typed text only if the user // was scrolling when they hit escape return !isScrolling; ]]></body> </method> + <method name="_whereToOpen"> + <parameter name="event"/> + <body><![CDATA[ + let isMouseEvent = event instanceof MouseEvent; + let where = undefined; + if (isMouseEvent) { + where = whereToOpenLink(event, false, false); + } else { + // If the current tab is empty, ignore Alt+Enter (reuse this tab) + let altEnter = !isMouseEvent && + event && + event.altKey && + !isTabEmpty(gBrowser.selectedTab); + where = altEnter ? "tab" : "current"; + } + return where; + ]]></body> + </method> + <!-- This is ultimately called by the autocomplete controller as the result of handleEnter when the Return key is pressed in the textbox. Since onPopupClick also calls handleEnter, this is also called as a result in that case. @param event The event that triggered the command. @@ -561,29 +580,17 @@ file, You can obtain one at http://mozil } // Do the command of the selected one-off if it's not an engine. if (selectedOneOff && !selectedOneOff.engine) { selectedOneOff.doCommand(); return; } - let where = openUILinkWhere; - if (!where) { - if (isMouseEvent) { - where = whereToOpenLink(event, false, false); - } else { - // If the current tab is empty, ignore Alt+Enter (reuse this tab) - let altEnter = !isMouseEvent && - event && - event.altKey && - !isTabEmpty(gBrowser.selectedTab); - where = altEnter ? "tab" : "current"; - } - } + let where = openUILinkWhere || this._whereToOpen(event); let url = this.value; if (!url) { return; } let mayInheritPrincipal = false; let postData = null;