Bug 893117: Remove nsIDOMHTMLLabelElement r=bz

This commit is contained in:
David Zbarsky 2013-07-30 14:55:13 -07:00
parent 5058a43793
commit aa7c54d744
6 changed files with 3 additions and 69 deletions

View File

@ -15,7 +15,6 @@ let HTMLIFrameElement = Ci.nsIDOMHTMLIFrameElement;
let HTMLDocument = Ci.nsIDOMHTMLDocument;
let HTMLHtmlElement = Ci.nsIDOMHTMLHtmlElement;
let HTMLBodyElement = Ci.nsIDOMHTMLBodyElement;
let HTMLLabelElement = Ci.nsIDOMHTMLLabelElement;
let HTMLButtonElement = Ci.nsIDOMHTMLButtonElement;
let HTMLOptGroupElement = Ci.nsIDOMHTMLOptGroupElement;
let HTMLOptionElement = Ci.nsIDOMHTMLOptionElement;

View File

@ -35,49 +35,13 @@ NS_IMPL_ADDREF_INHERITED(HTMLLabelElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLLabelElement, Element)
// QueryInterface implementation for HTMLLabelElement
NS_INTERFACE_TABLE_HEAD(HTMLLabelElement)
NS_INTERFACE_MAP_BEGIN(HTMLLabelElement)
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
NS_INTERFACE_TABLE_INHERITED1(HTMLLabelElement,
nsIDOMHTMLLabelElement)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_ELEMENT_INTERFACE_MAP_END
// nsIDOMHTMLLabelElement
NS_IMPL_ELEMENT_CLONE(HTMLLabelElement)
NS_IMETHODIMP
HTMLLabelElement::GetForm(nsIDOMHTMLFormElement** aForm)
{
return nsGenericHTMLFormElement::GetForm(aForm);
}
NS_IMETHODIMP
HTMLLabelElement::GetControl(nsIDOMHTMLElement** aElement)
{
nsCOMPtr<nsIDOMHTMLElement> element = do_QueryInterface(GetLabeledElement());
element.forget(aElement);
return NS_OK;
}
NS_IMETHODIMP
HTMLLabelElement::SetHtmlFor(const nsAString& aHtmlFor)
{
ErrorResult rv;
SetHtmlFor(aHtmlFor, rv);
return rv.ErrorCode();
}
NS_IMETHODIMP
HTMLLabelElement::GetHtmlFor(nsAString& aHtmlFor)
{
nsString htmlFor;
GetHtmlFor(htmlFor);
aHtmlFor = htmlFor;
return NS_OK;
}
void
HTMLLabelElement::Focus(ErrorResult& aError)
{

View File

@ -11,13 +11,12 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLLabelElement.h"
namespace mozilla {
namespace dom {
class HTMLLabelElement MOZ_FINAL : public nsGenericHTMLFormElement,
public nsIDOMHTMLLabelElement
public nsIDOMHTMLElement
{
public:
HTMLLabelElement(already_AddRefed<nsINodeInfo> aNodeInfo)
@ -38,9 +37,6 @@ public:
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsIDOMHTMLLabelElement
NS_DECL_NSIDOMHTMLLABELELEMENT
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC

View File

@ -33,7 +33,6 @@ XPIDL_SOURCES += [
'nsIDOMHTMLImageElement.idl',
'nsIDOMHTMLInputElement.idl',
'nsIDOMHTMLLIElement.idl',
'nsIDOMHTMLLabelElement.idl',
'nsIDOMHTMLLinkElement.idl',
'nsIDOMHTMLMapElement.idl',
'nsIDOMHTMLMediaElement.idl',

View File

@ -1,25 +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 nsIDOMHTMLLabelElement interface is the interface to a [X]HTML
* label 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(cbffa708-f51e-4c74-9644-19f9d417aac5)]
interface nsIDOMHTMLLabelElement : nsIDOMHTMLElement
{
readonly attribute nsIDOMHTMLFormElement form;
attribute DOMString htmlFor;
readonly attribute nsIDOMHTMLElement control;
};

View File

@ -13,6 +13,7 @@
interface HTMLLabelElement : HTMLElement {
readonly attribute HTMLFormElement? form;
[SetterThrows]
attribute DOMString htmlFor;
readonly attribute HTMLElement? control;
};