mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 915918 - Part 2: openUrl -> openUrlAndExitEditingMode. r=lucasr
This commit is contained in:
parent
7cdbae322c
commit
268ce813fb
@ -1324,19 +1324,19 @@ abstract public class BrowserApp extends GeckoApp
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openUrl(String url) {
|
private void openUrlAndStopEditing(String url) {
|
||||||
openUrl(url, null, false);
|
openUrlAndStopEditing(url, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openUrl(String url, boolean newTab) {
|
private void openUrlAndStopEditing(String url, boolean newTab) {
|
||||||
openUrl(url, null, newTab);
|
openUrlAndStopEditing(url, null, newTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openUrl(String url, String searchEngine) {
|
private void openUrlAndStopEditing(String url, String searchEngine) {
|
||||||
openUrl(url, searchEngine, false);
|
openUrlAndStopEditing(url, searchEngine, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openUrl(String url, String searchEngine, boolean newTab) {
|
private void openUrlAndStopEditing(String url, String searchEngine, boolean newTab) {
|
||||||
mBrowserToolbar.setProgressVisibility(true);
|
mBrowserToolbar.setProgressVisibility(true);
|
||||||
|
|
||||||
int flags = Tabs.LOADURL_NONE;
|
int flags = Tabs.LOADURL_NONE;
|
||||||
@ -2356,7 +2356,7 @@ abstract public class BrowserApp extends GeckoApp
|
|||||||
|
|
||||||
for (String url : urls) {
|
for (String url : urls) {
|
||||||
if (!maybeSwitchToTab(url, flags)) {
|
if (!maybeSwitchToTab(url, flags)) {
|
||||||
openUrl(url, true);
|
openUrlAndStopEditing(url, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2365,7 +2365,7 @@ abstract public class BrowserApp extends GeckoApp
|
|||||||
@Override
|
@Override
|
||||||
public void onUrlOpen(String url, EnumSet<OnUrlOpenListener.Flags> flags) {
|
public void onUrlOpen(String url, EnumSet<OnUrlOpenListener.Flags> flags) {
|
||||||
if (!maybeSwitchToTab(url, flags)) {
|
if (!maybeSwitchToTab(url, flags)) {
|
||||||
openUrl(url);
|
openUrlAndStopEditing(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2373,7 +2373,7 @@ abstract public class BrowserApp extends GeckoApp
|
|||||||
@Override
|
@Override
|
||||||
public void onSearch(String engineId, String text) {
|
public void onSearch(String engineId, String text) {
|
||||||
recordSearch(engineId, "barsuggest");
|
recordSearch(engineId, "barsuggest");
|
||||||
openUrl(text, engineId);
|
openUrlAndStopEditing(text, engineId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// BrowserSearch.OnEditSuggestionListener
|
// BrowserSearch.OnEditSuggestionListener
|
||||||
|
Loading…
Reference in New Issue
Block a user