зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631464 Remove the title argument from registerProtocolHandler() r=smaug
See https://groups.google.com/g/mozilla.dev.platform/c/T633aemFPJU/m/dbv5_iB8AgAJ Differential Revision: https://phabricator.services.mozilla.com/D71714
This commit is contained in:
Родитель
5cabaa29f2
Коммит
5a2adffbe7
|
@ -985,7 +985,6 @@ void Navigator::CheckProtocolHandlerAllowed(const nsAString& aScheme,
|
|||
|
||||
void Navigator::RegisterProtocolHandler(const nsAString& aScheme,
|
||||
const nsAString& aURI,
|
||||
const nsAString& aTitle,
|
||||
ErrorResult& aRv) {
|
||||
if (!mWindow || !mWindow->GetOuterWindow() || !mWindow->GetDocShell() ||
|
||||
!mWindow->GetDoc()) {
|
||||
|
@ -1014,9 +1013,13 @@ void Navigator::RegisterProtocolHandler(const nsAString& aScheme,
|
|||
return;
|
||||
}
|
||||
|
||||
// Determine a title from the document URI.
|
||||
nsAutoCString docDisplayHostPort;
|
||||
docURI->GetDisplayHostPort(docDisplayHostPort);
|
||||
NS_ConvertASCIItoUTF16 title(docDisplayHostPort);
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
nsAutoString scheme(aScheme);
|
||||
nsAutoString title(aTitle);
|
||||
RefPtr<BrowserChild> browserChild = BrowserChild::GetFrom(mWindow);
|
||||
browserChild->SendRegisterProtocolHandler(scheme, handlerURI, title,
|
||||
docURI);
|
||||
|
@ -1026,8 +1029,8 @@ void Navigator::RegisterProtocolHandler(const nsAString& aScheme,
|
|||
nsCOMPtr<nsIWebProtocolHandlerRegistrar> registrar =
|
||||
do_GetService(NS_WEBPROTOCOLHANDLERREGISTRAR_CONTRACTID);
|
||||
if (registrar) {
|
||||
aRv = registrar->RegisterProtocolHandler(aScheme, handlerURI, aTitle,
|
||||
docURI, mWindow->GetOuterWindow());
|
||||
aRv = registrar->RegisterProtocolHandler(aScheme, handlerURI, title, docURI,
|
||||
mWindow->GetOuterWindow());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ class Navigator final : public nsISupports, public nsWrapperCache {
|
|||
nsIURI* aHandlerURI, nsIURI* aDocumentURI,
|
||||
ErrorResult& aRv);
|
||||
void RegisterProtocolHandler(const nsAString& aScheme, const nsAString& aURL,
|
||||
const nsAString& aTitle, ErrorResult& aRv);
|
||||
ErrorResult& aRv);
|
||||
nsMimeTypeArray* GetMimeTypes(ErrorResult& aRv);
|
||||
nsPluginArray* GetPlugins(ErrorResult& aRv);
|
||||
Permissions* GetPermissions(ErrorResult& aRv);
|
||||
|
|
|
@ -84,7 +84,7 @@ interface mixin NavigatorContentUtils {
|
|||
[Throws, ChromeOnly]
|
||||
void checkProtocolHandlerAllowed(DOMString scheme, URI handlerURI, URI documentURI);
|
||||
[Throws, SecureContext]
|
||||
void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title);
|
||||
void registerProtocolHandler(DOMString scheme, DOMString url);
|
||||
// NOT IMPLEMENTED
|
||||
//void unregisterProtocolHandler(DOMString scheme, DOMString url);
|
||||
};
|
||||
|
|
|
@ -711,9 +711,6 @@ prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featu
|
|||
[OffscreenCanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)]
|
||||
expected: FAIL
|
||||
|
||||
[Navigator interface: operation registerProtocolHandler(DOMString, USVString)]
|
||||
expected: FAIL
|
||||
|
||||
[ElementInternals interface: operation setValidity(optional ValidityStateFlags, optional DOMString, optional HTMLElement)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[historical.https.window.html]
|
||||
[registerProtocolHandler has no third argument]
|
||||
expected: FAIL
|
||||
|
Загрузка…
Ссылка в новой задаче