summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 03:29:58 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 03:29:58 +0000
commitdf0846a5f9527233de7b551dd426585f97b0f296 (patch)
tree843b38998e7c604c1c583466b810124508764c93 /chrome_frame
parent12e02fab8ec3e85bdb2e6c60116fc53d95b18ce0 (diff)
downloadchromium_src-df0846a5f9527233de7b551dd426585f97b0f296.zip
chromium_src-df0846a5f9527233de7b551dd426585f97b0f296.tar.gz
chromium_src-df0846a5f9527233de7b551dd426585f97b0f296.tar.bz2
Fix for the chrome frame anchor url navigation test failures. Fix is to append the anchor
portion of the url retrieved from the navigation manager to the url retrieved from the protocol sink wrapper. This is needed as the protocol sink wrapper sees the url without the anchor portion. BUG=71860 TEST=ChromeFrame anchor url tests. TBR=amit Review URL: http://codereview.chromium.org/6546081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75704 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_active_document.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index 3db9f4c..3635d4e 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -250,6 +250,17 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable,
DCHECK(info);
if (info && !info->GetUrl().empty()) {
url = info->GetUrl();
+ if (mgr) {
+ // If the original URL contains an anchor, then the URL queried
+ // from the protocol sink wrapper does not contain the anchor. To
+ // workaround this we retrieve the anchor from the navigation manager
+ // and append it to the url retrieved from the protocol sink wrapper.
+ GURL url_for_anchor(mgr->url());
+ if (url_for_anchor.has_ref()) {
+ url += L"#";
+ url += UTF8ToWide(url_for_anchor.ref());
+ }
+ }
} else {
// If the original URL contains an anchor, then the URL queried
// from the moniker does not contain the anchor. To workaround