mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 824823 part 6. Move HTMLLIElement to WebIDL bindings. r=peterv
This commit is contained in:
parent
96cb81e954
commit
c7d060e020
@ -4,6 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/dom/HTMLLIElement.h"
|
||||
#include "mozilla/dom/HTMLLIElementBinding.h"
|
||||
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsGkAtoms.h"
|
||||
@ -116,5 +117,11 @@ HTMLLIElement::GetAttributeMappingFunction() const
|
||||
return &MapAttributesIntoRule;
|
||||
}
|
||||
|
||||
JSObject*
|
||||
HTMLLIElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap)
|
||||
{
|
||||
return HTMLLIElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -20,6 +20,7 @@ public:
|
||||
HTMLLIElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
: nsGenericHTMLElement(aNodeInfo)
|
||||
{
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
virtual ~HTMLLIElement();
|
||||
|
||||
@ -47,6 +48,28 @@ public:
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||
virtual nsXPCClassInfo* GetClassInfo();
|
||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||
|
||||
// WebIDL API
|
||||
void GetType(nsString& aType)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::type, aType);
|
||||
}
|
||||
void SetType(const nsAString& aType, mozilla::ErrorResult& rv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::type, aType, rv);
|
||||
}
|
||||
int32_t Value() const
|
||||
{
|
||||
return GetIntAttr(nsGkAtoms::value, 0);
|
||||
}
|
||||
void SetValue(int32_t aValue, mozilla::ErrorResult& rv)
|
||||
{
|
||||
SetHTMLIntAttr(nsGkAtoms::value, aValue, rv);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope,
|
||||
bool *aTriedToWrap) MOZ_OVERRIDE;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
@ -366,6 +366,10 @@ DOMInterfaces = {
|
||||
'hasInstanceInterface': 'nsIDOMHTMLLabelElement',
|
||||
},
|
||||
|
||||
'HTMLLIElement': {
|
||||
'hasInstanceInterface': 'nsIDOMHTMLLIElement',
|
||||
},
|
||||
|
||||
'HTMLOListElement': {
|
||||
'headerFile' : 'mozilla/dom/HTMLSharedListElement.h',
|
||||
'hasInstanceInterface': 'nsIDOMHTMLOListElement'
|
||||
|
27
dom/webidl/HTMLLIElement.webidl
Normal file
27
dom/webidl/HTMLLIElement.webidl
Normal file
@ -0,0 +1,27 @@
|
||||
/* -*- 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/.
|
||||
*
|
||||
* The origin of this IDL file is
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
*
|
||||
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
|
||||
* Opera Software ASA. You are granted a license to use, reproduce
|
||||
* and create derivative works of this document.
|
||||
*/
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#the-li-element
|
||||
interface HTMLLIElement : HTMLElement {
|
||||
[SetterThrows]
|
||||
attribute long value;
|
||||
/*
|
||||
};
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
partial interface HTMLLIElement {
|
||||
*/
|
||||
[SetterThrows]
|
||||
attribute DOMString type;
|
||||
};
|
@ -62,6 +62,7 @@ webidl_files = \
|
||||
HTMLHeadingElement.webidl \
|
||||
HTMLImageElement.webidl \
|
||||
HTMLLabelElement.webidl \
|
||||
HTMLLIElement.webidl \
|
||||
HTMLOListElement.webidl \
|
||||
HTMLOptionsCollection.webidl \
|
||||
HTMLPropertiesCollection.webidl \
|
||||
|
Loading…
Reference in New Issue
Block a user