author | Boris Zbarsky <bzbarsky@mit.edu> |
Wed, 26 Dec 2012 13:40:46 -0800 (2012-12-26) | |
changeset 117068 | f5638aa67e2330897e40e4cdf25ddf1a7eb55ec8 |
parent 117067 | dc616866209937ed941d1abeb1c939c32888a003 |
child 117069 | e364512a658fe9dd20e711bd9b93893aee2045d1 |
push id | 20289 |
push user | bzbarsky@mozilla.com |
push date | Wed, 26 Dec 2012 21:44:58 +0000 (2012-12-26) |
treeherder | mozilla-inbound@e364512a658f [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | peterv |
bugs | 824448 |
milestone | 20.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/content/html/content/src/HTMLHeadingElement.cpp +++ b/content/html/content/src/HTMLHeadingElement.cpp @@ -1,14 +1,15 @@ /* -*- Mode: C++; 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/. */ #include "mozilla/dom/HTMLHeadingElement.h" +#include "mozilla/dom/HTMLHeadingElementBinding.h" #include "mozilla/Util.h" #include "nsGkAtoms.h" #include "nsStyleConsts.h" #include "nsMappedAttributes.h" #include "nsRuleData.h" #include "mozAutoDocUpdate.h" @@ -31,16 +32,21 @@ NS_INTERFACE_TABLE_HEAD(HTMLHeadingEleme nsIDOMHTMLHeadingElement) NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLHeadingElement, nsGenericHTMLElement) 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) bool HTMLHeadingElement::ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute, const nsAString& aValue,
--- a/content/html/content/src/HTMLHeadingElement.h +++ b/content/html/content/src/HTMLHeadingElement.h @@ -14,16 +14,17 @@ namespace dom { class HTMLHeadingElement MOZ_FINAL : public nsGenericHTMLElement, public nsIDOMHTMLHeadingElement { public: HTMLHeadingElement(already_AddRefed<nsINodeInfo> aNodeInfo) : nsGenericHTMLElement(aNodeInfo) { + SetIsDOMBinding(); } virtual ~HTMLHeadingElement(); // nsISupports NS_DECL_ISUPPORTS_INHERITED // nsIDOMNode NS_FORWARD_NSIDOMNODE_TO_NSINODE @@ -41,14 +42,18 @@ public: nsIAtom* aAttribute, const nsAString& aValue, nsAttrValue& aResult); NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const; nsMapRuleToAttributesFunc GetAttributeMappingFunction() const; 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 } // namespace dom #endif // mozilla_dom_HTMLHeadingElement_h
new file mode 100644 --- /dev/null +++ b/dom/webidl/HTMLHeadingElement.webidl @@ -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 {};
--- a/dom/webidl/WebIDL.mk +++ b/dom/webidl/WebIDL.mk @@ -50,16 +50,17 @@ webidl_files = \ HTMLBodyElement.webidl \ HTMLCollection.webidl \ HTMLDataListElement.webidl \ HTMLDivElement.webidl \ HTMLDocument.webidl \ HTMLElement.webidl \ HTMLFontElement.webidl \ HTMLFrameSetElement.webidl \ + HTMLHeadingElement.webidl \ HTMLLabelElement.webidl \ HTMLOptionsCollection.webidl \ HTMLPropertiesCollection.webidl \ ImageData.webidl \ Location.webidl \ MutationObserver.webidl \ Node.webidl \ NodeFilter.webidl \