diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 00:02:34 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 00:02:34 +0000 |
commit | 7e3544bd5859cad57261bc4827686f266a8d3961 (patch) | |
tree | e3859f5a3692cf096ba92f02636b46ccd24e2f08 /chrome_frame/chrome_active_document.cc | |
parent | 52574021ab8190a5b93bdf1344dada2b420f4b1c (diff) | |
download | chromium_src-7e3544bd5859cad57261bc4827686f266a8d3961.zip chromium_src-7e3544bd5859cad57261bc4827686f266a8d3961.tar.gz chromium_src-7e3544bd5859cad57261bc4827686f266a8d3961.tar.bz2 |
If we navigate to a URL which has an anchor in IE, which eventually ends up in ChromeFrame,
the actual URL queried from the moniker passed in to our implementation of IPersistStream::Load
does not have the anchor. It looks like there are some private interfaces exposed by MSHTML and
invoked by IEFrame to pass this information over.
Our fix is to save away the url received in our Bho BeforeNavigate2 notification and use this URL
if available before querying the moniker for the URL. This needs to be done in IPersistStream::Load
and in the OnHttpEquiv patch when we initiate a navigation to the actual URL using the moniker.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=27270
Bug=27270
Test=Covered by unit test.
Review URL: http://codereview.chromium.org/542096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_active_document.cc')
-rw-r--r-- | chrome_frame/chrome_active_document.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc index 79253d1..e92aa0b 100644 --- a/chrome_frame/chrome_active_document.cc +++ b/chrome_frame/chrome_active_document.cc @@ -204,9 +204,14 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable, SetClientSite(client_site); } - CComHeapPtr<WCHAR> display_name; - moniker_name->GetDisplayName(bind_context, NULL, &display_name); - std::wstring url = display_name; + Bho* chrome_frame_bho = Bho::GetCurrentThreadBhoInstance(); + + // If the original URL contains an anchor, then the URL queried + // from the moniker does not contain the anchor. To workaround + // this we retrieve the URL from our BHO. + std::wstring url = GetActualUrlFromMoniker( + moniker_name, bind_context, + chrome_frame_bho ? chrome_frame_bho->url() : std::wstring()); // The is_new_navigation variable indicates if this a navigation initiated // by typing in a URL for e.g. in the IE address bar, or from Chrome by |