2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2010-04-26 11:42:00 +04:00
|
|
|
|
|
|
|
/*
|
2013-01-15 12:35:59 +04:00
|
|
|
* Implementation of DOMSettableTokenList specified by HTML5.
|
2010-04-26 11:42:00 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsDOMSettableTokenList_h___
|
|
|
|
#define nsDOMSettableTokenList_h___
|
|
|
|
|
|
|
|
#include "nsDOMTokenList.h"
|
|
|
|
|
|
|
|
class nsIAtom;
|
|
|
|
|
2013-01-15 12:35:59 +04:00
|
|
|
// nsISupports must be on the primary inheritance chain
|
2012-11-15 02:10:08 +04:00
|
|
|
// because nsDOMSettableTokenList is traversed by Element.
|
2013-01-15 12:35:59 +04:00
|
|
|
class nsDOMSettableTokenList MOZ_FINAL : public nsDOMTokenList
|
2010-04-26 11:42:00 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2013-01-15 12:35:59 +04:00
|
|
|
nsDOMSettableTokenList(mozilla::dom::Element* aElement, nsIAtom* aAttrAtom)
|
|
|
|
: nsDOMTokenList(aElement, aAttrAtom) {}
|
2010-04-26 11:42:00 +04:00
|
|
|
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 17:13:33 +03:00
|
|
|
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
|
2011-08-22 13:14:13 +04:00
|
|
|
|
2013-01-15 12:35:59 +04:00
|
|
|
// WebIDL
|
|
|
|
void GetValue(nsAString& aResult) { Stringify(aResult); }
|
|
|
|
void SetValue(const nsAString& aValue, mozilla::ErrorResult& rv);
|
2010-04-26 11:42:00 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsDOMSettableTokenList_h___
|
|
|
|
|