mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 708161 - POST data for search engine submissions. r=mfinkle
This commit is contained in:
parent
001b042a9a
commit
f3c84d62f7
@ -507,7 +507,7 @@ var BrowserApp = {
|
||||
aParams = aParams || {};
|
||||
|
||||
let flags = "flags" in aParams ? aParams.flags : Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
let postData = ("postData" in aParams && aParams.postData) ? aParams.postData.value : null;
|
||||
let postData = ("postData" in aParams && aParams.postData) ? aParams.postData : null;
|
||||
let referrerURI = "referrerURI" in aParams ? aParams.referrerURI : null;
|
||||
let charset = "charset" in aParams ? aParams.charset : null;
|
||||
|
||||
@ -830,16 +830,6 @@ var BrowserApp = {
|
||||
});
|
||||
},
|
||||
|
||||
getSearchOrURI: function getSearchOrURI(aParams) {
|
||||
let uri;
|
||||
if (aParams.engine) {
|
||||
let engine = Services.search.getEngineByName(aParams.engine);
|
||||
if (engine)
|
||||
uri = engine.getSubmission(aParams.url).uri;
|
||||
}
|
||||
return uri ? uri.spec : aParams.url;
|
||||
},
|
||||
|
||||
scrollToFocusedInput: function(aBrowser) {
|
||||
let doc = aBrowser.contentDocument;
|
||||
if (!doc)
|
||||
@ -955,7 +945,15 @@ var BrowserApp = {
|
||||
flags: flags
|
||||
};
|
||||
|
||||
let url = this.getSearchOrURI(data);
|
||||
let url = data.url;
|
||||
if (data.engine) {
|
||||
let engine = Services.search.getEngineByName(data.engine);
|
||||
if (engine) {
|
||||
let submission = engine.getSubmission(url);
|
||||
url = submission.uri.spec;
|
||||
params.postData = submission.postData;
|
||||
}
|
||||
}
|
||||
|
||||
// Don't show progress throbber for about:home
|
||||
if (url == "about:home")
|
||||
|
Loading…
Reference in New Issue
Block a user