mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge backout, a=me
This commit is contained in:
commit
4772e654e1
@ -27,11 +27,8 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLDataListElement, nsGenericHTMLElement,
|
|||||||
NS_IMPL_ADDREF_INHERITED(HTMLDataListElement, Element)
|
NS_IMPL_ADDREF_INHERITED(HTMLDataListElement, Element)
|
||||||
NS_IMPL_RELEASE_INHERITED(HTMLDataListElement, Element)
|
NS_IMPL_RELEASE_INHERITED(HTMLDataListElement, Element)
|
||||||
|
|
||||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLDataListElement,
|
|
||||||
nsIDOMHTMLDataListElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
|
||||||
@ -45,13 +42,5 @@ HTMLDataListElement::MatchOptions(nsIContent* aContent, int32_t aNamespaceID,
|
|||||||
!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);
|
!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLDataListElement::GetOptions(nsIDOMHTMLCollection** aOptions)
|
|
||||||
{
|
|
||||||
NS_ADDREF(*aOptions = Options());
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
@ -7,14 +7,13 @@
|
|||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsIDOMHTMLDataListElement.h"
|
|
||||||
#include "nsContentList.h"
|
#include "nsContentList.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLDataListElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLDataListElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLDataListElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLDataListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLDataListElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
@ -35,9 +34,6 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLDataListElement
|
|
||||||
NS_DECL_NSIDOMHTMLDATALISTELEMENT
|
|
||||||
|
|
||||||
nsContentList* Options()
|
nsContentList* Options()
|
||||||
{
|
{
|
||||||
if (!mOptions) {
|
if (!mOptions) {
|
||||||
|
@ -31,66 +31,13 @@ NS_IMPL_ADDREF_INHERITED(HTMLFontElement, Element)
|
|||||||
NS_IMPL_RELEASE_INHERITED(HTMLFontElement, Element)
|
NS_IMPL_RELEASE_INHERITED(HTMLFontElement, Element)
|
||||||
|
|
||||||
// QueryInterface implementation for HTMLFontElement
|
// QueryInterface implementation for HTMLFontElement
|
||||||
NS_INTERFACE_TABLE_HEAD(HTMLFontElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLFontElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLFontElement, nsIDOMHTMLFontElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLFontElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLFontElement)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLFontElement::GetColor(nsAString& aColor)
|
|
||||||
{
|
|
||||||
nsString color;
|
|
||||||
GetColor(color);
|
|
||||||
aColor = color;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLFontElement::SetColor(const nsAString& aColor)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetColor(aColor, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLFontElement::GetFace(nsAString& aFace)
|
|
||||||
{
|
|
||||||
nsString face;
|
|
||||||
GetFace(face);
|
|
||||||
aFace = face;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLFontElement::SetFace(const nsAString& aFace)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetFace(aFace, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLFontElement::GetSize(nsAString& aSize)
|
|
||||||
{
|
|
||||||
nsString size;
|
|
||||||
GetSize(size);
|
|
||||||
aSize = size;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLFontElement::SetSize(const nsAString& aSize)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetSize(aSize, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
HTMLFontElement::ParseAttribute(int32_t aNamespaceID,
|
HTMLFontElement::ParseAttribute(int32_t aNamespaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
|
@ -7,13 +7,12 @@
|
|||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsIDOMHTMLFontElement.h"
|
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLFontElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLFontElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLFontElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLFontElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLFontElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
@ -34,9 +33,6 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLFontElement
|
|
||||||
NS_DECL_NSIDOMHTMLFONTELEMENT
|
|
||||||
|
|
||||||
void GetColor(nsString& aColor)
|
void GetColor(nsString& aColor)
|
||||||
{
|
{
|
||||||
GetHTMLAttr(nsGkAtoms::color, aColor);
|
GetHTMLAttr(nsGkAtoms::color, aColor);
|
||||||
|
@ -25,30 +25,13 @@ NS_IMPL_RELEASE_INHERITED(HTMLLegendElement, Element)
|
|||||||
|
|
||||||
|
|
||||||
// QueryInterface implementation for HTMLLegendElement
|
// QueryInterface implementation for HTMLLegendElement
|
||||||
NS_INTERFACE_TABLE_HEAD(HTMLLegendElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLLegendElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLLegendElement, nsIDOMHTMLLegendElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
|
||||||
// nsIDOMHTMLLegendElement
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLLegendElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLLegendElement)
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLLegendElement::GetForm(nsIDOMHTMLFormElement** aForm)
|
|
||||||
{
|
|
||||||
Element* form = GetFormElement();
|
|
||||||
|
|
||||||
return form ? CallQueryInterface(form, aForm) : NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_STRING_ATTR(HTMLLegendElement, Align, align)
|
|
||||||
|
|
||||||
// this contains center, because IE4 does
|
// this contains center, because IE4 does
|
||||||
static const nsAttrValue::EnumTable kAlignTable[] = {
|
static const nsAttrValue::EnumTable kAlignTable[] = {
|
||||||
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
|
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#define mozilla_dom_HTMLLegendElement_h
|
#define mozilla_dom_HTMLLegendElement_h
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsIDOMHTMLLegendElement.h"
|
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "mozilla/dom/HTMLFormElement.h"
|
#include "mozilla/dom/HTMLFormElement.h"
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ namespace mozilla {
|
|||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLLegendElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLLegendElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLLegendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
@ -35,9 +34,6 @@ public:
|
|||||||
// nsIDOMElement
|
// nsIDOMElement
|
||||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLLegendElement
|
|
||||||
NS_DECL_NSIDOMHTMLLEGENDELEMENT
|
|
||||||
|
|
||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
@ -86,7 +82,11 @@ public:
|
|||||||
|
|
||||||
already_AddRefed<HTMLFormElement> GetForm();
|
already_AddRefed<HTMLFormElement> GetForm();
|
||||||
|
|
||||||
// The XPCOM GetAlign is OK for us
|
void GetAlign(nsAString& aAlign)
|
||||||
|
{
|
||||||
|
GetHTMLAttr(nsGkAtoms::align, aAlign);
|
||||||
|
}
|
||||||
|
|
||||||
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
|
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
|
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
|
||||||
|
@ -29,11 +29,8 @@ NS_IMPL_ADDREF_INHERITED(HTMLMeterElement, Element)
|
|||||||
NS_IMPL_RELEASE_INHERITED(HTMLMeterElement, Element)
|
NS_IMPL_RELEASE_INHERITED(HTMLMeterElement, Element)
|
||||||
|
|
||||||
|
|
||||||
NS_INTERFACE_TABLE_HEAD(HTMLMeterElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLMeterElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLMeterElement,
|
|
||||||
nsIDOMHTMLMeterElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLMeterElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLMeterElement)
|
||||||
@ -223,88 +220,6 @@ HTMLMeterElement::Optimum() const
|
|||||||
return std::min(optimum, max);
|
return std::min(optimum, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* XPCOM methods
|
|
||||||
*/
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::GetMin(double* aValue)
|
|
||||||
{
|
|
||||||
*aValue = Min();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::SetMin(double aValue)
|
|
||||||
{
|
|
||||||
return SetDoubleAttr(nsGkAtoms::min, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::GetMax(double* aValue)
|
|
||||||
{
|
|
||||||
*aValue = Max();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::SetMax(double aValue)
|
|
||||||
{
|
|
||||||
return SetDoubleAttr(nsGkAtoms::max, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::GetValue(double* aValue)
|
|
||||||
{
|
|
||||||
*aValue = Value();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::SetValue(double aValue)
|
|
||||||
{
|
|
||||||
return SetDoubleAttr(nsGkAtoms::value, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::GetLow(double* aValue)
|
|
||||||
{
|
|
||||||
*aValue = Low();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::SetLow(double aValue)
|
|
||||||
{
|
|
||||||
return SetDoubleAttr(nsGkAtoms::low, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::GetHigh(double* aValue)
|
|
||||||
{
|
|
||||||
*aValue = High();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::SetHigh(double aValue)
|
|
||||||
{
|
|
||||||
return SetDoubleAttr(nsGkAtoms::high, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::GetOptimum(double* aValue)
|
|
||||||
{
|
|
||||||
*aValue = Optimum();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLMeterElement::SetOptimum(double aValue)
|
|
||||||
{
|
|
||||||
return SetDoubleAttr(nsGkAtoms::optimum, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsEventStates
|
nsEventStates
|
||||||
HTMLMeterElement::GetOptimumState() const
|
HTMLMeterElement::GetOptimumState() const
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#define mozilla_dom_HTMLMeterElement_h
|
#define mozilla_dom_HTMLMeterElement_h
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsIDOMHTMLMeterElement.h"
|
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsAttrValue.h"
|
#include "nsAttrValue.h"
|
||||||
#include "nsAttrValueInlines.h"
|
#include "nsAttrValueInlines.h"
|
||||||
@ -19,7 +18,7 @@ namespace mozilla {
|
|||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLMeterElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLMeterElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLMeterElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLMeterElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
HTMLMeterElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||||
@ -37,9 +36,6 @@ public:
|
|||||||
/* nsIDOMHTMLElement */
|
/* nsIDOMHTMLElement */
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
/* nsIDOMHTMLMeterElement */
|
|
||||||
NS_DECL_NSIDOMHTMLMETERELEMENT
|
|
||||||
|
|
||||||
virtual nsEventStates IntrinsicState() const MOZ_OVERRIDE;
|
virtual nsEventStates IntrinsicState() const MOZ_OVERRIDE;
|
||||||
|
|
||||||
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
|
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
|
||||||
@ -55,42 +51,42 @@ public:
|
|||||||
double Value() const;
|
double Value() const;
|
||||||
void SetValue(double aValue, ErrorResult& aRv)
|
void SetValue(double aValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
aRv = SetValue(aValue);
|
aRv = SetDoubleAttr(nsGkAtoms::value, aValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @return the minimum value */
|
/* @return the minimum value */
|
||||||
double Min() const;
|
double Min() const;
|
||||||
void SetMin(double aValue, ErrorResult& aRv)
|
void SetMin(double aValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
aRv = SetMin(aValue);
|
aRv = SetDoubleAttr(nsGkAtoms::min, aValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @return the maximum value */
|
/* @return the maximum value */
|
||||||
double Max() const;
|
double Max() const;
|
||||||
void SetMax(double aValue, ErrorResult& aRv)
|
void SetMax(double aValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
aRv = SetMax(aValue);
|
aRv = SetDoubleAttr(nsGkAtoms::max, aValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @return the low value */
|
/* @return the low value */
|
||||||
double Low() const;
|
double Low() const;
|
||||||
void SetLow(double aValue, ErrorResult& aRv)
|
void SetLow(double aValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
aRv = SetLow(aValue);
|
aRv = SetDoubleAttr(nsGkAtoms::low, aValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @return the high value */
|
/* @return the high value */
|
||||||
double High() const;
|
double High() const;
|
||||||
void SetHigh(double aValue, ErrorResult& aRv)
|
void SetHigh(double aValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
aRv = SetHigh(aValue);
|
aRv = SetDoubleAttr(nsGkAtoms::high, aValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @return the optimum value */
|
/* @return the optimum value */
|
||||||
double Optimum() const;
|
double Optimum() const;
|
||||||
void SetOptimum(double aValue, ErrorResult& aRv)
|
void SetOptimum(double aValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
aRv = SetOptimum(aValue);
|
aRv = SetDoubleAttr(nsGkAtoms::optimum, aValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -26,20 +26,13 @@ NS_IMPL_ADDREF_INHERITED(HTMLModElement, Element)
|
|||||||
NS_IMPL_RELEASE_INHERITED(HTMLModElement, Element)
|
NS_IMPL_RELEASE_INHERITED(HTMLModElement, Element)
|
||||||
|
|
||||||
// QueryInterface implementation for HTMLModElement
|
// QueryInterface implementation for HTMLModElement
|
||||||
NS_INTERFACE_TABLE_HEAD(HTMLModElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLModElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLModElement,
|
|
||||||
nsIDOMHTMLModElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLModElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLModElement)
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_URI_ATTR(HTMLModElement, Cite, cite)
|
|
||||||
NS_IMPL_STRING_ATTR(HTMLModElement, DateTime, datetime)
|
|
||||||
|
|
||||||
JSObject*
|
JSObject*
|
||||||
HTMLModElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
HTMLModElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
||||||
{
|
{
|
||||||
|
@ -8,14 +8,13 @@
|
|||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsIDOMHTMLModElement.h"
|
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLModElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLModElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLModElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLModElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
HTMLModElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||||
@ -33,9 +32,6 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLModElement
|
|
||||||
NS_DECL_NSIDOMHTMLMODELEMENT
|
|
||||||
|
|
||||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
|
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
|
||||||
@ -48,7 +44,10 @@ public:
|
|||||||
{
|
{
|
||||||
SetHTMLAttr(nsGkAtoms::cite, aCite, aRv);
|
SetHTMLAttr(nsGkAtoms::cite, aCite, aRv);
|
||||||
}
|
}
|
||||||
// XPCOM GetDateTime is fine.
|
void GetDateTime(nsAString& aDateTime)
|
||||||
|
{
|
||||||
|
GetHTMLAttr(nsGkAtoms::datetime, aDateTime);
|
||||||
|
}
|
||||||
void SetDateTime(const nsAString& aDateTime, ErrorResult& aRv)
|
void SetDateTime(const nsAString& aDateTime, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
SetHTMLAttr(nsGkAtoms::datetime, aDateTime, aRv);
|
SetHTMLAttr(nsGkAtoms::datetime, aDateTime, aRv);
|
||||||
|
@ -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 {
|
||||||
|
@ -31,11 +31,8 @@ NS_IMPL_ADDREF_INHERITED(HTMLProgressElement, Element)
|
|||||||
NS_IMPL_RELEASE_INHERITED(HTMLProgressElement, Element)
|
NS_IMPL_RELEASE_INHERITED(HTMLProgressElement, Element)
|
||||||
|
|
||||||
|
|
||||||
NS_INTERFACE_TABLE_HEAD(HTMLProgressElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLProgressElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLProgressElement,
|
|
||||||
nsIDOMHTMLProgressElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLProgressElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLProgressElement)
|
||||||
@ -67,13 +64,6 @@ HTMLProgressElement::ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute,
|
|||||||
aValue, aResult);
|
aValue, aResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLProgressElement::GetValue(double* aValue)
|
|
||||||
{
|
|
||||||
*aValue = Value();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
double
|
double
|
||||||
HTMLProgressElement::Value() const
|
HTMLProgressElement::Value() const
|
||||||
{
|
{
|
||||||
@ -86,21 +76,6 @@ HTMLProgressElement::Value() const
|
|||||||
return std::min(attrValue->GetDoubleValue(), Max());
|
return std::min(attrValue->GetDoubleValue(), Max());
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLProgressElement::SetValue(double aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetValue(aValue, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLProgressElement::GetMax(double* aValue)
|
|
||||||
{
|
|
||||||
*aValue = Max();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
double
|
double
|
||||||
HTMLProgressElement::Max() const
|
HTMLProgressElement::Max() const
|
||||||
{
|
{
|
||||||
@ -113,21 +88,6 @@ HTMLProgressElement::Max() const
|
|||||||
return attrMax->GetDoubleValue();
|
return attrMax->GetDoubleValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLProgressElement::SetMax(double aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetMax(aValue, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLProgressElement::GetPosition(double* aPosition)
|
|
||||||
{
|
|
||||||
*aPosition = Position();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
double
|
double
|
||||||
HTMLProgressElement::Position() const
|
HTMLProgressElement::Position() const
|
||||||
{
|
{
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#define mozilla_dom_HTMLProgressElement_h
|
#define mozilla_dom_HTMLProgressElement_h
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsIDOMHTMLProgressElement.h"
|
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsAttrValue.h"
|
#include "nsAttrValue.h"
|
||||||
#include "nsAttrValueInlines.h"
|
#include "nsAttrValueInlines.h"
|
||||||
@ -18,7 +17,7 @@ namespace mozilla {
|
|||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLProgressElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLProgressElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLProgressElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLProgressElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
HTMLProgressElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||||
@ -36,9 +35,6 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLProgressElement
|
|
||||||
NS_DECL_NSIDOMHTMLPROGRESSELEMENT
|
|
||||||
|
|
||||||
nsEventStates IntrinsicState() const MOZ_OVERRIDE;
|
nsEventStates IntrinsicState() const MOZ_OVERRIDE;
|
||||||
|
|
||||||
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
|
nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
|
||||||
|
@ -34,8 +34,7 @@ NS_IMPL_RELEASE_INHERITED(HTMLSharedElement, Element)
|
|||||||
// QueryInterface implementation for HTMLSharedElement
|
// QueryInterface implementation for HTMLSharedElement
|
||||||
NS_INTERFACE_MAP_BEGIN(HTMLSharedElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLSharedElement)
|
||||||
NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
|
NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
|
||||||
nsIDOMHTMLParamElement)
|
nsIDOMHTMLBaseElement)
|
||||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLParamElement, param)
|
|
||||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLBaseElement, base)
|
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLBaseElement, base)
|
||||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDirectoryElement, dir)
|
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDirectoryElement, dir)
|
||||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLQuoteElement, q)
|
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLQuoteElement, q)
|
||||||
@ -47,15 +46,6 @@ NS_ELEMENT_INTERFACE_MAP_END
|
|||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLSharedElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLSharedElement)
|
||||||
|
|
||||||
// nsIDOMHTMLParamElement
|
|
||||||
NS_IMPL_STRING_ATTR(HTMLSharedElement, Name, name)
|
|
||||||
NS_IMPL_STRING_ATTR(HTMLSharedElement, Type, type)
|
|
||||||
NS_IMPL_STRING_ATTR(HTMLSharedElement, Value, value)
|
|
||||||
NS_IMPL_STRING_ATTR(HTMLSharedElement, ValueType, valuetype)
|
|
||||||
|
|
||||||
// nsIDOMHTMLDirectoryElement
|
|
||||||
NS_IMPL_BOOL_ATTR(HTMLSharedElement, Compact, compact)
|
|
||||||
|
|
||||||
// nsIDOMHTMLQuoteElement
|
// nsIDOMHTMLQuoteElement
|
||||||
NS_IMPL_URI_ATTR(HTMLSharedElement, Cite, cite)
|
NS_IMPL_URI_ATTR(HTMLSharedElement, Cite, cite)
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#ifndef mozilla_dom_HTMLSharedElement_h
|
#ifndef mozilla_dom_HTMLSharedElement_h
|
||||||
#define mozilla_dom_HTMLSharedElement_h
|
#define mozilla_dom_HTMLSharedElement_h
|
||||||
|
|
||||||
#include "nsIDOMHTMLParamElement.h"
|
|
||||||
#include "nsIDOMHTMLBaseElement.h"
|
#include "nsIDOMHTMLBaseElement.h"
|
||||||
#include "nsIDOMHTMLDirectoryElement.h"
|
#include "nsIDOMHTMLDirectoryElement.h"
|
||||||
#include "nsIDOMHTMLQuoteElement.h"
|
#include "nsIDOMHTMLQuoteElement.h"
|
||||||
@ -23,7 +22,6 @@ namespace mozilla {
|
|||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLSharedElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLSharedElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLParamElement,
|
|
||||||
public nsIDOMHTMLBaseElement,
|
public nsIDOMHTMLBaseElement,
|
||||||
public nsIDOMHTMLDirectoryElement,
|
public nsIDOMHTMLDirectoryElement,
|
||||||
public nsIDOMHTMLQuoteElement,
|
public nsIDOMHTMLQuoteElement,
|
||||||
@ -49,15 +47,9 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLParamElement
|
|
||||||
NS_DECL_NSIDOMHTMLPARAMELEMENT
|
|
||||||
|
|
||||||
// nsIDOMHTMLBaseElement
|
// nsIDOMHTMLBaseElement
|
||||||
NS_DECL_NSIDOMHTMLBASEELEMENT
|
NS_DECL_NSIDOMHTMLBASEELEMENT
|
||||||
|
|
||||||
// nsIDOMHTMLDirectoryElement
|
|
||||||
NS_DECL_NSIDOMHTMLDIRECTORYELEMENT
|
|
||||||
|
|
||||||
// nsIDOMHTMLQuoteElement
|
// nsIDOMHTMLQuoteElement
|
||||||
NS_DECL_NSIDOMHTMLQUOTEELEMENT
|
NS_DECL_NSIDOMHTMLQUOTEELEMENT
|
||||||
|
|
||||||
@ -98,7 +90,7 @@ public:
|
|||||||
|
|
||||||
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE
|
virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
return static_cast<nsIDOMHTMLParamElement*>(this);
|
return static_cast<nsIDOMHTMLBaseElement*>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebIDL API
|
// WebIDL API
|
||||||
|
@ -32,7 +32,6 @@ NS_INTERFACE_MAP_BEGIN(HTMLSharedListElement)
|
|||||||
NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
|
NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
|
||||||
nsIDOMHTMLOListElement)
|
nsIDOMHTMLOListElement)
|
||||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLOListElement, ol)
|
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLOListElement, ol)
|
||||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDListElement, dl)
|
|
||||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLUListElement, ul)
|
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLUListElement, ul)
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include "mozilla/Util.h"
|
#include "mozilla/Util.h"
|
||||||
|
|
||||||
#include "nsIDOMHTMLOListElement.h"
|
#include "nsIDOMHTMLOListElement.h"
|
||||||
#include "nsIDOMHTMLDListElement.h"
|
|
||||||
#include "nsIDOMHTMLUListElement.h"
|
#include "nsIDOMHTMLUListElement.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
|
|
||||||
@ -18,7 +17,6 @@ namespace dom {
|
|||||||
|
|
||||||
class HTMLSharedListElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLSharedListElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLOListElement,
|
public nsIDOMHTMLOListElement,
|
||||||
public nsIDOMHTMLDListElement,
|
|
||||||
public nsIDOMHTMLUListElement
|
public nsIDOMHTMLUListElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -43,9 +41,6 @@ public:
|
|||||||
// nsIDOMHTMLOListElement
|
// nsIDOMHTMLOListElement
|
||||||
NS_DECL_NSIDOMHTMLOLISTELEMENT
|
NS_DECL_NSIDOMHTMLOLISTELEMENT
|
||||||
|
|
||||||
// nsIDOMHTMLDListElement
|
|
||||||
// fully declared by NS_DECL_NSIDOMHTMLOLISTELEMENT
|
|
||||||
|
|
||||||
// nsIDOMHTMLUListElement
|
// nsIDOMHTMLUListElement
|
||||||
// fully declared by NS_DECL_NSIDOMHTMLOLISTELEMENT
|
// fully declared by NS_DECL_NSIDOMHTMLOLISTELEMENT
|
||||||
|
|
||||||
|
@ -34,115 +34,12 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableColElement, Element)
|
|||||||
NS_IMPL_RELEASE_INHERITED(HTMLTableColElement, Element)
|
NS_IMPL_RELEASE_INHERITED(HTMLTableColElement, Element)
|
||||||
|
|
||||||
// QueryInterface implementation for HTMLTableColElement
|
// QueryInterface implementation for HTMLTableColElement
|
||||||
NS_INTERFACE_TABLE_HEAD(HTMLTableColElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLTableColElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLTableColElement,
|
|
||||||
nsIDOMHTMLTableColElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLTableColElement)
|
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
|
bool
|
||||||
HTMLTableColElement::ParseAttribute(int32_t aNamespaceID,
|
HTMLTableColElement::ParseAttribute(int32_t aNamespaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
|
@ -7,13 +7,12 @@
|
|||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsIDOMHTMLTableColElement.h"
|
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLTableColElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLTableColElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLTableColElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLTableColElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLTableColElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
@ -34,9 +33,6 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLTableColElement
|
|
||||||
NS_DECL_NSIDOMHTMLTABLECOLELEMENT
|
|
||||||
|
|
||||||
uint32_t Span() const
|
uint32_t Span() const
|
||||||
{
|
{
|
||||||
return GetIntAttr(nsGkAtoms::span, 1);
|
return GetIntAttr(nsGkAtoms::span, 1);
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "mozilla/Util.h"
|
#include "mozilla/Util.h"
|
||||||
|
|
||||||
#include "mozilla/dom/HTMLTableElement.h"
|
#include "mozilla/dom/HTMLTableElement.h"
|
||||||
#include "nsIDOMHTMLTableSectionElement.h"
|
|
||||||
#include "nsAttrValueInlines.h"
|
#include "nsAttrValueInlines.h"
|
||||||
#include "nsRuleData.h"
|
#include "nsRuleData.h"
|
||||||
#include "nsHTMLStyleSheet.h"
|
#include "nsHTMLStyleSheet.h"
|
||||||
@ -344,219 +343,6 @@ NS_IMPL_ELEMENT_CLONE(HTMLTableElement)
|
|||||||
// in fact, they are integers or they are meaningless. so we store them
|
// in fact, they are integers or they are meaningless. so we store them
|
||||||
// here as ints.
|
// here as ints.
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetAlign(const nsAString& aAlign)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetAlign(aAlign, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetAlign(nsAString& aAlign)
|
|
||||||
{
|
|
||||||
nsString align;
|
|
||||||
GetAlign(align);
|
|
||||||
aAlign = align;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetBgColor(const nsAString& aBgColor)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetBgColor(aBgColor, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetBgColor(nsAString& aBgColor)
|
|
||||||
{
|
|
||||||
nsString bgColor;
|
|
||||||
GetBgColor(bgColor);
|
|
||||||
aBgColor = bgColor;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetBorder(const nsAString& aBorder)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetBorder(aBorder, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetBorder(nsAString& aBorder)
|
|
||||||
{
|
|
||||||
nsString border;
|
|
||||||
GetBorder(border);
|
|
||||||
aBorder = border;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetCellPadding(const nsAString& aCellPadding)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetCellPadding(aCellPadding, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetCellPadding(nsAString& aCellPadding)
|
|
||||||
{
|
|
||||||
nsString cellPadding;
|
|
||||||
GetCellPadding(cellPadding);
|
|
||||||
aCellPadding = cellPadding;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetCellSpacing(const nsAString& aCellSpacing)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetCellSpacing(aCellSpacing, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetCellSpacing(nsAString& aCellSpacing)
|
|
||||||
{
|
|
||||||
nsString cellSpacing;
|
|
||||||
GetCellSpacing(cellSpacing);
|
|
||||||
aCellSpacing = cellSpacing;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetFrame(const nsAString& aFrame)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetFrame(aFrame, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetFrame(nsAString& aFrame)
|
|
||||||
{
|
|
||||||
nsString frame;
|
|
||||||
GetFrame(frame);
|
|
||||||
aFrame = frame;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetRules(const nsAString& aRules)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetRules(aRules, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetRules(nsAString& aRules)
|
|
||||||
{
|
|
||||||
nsString rules;
|
|
||||||
GetRules(rules);
|
|
||||||
aRules = rules;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetSummary(const nsAString& aSummary)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetSummary(aSummary, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetSummary(nsAString& aSummary)
|
|
||||||
{
|
|
||||||
nsString summary;
|
|
||||||
GetSummary(summary);
|
|
||||||
aSummary = summary;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetWidth(const nsAString& aWidth)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetWidth(aWidth, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetWidth(nsAString& aWidth)
|
|
||||||
{
|
|
||||||
nsString width;
|
|
||||||
GetWidth(width);
|
|
||||||
aWidth = width;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetCaption(nsIDOMHTMLTableCaptionElement** aValue)
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsIDOMHTMLTableCaptionElement> caption = GetCaption();
|
|
||||||
caption.forget(aValue);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetCaption(nsIDOMHTMLTableCaptionElement* aValue)
|
|
||||||
{
|
|
||||||
HTMLTableCaptionElement* caption =
|
|
||||||
static_cast<HTMLTableCaptionElement*>(aValue);
|
|
||||||
SetCaption(caption);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetTHead(nsIDOMHTMLTableSectionElement** aValue)
|
|
||||||
{
|
|
||||||
NS_IF_ADDREF(*aValue = GetTHead());
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetTHead(nsIDOMHTMLTableSectionElement* aValue)
|
|
||||||
{
|
|
||||||
HTMLTableSectionElement* section =
|
|
||||||
static_cast<HTMLTableSectionElement*>(aValue);
|
|
||||||
ErrorResult rv;
|
|
||||||
SetTHead(section, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetTFoot(nsIDOMHTMLTableSectionElement** aValue)
|
|
||||||
{
|
|
||||||
NS_IF_ADDREF(*aValue = GetTFoot());
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::SetTFoot(nsIDOMHTMLTableSectionElement* aValue)
|
|
||||||
{
|
|
||||||
HTMLTableSectionElement* section =
|
|
||||||
static_cast<HTMLTableSectionElement*>(aValue);
|
|
||||||
ErrorResult rv;
|
|
||||||
SetTFoot(section, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetRows(nsIDOMHTMLCollection** aValue)
|
|
||||||
{
|
|
||||||
NS_ADDREF(*aValue = Rows());
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIHTMLCollection*
|
nsIHTMLCollection*
|
||||||
HTMLTableElement::Rows()
|
HTMLTableElement::Rows()
|
||||||
{
|
{
|
||||||
@ -567,13 +353,6 @@ HTMLTableElement::Rows()
|
|||||||
return mRows;
|
return mRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue)
|
|
||||||
{
|
|
||||||
NS_ADDREF(*aValue = TBodies());
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIHTMLCollection*
|
nsIHTMLCollection*
|
||||||
HTMLTableElement::TBodies()
|
HTMLTableElement::TBodies()
|
||||||
{
|
{
|
||||||
@ -610,14 +389,7 @@ HTMLTableElement::CreateTHead()
|
|||||||
return head.forget();
|
return head.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLTableElement::CreateTHead(nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
nsRefPtr<nsGenericHTMLElement> thead = CreateTHead();
|
|
||||||
return thead ? CallQueryInterface(thead, aValue) : NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::DeleteTHead()
|
HTMLTableElement::DeleteTHead()
|
||||||
{
|
{
|
||||||
HTMLTableSectionElement* tHead = GetTHead();
|
HTMLTableSectionElement* tHead = GetTHead();
|
||||||
@ -626,8 +398,6 @@ HTMLTableElement::DeleteTHead()
|
|||||||
nsINode::RemoveChild(*tHead, rv);
|
nsINode::RemoveChild(*tHead, rv);
|
||||||
MOZ_ASSERT(!rv.Failed());
|
MOZ_ASSERT(!rv.Failed());
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
@ -650,14 +420,7 @@ HTMLTableElement::CreateTFoot()
|
|||||||
return foot.forget();
|
return foot.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLTableElement::CreateTFoot(nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
nsRefPtr<nsGenericHTMLElement> tfoot = CreateTFoot();
|
|
||||||
return tfoot ? CallQueryInterface(tfoot, aValue) : NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::DeleteTFoot()
|
HTMLTableElement::DeleteTFoot()
|
||||||
{
|
{
|
||||||
HTMLTableSectionElement* tFoot = GetTFoot();
|
HTMLTableSectionElement* tFoot = GetTFoot();
|
||||||
@ -666,8 +429,6 @@ HTMLTableElement::DeleteTFoot()
|
|||||||
nsINode::RemoveChild(*tFoot, rv);
|
nsINode::RemoveChild(*tFoot, rv);
|
||||||
MOZ_ASSERT(!rv.Failed());
|
MOZ_ASSERT(!rv.Failed());
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
@ -690,14 +451,7 @@ HTMLTableElement::CreateCaption()
|
|||||||
return caption.forget();
|
return caption.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLTableElement::CreateCaption(nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
nsRefPtr<nsGenericHTMLElement> caption = CreateCaption();
|
|
||||||
return caption ? CallQueryInterface(caption, aValue) : NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::DeleteCaption()
|
HTMLTableElement::DeleteCaption()
|
||||||
{
|
{
|
||||||
HTMLTableCaptionElement* caption = GetCaption();
|
HTMLTableCaptionElement* caption = GetCaption();
|
||||||
@ -706,8 +460,6 @@ HTMLTableElement::DeleteCaption()
|
|||||||
nsINode::RemoveChild(*caption, rv);
|
nsINode::RemoveChild(*caption, rv);
|
||||||
MOZ_ASSERT(!rv.Failed());
|
MOZ_ASSERT(!rv.Failed());
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
@ -848,14 +600,6 @@ HTMLTableElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
|||||||
return newRow.forget();
|
return newRow.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::InsertRow(int32_t aIndex, nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
nsRefPtr<nsGenericHTMLElement> newRow = InsertRow(aIndex, rv);
|
|
||||||
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(newRow, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
|
HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
@ -886,14 +630,6 @@ HTMLTableElement::DeleteRow(int32_t aIndex, ErrorResult& aError)
|
|||||||
row->RemoveFromParent();
|
row->RemoveFromParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableElement::DeleteRow(int32_t aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
DeleteRow(aValue, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
static const nsAttrValue::EnumTable kFrameTable[] = {
|
static const nsAttrValue::EnumTable kFrameTable[] = {
|
||||||
{ "void", NS_STYLE_TABLE_FRAME_NONE },
|
{ "void", NS_STYLE_TABLE_FRAME_NONE },
|
||||||
{ "above", NS_STYLE_TABLE_FRAME_ABOVE },
|
{ "above", NS_STYLE_TABLE_FRAME_ABOVE },
|
||||||
|
@ -39,9 +39,6 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLTableElement
|
|
||||||
NS_DECL_NSIDOMHTMLTABLEELEMENT
|
|
||||||
|
|
||||||
HTMLTableCaptionElement* GetCaption() const
|
HTMLTableCaptionElement* GetCaption() const
|
||||||
{
|
{
|
||||||
return static_cast<HTMLTableCaptionElement*>(GetChild(nsGkAtoms::caption));
|
return static_cast<HTMLTableCaptionElement*>(GetChild(nsGkAtoms::caption));
|
||||||
@ -54,8 +51,13 @@ public:
|
|||||||
nsINode::AppendChild(*aCaption, rv);
|
nsINode::AppendChild(*aCaption, rv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DeleteTFoot();
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement> CreateCaption();
|
already_AddRefed<nsGenericHTMLElement> CreateCaption();
|
||||||
|
|
||||||
|
void DeleteCaption();
|
||||||
|
|
||||||
HTMLTableSectionElement* GetTHead() const
|
HTMLTableSectionElement* GetTHead() const
|
||||||
{
|
{
|
||||||
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::thead));
|
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::thead));
|
||||||
@ -74,6 +76,8 @@ public:
|
|||||||
}
|
}
|
||||||
already_AddRefed<nsGenericHTMLElement> CreateTHead();
|
already_AddRefed<nsGenericHTMLElement> CreateTHead();
|
||||||
|
|
||||||
|
void DeleteTHead();
|
||||||
|
|
||||||
HTMLTableSectionElement* GetTFoot() const
|
HTMLTableSectionElement* GetTFoot() const
|
||||||
{
|
{
|
||||||
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::tfoot));
|
return static_cast<HTMLTableSectionElement*>(GetChild(nsGkAtoms::tfoot));
|
||||||
|
@ -35,11 +35,8 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableRowElement, Element)
|
|||||||
NS_IMPL_RELEASE_INHERITED(HTMLTableRowElement, Element)
|
NS_IMPL_RELEASE_INHERITED(HTMLTableRowElement, Element)
|
||||||
|
|
||||||
// QueryInterface implementation for HTMLTableRowElement
|
// QueryInterface implementation for HTMLTableRowElement
|
||||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableRowElement)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLTableRowElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLTableRowElement,
|
|
||||||
nsIDOMHTMLTableRowElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
|
||||||
@ -47,12 +44,16 @@ NS_IMPL_ELEMENT_CLONE(HTMLTableRowElement)
|
|||||||
|
|
||||||
|
|
||||||
// protected method
|
// protected method
|
||||||
already_AddRefed<nsIDOMHTMLTableSectionElement>
|
HTMLTableSectionElement*
|
||||||
HTMLTableRowElement::GetSection() const
|
HTMLTableRowElement::GetSection() const
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIDOMHTMLTableSectionElement> section =
|
nsIContent* parent = GetParent();
|
||||||
do_QueryInterface(GetParent());
|
if (parent->IsHTML() && (parent->Tag() == nsGkAtoms::thead ||
|
||||||
return section.forget();
|
parent->Tag() == nsGkAtoms::tbody ||
|
||||||
|
parent->Tag() == nsGkAtoms::tfoot)) {
|
||||||
|
return static_cast<HTMLTableSectionElement*>(parent);
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// protected method
|
// protected method
|
||||||
@ -94,25 +95,15 @@ HTMLTableRowElement::RowIndex() const
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::GetRowIndex(int32_t* aValue)
|
|
||||||
{
|
|
||||||
*aValue = RowIndex();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
HTMLTableRowElement::SectionRowIndex() const
|
HTMLTableRowElement::SectionRowIndex() const
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIDOMHTMLTableSectionElement> section = GetSection();
|
HTMLTableSectionElement* section = GetSection();
|
||||||
if (!section) {
|
if (!section) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMHTMLCollection> rows;
|
nsCOMPtr<nsIHTMLCollection> coll = section->Rows();
|
||||||
section->GetRows(getter_AddRefs(rows));
|
|
||||||
|
|
||||||
nsCOMPtr<nsIHTMLCollection> coll = do_QueryInterface(rows);
|
|
||||||
uint32_t numRows = coll->Length();
|
uint32_t numRows = coll->Length();
|
||||||
for (uint32_t i = 0; i < numRows; i++) {
|
for (uint32_t i = 0; i < numRows; i++) {
|
||||||
if (coll->GetElementAt(i) == this) {
|
if (coll->GetElementAt(i) == this) {
|
||||||
@ -123,13 +114,6 @@ HTMLTableRowElement::SectionRowIndex() const
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::GetSectionRowIndex(int32_t* aValue)
|
|
||||||
{
|
|
||||||
*aValue = SectionRowIndex();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
IsCell(nsIContent *aContent, int32_t aNamespaceID,
|
IsCell(nsIContent *aContent, int32_t aNamespaceID,
|
||||||
nsIAtom* aAtom, void *aData)
|
nsIAtom* aAtom, void *aData)
|
||||||
@ -157,13 +141,6 @@ HTMLTableRowElement::Cells()
|
|||||||
return mCells;
|
return mCells;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::GetCells(nsIDOMHTMLCollection** aValue)
|
|
||||||
{
|
|
||||||
NS_ADDREF(*aValue = Cells());
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
HTMLTableRowElement::InsertCell(int32_t aIndex,
|
HTMLTableRowElement::InsertCell(int32_t aIndex,
|
||||||
ErrorResult& aError)
|
ErrorResult& aError)
|
||||||
@ -211,14 +188,6 @@ HTMLTableRowElement::InsertCell(int32_t aIndex,
|
|||||||
return cell.forget();
|
return cell.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::InsertCell(int32_t aIndex, nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
nsRefPtr<nsGenericHTMLElement> cell = InsertCell(aIndex, rv);
|
|
||||||
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(cell, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
HTMLTableRowElement::DeleteCell(int32_t aValue, ErrorResult& aError)
|
HTMLTableRowElement::DeleteCell(int32_t aValue, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
@ -251,99 +220,6 @@ HTMLTableRowElement::DeleteCell(int32_t aValue, ErrorResult& aError)
|
|||||||
nsINode::RemoveChild(*cell, aError);
|
nsINode::RemoveChild(*cell, aError);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::DeleteCell(int32_t aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
DeleteCell(aValue, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::SetAlign(const nsAString& aAlign)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetAlign(aAlign, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::GetAlign(nsAString& aAlign)
|
|
||||||
{
|
|
||||||
nsString align;
|
|
||||||
GetAlign(align);
|
|
||||||
aAlign = align;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::SetVAlign(const nsAString& aVAlign)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetVAlign(aVAlign, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::GetVAlign(nsAString& aVAlign)
|
|
||||||
{
|
|
||||||
nsString vAlign;
|
|
||||||
GetVAlign(vAlign);
|
|
||||||
aVAlign = vAlign;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::SetCh(const nsAString& aCh)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetCh(aCh, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::GetCh(nsAString& aCh)
|
|
||||||
{
|
|
||||||
nsString ch;
|
|
||||||
GetCh(ch);
|
|
||||||
aCh = ch;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::SetChOff(const nsAString& aChOff)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetChOff(aChOff, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::GetChOff(nsAString& aChOff)
|
|
||||||
{
|
|
||||||
nsString chOff;
|
|
||||||
GetChOff(chOff);
|
|
||||||
aChOff = chOff;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::SetBgColor(const nsAString& aBgColor)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetBgColor(aBgColor, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableRowElement::GetBgColor(nsAString& aBgColor)
|
|
||||||
{
|
|
||||||
nsString bgColor;
|
|
||||||
GetBgColor(bgColor);
|
|
||||||
aBgColor = bgColor;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
HTMLTableRowElement::ParseAttribute(int32_t aNamespaceID,
|
HTMLTableRowElement::ParseAttribute(int32_t aNamespaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
|
@ -7,17 +7,17 @@
|
|||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsIDOMHTMLTableRowElement.h"
|
|
||||||
|
|
||||||
class nsIDOMHTMLTableElement;
|
class nsIDOMHTMLTableElement;
|
||||||
class nsIDOMHTMLTableSectionElement;
|
|
||||||
class nsContentList;
|
class nsContentList;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
|
class HTMLTableSectionElement;
|
||||||
|
|
||||||
class HTMLTableRowElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLTableRowElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLTableRowElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLTableRowElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLTableRowElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
@ -39,9 +39,6 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLTableRowElement
|
|
||||||
NS_DECL_NSIDOMHTMLTABLEROWELEMENT
|
|
||||||
|
|
||||||
int32_t RowIndex() const;
|
int32_t RowIndex() const;
|
||||||
int32_t SectionRowIndex() const;
|
int32_t SectionRowIndex() const;
|
||||||
nsIHTMLCollection* Cells();
|
nsIHTMLCollection* Cells();
|
||||||
@ -108,7 +105,7 @@ protected:
|
|||||||
virtual JSObject* WrapNode(JSContext *aCx,
|
virtual JSObject* WrapNode(JSContext *aCx,
|
||||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
||||||
|
|
||||||
already_AddRefed<nsIDOMHTMLTableSectionElement> GetSection() const;
|
HTMLTableSectionElement* GetSection() const;
|
||||||
HTMLTableElement* GetTable() const;
|
HTMLTableElement* GetTable() const;
|
||||||
nsRefPtr<nsContentList> mCells;
|
nsRefPtr<nsContentList> mCells;
|
||||||
};
|
};
|
||||||
|
@ -35,84 +35,13 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableSectionElement, Element)
|
|||||||
NS_IMPL_RELEASE_INHERITED(HTMLTableSectionElement, Element)
|
NS_IMPL_RELEASE_INHERITED(HTMLTableSectionElement, Element)
|
||||||
|
|
||||||
// QueryInterface implementation for HTMLTableSectionElement
|
// QueryInterface implementation for HTMLTableSectionElement
|
||||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableSectionElement)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLTableSectionElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLTableSectionElement,
|
|
||||||
nsIDOMHTMLTableSectionElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLTableSectionElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLTableSectionElement)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::SetAlign(const nsAString& aAlign)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetAlign(aAlign, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::GetAlign(nsAString& aAlign)
|
|
||||||
{
|
|
||||||
nsString align;
|
|
||||||
GetAlign(align);
|
|
||||||
aAlign = align;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::SetVAlign(const nsAString& aVAlign)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetVAlign(aVAlign, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::GetVAlign(nsAString& aVAlign)
|
|
||||||
{
|
|
||||||
nsString vAlign;
|
|
||||||
GetVAlign(vAlign);
|
|
||||||
aVAlign = vAlign;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::SetCh(const nsAString& aCh)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetCh(aCh, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::GetCh(nsAString& aCh)
|
|
||||||
{
|
|
||||||
nsString ch;
|
|
||||||
GetCh(ch);
|
|
||||||
aCh = ch;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::SetChOff(const nsAString& aChOff)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetChOff(aChOff, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::GetChOff(nsAString& aChOff)
|
|
||||||
{
|
|
||||||
nsString chOff;
|
|
||||||
GetChOff(chOff);
|
|
||||||
aChOff = chOff;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIHTMLCollection*
|
nsIHTMLCollection*
|
||||||
HTMLTableSectionElement::Rows()
|
HTMLTableSectionElement::Rows()
|
||||||
{
|
{
|
||||||
@ -127,13 +56,6 @@ HTMLTableSectionElement::Rows()
|
|||||||
return mRows;
|
return mRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue)
|
|
||||||
{
|
|
||||||
NS_ADDREF(*aValue = Rows());
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
HTMLTableSectionElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
HTMLTableSectionElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
@ -172,15 +94,6 @@ HTMLTableSectionElement::InsertRow(int32_t aIndex, ErrorResult& aError)
|
|||||||
return rowContent.forget();
|
return rowContent.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::InsertRow(int32_t aIndex,
|
|
||||||
nsIDOMHTMLElement** aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
nsRefPtr<nsGenericHTMLElement> row = InsertRow(aIndex, rv);
|
|
||||||
return rv.Failed() ? rv.ErrorCode() : CallQueryInterface(row, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
HTMLTableSectionElement::DeleteRow(int32_t aValue, ErrorResult& aError)
|
HTMLTableSectionElement::DeleteRow(int32_t aValue, ErrorResult& aError)
|
||||||
{
|
{
|
||||||
@ -213,14 +126,6 @@ HTMLTableSectionElement::DeleteRow(int32_t aValue, ErrorResult& aError)
|
|||||||
nsINode::RemoveChild(*row, aError);
|
nsINode::RemoveChild(*row, aError);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLTableSectionElement::DeleteRow(int32_t aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
DeleteRow(aValue, rv);
|
|
||||||
return rv.ErrorCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
HTMLTableSectionElement::ParseAttribute(int32_t aNamespaceID,
|
HTMLTableSectionElement::ParseAttribute(int32_t aNamespaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
|
@ -7,14 +7,13 @@
|
|||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsIDOMHTMLTableSectionElement.h"
|
|
||||||
#include "nsContentList.h" // For ctor.
|
#include "nsContentList.h" // For ctor.
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLTableSectionElement MOZ_FINAL : public nsGenericHTMLElement,
|
class HTMLTableSectionElement MOZ_FINAL : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLTableSectionElement
|
public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLTableSectionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLTableSectionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
@ -34,9 +33,6 @@ public:
|
|||||||
// nsIDOMHTMLElement
|
// nsIDOMHTMLElement
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
// nsIDOMHTMLTableSectionElement
|
|
||||||
NS_DECL_NSIDOMHTMLTABLESECTIONELEMENT
|
|
||||||
|
|
||||||
nsIHTMLCollection* Rows();
|
nsIHTMLCollection* Rows();
|
||||||
already_AddRefed<nsGenericHTMLElement>
|
already_AddRefed<nsGenericHTMLElement>
|
||||||
InsertRow(int32_t aIndex, ErrorResult& aError);
|
InsertRow(int32_t aIndex, ErrorResult& aError);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "nsDocument.h"
|
#include "nsDocument.h"
|
||||||
#include "HTMLUnknownElement.h"
|
#include "mozilla/dom/HTMLUnknownElement.h"
|
||||||
#include "mozilla/dom/HTMLElementBinding.h"
|
#include "mozilla/dom/HTMLElementBinding.h"
|
||||||
|
|
||||||
NS_IMPL_NS_NEW_HTML_ELEMENT(Unknown)
|
NS_IMPL_NS_NEW_HTML_ELEMENT(Unknown)
|
||||||
@ -35,11 +35,8 @@ HTMLUnknownElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// QueryInterface implementation for HTMLUnknownElement
|
// QueryInterface implementation for HTMLUnknownElement
|
||||||
NS_INTERFACE_TABLE_HEAD(HTMLUnknownElement)
|
NS_INTERFACE_MAP_BEGIN(HTMLUnknownElement)
|
||||||
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
|
||||||
NS_INTERFACE_TABLE_INHERITED1(HTMLUnknownElement,
|
|
||||||
nsIDOMHTMLUnknownElement)
|
|
||||||
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
|
||||||
NS_ELEMENT_INTERFACE_MAP_END
|
NS_ELEMENT_INTERFACE_MAP_END
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(HTMLUnknownElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLUnknownElement)
|
||||||
|
@ -2,18 +2,17 @@
|
|||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* 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
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
#ifndef HTMLUnknownElement_h___
|
#ifndef mozilla_dom_HTMLUnknownElement_h
|
||||||
#define HTMLUnknownElement_h___
|
#define mozilla_dom_HTMLUnknownElement_h
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsIDOMHTMLUnknownElement.h"
|
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class HTMLUnknownElement MOZ_FINAL : public nsGenericHTMLElement
|
class HTMLUnknownElement MOZ_FINAL : public nsGenericHTMLElement
|
||||||
, public nsIDOMHTMLUnknownElement
|
, public nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLUnknownElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLUnknownElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
@ -48,4 +47,4 @@ protected:
|
|||||||
} // namespace dom
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif /* HTMLUnknownElement_h___ */
|
#endif /* mozilla_dom_HTMLUnknownElement_h */
|
||||||
|
@ -244,13 +244,9 @@ for (var tag of allTags) {
|
|||||||
if (classInfoString != 'HTMLUnknownElement') {
|
if (classInfoString != 'HTMLUnknownElement') {
|
||||||
is(node instanceof HTMLUnknownElement, false,
|
is(node instanceof HTMLUnknownElement, false,
|
||||||
tagName(tag) + " is an instance of HTMLUnknownElement");
|
tagName(tag) + " is an instance of HTMLUnknownElement");
|
||||||
is(node instanceof SpecialPowers.Ci.nsIDOMHTMLUnknownElement, false,
|
|
||||||
tagName(tag) + " is an instance of nsIDOMHTMLUnknownElement");
|
|
||||||
} else {
|
} else {
|
||||||
is(node instanceof HTMLUnknownElement, true,
|
is(node instanceof HTMLUnknownElement, true,
|
||||||
tagName(tag) + " is an instance of HTMLUnknownElement");
|
tagName(tag) + " is an instance of HTMLUnknownElement");
|
||||||
is(node instanceof SpecialPowers.Ci.nsIDOMHTMLUnknownElement, true,
|
|
||||||
tagName(tag) + " is an instance of nsIDOMHTMLUnknownElement");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that each node QIs to all the things we expect it to QI to
|
// Check that each node QIs to all the things we expect it to QI to
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "nsIDOMHTMLFrameElement.h"
|
#include "nsIDOMHTMLFrameElement.h"
|
||||||
#include "nsIDOMHTMLInputElement.h"
|
#include "nsIDOMHTMLInputElement.h"
|
||||||
#include "nsIDOMHTMLMapElement.h"
|
#include "nsIDOMHTMLMapElement.h"
|
||||||
#include "nsIDOMHTMLLegendElement.h"
|
|
||||||
#include "nsIDOMDocument.h"
|
#include "nsIDOMDocument.h"
|
||||||
#include "nsIDOMRange.h"
|
#include "nsIDOMRange.h"
|
||||||
#include "nsIHTMLDocument.h"
|
#include "nsIHTMLDocument.h"
|
||||||
|
@ -73,7 +73,6 @@ interface nsIDOMRect;
|
|||||||
interface nsIDOMCSSStyleRule;
|
interface nsIDOMCSSStyleRule;
|
||||||
interface nsIDOMCSSStyleRuleCollection;
|
interface nsIDOMCSSStyleRuleCollection;
|
||||||
interface nsIDOMHTMLTableCaptionElement;
|
interface nsIDOMHTMLTableCaptionElement;
|
||||||
interface nsIDOMHTMLTableSectionElement;
|
|
||||||
|
|
||||||
// Range
|
// Range
|
||||||
interface nsIDOMRange;
|
interface nsIDOMRange;
|
||||||
|
@ -16,15 +16,12 @@ XPIDL_SOURCES += [
|
|||||||
'nsIDOMHTMLByteRanges.idl',
|
'nsIDOMHTMLByteRanges.idl',
|
||||||
'nsIDOMHTMLCanvasElement.idl',
|
'nsIDOMHTMLCanvasElement.idl',
|
||||||
'nsIDOMHTMLCollection.idl',
|
'nsIDOMHTMLCollection.idl',
|
||||||
'nsIDOMHTMLDListElement.idl',
|
|
||||||
'nsIDOMHTMLDataListElement.idl',
|
|
||||||
'nsIDOMHTMLDirectoryElement.idl',
|
'nsIDOMHTMLDirectoryElement.idl',
|
||||||
'nsIDOMHTMLDivElement.idl',
|
'nsIDOMHTMLDivElement.idl',
|
||||||
'nsIDOMHTMLDocument.idl',
|
'nsIDOMHTMLDocument.idl',
|
||||||
'nsIDOMHTMLElement.idl',
|
'nsIDOMHTMLElement.idl',
|
||||||
'nsIDOMHTMLEmbedElement.idl',
|
'nsIDOMHTMLEmbedElement.idl',
|
||||||
'nsIDOMHTMLFieldSetElement.idl',
|
'nsIDOMHTMLFieldSetElement.idl',
|
||||||
'nsIDOMHTMLFontElement.idl',
|
|
||||||
'nsIDOMHTMLFormElement.idl',
|
'nsIDOMHTMLFormElement.idl',
|
||||||
'nsIDOMHTMLFrameElement.idl',
|
'nsIDOMHTMLFrameElement.idl',
|
||||||
'nsIDOMHTMLFrameSetElement.idl',
|
'nsIDOMHTMLFrameSetElement.idl',
|
||||||
@ -37,25 +34,19 @@ XPIDL_SOURCES += [
|
|||||||
'nsIDOMHTMLInputElement.idl',
|
'nsIDOMHTMLInputElement.idl',
|
||||||
'nsIDOMHTMLLIElement.idl',
|
'nsIDOMHTMLLIElement.idl',
|
||||||
'nsIDOMHTMLLabelElement.idl',
|
'nsIDOMHTMLLabelElement.idl',
|
||||||
'nsIDOMHTMLLegendElement.idl',
|
|
||||||
'nsIDOMHTMLLinkElement.idl',
|
'nsIDOMHTMLLinkElement.idl',
|
||||||
'nsIDOMHTMLMapElement.idl',
|
'nsIDOMHTMLMapElement.idl',
|
||||||
'nsIDOMHTMLMediaElement.idl',
|
'nsIDOMHTMLMediaElement.idl',
|
||||||
'nsIDOMHTMLMenuElement.idl',
|
'nsIDOMHTMLMenuElement.idl',
|
||||||
'nsIDOMHTMLMenuItemElement.idl',
|
'nsIDOMHTMLMenuItemElement.idl',
|
||||||
'nsIDOMHTMLMetaElement.idl',
|
'nsIDOMHTMLMetaElement.idl',
|
||||||
'nsIDOMHTMLMeterElement.idl',
|
|
||||||
'nsIDOMHTMLModElement.idl',
|
|
||||||
'nsIDOMHTMLOListElement.idl',
|
'nsIDOMHTMLOListElement.idl',
|
||||||
'nsIDOMHTMLObjectElement.idl',
|
'nsIDOMHTMLObjectElement.idl',
|
||||||
'nsIDOMHTMLOptGroupElement.idl',
|
'nsIDOMHTMLOptGroupElement.idl',
|
||||||
'nsIDOMHTMLOptionElement.idl',
|
'nsIDOMHTMLOptionElement.idl',
|
||||||
'nsIDOMHTMLOptionsCollection.idl',
|
'nsIDOMHTMLOptionsCollection.idl',
|
||||||
'nsIDOMHTMLOutputElement.idl',
|
|
||||||
'nsIDOMHTMLParagraphElement.idl',
|
'nsIDOMHTMLParagraphElement.idl',
|
||||||
'nsIDOMHTMLParamElement.idl',
|
|
||||||
'nsIDOMHTMLPreElement.idl',
|
'nsIDOMHTMLPreElement.idl',
|
||||||
'nsIDOMHTMLProgressElement.idl',
|
|
||||||
'nsIDOMHTMLQuoteElement.idl',
|
'nsIDOMHTMLQuoteElement.idl',
|
||||||
'nsIDOMHTMLScriptElement.idl',
|
'nsIDOMHTMLScriptElement.idl',
|
||||||
'nsIDOMHTMLSelectElement.idl',
|
'nsIDOMHTMLSelectElement.idl',
|
||||||
@ -63,14 +54,10 @@ XPIDL_SOURCES += [
|
|||||||
'nsIDOMHTMLStyleElement.idl',
|
'nsIDOMHTMLStyleElement.idl',
|
||||||
'nsIDOMHTMLTableCaptionElem.idl',
|
'nsIDOMHTMLTableCaptionElem.idl',
|
||||||
'nsIDOMHTMLTableCellElement.idl',
|
'nsIDOMHTMLTableCellElement.idl',
|
||||||
'nsIDOMHTMLTableColElement.idl',
|
|
||||||
'nsIDOMHTMLTableElement.idl',
|
'nsIDOMHTMLTableElement.idl',
|
||||||
'nsIDOMHTMLTableRowElement.idl',
|
|
||||||
'nsIDOMHTMLTableSectionElement.idl',
|
|
||||||
'nsIDOMHTMLTextAreaElement.idl',
|
'nsIDOMHTMLTextAreaElement.idl',
|
||||||
'nsIDOMHTMLTitleElement.idl',
|
'nsIDOMHTMLTitleElement.idl',
|
||||||
'nsIDOMHTMLUListElement.idl',
|
'nsIDOMHTMLUListElement.idl',
|
||||||
'nsIDOMHTMLUnknownElement.idl',
|
|
||||||
'nsIDOMHTMLVideoElement.idl',
|
'nsIDOMHTMLVideoElement.idl',
|
||||||
'nsIDOMMediaError.idl',
|
'nsIDOMMediaError.idl',
|
||||||
'nsIDOMMozBrowserFrame.idl',
|
'nsIDOMMozBrowserFrame.idl',
|
||||||
|
@ -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 nsIDOMHTMLDListElement interface is the interface to a [X]HTML
|
|
||||||
* dl 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(edd9338b-f0d5-4825-97d6-6a49862309cc)]
|
|
||||||
interface nsIDOMHTMLDListElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
attribute boolean compact;
|
|
||||||
};
|
|
@ -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 nsIDOMHTMLDataListElement interface is the interface to a HTML
|
|
||||||
* <datalist> element.
|
|
||||||
*
|
|
||||||
* For more information on this interface, please see
|
|
||||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-datalist-element
|
|
||||||
*
|
|
||||||
* @status UNDER_DEVELOPMENT
|
|
||||||
*/
|
|
||||||
|
|
||||||
interface nsIDOMHTMLCollection;
|
|
||||||
|
|
||||||
[scriptable, uuid(528e6a6b-f957-42e1-8d1b-eeeb2fd0b128)]
|
|
||||||
interface nsIDOMHTMLDataListElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
readonly attribute nsIDOMHTMLCollection options;
|
|
||||||
};
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
|||||||
* http://www.whatwg.org/specs/web-apps/current-work/
|
* http://www.whatwg.org/specs/web-apps/current-work/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Exists so that | element instanceof Ci.nsIDOMHTMLDirectoryElement | works.
|
||||||
[scriptable, uuid(cf50373e-e004-4cec-bc65-be9250d9e4c8)]
|
[scriptable, uuid(cf50373e-e004-4cec-bc65-be9250d9e4c8)]
|
||||||
interface nsIDOMHTMLDirectoryElement : nsIDOMHTMLElement
|
interface nsIDOMHTMLDirectoryElement : nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
attribute boolean compact;
|
|
||||||
};
|
};
|
||||||
|
@ -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 nsIDOMHTMLFontElement interface is the interface to a [X]HTML
|
|
||||||
* font 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(e4d86aad-f245-4901-877e-0ae233c5fd37)]
|
|
||||||
interface nsIDOMHTMLFontElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
attribute DOMString color;
|
|
||||||
attribute DOMString face;
|
|
||||||
attribute DOMString size;
|
|
||||||
};
|
|
@ -1,24 +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 nsIDOMHTMLLegendElement interface is the interface to a [X]HTML
|
|
||||||
* legend 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(2e4567be-3d91-4df8-bdf9-f3bd96a6cd06)]
|
|
||||||
interface nsIDOMHTMLLegendElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
readonly attribute nsIDOMHTMLFormElement form;
|
|
||||||
attribute DOMString align;
|
|
||||||
};
|
|
@ -1,30 +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 nsIDOMHTMLMeterElement interface is the interface to a HTML
|
|
||||||
* <meter> element.
|
|
||||||
*
|
|
||||||
* For more information on this interface, please see
|
|
||||||
* http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-meter-element
|
|
||||||
*/
|
|
||||||
|
|
||||||
[scriptable, uuid(6b1fc313-a7c1-4064-ba24-b72e099b05fa)]
|
|
||||||
interface nsIDOMHTMLMeterElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
attribute double value;
|
|
||||||
attribute double min;
|
|
||||||
attribute double max;
|
|
||||||
attribute double low;
|
|
||||||
attribute double high;
|
|
||||||
attribute double optimum;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The labels attribute will be done with bug 556743.
|
|
||||||
*/
|
|
||||||
//readonly attribute NodeList labels;
|
|
||||||
};
|
|
@ -1,24 +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 nsIDOMHTMLModElement interface is the interface to a [X]HTML
|
|
||||||
* ins and del 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(8a1bdf64-19f3-401b-aaea-8c6a5ef1c66f)]
|
|
||||||
interface nsIDOMHTMLModElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
attribute DOMString cite;
|
|
||||||
attribute DOMString dateTime;
|
|
||||||
};
|
|
@ -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;
|
|
||||||
};
|
|
||||||
|
|
@ -1,26 +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 nsIDOMHTMLParamElement interface is the interface to a [X]HTML
|
|
||||||
* param 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(f85e1b05-6dc4-442d-bea8-7cf551f9bc9f)]
|
|
||||||
interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
attribute DOMString name;
|
|
||||||
attribute DOMString type;
|
|
||||||
attribute DOMString value;
|
|
||||||
attribute DOMString valueType;
|
|
||||||
};
|
|
@ -1,29 +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 nsIDOMHTMLProgressElement interface is the interface to a HTML
|
|
||||||
* <progress> element.
|
|
||||||
*
|
|
||||||
* For more information on this interface, please see
|
|
||||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-progress-element
|
|
||||||
*
|
|
||||||
* @status UNDER_DEVELOPMENT
|
|
||||||
*/
|
|
||||||
|
|
||||||
[scriptable, uuid(4b4bec16-c65f-4a08-97d1-dff624efdca4)]
|
|
||||||
interface nsIDOMHTMLProgressElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
attribute double value;
|
|
||||||
attribute double max;
|
|
||||||
readonly attribute double position;
|
|
||||||
/**
|
|
||||||
* The labels attribute will be done with bug 567740.
|
|
||||||
*/
|
|
||||||
//readonly attribute NodeList labels;
|
|
||||||
};
|
|
||||||
|
|
@ -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;
|
|
||||||
};
|
|
@ -19,39 +19,4 @@
|
|||||||
[scriptable, uuid(1a7bf1f1-5d6c-4200-9ceb-455874322315)]
|
[scriptable, uuid(1a7bf1f1-5d6c-4200-9ceb-455874322315)]
|
||||||
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
|
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
|
||||||
{
|
{
|
||||||
// Modified in DOM Level 2:
|
|
||||||
attribute nsIDOMHTMLTableCaptionElement caption;
|
|
||||||
// raises(DOMException) on setting
|
|
||||||
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
attribute nsIDOMHTMLTableSectionElement tHead;
|
|
||||||
// raises(DOMException) on setting
|
|
||||||
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
attribute nsIDOMHTMLTableSectionElement tFoot;
|
|
||||||
// raises(DOMException) on setting
|
|
||||||
|
|
||||||
readonly attribute nsIDOMHTMLCollection rows;
|
|
||||||
readonly attribute nsIDOMHTMLCollection tBodies;
|
|
||||||
attribute DOMString align;
|
|
||||||
attribute DOMString bgColor;
|
|
||||||
attribute DOMString border;
|
|
||||||
attribute DOMString cellPadding;
|
|
||||||
attribute DOMString cellSpacing;
|
|
||||||
attribute DOMString frame;
|
|
||||||
attribute DOMString rules;
|
|
||||||
attribute DOMString summary;
|
|
||||||
attribute DOMString width;
|
|
||||||
nsIDOMHTMLElement createTHead();
|
|
||||||
void deleteTHead();
|
|
||||||
nsIDOMHTMLElement createTFoot();
|
|
||||||
void deleteTFoot();
|
|
||||||
nsIDOMHTMLElement createCaption();
|
|
||||||
void deleteCaption();
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
nsIDOMHTMLElement insertRow(in long index)
|
|
||||||
raises(DOMException);
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
void deleteRow(in long index)
|
|
||||||
raises(DOMException);
|
|
||||||
};
|
};
|
||||||
|
@ -1,39 +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 nsIDOMHTMLTableRowElement interface is the interface to a
|
|
||||||
* [X]HTML tr 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(02094366-0d3d-47e3-949c-89113a9bcc15)]
|
|
||||||
interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
readonly attribute long rowIndex;
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
readonly attribute long sectionRowIndex;
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
readonly attribute nsIDOMHTMLCollection cells;
|
|
||||||
attribute DOMString align;
|
|
||||||
attribute DOMString bgColor;
|
|
||||||
attribute DOMString ch;
|
|
||||||
attribute DOMString chOff;
|
|
||||||
attribute DOMString vAlign;
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
nsIDOMHTMLElement insertCell(in long index)
|
|
||||||
raises(DOMException);
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
void deleteCell(in long index)
|
|
||||||
raises(DOMException);
|
|
||||||
};
|
|
@ -1,33 +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 nsIDOMHTMLTableSectionElement interface is the interface to a
|
|
||||||
* [X]HTML thead, tbody, and tfoot 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, builtinclass, uuid(7b91cf4c-5194-4122-bc29-7bbd18ba0020)]
|
|
||||||
interface nsIDOMHTMLTableSectionElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
attribute DOMString align;
|
|
||||||
attribute DOMString ch;
|
|
||||||
attribute DOMString chOff;
|
|
||||||
attribute DOMString vAlign;
|
|
||||||
readonly attribute nsIDOMHTMLCollection rows;
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
nsIDOMHTMLElement insertRow(in long index)
|
|
||||||
raises(DOMException);
|
|
||||||
// Modified in DOM Level 2:
|
|
||||||
void deleteRow(in long index)
|
|
||||||
raises(DOMException);
|
|
||||||
};
|
|
@ -1,17 +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 nsIDOMHTMLUnknownElement interface is the interface to an unknown HTML
|
|
||||||
* element.
|
|
||||||
*
|
|
||||||
* @see <http://www.whatwg.org/html/#htmlunknownelement>
|
|
||||||
*/
|
|
||||||
[scriptable, uuid(aa044a2d-4e9b-4fc5-8ad2-666da9062b36)]
|
|
||||||
interface nsIDOMHTMLUnknownElement : nsIDOMHTMLElement
|
|
||||||
{
|
|
||||||
};
|
|
@ -19,5 +19,6 @@ interface HTMLLegendElement : HTMLElement {
|
|||||||
|
|
||||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||||
partial interface HTMLLegendElement {
|
partial interface HTMLLegendElement {
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString align;
|
attribute DOMString align;
|
||||||
};
|
};
|
||||||
|
@ -12,13 +12,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
interface HTMLTableColElement : HTMLElement {
|
interface HTMLTableColElement : HTMLElement {
|
||||||
|
[SetterThrows]
|
||||||
attribute unsigned long span;
|
attribute unsigned long span;
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface HTMLTableColElement {
|
partial interface HTMLTableColElement {
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString align;
|
attribute DOMString align;
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString ch;
|
attribute DOMString ch;
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString chOff;
|
attribute DOMString chOff;
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString vAlign;
|
attribute DOMString vAlign;
|
||||||
|
[SetterThrows]
|
||||||
attribute DOMString width;
|
attribute DOMString width;
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
#include "nsIDOMXULElement.h"
|
#include "nsIDOMXULElement.h"
|
||||||
#include "nsContainerFrame.h"
|
#include "nsContainerFrame.h"
|
||||||
#include "nsINameSpaceManager.h"
|
#include "nsINameSpaceManager.h"
|
||||||
#include "nsIDOMHTMLLegendElement.h"
|
|
||||||
#include "nsIComboboxControlFrame.h"
|
#include "nsIComboboxControlFrame.h"
|
||||||
#include "nsIListControlFrame.h"
|
#include "nsIListControlFrame.h"
|
||||||
#include "nsISelectControlFrame.h"
|
#include "nsISelectControlFrame.h"
|
||||||
@ -5879,7 +5878,7 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
|||||||
nsGkAtoms::blockFrame == parentType)) {
|
nsGkAtoms::blockFrame == parentType)) {
|
||||||
// Legends can be sibling of legends but not of other content in the fieldset
|
// Legends can be sibling of legends but not of other content in the fieldset
|
||||||
nsIAtom* sibType = aSibling->GetContentInsertionFrame()->GetType();
|
nsIAtom* sibType = aSibling->GetContentInsertionFrame()->GetType();
|
||||||
nsCOMPtr<nsIDOMHTMLLegendElement> legendContent(do_QueryInterface(aContent));
|
bool legendContent = aContent->IsHTML(nsGkAtoms::legend);
|
||||||
|
|
||||||
if ((legendContent && (nsGkAtoms::legendFrame != sibType)) ||
|
if ((legendContent && (nsGkAtoms::legendFrame != sibType)) ||
|
||||||
(!legendContent && (nsGkAtoms::legendFrame == sibType)))
|
(!legendContent && (nsGkAtoms::legendFrame == sibType)))
|
||||||
@ -5987,8 +5986,7 @@ GetAdjustedParentFrame(nsIFrame* aParentFrame,
|
|||||||
if (nsGkAtoms::fieldSetFrame == aParentFrameType) {
|
if (nsGkAtoms::fieldSetFrame == aParentFrameType) {
|
||||||
// If the parent is a fieldSet, use the fieldSet's area frame as the
|
// If the parent is a fieldSet, use the fieldSet's area frame as the
|
||||||
// parent unless the new content is a legend.
|
// parent unless the new content is a legend.
|
||||||
nsCOMPtr<nsIDOMHTMLLegendElement> legendContent(do_QueryInterface(aChildContent));
|
if (!aChildContent->IsHTML(nsGkAtoms::legend)) {
|
||||||
if (!legendContent) {
|
|
||||||
newParent = GetFieldSetBlockFrame(aParentFrame);
|
newParent = GetFieldSetBlockFrame(aParentFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "nsLegendFrame.h"
|
#include "nsLegendFrame.h"
|
||||||
#include "nsIDOMNode.h"
|
#include "nsIDOMNode.h"
|
||||||
#include "nsIDOMHTMLFieldSetElement.h"
|
#include "nsIDOMHTMLFieldSetElement.h"
|
||||||
#include "nsIDOMHTMLLegendElement.h"
|
|
||||||
#include "nsCSSRendering.h"
|
#include "nsCSSRendering.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "nsMeterFrame.h"
|
#include "nsMeterFrame.h"
|
||||||
|
|
||||||
#include "nsIDOMHTMLMeterElement.h"
|
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
@ -20,9 +19,11 @@
|
|||||||
#include "nsFontMetrics.h"
|
#include "nsFontMetrics.h"
|
||||||
#include "nsContentList.h"
|
#include "nsContentList.h"
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
|
#include "mozilla/dom/HTMLMeterElement.h"
|
||||||
#include "nsContentList.h"
|
#include "nsContentList.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
using mozilla::dom::HTMLMeterElement;
|
||||||
|
|
||||||
nsIFrame*
|
nsIFrame*
|
||||||
NS_NewMeterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
NS_NewMeterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||||
@ -150,15 +151,13 @@ nsMeterFrame::ReflowBarFrame(nsIFrame* aBarFrame,
|
|||||||
nscoord yoffset = aReflowState.mComputedBorderPadding.top;
|
nscoord yoffset = aReflowState.mComputedBorderPadding.top;
|
||||||
|
|
||||||
// NOTE: Introduce a new function getPosition in the content part ?
|
// NOTE: Introduce a new function getPosition in the content part ?
|
||||||
double position, max, min, value;
|
HTMLMeterElement* meterElement = static_cast<HTMLMeterElement*>(mContent);
|
||||||
nsCOMPtr<nsIDOMHTMLMeterElement> meterElement =
|
|
||||||
do_QueryInterface(mContent);
|
|
||||||
|
|
||||||
meterElement->GetMax(&max);
|
double max = meterElement->Max();
|
||||||
meterElement->GetMin(&min);
|
double min = meterElement->Min();
|
||||||
meterElement->GetValue(&value);
|
double value = meterElement->Value();
|
||||||
|
|
||||||
position = max - min;
|
double position = max - min;
|
||||||
position = position != 0 ? (value - min) / position : 1;
|
position = position != 0 ? (value - min) / position : 1;
|
||||||
|
|
||||||
size = NSToCoordRound(size * position);
|
size = NSToCoordRound(size * position);
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "nsProgressFrame.h"
|
#include "nsProgressFrame.h"
|
||||||
|
|
||||||
#include "nsIDOMHTMLProgressElement.h"
|
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
@ -20,9 +19,11 @@
|
|||||||
#include "nsContentList.h"
|
#include "nsContentList.h"
|
||||||
#include "nsFontMetrics.h"
|
#include "nsFontMetrics.h"
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
|
#include "mozilla/dom/HTMLProgressElement.h"
|
||||||
#include "nsContentList.h"
|
#include "nsContentList.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
nsIFrame*
|
nsIFrame*
|
||||||
NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||||
@ -157,10 +158,7 @@ nsProgressFrame::ReflowBarFrame(nsIFrame* aBarFrame,
|
|||||||
nscoord xoffset = aReflowState.mComputedBorderPadding.left;
|
nscoord xoffset = aReflowState.mComputedBorderPadding.left;
|
||||||
nscoord yoffset = aReflowState.mComputedBorderPadding.top;
|
nscoord yoffset = aReflowState.mComputedBorderPadding.top;
|
||||||
|
|
||||||
double position;
|
double position = static_cast<HTMLProgressElement*>(mContent)->Position();
|
||||||
nsCOMPtr<nsIDOMHTMLProgressElement> progressElement =
|
|
||||||
do_QueryInterface(mContent);
|
|
||||||
progressElement->GetPosition(&position);
|
|
||||||
|
|
||||||
// Force the bar's size to match the current progress.
|
// Force the bar's size to match the current progress.
|
||||||
// When indeterminate, the progress' size will be 100%.
|
// When indeterminate, the progress' size will be 100%.
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
#include "nsCocoaWindow.h"
|
#include "nsCocoaWindow.h"
|
||||||
#include "nsNativeThemeColors.h"
|
#include "nsNativeThemeColors.h"
|
||||||
#include "nsIScrollableFrame.h"
|
#include "nsIScrollableFrame.h"
|
||||||
#include "nsIDOMHTMLMeterElement.h"
|
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
|
#include "mozilla/dom/HTMLMeterElement.h"
|
||||||
#include "nsLookAndFeel.h"
|
#include "nsLookAndFeel.h"
|
||||||
|
|
||||||
#include "gfxContext.h"
|
#include "gfxContext.h"
|
||||||
@ -34,6 +34,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace mozilla::gfx;
|
using namespace mozilla::gfx;
|
||||||
|
using mozilla::dom::HTMLMeterElement;
|
||||||
|
|
||||||
#define DRAW_IN_FRAME_DEBUG 0
|
#define DRAW_IN_FRAME_DEBUG 0
|
||||||
#define SCROLLBARS_VISUAL_DEBUG 0
|
#define SCROLLBARS_VISUAL_DEBUG 0
|
||||||
@ -1390,33 +1391,23 @@ nsNativeThemeCocoa::DrawMeter(CGContextRef cgContext, const HIRect& inBoxRect,
|
|||||||
|
|
||||||
NS_PRECONDITION(aFrame, "aFrame should not be null here!");
|
NS_PRECONDITION(aFrame, "aFrame should not be null here!");
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMHTMLMeterElement> meterElement =
|
|
||||||
do_QueryInterface(aFrame->GetContent());
|
|
||||||
|
|
||||||
// When using -moz-meterbar on an non meter element, we will not be able to
|
// When using -moz-meterbar on an non meter element, we will not be able to
|
||||||
// get all the needed information so we just draw an empty meter.
|
// get all the needed information so we just draw an empty meter.
|
||||||
if (!meterElement) {
|
nsIContent* content = aFrame->GetContent();
|
||||||
|
if (!(content && content->IsHTML(nsGkAtoms::meter))) {
|
||||||
DrawCellWithSnapping(mMeterBarCell, cgContext, inBoxRect,
|
DrawCellWithSnapping(mMeterBarCell, cgContext, inBoxRect,
|
||||||
meterSetting, VerticalAlignFactor(aFrame),
|
meterSetting, VerticalAlignFactor(aFrame),
|
||||||
mCellDrawView, IsFrameRTL(aFrame));
|
mCellDrawView, IsFrameRTL(aFrame));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
double value;
|
HTMLMeterElement* meterElement = static_cast<HTMLMeterElement*>(content);
|
||||||
double min;
|
double value = meterElement->Value();
|
||||||
double max;
|
double min = meterElement->Min();
|
||||||
double low;
|
double max = meterElement->Max();
|
||||||
double high;
|
double low = meterElement->Low();
|
||||||
double optimum;
|
double high = meterElement->High();
|
||||||
|
double optimum = meterElement->Optimum();
|
||||||
// NOTE: if we were allowed to static_cast to HTMLMeterElement we would be
|
|
||||||
// able to use nicer getters...
|
|
||||||
meterElement->GetValue(&value);
|
|
||||||
meterElement->GetMin(&min);
|
|
||||||
meterElement->GetMax(&max);
|
|
||||||
meterElement->GetLow(&low);
|
|
||||||
meterElement->GetHigh(&high);
|
|
||||||
meterElement->GetOptimum(&optimum);
|
|
||||||
|
|
||||||
NSLevelIndicatorCell* cell = mMeterBarCell;
|
NSLevelIndicatorCell* cell = mMeterBarCell;
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsINameSpaceManager.h"
|
#include "nsINameSpaceManager.h"
|
||||||
#include "nsIDOMHTMLInputElement.h"
|
#include "nsIDOMHTMLInputElement.h"
|
||||||
#include "nsIDOMHTMLProgressElement.h"
|
|
||||||
#include "nsIDOMXULMenuListElement.h"
|
#include "nsIDOMXULMenuListElement.h"
|
||||||
#include "nsThemeConstants.h"
|
#include "nsThemeConstants.h"
|
||||||
#include "nsIComponentManager.h"
|
#include "nsIComponentManager.h"
|
||||||
@ -26,9 +25,12 @@
|
|||||||
#include "nsCSSRendering.h"
|
#include "nsCSSRendering.h"
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
#include "mozilla/dom/HTMLBodyElement.h"
|
#include "mozilla/dom/HTMLBodyElement.h"
|
||||||
|
#include "mozilla/dom/HTMLProgressElement.h"
|
||||||
#include "nsIDocumentInlines.h"
|
#include "nsIDocumentInlines.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
nsNativeTheme::nsNativeTheme()
|
nsNativeTheme::nsNativeTheme()
|
||||||
: mAnimatedContentTimeout(UINT32_MAX)
|
: mAnimatedContentTimeout(UINT32_MAX)
|
||||||
{
|
{
|
||||||
@ -150,14 +152,8 @@ nsNativeTheme::GetProgressValue(nsIFrame* aFrame)
|
|||||||
{
|
{
|
||||||
// When we are using the HTML progress element,
|
// When we are using the HTML progress element,
|
||||||
// we can get the value from the IDL property.
|
// we can get the value from the IDL property.
|
||||||
if (aFrame) {
|
if (aFrame && aFrame->GetContent()->IsHTML(nsGkAtoms::progress)) {
|
||||||
nsCOMPtr<nsIDOMHTMLProgressElement> progress =
|
return static_cast<HTMLProgressElement*>(aFrame->GetContent())->Value();
|
||||||
do_QueryInterface(aFrame->GetContent());
|
|
||||||
if (progress) {
|
|
||||||
double value;
|
|
||||||
progress->GetValue(&value);
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (double)nsNativeTheme::CheckIntAttr(aFrame, nsGkAtoms::value, 0);
|
return (double)nsNativeTheme::CheckIntAttr(aFrame, nsGkAtoms::value, 0);
|
||||||
@ -169,14 +165,8 @@ nsNativeTheme::GetProgressMaxValue(nsIFrame* aFrame)
|
|||||||
{
|
{
|
||||||
// When we are using the HTML progress element,
|
// When we are using the HTML progress element,
|
||||||
// we can get the max from the IDL property.
|
// we can get the max from the IDL property.
|
||||||
if (aFrame) {
|
if (aFrame && aFrame->GetContent()->IsHTML(nsGkAtoms::progress)) {
|
||||||
nsCOMPtr<nsIDOMHTMLProgressElement> progress =
|
return static_cast<HTMLProgressElement*>(aFrame->GetContent())->Max();
|
||||||
do_QueryInterface(aFrame->GetContent());
|
|
||||||
if (progress) {
|
|
||||||
double max;
|
|
||||||
progress->GetMax(&max);
|
|
||||||
return max;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (double)std::max(nsNativeTheme::CheckIntAttr(aFrame, nsGkAtoms::max, 100), 1);
|
return (double)std::max(nsNativeTheme::CheckIntAttr(aFrame, nsGkAtoms::max, 100), 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user