Exercise 1 : Using LXR
I attmeped my search under Mozilla 1.8 and as a text search. I began my search with 'reload', which returned an overwhelming account of hits. After s fair bit of reading, I thought I found soemthing relivant in: /browser/locales/en-US/chrome/browser/browser.dtd
82 <!ENTITY reloadCmd.label "Reload"> 83 <!ENTITY reloadCmd.accesskey "R"> 84 <!ENTITY reloadButton.tooltip "Reload current page">
which didn't turn out to be much.. so on with my search..
I decided to try 'reloadCmd', which turned up in my first search, and I found:
173 <menuitem label="&reloadCmd.label;" accesskey="&reloadCmd.accesskey;" command="Browser:Reload" key="key_reload"/>
which again, didn't turn out to be much, however taking a hint perhaps I should try, 'BrowserReload', which I got a few hits for, one was in javascript in /browser/base/content/browser.js
1622 function BrowserReload() 1623 { 1624 const reloadFlags = nsIWebNavigation.LOAD_FLAGS_NONE; 1625 return BrowserReloadWithFlags(reloadFlags); 1626 }
and in /browser/base/content/browser.js,
5056 // Reload the page to show the effect instantly 5057 BrowserReload();
so I'm assuming I'm on the right track.. I then tired 'BrowserReload('.. and found a .cpp file.. I got a little excited (!!) I found it in /embedding/tests/wxEmbed/BrowserFrame.cpp,
203 void BrowserFrame::OnBrowserReload(wxCommandEvent & WXUNUSED(event)) 204 { 205 if (mWebBrowser) 206 { 207 nsCOMPtr<nsIWebNavigation> webNav = do_QueryInterface(mWebBrowser); 208 webNav->Reload(nsIWebNavigation::LOAD_FLAGS_NONE); 209 } 210 }