diff --git a/content/base/public/nsIContent.h b/content/base/public/nsIContent.h index e2114beb864..e58568d8563 100644 --- a/content/base/public/nsIContent.h +++ b/content/base/public/nsIContent.h @@ -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 */ diff --git a/content/base/src/nsFrameLoader.cpp b/content/base/src/nsFrameLoader.cpp index a5a169ad600..7bb1c43a299 100644 --- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -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 base_uri = mOwnerContent->GetBaseURI(); + const nsAFlatCString &doc_charset = doc->GetDocumentCharacterSet(); nsCOMPtr 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 loadInfo;