diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-13 01:27:22 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-13 01:27:22 +0000 |
commit | e33f99a191db9341991d5b42f4da594d1ed15e3a (patch) | |
tree | f881998c37a1a2eb1e45852864eeda1d7f50d81e /chrome_frame/urlmon_moniker.cc | |
parent | 92ff337e2bb148581011ddf6c8d14d3ace50d626 (diff) | |
download | chromium_src-e33f99a191db9341991d5b42f4da594d1ed15e3a.zip chromium_src-e33f99a191db9341991d5b42f4da594d1ed15e3a.tar.gz chromium_src-e33f99a191db9341991d5b42f4da594d1ed15e3a.tar.bz2 |
IE would not switch into ChromeFrame if the url being navigated to had an anchor. The IsTopLevelUrl function exposed by the navigation manager
would compare the URL received in the BHO which has the anchor and the URL received from the anchor which does not have the anchor. As a result
we would not wrap the bind status callback which caused this issue.
The IsTopLevelUrl function now compares the URLs after stripping the anchor portion in the URL.
Should fix bug http://code.google.com/p/chromium/issues/detail?id=38265.
This only works if the moniker patch is enabled.
Bug=38265
Test=Covered by unit test.
Review URL: http://codereview.chromium.org/1559027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_moniker.cc')
-rw-r--r-- | chrome_frame/urlmon_moniker.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome_frame/urlmon_moniker.cc b/chrome_frame/urlmon_moniker.cc index 76a5bea..49632fd 100644 --- a/chrome_frame/urlmon_moniker.cc +++ b/chrome_frame/urlmon_moniker.cc @@ -82,7 +82,6 @@ HRESULT NavigationManager::NavigateToCurrentUrlInCF(IBrowserService* browser) { GURL parsed_moniker_url(url_); if (parsed_moniker_url.has_ref()) { fragment = UTF8ToWide(parsed_moniker_url.ref()); - set_original_url_with_fragment(url_.c_str()); } hr = NavigateBrowserToMoniker(browser, moniker, headers.c_str(), @@ -94,6 +93,10 @@ HRESULT NavigationManager::NavigateToCurrentUrlInCF(IBrowserService* browser) { return hr; } +bool NavigationManager::IsTopLevelUrl(const wchar_t* url) { + return CompareUrlsWithoutFragment(url_.c_str(), url); +} + void NavigationManager::OnBeginningTransaction(bool is_top_level, const wchar_t* url, const wchar_t* headers, const wchar_t* additional_headers) { @@ -278,4 +281,5 @@ HRESULT MonikerPatch::BindToStorage(IMoniker_BindToStorage_Fn original, if ((S_OK == hr) && callback) callback->MayPlayBack(BSCF_LASTDATANOTIFICATION); return hr; -}
\ No newline at end of file +} + |