Bug 824448 part 2. Switch HTMLHeadingElement to WebIDL bindings. r=peterv

This commit is contained in:
Boris Zbarsky 2012-12-26 13:40:46 -08:00
parent ae18157740
commit 8c6988d0fe
4 changed files with 26 additions and 0 deletions

View File

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/HTMLHeadingElement.h"
#include "mozilla/dom/HTMLHeadingElementBinding.h"
#include "mozilla/Util.h"
#include "nsGkAtoms.h"
@ -36,6 +37,11 @@ NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLHeadingElement)
NS_IMPL_ELEMENT_CLONE(HTMLHeadingElement)
JSObject*
HTMLHeadingElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap)
{
return HTMLHeadingElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
}
NS_IMPL_STRING_ATTR(HTMLHeadingElement, Align, align)

View File

@ -19,6 +19,7 @@ public:
HTMLHeadingElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
SetIsDOMBinding();
}
virtual ~HTMLHeadingElement();
@ -46,6 +47,10 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
virtual nsIDOMNode* AsDOMNode() { return this; }
protected:
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope,
bool *aTriedToWrap) MOZ_OVERRIDE;
};
} // namespace mozilla

View File

@ -0,0 +1,14 @@
/* -*- 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/
*
* © 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.
*/
interface HTMLHeadingElement : HTMLElement {};

View File

@ -55,6 +55,7 @@ webidl_files = \
HTMLElement.webidl \
HTMLFontElement.webidl \
HTMLFrameSetElement.webidl \
HTMLHeadingElement.webidl \
HTMLLabelElement.webidl \
HTMLOptionsCollection.webidl \
HTMLPropertiesCollection.webidl \