292357 nsFrameLoader should use the content's base URI, not the document's

r+sr=bz a=asa
This commit is contained in:
cbiesinger%web.de 2005-05-01 13:06:48 +00:00
Родитель 6945e04e88
Коммит c98126213b
2 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -556,7 +556,8 @@ public:
/**
* Get the base URI for any relative URIs within this piece of
* content. Generally, this is the document's base URI, but certain
* content carries a local base for backward compatibility.
* content carries a local base for backward compatibility, and XML
* supports setting a per-node base URI.
*
* @return the base URI
*/

Просмотреть файл

@ -108,15 +108,13 @@ nsFrameLoader::LoadFrame()
src.AssignLiteral("about:blank");
}
// Make an absolute URI
nsIURI *base_uri = doc->GetBaseURI();
const nsACString &doc_charset = doc->GetDocumentCharacterSet();
nsCOMPtr<nsIURI> base_uri = mOwnerContent->GetBaseURI();
const nsAFlatCString &doc_charset = doc->GetDocumentCharacterSet();
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), src,
doc_charset.IsEmpty() ? nsnull :
PromiseFlatCString(doc_charset).get(), base_uri);
doc_charset.IsEmpty() ? nsnull : doc_charset.get(),
base_uri);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocShellLoadInfo> loadInfo;