Bug 893117: Remove nsIDOMHTMLHeadingElement r=bz

This commit is contained in:
David Zbarsky 2013-07-30 14:55:12 -07:00
parent 287910005d
commit 5be64ca260
6 changed files with 13 additions and 39 deletions

View File

@ -227,7 +227,7 @@ let Util = {
aElement instanceof Ci.nsIDOMHTMLDivElement ||
aElement instanceof Ci.nsIDOMHTMLLIElement ||
aElement instanceof Ci.nsIDOMHTMLPreElement ||
aElement instanceof Ci.nsIDOMHTMLHeadingElement ||
aElement instanceof HTMLHeadingElement ||
aElement instanceof HTMLTableCellElement ||
aElement instanceof Ci.nsIDOMHTMLBodyElement);
},

View File

@ -26,11 +26,8 @@ NS_IMPL_ADDREF_INHERITED(HTMLHeadingElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLHeadingElement, Element)
// QueryInterface implementation for HTMLHeadingElement
NS_INTERFACE_TABLE_HEAD(HTMLHeadingElement)
NS_INTERFACE_MAP_BEGIN(HTMLHeadingElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLHeadingElement,
nsIDOMHTMLHeadingElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
@ -42,9 +39,6 @@ HTMLHeadingElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
return HTMLHeadingElementBinding::Wrap(aCx, aScope, this);
}
NS_IMPL_STRING_ATTR(HTMLHeadingElement, Align, align)
bool
HTMLHeadingElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,

View File

@ -7,14 +7,13 @@
#define mozilla_dom_HTMLHeadingElement_h
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLHeadingElement.h"
#include "nsGenericHTMLElement.h"
namespace mozilla {
namespace dom {
class HTMLHeadingElement MOZ_FINAL : public nsGenericHTMLElement,
public nsIDOMHTMLHeadingElement
public nsIDOMHTMLElement
{
public:
HTMLHeadingElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -35,9 +34,6 @@ public:
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
// nsIDOMHTMLHeadingElement
NS_DECL_NSIDOMHTMLHEADINGELEMENT
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
@ -47,8 +43,15 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// The XPCOM versions of GetAlign and SetAlign are fine for us for
// use from WebIDL.
void GetAlign(nsAString& aAlign)
{
GetHTMLAttr(nsGkAtoms::align, aAlign);
}
void SetAlign(const nsAString& aAlign, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::align, aAlign, aRv);
}
protected:
virtual JSObject* WrapNode(JSContext *aCx,

View File

@ -29,7 +29,6 @@ XPIDL_SOURCES += [
'nsIDOMHTMLFrameSetElement.idl',
'nsIDOMHTMLHRElement.idl',
'nsIDOMHTMLHeadElement.idl',
'nsIDOMHTMLHeadingElement.idl',
'nsIDOMHTMLHtmlElement.idl',
'nsIDOMHTMLIFrameElement.idl',
'nsIDOMHTMLImageElement.idl',

View File

@ -1,23 +0,0 @@
/* -*- 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/. */
#include "nsIDOMHTMLElement.idl"
/**
* The nsIDOMHTMLHeadingElement interface is the interface to a
* [X]HTML h1, h2, h3, ... element.
*
* This interface is trying to follow the DOM Level 2 HTML specification:
* http://www.w3.org/TR/DOM-Level-2-HTML/
*
* with changes from the work-in-progress WHATWG HTML specification:
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[scriptable, uuid(e601aadf-e9e7-4605-a6f9-2cd2006723de)]
interface nsIDOMHTMLHeadingElement : nsIDOMHTMLElement
{
attribute DOMString align;
};

View File

@ -17,5 +17,6 @@ interface HTMLHeadingElement : HTMLElement {
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
partial interface HTMLHeadingElement {
[SetterThrows]
attribute DOMString align;
};