The OverLink handler no longer caches the current over and target link to ensure we aren't called for the same link more than once. The lower level is assuring we aren't execpt in on case where a popup is up and then you move over links. This is a small case. Since string copies were actually showing up on some profiles I'm removing this caching of the string for some small amount of performance and bloat benefit as well as code cleanup.
git-svn-id: svn://10.0.0.236/trunk@64677 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -379,8 +379,6 @@ protected:
|
||||
nsISessionHistory * mSHist;
|
||||
|
||||
nsRect mBounds;
|
||||
nsString mOverURL;
|
||||
nsString mOverTarget;
|
||||
|
||||
PRPackedBool mIsInSHist;
|
||||
PRPackedBool mFailedToLoadHistoryService;
|
||||
@@ -2229,30 +2227,12 @@ nsWebShell::OnOverLink(nsIContent* aContent,
|
||||
const PRUnichar* aURLSpec,
|
||||
const PRUnichar* aTargetSpec)
|
||||
{
|
||||
if (!mOverURL.Equals(aURLSpec) || !mOverTarget.Equals(aTargetSpec)) {
|
||||
#ifdef NOISY_LINKS
|
||||
fputs("Was '", stdout);
|
||||
fputs(mOverURL, stdout);
|
||||
fputs("' '", stdout);
|
||||
fputs(mOverTarget, stdout);
|
||||
fputs("'\n", stdout);
|
||||
fputs("Over link '", stdout);
|
||||
fputs(aURLSpec, stdout);
|
||||
fputs("' '", stdout);
|
||||
fputs(aTargetSpec, stdout);
|
||||
fputs("'\n", stdout);
|
||||
#endif /* NS_DEBUG */
|
||||
nsCOMPtr<nsIWebBrowserChrome> browserChrome(do_GetInterface(mTreeOwner));
|
||||
|
||||
mOverURL = aURLSpec;
|
||||
mOverTarget = aTargetSpec;
|
||||
|
||||
|
||||
nsCOMPtr<nsIWebBrowserChrome> browserChrome(do_GetInterface(mTreeOwner));
|
||||
|
||||
if (browserChrome)
|
||||
if(browserChrome)
|
||||
browserChrome->SetOverLink(aURLSpec);
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
||||
Reference in New Issue
Block a user