Merge inbound to mozilla-central. a=merge

This commit is contained in:
Csoregi Natalia 2019-08-16 06:59:41 +03:00
Родитель 454835b69d 25862fe2eb
Коммит 838811e23f
2 изменённых файлов: 14 добавлений и 0 удалений

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

@ -331,6 +331,7 @@
#include "mozilla/PendingFullscreenEvent.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/ResultExtensions.h"
#include "nsHTMLTags.h"
#include "MobileViewportManager.h"
#include "NodeUbiReporting.h"
@ -5750,6 +5751,14 @@ void Document::SetBaseURI(nsIURI* aURI) {
RefreshLinkHrefs();
}
Result<nsCOMPtr<nsIURI>, nsresult> Document::ResolveWithBaseURI(
const nsAString& aURI) {
nsCOMPtr<nsIURI> resolvedURI;
MOZ_TRY(
NS_NewURI(getter_AddRefs(resolvedURI), aURI, nullptr, GetDocBaseURI()));
return std::move(resolvedURI);
}
URLExtraData* Document::DefaultStyleAttrURLData() {
MOZ_ASSERT(NS_IsMainThread());
nsIURI* baseURI = GetDocBaseURI();

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

@ -910,6 +910,11 @@ class Document : public nsINode,
void SetBaseURI(nsIURI* aURI);
/**
* Resolves a URI based on the document's base URI.
*/
Result<nsCOMPtr<nsIURI>, nsresult> ResolveWithBaseURI(const nsAString& aURI);
/**
* Return the URL data which style system needs for resolving url value.
* This method attempts to use the cached object in mCachedURLData, but