From 0e02d64bfd045db2cc9327dd15186dc71f3fcd9e Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Thu, 18 Jul 2013 17:43:37 -0700 Subject: [PATCH] Bug 893117: Remove nsIDOMHTMLTableColElement r=peterv --- .../html/content/src/HTMLTableColElement.cpp | 102 ------------------ .../html/content/src/HTMLTableColElement.h | 6 +- dom/interfaces/html/moz.build | 1 - .../html/nsIDOMHTMLTableColElement.idl | 28 ----- dom/webidl/HTMLTableColElement.webidl | 6 ++ 5 files changed, 7 insertions(+), 136 deletions(-) delete mode 100644 dom/interfaces/html/nsIDOMHTMLTableColElement.idl diff --git a/content/html/content/src/HTMLTableColElement.cpp b/content/html/content/src/HTMLTableColElement.cpp index ca9986f1ce72..6687dab9d41d 100644 --- a/content/html/content/src/HTMLTableColElement.cpp +++ b/content/html/content/src/HTMLTableColElement.cpp @@ -36,113 +36,11 @@ NS_IMPL_RELEASE_INHERITED(HTMLTableColElement, Element) // QueryInterface implementation for HTMLTableColElement NS_INTERFACE_TABLE_HEAD(HTMLTableColElement) NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement) - NS_INTERFACE_TABLE_INHERITED1(HTMLTableColElement, - nsIDOMHTMLTableColElement) NS_INTERFACE_TABLE_TO_MAP_SEGUE NS_ELEMENT_INTERFACE_MAP_END NS_IMPL_ELEMENT_CLONE(HTMLTableColElement) -NS_IMETHODIMP -HTMLTableColElement::SetSpan(int32_t aSpan) -{ - ErrorResult rv; - SetSpan(aSpan, rv); - return rv.ErrorCode(); -} - -NS_IMETHODIMP -HTMLTableColElement::GetSpan(int32_t* aSpan) -{ - *aSpan = Span(); - return NS_OK; -} - -NS_IMETHODIMP -HTMLTableColElement::SetAlign(const nsAString& aAlign) -{ - ErrorResult rv; - SetAlign(aAlign, rv); - return rv.ErrorCode(); -} - -NS_IMETHODIMP -HTMLTableColElement::GetAlign(nsAString& aAlign) -{ - nsString align; - GetAlign(align); - aAlign = align; - return NS_OK; -} - -NS_IMETHODIMP -HTMLTableColElement::SetVAlign(const nsAString& aVAlign) -{ - ErrorResult rv; - SetVAlign(aVAlign, rv); - return rv.ErrorCode(); -} - -NS_IMETHODIMP -HTMLTableColElement::GetVAlign(nsAString& aVAlign) -{ - nsString vAlign; - GetVAlign(vAlign); - aVAlign = vAlign; - return NS_OK; -} - -NS_IMETHODIMP -HTMLTableColElement::SetCh(const nsAString& aCh) -{ - ErrorResult rv; - SetCh(aCh, rv); - return rv.ErrorCode(); -} - -NS_IMETHODIMP -HTMLTableColElement::GetCh(nsAString& aCh) -{ - nsString ch; - GetCh(ch); - aCh = ch; - return NS_OK; -} - -NS_IMETHODIMP -HTMLTableColElement::SetChOff(const nsAString& aChOff) -{ - ErrorResult rv; - SetChOff(aChOff, rv); - return rv.ErrorCode(); -} - -NS_IMETHODIMP -HTMLTableColElement::GetChOff(nsAString& aChOff) -{ - nsString chOff; - GetChOff(chOff); - aChOff = chOff; - return NS_OK; -} - -NS_IMETHODIMP -HTMLTableColElement::SetWidth(const nsAString& aWidth) -{ - ErrorResult rv; - SetWidth(aWidth, rv); - return rv.ErrorCode(); -} - -NS_IMETHODIMP -HTMLTableColElement::GetWidth(nsAString& aWidth) -{ - nsString width; - GetWidth(width); - aWidth = width; - return NS_OK; -} - bool HTMLTableColElement::ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute, diff --git a/content/html/content/src/HTMLTableColElement.h b/content/html/content/src/HTMLTableColElement.h index 401050610198..225511d8e5c4 100644 --- a/content/html/content/src/HTMLTableColElement.h +++ b/content/html/content/src/HTMLTableColElement.h @@ -7,13 +7,12 @@ #include "mozilla/Attributes.h" #include "nsGenericHTMLElement.h" -#include "nsIDOMHTMLTableColElement.h" namespace mozilla { namespace dom { class HTMLTableColElement MOZ_FINAL : public nsGenericHTMLElement, - public nsIDOMHTMLTableColElement + public nsIDOMHTMLElement { public: HTMLTableColElement(already_AddRefed aNodeInfo) @@ -34,9 +33,6 @@ public: // nsIDOMHTMLElement NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC - // nsIDOMHTMLTableColElement - NS_DECL_NSIDOMHTMLTABLECOLELEMENT - uint32_t Span() const { return GetIntAttr(nsGkAtoms::span, 1); diff --git a/dom/interfaces/html/moz.build b/dom/interfaces/html/moz.build index 6cccfc394d2d..4e8f47e616ca 100644 --- a/dom/interfaces/html/moz.build +++ b/dom/interfaces/html/moz.build @@ -62,7 +62,6 @@ XPIDL_SOURCES += [ 'nsIDOMHTMLSourceElement.idl', 'nsIDOMHTMLStyleElement.idl', 'nsIDOMHTMLTableCaptionElem.idl', - 'nsIDOMHTMLTableColElement.idl', 'nsIDOMHTMLTableElement.idl', 'nsIDOMHTMLTextAreaElement.idl', 'nsIDOMHTMLTitleElement.idl', diff --git a/dom/interfaces/html/nsIDOMHTMLTableColElement.idl b/dom/interfaces/html/nsIDOMHTMLTableColElement.idl deleted file mode 100644 index 95ab44e5b352..000000000000 --- a/dom/interfaces/html/nsIDOMHTMLTableColElement.idl +++ /dev/null @@ -1,28 +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 nsIDOMHTMLTableColElement interface is the interface to a - * [X]HTML col 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(cd5a5a33-7101-4d32-987c-337c004fce1a)] -interface nsIDOMHTMLTableColElement : nsIDOMHTMLElement -{ - attribute DOMString align; - attribute DOMString ch; - attribute DOMString chOff; - attribute long span; - attribute DOMString vAlign; - attribute DOMString width; -}; diff --git a/dom/webidl/HTMLTableColElement.webidl b/dom/webidl/HTMLTableColElement.webidl index 0e6c858e7d9d..c927541a3dc4 100644 --- a/dom/webidl/HTMLTableColElement.webidl +++ b/dom/webidl/HTMLTableColElement.webidl @@ -12,13 +12,19 @@ */ interface HTMLTableColElement : HTMLElement { + [SetterThrows] attribute unsigned long span; }; partial interface HTMLTableColElement { + [SetterThrows] attribute DOMString align; + [SetterThrows] attribute DOMString ch; + [SetterThrows] attribute DOMString chOff; + [SetterThrows] attribute DOMString vAlign; + [SetterThrows] attribute DOMString width; };