зеркало из https://github.com/mozilla/gecko-dev.git
Bug 893117: Remove nsIDOMHTMLOutputElement r=bz
This commit is contained in:
Родитель
67c8079b37
Коммит
4d1aa06dec
|
@ -53,8 +53,7 @@ NS_IMPL_RELEASE_INHERITED(HTMLOutputElement, Element)
|
||||||
|
|
||||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLOutputElement)
|
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLOutputElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED3(HTMLOutputElement,
|
NS_INTERFACE_TABLE_INHERITED2(HTMLOutputElement,
|
||||||
nsIDOMHTMLOutputElement,
|
|
||||||
nsIMutationObserver,
|
nsIMutationObserver,
|
||||||
nsIConstraintValidation)
|
nsIConstraintValidation)
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
||||||
|
@ -62,20 +61,12 @@ NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLOutputElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLOutputElement)
|
||||||
|
|
||||||
|
void
|
||||||
NS_IMPL_STRING_ATTR(HTMLOutputElement, Name, name)
|
|
||||||
|
|
||||||
// nsIConstraintValidation
|
|
||||||
NS_IMPL_NSICONSTRAINTVALIDATION_EXCEPT_SETCUSTOMVALIDITY(HTMLOutputElement)
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLOutputElement::SetCustomValidity(const nsAString& aError)
|
HTMLOutputElement::SetCustomValidity(const nsAString& aError)
|
||||||
{
|
{
|
||||||
nsIConstraintValidation::SetCustomValidity(aError);
|
nsIConstraintValidation::SetCustomValidity(aError);
|
||||||
|
|
||||||
UpdateState(true);
|
UpdateState(true);
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -149,49 +140,20 @@ HTMLOutputElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLOutputElement::GetForm(nsIDOMHTMLFormElement** aForm)
|
HTMLOutputElement::SetValue(const nsAString& aValue, ErrorResult& aRv)
|
||||||
{
|
|
||||||
return nsGenericHTMLFormElement::GetForm(aForm);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLOutputElement::GetType(nsAString& aType)
|
|
||||||
{
|
|
||||||
aType.AssignLiteral("output");
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLOutputElement::GetValue(nsAString& aValue)
|
|
||||||
{
|
|
||||||
nsContentUtils::GetNodeTextContent(this, true, aValue);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLOutputElement::SetValue(const nsAString& aValue)
|
|
||||||
{
|
{
|
||||||
mValueModeFlag = eModeValue;
|
mValueModeFlag = eModeValue;
|
||||||
return nsContentUtils::SetNodeTextContent(this, aValue, true);
|
aRv = nsContentUtils::SetNodeTextContent(this, aValue, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLOutputElement::GetDefaultValue(nsAString& aDefaultValue)
|
HTMLOutputElement::SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv)
|
||||||
{
|
|
||||||
aDefaultValue = mDefaultValue;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLOutputElement::SetDefaultValue(const nsAString& aDefaultValue)
|
|
||||||
{
|
{
|
||||||
mDefaultValue = aDefaultValue;
|
mDefaultValue = aDefaultValue;
|
||||||
if (mValueModeFlag == eModeDefault) {
|
if (mValueModeFlag == eModeDefault) {
|
||||||
return nsContentUtils::SetNodeTextContent(this, mDefaultValue, true);
|
aRv = nsContentUtils::SetNodeTextContent(this, mDefaultValue, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDOMSettableTokenList*
|
nsDOMSettableTokenList*
|
||||||
|
@ -203,13 +165,6 @@ HTMLOutputElement::HtmlFor()
|
||||||
return mTokenList;
|
return mTokenList;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLOutputElement::GetHtmlFor(nsISupports** aResult)
|
|
||||||
{
|
|
||||||
NS_ADDREF(*aResult = HtmlFor());
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HTMLOutputElement::DescendantsChanged()
|
void HTMLOutputElement::DescendantsChanged()
|
||||||
{
|
{
|
||||||
if (mValueModeFlag == eModeDefault) {
|
if (mValueModeFlag == eModeDefault) {
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsIDOMHTMLOutputElement.h"
|
|
||||||
#include "nsStubMutationObserver.h"
|
#include "nsStubMutationObserver.h"
|
||||||
#include "nsIConstraintValidation.h"
|
#include "nsIConstraintValidation.h"
|
||||||
|
|
||||||
|
@ -16,7 +15,7 @@ namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLOutputElement MOZ_FINAL : public nsGenericHTMLFormElement,
|
class HTMLOutputElement MOZ_FINAL : public nsGenericHTMLFormElement,
|
||||||
public nsIDOMHTMLOutputElement,
|
public nsIDOMHTMLElement,
|
||||||
public nsStubMutationObserver,
|
public nsStubMutationObserver,
|
||||||
public nsIConstraintValidation
|
public nsIConstraintValidation
|
||||||
{
|
{
|
||||||
|
@ -38,9 +37,6 @@ public:
|
||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLOutputElement
|
|
||||||
NS_DECL_NSIDOMHTMLOUTPUTELEMENT
|
|
||||||
|
|
||||||
// nsIFormControl
|
// nsIFormControl
|
||||||
NS_IMETHOD_(uint32_t) GetType() const { return NS_FORM_OUTPUT; }
|
NS_IMETHOD_(uint32_t) GetType() const { return NS_FORM_OUTPUT; }
|
||||||
NS_IMETHOD Reset() MOZ_OVERRIDE;
|
NS_IMETHOD Reset() MOZ_OVERRIDE;
|
||||||
|
@ -79,31 +75,40 @@ public:
|
||||||
// WebIDL
|
// WebIDL
|
||||||
nsDOMSettableTokenList* HtmlFor();
|
nsDOMSettableTokenList* HtmlFor();
|
||||||
// nsGenericHTMLFormElement::GetForm is fine.
|
// nsGenericHTMLFormElement::GetForm is fine.
|
||||||
using nsGenericHTMLFormElement::GetForm;
|
void GetName(nsAString& aName)
|
||||||
// XPCOM GetName is fine.
|
{
|
||||||
|
GetHTMLAttr(nsGkAtoms::name, aName);
|
||||||
|
}
|
||||||
|
|
||||||
void SetName(const nsAString& aName, ErrorResult& aRv)
|
void SetName(const nsAString& aName, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
SetHTMLAttr(nsGkAtoms::name, aName, aRv);
|
SetHTMLAttr(nsGkAtoms::name, aName, aRv);
|
||||||
}
|
}
|
||||||
|
|
||||||
// XPCOM GetType is fine.
|
void GetType(nsAString& aType)
|
||||||
// XPCOM GetDefaultValue is fine.
|
|
||||||
void SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv)
|
|
||||||
{
|
{
|
||||||
aRv = SetDefaultValue(aDefaultValue);
|
aType.AssignLiteral("output");
|
||||||
}
|
}
|
||||||
// XPCOM GetValue is fine.
|
|
||||||
void SetValue(const nsAString& aValue, ErrorResult& aRv)
|
void GetDefaultValue(nsAString& aDefaultValue)
|
||||||
{
|
{
|
||||||
aRv = SetValue(aValue);
|
aDefaultValue = mDefaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv);
|
||||||
|
|
||||||
|
void GetValue(nsAString& aValue)
|
||||||
|
{
|
||||||
|
nsContentUtils::GetNodeTextContent(this, true, aValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetValue(const nsAString& aValue, ErrorResult& aRv);
|
||||||
|
|
||||||
// nsIConstraintValidation::WillValidate is fine.
|
// nsIConstraintValidation::WillValidate is fine.
|
||||||
// nsIConstraintValidation::Validity() is fine.
|
// nsIConstraintValidation::Validity() is fine.
|
||||||
// nsIConstraintValidation::GetValidationMessage() is fine.
|
// nsIConstraintValidation::GetValidationMessage() is fine.
|
||||||
// nsIConstraintValidation::CheckValidity() is fine.
|
// nsIConstraintValidation::CheckValidity() is fine.
|
||||||
using nsIConstraintValidation::CheckValidity;
|
void SetCustomValidity(const nsAString& aError);
|
||||||
// nsIConstraintValidation::SetCustomValidity() is fine.
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum ValueModeFlag {
|
enum ValueModeFlag {
|
||||||
|
|
|
@ -50,7 +50,6 @@ XPIDL_SOURCES += [
|
||||||
'nsIDOMHTMLOptGroupElement.idl',
|
'nsIDOMHTMLOptGroupElement.idl',
|
||||||
'nsIDOMHTMLOptionElement.idl',
|
'nsIDOMHTMLOptionElement.idl',
|
||||||
'nsIDOMHTMLOptionsCollection.idl',
|
'nsIDOMHTMLOptionsCollection.idl',
|
||||||
'nsIDOMHTMLOutputElement.idl',
|
|
||||||
'nsIDOMHTMLParagraphElement.idl',
|
'nsIDOMHTMLParagraphElement.idl',
|
||||||
'nsIDOMHTMLParamElement.idl',
|
'nsIDOMHTMLParamElement.idl',
|
||||||
'nsIDOMHTMLPreElement.idl',
|
'nsIDOMHTMLPreElement.idl',
|
||||||
|
|
|
@ -1,43 +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 nsIDOMHTMLOutputElement interface is the interface to a HTML
|
|
||||||
* <output> element.
|
|
||||||
*
|
|
||||||
* For more information on this interface, please see
|
|
||||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-output-element
|
|
||||||
*
|
|
||||||
* @status UNDER_DEVELOPMENT
|
|
||||||
*/
|
|
||||||
|
|
||||||
interface nsIDOMValidityState;
|
|
||||||
|
|
||||||
[scriptable, uuid(c4bff576-90b5-44b0-8278-bf4e3010b09a)]
|
|
||||||
interface nsIDOMHTMLOutputElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
// DOMSettableTokenList
|
|
||||||
readonly attribute nsISupports htmlFor;
|
|
||||||
readonly attribute nsIDOMHTMLFormElement form;
|
|
||||||
attribute DOMString name;
|
|
||||||
|
|
||||||
readonly attribute DOMString type;
|
|
||||||
attribute DOMString defaultValue;
|
|
||||||
attribute DOMString value;
|
|
||||||
|
|
||||||
readonly attribute boolean willValidate;
|
|
||||||
readonly attribute nsIDOMValidityState validity;
|
|
||||||
readonly attribute DOMString validationMessage;
|
|
||||||
boolean checkValidity();
|
|
||||||
void setCustomValidity(in DOMString error);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The labels IDL attribute will be added with bug 556743.
|
|
||||||
*/
|
|
||||||
//readonly attribute nsIDOMNodeList labels;
|
|
||||||
};
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче