Confirmed users, Bureaucrats and Sysops emeriti
722
edits
GavinSharp (talk | contribs) |
GavinSharp (talk | contribs) No edit summary |
||
| Line 12: | Line 12: | ||
==When Enter Is Pressed== | ==When Enter Is Pressed== | ||
==Before Network== | ==Before Network== | ||
* The command is handled by urlbarBindings.xml's "urlbar" binding's handleCommand method | |||
** It first calls _canonizeURL (urlbarBindings.xml), which handles Ctrl/Shift/Alt modifier suffix addition (e.g. Ctrl+Enter to add "www." and ".com") | |||
** _canonizeURL also calls getShortcutOrURI (browser.js) | |||
*** If the string contains a space, split on the first space and examine the first token. | |||
**** If it's a search engine keyword, expand using the relevant search URL. | |||
**** If it's a user-defined keyword, expand that. | |||
** With the URL filtered through _canonizeURL, and the right tab/window obtained via handleCommand's modifier checking code, call nsDocShell::LoadURI with LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP | |||
.. | |||
* If it looks like a search according to [http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDefaultURIFixup.cpp#804 this algorithm], insert it into the <tt>keyword.URL</tt> preference value to produce a search URL, since the <code>keyword.enabled</code> preference defaults to true in Firefox. | * If it looks like a search according to [http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDefaultURIFixup.cpp#804 this algorithm], insert it into the <tt>keyword.URL</tt> preference value to produce a search URL, since the <code>keyword.enabled</code> preference defaults to true in Firefox. | ||