Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "HTMLDataListElement.h"
8 : #include "mozilla/dom/HTMLDataListElementBinding.h"
9 :
10 0 : NS_IMPL_NS_NEW_HTML_ELEMENT(DataList)
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 0 : HTMLDataListElement::~HTMLDataListElement()
16 : {
17 0 : }
18 :
19 : JSObject*
20 0 : HTMLDataListElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
21 : {
22 0 : return HTMLDataListElementBinding::Wrap(aCx, this, aGivenProto);
23 : }
24 :
25 0 : NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLDataListElement, nsGenericHTMLElement,
26 : mOptions)
27 :
28 0 : NS_IMPL_ADDREF_INHERITED(HTMLDataListElement, Element)
29 0 : NS_IMPL_RELEASE_INHERITED(HTMLDataListElement, Element)
30 :
31 0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
32 0 : NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
33 :
34 :
35 0 : NS_IMPL_ELEMENT_CLONE(HTMLDataListElement)
36 :
37 : bool
38 0 : HTMLDataListElement::MatchOptions(Element* aElement, int32_t aNamespaceID,
39 : nsIAtom* aAtom, void* aData)
40 : {
41 0 : return aElement->NodeInfo()->Equals(nsGkAtoms::option, kNameSpaceID_XHTML) &&
42 0 : !aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);
43 : }
44 :
45 : } // namespace dom
46 : } // namespace mozilla
|