Bug 882193 - Remove nsIDocumentRegister. r=mrbkap.

This commit is contained in:
Peter Van der Beken 2013-06-05 22:19:22 +02:00
Родитель d0a02501d7
Коммит 5e21d995cc
4 изменённых файлов: 0 добавлений и 49 удалений

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

@ -1537,7 +1537,6 @@ NS_INTERFACE_TABLE_HEAD(nsDocument)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocumentTouch)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsITouchEventReceiver)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIInlineEventHandlers)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDocumentRegister)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIObserver)
NS_INTERFACE_TABLE_END
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsDocument)
@ -5075,32 +5074,6 @@ nsDocument::RegisterEnabled()
return sPrefValue;
}
NS_IMETHODIMP
nsDocument::Register(const nsAString& aName, const JS::Value& aOptions,
JSContext* aCx, uint8_t aOptionalArgc,
jsval* aConstructor /* out param */)
{
RootedDictionary<ElementRegistrationOptions> options(aCx);
if (aOptionalArgc > 0) {
JSAutoCompartment ac(aCx, GetWrapper());
JS::Rooted<JS::Value> opts(aCx, aOptions);
NS_ENSURE_TRUE(JS_WrapValue(aCx, opts.address()),
NS_ERROR_UNEXPECTED);
NS_ENSURE_TRUE(options.Init(aCx, opts),
NS_ERROR_UNEXPECTED);
}
ErrorResult rv;
JSObject* object = Register(aCx, aName, options, rv);
if (rv.Failed()) {
return rv.ErrorCode();
}
NS_ENSURE_TRUE(object, NS_ERROR_UNEXPECTED);
*aConstructor = OBJECT_TO_JSVAL(object);
return NS_OK;
}
JSObject*
nsDocument::Register(JSContext* aCx, const nsAString& aName,
const ElementRegistrationOptions& aOptions,

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

@ -60,7 +60,6 @@
#include "nsIProgressEventSink.h"
#include "nsISecurityEventSink.h"
#include "nsIChannelEventSink.h"
#include "nsIDocumentRegister.h"
#include "imgIRequest.h"
#include "mozilla/dom/DOMImplementation.h"
#include "nsIDOMTouchEvent.h"
@ -505,7 +504,6 @@ class nsDocument : public nsIDocument,
public nsStubMutationObserver,
public nsIDOMDocumentTouch,
public nsIInlineEventHandlers,
public nsIDocumentRegister,
public nsIObserver
{
public:
@ -796,9 +794,6 @@ public:
// nsIInlineEventHandlers
NS_DECL_NSIINLINEEVENTHANDLERS
// nsIDocumentRegister
NS_DECL_NSIDOCUMENTREGISTER
// nsIObserver
NS_DECL_NSIOBSERVER

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

@ -25,7 +25,6 @@ XPIDL_SOURCES += [
'nsIDOMText.idl',
'nsIDOMUserDataHandler.idl',
'nsIDOMXMLDocument.idl',
'nsIDocumentRegister.idl',
'nsIInlineEventHandlers.idl',
]

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

@ -1,16 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
[scriptable, uuid(e35935bd-ebae-4e0d-93bf-efa93ab14c05)]
interface nsIDocumentRegister : nsISupports
{
[optional_argc,
implicit_jscontext] jsval register(in DOMString name,
[optional] in jsval options)
raises(DOMException);
};