mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 732708 - Part d: Remove StorageEventObsolete, NS_NewDOMStorage; r=mayhemer
This commit is contained in:
parent
6fe3c4fa34
commit
2a26067c2b
@ -1371,8 +1371,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(StorageEvent, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(StorageEventObsolete, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
||||
NS_DEFINE_CLASSINFO_DATA(DOMParser, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
@ -3957,10 +3955,6 @@ nsDOMClassInfo::Init()
|
||||
DOM_CLASSINFO_EVENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(StorageEventObsolete, nsIDOMStorageEventObsolete)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageEventObsolete)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(DOMParser, nsIDOMParser)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMParser)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMParserJS)
|
||||
|
@ -378,7 +378,6 @@ DOMCI_CLASS(StorageObsolete)
|
||||
DOMCI_CLASS(Storage)
|
||||
DOMCI_CLASS(StorageItem)
|
||||
DOMCI_CLASS(StorageEvent)
|
||||
DOMCI_CLASS(StorageEventObsolete)
|
||||
|
||||
// DOMParser, XMLSerializer
|
||||
DOMCI_CLASS(DOMParser)
|
||||
|
@ -59,7 +59,6 @@ SDK_XPIDLSRCS = \
|
||||
nsIDOMStorage.idl \
|
||||
nsIDOMStorageObsolete.idl\
|
||||
nsIDOMStorageEvent.idl \
|
||||
nsIDOMStorageEventObsolete.idl \
|
||||
nsIDOMStorageItem.idl \
|
||||
nsIDOMStorageIndexedDB.idl \
|
||||
$(NULL)
|
||||
|
@ -1,65 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Neil Deakin <enndeakin@sympatico.ca>
|
||||
* Portions created by the Initial Developer are Copyright (C) 2006
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "domstubs.idl"
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
/**
|
||||
* Interface for a client side storage. See
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#scs-client-side
|
||||
* for more information.
|
||||
*
|
||||
* Event sent to a window when a storage area changes.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(2b3b40fe-4734-4661-b7ff-dc555215db4e)]
|
||||
interface nsIDOMStorageEventObsolete : nsIDOMEvent
|
||||
{
|
||||
/**
|
||||
* Domain of the storage area which changed, or #session for
|
||||
* session storage.
|
||||
*/
|
||||
readonly attribute DOMString domain;
|
||||
|
||||
/**
|
||||
* Initialize a storage event.
|
||||
*/
|
||||
void initStorageEvent(in DOMString typeArg,
|
||||
in boolean canBubbleArg,
|
||||
in boolean cancelableArg,
|
||||
in DOMString domainArg);
|
||||
};
|
@ -615,23 +615,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMStorage)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(StorageObsolete)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
nsresult
|
||||
NS_NewDOMStorage(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
||||
{
|
||||
nsDOMStorage* storage = new nsDOMStorage();
|
||||
if (!storage)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return storage->QueryInterface(aIID, aResult);
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_NewDOMStorage2(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
||||
{
|
||||
nsDOMStorage2* storage = new nsDOMStorage2();
|
||||
if (!storage)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return storage->QueryInterface(aIID, aResult);
|
||||
}
|
||||
|
||||
@ -2193,41 +2180,3 @@ nsDOMStorageEvent::InitFromCtor(const nsAString& aType,
|
||||
return InitStorageEvent(aType, d.bubbles, d.cancelable, d.key, d.oldValue,
|
||||
d.newValue, d.url, d.storageArea);
|
||||
}
|
||||
|
||||
// Obsolete globalStorage event
|
||||
|
||||
DOMCI_DATA(StorageEventObsolete, nsDOMStorageEventObsolete)
|
||||
|
||||
// QueryInterface implementation for nsDOMStorageEventObsolete
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMStorageEventObsolete)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMStorageEventObsolete)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(StorageEventObsolete)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsDOMStorageEventObsolete, nsDOMEvent)
|
||||
NS_IMPL_RELEASE_INHERITED(nsDOMStorageEventObsolete, nsDOMEvent)
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMStorageEventObsolete::GetDomain(nsAString& aDomain)
|
||||
{
|
||||
// mDomain will be #session for session storage for events that fire
|
||||
// due to a change in a session storage object.
|
||||
aDomain = mDomain;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMStorageEventObsolete::InitStorageEvent(const nsAString& aTypeArg,
|
||||
bool aCanBubbleArg,
|
||||
bool aCancelableArg,
|
||||
const nsAString& aDomainArg)
|
||||
{
|
||||
nsresult rv = InitEvent(aTypeArg, aCanBubbleArg, aCancelableArg);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mDomain = aDomainArg;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -54,7 +54,6 @@
|
||||
#include "nsIDOMToString.h"
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsIDOMStorageEvent.h"
|
||||
#include "nsIDOMStorageEventObsolete.h"
|
||||
#include "nsIDOMStorageManager.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIObserver.h"
|
||||
@ -555,30 +554,6 @@ protected:
|
||||
nsCOMPtr<nsIDOMStorage> mStorageArea;
|
||||
};
|
||||
|
||||
class nsDOMStorageEventObsolete : public nsDOMEvent,
|
||||
public nsIDOMStorageEventObsolete
|
||||
{
|
||||
public:
|
||||
nsDOMStorageEventObsolete()
|
||||
: nsDOMEvent(nsnull, nsnull)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~nsDOMStorageEventObsolete()
|
||||
{
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMSTORAGEEVENTOBSOLETE
|
||||
NS_FORWARD_NSIDOMEVENT(nsDOMEvent::)
|
||||
|
||||
protected:
|
||||
nsString mDomain;
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewDOMStorage(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
||||
|
||||
nsresult
|
||||
NS_NewDOMStorage2(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
||||
|
||||
|
@ -745,7 +745,6 @@ NS_DEFINE_NAMED_CID(NS_XMLHTTPREQUEST_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_EVENTSOURCE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WEBSOCKET_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DOMPARSER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DOMSTORAGE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DOMSTORAGE2_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DOMSTORAGEMANAGER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DOMJSON_CID);
|
||||
@ -1016,7 +1015,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
|
||||
{ &kNS_EVENTSOURCE_CID, false, NULL, nsEventSourceConstructor },
|
||||
{ &kNS_WEBSOCKET_CID, false, NULL, nsWebSocketConstructor },
|
||||
{ &kNS_DOMPARSER_CID, false, NULL, nsDOMParserConstructor },
|
||||
{ &kNS_DOMSTORAGE_CID, false, NULL, NS_NewDOMStorage },
|
||||
{ &kNS_DOMSTORAGE2_CID, false, NULL, NS_NewDOMStorage2 },
|
||||
{ &kNS_DOMSTORAGEMANAGER_CID, false, NULL, nsDOMStorageManagerConstructor },
|
||||
{ &kNS_DOMJSON_CID, false, NULL, NS_NewJSON },
|
||||
@ -1151,7 +1149,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
|
||||
{ NS_EVENTSOURCE_CONTRACTID, &kNS_EVENTSOURCE_CID },
|
||||
{ NS_WEBSOCKET_CONTRACTID, &kNS_WEBSOCKET_CID },
|
||||
{ NS_DOMPARSER_CONTRACTID, &kNS_DOMPARSER_CID },
|
||||
{ "@mozilla.org/dom/storage;1", &kNS_DOMSTORAGE_CID },
|
||||
{ "@mozilla.org/dom/storage;2", &kNS_DOMSTORAGE2_CID },
|
||||
{ "@mozilla.org/dom/storagemanager;1", &kNS_DOMSTORAGEMANAGER_CID },
|
||||
{ "@mozilla.org/dom/json;1", &kNS_DOMJSON_CID },
|
||||
|
Loading…
Reference in New Issue
Block a user