Skip to content

Commit

Permalink
Bug 1390209 - Remove unused nsIDOMHTML*Element interfaces. r=qdot
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: DagD3IHhRZy

--HG--
extra : rebase_source : 2add5ad8e9181ba9bf29f53a6df75b730ab5ea78
  • Loading branch information
vyv03354 committed Aug 14, 2017
1 parent e5cb282 commit 5f03596
Show file tree
Hide file tree
Showing 69 changed files with 102 additions and 1,166 deletions.
1 change: 0 additions & 1 deletion accessible/html/HTMLImageMapAccessible.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "HTMLLinkAccessible.h"
#include "ImageAccessibleWrap.h"
#include "nsIDOMHTMLMapElement.h"

namespace mozilla {
namespace a11y {
Expand Down
105 changes: 1 addition & 104 deletions dom/html/HTMLBodyElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,113 +38,10 @@ HTMLBodyElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
return HTMLBodyElementBinding::Wrap(aCx, this, aGivenProto);
}

NS_IMPL_ISUPPORTS_INHERITED(HTMLBodyElement, nsGenericHTMLElement,
nsIDOMHTMLBodyElement)
NS_IMPL_ISUPPORTS_INHERITED0(HTMLBodyElement, nsGenericHTMLElement)

NS_IMPL_ELEMENT_CLONE(HTMLBodyElement)

NS_IMETHODIMP
HTMLBodyElement::SetBackground(const nsAString& aBackground)
{
ErrorResult rv;
SetBackground(aBackground, rv);
return rv.StealNSResult();
}

NS_IMETHODIMP
HTMLBodyElement::GetBackground(nsAString& aBackground)
{
DOMString background;
GetBackground(background);
background.ToString(aBackground);
return NS_OK;
}

NS_IMETHODIMP
HTMLBodyElement::SetVLink(const nsAString& aVLink)
{
ErrorResult rv;
SetVLink(aVLink, rv);
return rv.StealNSResult();
}

NS_IMETHODIMP
HTMLBodyElement::GetVLink(nsAString& aVLink)
{
DOMString vLink;
GetVLink(vLink);
vLink.ToString(aVLink);
return NS_OK;
}

NS_IMETHODIMP
HTMLBodyElement::SetALink(const nsAString& aALink)
{
ErrorResult rv;
SetALink(aALink, rv);
return rv.StealNSResult();
}

NS_IMETHODIMP
HTMLBodyElement::GetALink(nsAString& aALink)
{
DOMString aLink;
GetALink(aLink);
aLink.ToString(aALink);
return NS_OK;
}

NS_IMETHODIMP
HTMLBodyElement::SetLink(const nsAString& aLink)
{
ErrorResult rv;
SetLink(aLink, rv);
return rv.StealNSResult();
}

NS_IMETHODIMP
HTMLBodyElement::GetLink(nsAString& aLink)
{
DOMString link;
GetLink(link);
link.ToString(aLink);
return NS_OK;
}

NS_IMETHODIMP
HTMLBodyElement::SetText(const nsAString& aText)
{
ErrorResult rv;
SetText(aText, rv);
return rv.StealNSResult();
}

NS_IMETHODIMP
HTMLBodyElement::GetText(nsAString& aText)
{
DOMString text;
GetText(text);
text.ToString(aText);
return NS_OK;
}

NS_IMETHODIMP
HTMLBodyElement::SetBgColor(const nsAString& aBgColor)
{
ErrorResult rv;
SetBgColor(aBgColor, rv);
return rv.StealNSResult();
}

NS_IMETHODIMP
HTMLBodyElement::GetBgColor(nsAString& aBgColor)
{
DOMString bgColor;
GetBgColor(bgColor);
bgColor.ToString(aBgColor);
return NS_OK;
}

bool
HTMLBodyElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
Expand Down
37 changes: 26 additions & 11 deletions dom/html/HTMLBodyElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLBodyElement.h"
#include "nsIStyleRule.h"

namespace mozilla {
Expand All @@ -19,8 +18,7 @@ namespace dom {

class OnBeforeUnloadEventHandlerNonNull;

class HTMLBodyElement final : public nsGenericHTMLElement,
public nsIDOMHTMLBodyElement
class HTMLBodyElement final : public nsGenericHTMLElement
{
public:
using Element::GetText;
Expand All @@ -34,9 +32,6 @@ class HTMLBodyElement final : public nsGenericHTMLElement,
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

// nsIDOMHTMLBodyElement
NS_DECL_NSIDOMHTMLBODYELEMENT

// Event listener stuff; we need to declare only the ones we need to
// forward to window that don't come from nsIDOMHTMLBodyElement.
#define EVENT(name_, id_, type_, struct_) /* nothing; handled by the shim */
Expand All @@ -53,42 +48,62 @@ class HTMLBodyElement final : public nsGenericHTMLElement,
#undef WINDOW_EVENT_HELPER
#undef EVENT

void GetText(DOMString& aText)
void GetText(nsAString& aText)
{
GetHTMLAttr(nsGkAtoms::text, aText);
}
void SetText(const nsAString& aText)
{
SetHTMLAttr(nsGkAtoms::text, aText);
}
void SetText(const nsAString& aText, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::text, aText, aError);
}
void GetLink(DOMString& aLink)
void GetLink(nsAString& aLink)
{
GetHTMLAttr(nsGkAtoms::link, aLink);
}
void SetLink(const nsAString& aLink)
{
SetHTMLAttr(nsGkAtoms::link, aLink);
}
void SetLink(const nsAString& aLink, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::link, aLink, aError);
}
void GetVLink(DOMString& aVLink)
void GetVLink(nsAString& aVLink)
{
GetHTMLAttr(nsGkAtoms::vlink, aVLink);
}
void SetVLink(const nsAString& aVLink)
{
SetHTMLAttr(nsGkAtoms::vlink, aVLink);
}
void SetVLink(const nsAString& aVLink, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::vlink, aVLink, aError);
}
void GetALink(DOMString& aALink)
void GetALink(nsAString& aALink)
{
GetHTMLAttr(nsGkAtoms::alink, aALink);
}
void SetALink(const nsAString& aALink)
{
SetHTMLAttr(nsGkAtoms::alink, aALink);
}
void SetALink(const nsAString& aALink, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::alink, aALink, aError);
}
void GetBgColor(DOMString& aBgColor)
void GetBgColor(nsAString& aBgColor)
{
GetHTMLAttr(nsGkAtoms::bgcolor, aBgColor);
}
void SetBgColor(const nsAString& aBgColor)
{
SetHTMLAttr(nsGkAtoms::bgcolor, aBgColor);
}
void SetBgColor(const nsAString& aBgColor, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::bgcolor, aBgColor, aError);
Expand Down
19 changes: 0 additions & 19 deletions dom/html/HTMLFieldSetElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,12 @@ NS_IMPL_RELEASE_INHERITED(HTMLFieldSetElement, Element)
// QueryInterface implementation for HTMLFieldSetElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement)
NS_INTERFACE_TABLE_INHERITED(HTMLFieldSetElement,
nsIDOMHTMLFieldSetElement,
nsIConstraintValidation)
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElement)

NS_IMPL_ELEMENT_CLONE(HTMLFieldSetElement)


NS_IMPL_BOOL_ATTR(HTMLFieldSetElement, Disabled, disabled)
NS_IMPL_STRING_ATTR(HTMLFieldSetElement, Name, name)

bool
HTMLFieldSetElement::IsDisabledForEvents(EventMessage aMessage)
{
Expand Down Expand Up @@ -106,14 +102,6 @@ HTMLFieldSetElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
aValue, aOldValue, aNotify);
}

// nsIDOMHTMLFieldSetElement

NS_IMETHODIMP
HTMLFieldSetElement::GetForm(nsIDOMHTMLFormElement** aForm)
{
return nsGenericHTMLFormElement::GetForm(aForm);
}

NS_IMETHODIMP
HTMLFieldSetElement::GetType(nsAString& aType)
{
Expand All @@ -130,13 +118,6 @@ HTMLFieldSetElement::MatchListedElements(Element* aElement, int32_t aNamespaceID
return formControl;
}

NS_IMETHODIMP
HTMLFieldSetElement::GetElements(nsIDOMHTMLCollection** aElements)
{
NS_ADDREF(*aElements = Elements());
return NS_OK;
}

nsIHTMLCollection*
HTMLFieldSetElement::Elements()
{
Expand Down
12 changes: 5 additions & 7 deletions dom/html/HTMLFieldSetElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLFieldSetElement.h"
#include "nsIConstraintValidation.h"
#include "mozilla/dom/HTMLFormElement.h"
#include "mozilla/dom/ValidityState.h"
Expand All @@ -19,7 +18,6 @@ class EventChainPreVisitor;
namespace dom {

class HTMLFieldSetElement final : public nsGenericHTMLFormElement,
public nsIDOMHTMLFieldSetElement,
public nsIConstraintValidation
{
public:
Expand All @@ -34,9 +32,6 @@ class HTMLFieldSetElement final : public nsGenericHTMLFormElement,
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

// nsIDOMHTMLFieldSetElement
NS_DECL_NSIDOMHTMLFIELDSETELEMENT

// nsIContent
virtual nsresult GetEventTargetParent(
EventChainPreVisitor& aVisitor) override;
Expand Down Expand Up @@ -75,14 +70,17 @@ class HTMLFieldSetElement final : public nsGenericHTMLFormElement,
SetHTMLBoolAttr(nsGkAtoms::disabled, aValue, aRv);
}

// XPCOM GetName is OK for us
void GetName(nsAString& aValue)
{
GetHTMLAttr(nsGkAtoms::name, aValue);
}

void SetName(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::name, aValue, aRv);
}

// XPCOM GetType is OK for us
NS_IMETHOD GetType(nsAString & aType);

nsIHTMLCollection* Elements();

Expand Down
37 changes: 1 addition & 36 deletions dom/html/HTMLFrameSetElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,45 +26,10 @@ HTMLFrameSetElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
return HTMLFrameSetElementBinding::Wrap(aCx, this, aGivenProto);
}

NS_IMPL_ISUPPORTS_INHERITED(HTMLFrameSetElement, nsGenericHTMLElement,
nsIDOMHTMLFrameSetElement)
NS_IMPL_ISUPPORTS_INHERITED0(HTMLFrameSetElement, nsGenericHTMLElement)

NS_IMPL_ELEMENT_CLONE(HTMLFrameSetElement)

NS_IMETHODIMP
HTMLFrameSetElement::SetCols(const nsAString& aCols)
{
ErrorResult rv;
SetCols(aCols, rv);
return rv.StealNSResult();
}

NS_IMETHODIMP
HTMLFrameSetElement::GetCols(nsAString& aCols)
{
DOMString cols;
GetCols(cols);
cols.ToString(aCols);
return NS_OK;
}

NS_IMETHODIMP
HTMLFrameSetElement::SetRows(const nsAString& aRows)
{
ErrorResult rv;
SetRows(aRows, rv);
return rv.StealNSResult();
}

NS_IMETHODIMP
HTMLFrameSetElement::GetRows(nsAString& aRows)
{
DOMString rows;
GetRows(rows);
rows.ToString(aRows);
return NS_OK;
}

nsresult
HTMLFrameSetElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
const nsAttrValueOrString* aValue,
Expand Down
7 changes: 1 addition & 6 deletions dom/html/HTMLFrameSetElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "mozilla/Attributes.h"
#include "mozilla/UniquePtr.h"
#include "nsIDOMHTMLFrameSetElement.h"
#include "nsGenericHTMLElement.h"

/**
Expand Down Expand Up @@ -44,8 +43,7 @@ namespace dom {

class OnBeforeUnloadEventHandlerNonNull;

class HTMLFrameSetElement final : public nsGenericHTMLElement,
public nsIDOMHTMLFrameSetElement
class HTMLFrameSetElement final : public nsGenericHTMLElement
{
public:
explicit HTMLFrameSetElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
Expand All @@ -62,9 +60,6 @@ class HTMLFrameSetElement final : public nsGenericHTMLElement,
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

// nsIDOMHTMLFrameSetElement
NS_DECL_NSIDOMHTMLFRAMESETELEMENT

void GetCols(DOMString& aCols)
{
GetHTMLAttr(nsGkAtoms::cols, aCols);
Expand Down
3 changes: 1 addition & 2 deletions dom/html/HTMLHRElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ HTMLHRElement::~HTMLHRElement()
{
}

NS_IMPL_ISUPPORTS_INHERITED(HTMLHRElement, nsGenericHTMLElement,
nsIDOMHTMLHRElement)
NS_IMPL_ISUPPORTS_INHERITED0(HTMLHRElement, nsGenericHTMLElement)

NS_IMPL_ELEMENT_CLONE(HTMLHRElement)

Expand Down
Loading

0 comments on commit 5f03596

Please sign in to comment.