зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1380413 part 1. Remove unused nsIDOMHTMLImageElement bits. r=mccr8
This commit is contained in:
Родитель
31878bd57a
Коммит
4da062bf6f
|
@ -153,20 +153,6 @@ NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
|
|||
NS_IMPL_ELEMENT_CLONE(HTMLImageElement)
|
||||
|
||||
|
||||
NS_IMPL_STRING_ATTR(HTMLImageElement, Name, name)
|
||||
NS_IMPL_STRING_ATTR(HTMLImageElement, Align, align)
|
||||
NS_IMPL_STRING_ATTR(HTMLImageElement, Alt, alt)
|
||||
NS_IMPL_STRING_ATTR(HTMLImageElement, Border, border)
|
||||
NS_IMPL_INT_ATTR(HTMLImageElement, Hspace, hspace)
|
||||
NS_IMPL_BOOL_ATTR(HTMLImageElement, IsMap, ismap)
|
||||
NS_IMPL_URI_ATTR(HTMLImageElement, LongDesc, longdesc)
|
||||
NS_IMPL_STRING_ATTR(HTMLImageElement, Sizes, sizes)
|
||||
NS_IMPL_URI_ATTR(HTMLImageElement, Lowsrc, lowsrc)
|
||||
NS_IMPL_URI_ATTR(HTMLImageElement, Src, src)
|
||||
NS_IMPL_STRING_ATTR(HTMLImageElement, Srcset, srcset)
|
||||
NS_IMPL_STRING_ATTR(HTMLImageElement, UseMap, usemap)
|
||||
NS_IMPL_INT_ATTR(HTMLImageElement, Vspace, vspace)
|
||||
|
||||
bool
|
||||
HTMLImageElement::IsInteractiveHTMLContent(bool aIgnoreTabindex) const
|
||||
{
|
||||
|
@ -180,7 +166,7 @@ HTMLImageElement::AsyncEventRunning(AsyncEventDispatcher* aEvent)
|
|||
nsImageLoadingContent::AsyncEventRunning(aEvent);
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
HTMLImageElement::GetCurrentSrc(nsAString& aValue)
|
||||
{
|
||||
nsCOMPtr<nsIURI> currentURI;
|
||||
|
@ -192,8 +178,6 @@ HTMLImageElement::GetCurrentSrc(nsAString& aValue)
|
|||
} else {
|
||||
SetDOMStringToNull(aValue);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -222,16 +206,6 @@ HTMLImageElement::Complete()
|
|||
(imgIRequest::STATUS_LOAD_COMPLETE | imgIRequest::STATUS_ERROR)) != 0;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLImageElement::GetComplete(bool* aComplete)
|
||||
{
|
||||
NS_PRECONDITION(aComplete, "Null out param!");
|
||||
|
||||
*aComplete = Complete();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
CSSIntPoint
|
||||
HTMLImageElement::GetXY()
|
||||
{
|
||||
|
@ -256,20 +230,6 @@ HTMLImageElement::Y()
|
|||
return GetXY().y;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLImageElement::GetX(int32_t* aX)
|
||||
{
|
||||
*aX = X();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLImageElement::GetY(int32_t* aY)
|
||||
{
|
||||
*aY = Y();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLImageElement::GetHeight(uint32_t* aHeight)
|
||||
{
|
||||
|
|
|
@ -134,15 +134,26 @@ public:
|
|||
SetUnsignedIntAttr(nsGkAtoms::vspace, aVspace, 0, aError);
|
||||
}
|
||||
|
||||
// The XPCOM versions of the following getters work for Web IDL bindings as well
|
||||
void GetAlt(nsAString& aAlt)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::alt, aAlt);
|
||||
}
|
||||
void SetAlt(const nsAString& aAlt, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::alt, aAlt, aError);
|
||||
}
|
||||
void GetSrc(nsAString& aSrc)
|
||||
{
|
||||
GetURIAttr(nsGkAtoms::src, nullptr, aSrc);
|
||||
}
|
||||
void SetSrc(const nsAString& aSrc, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::src, aSrc, aError);
|
||||
}
|
||||
void GetSrcset(nsAString& aSrcset)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::srcset, aSrcset);
|
||||
}
|
||||
void SetSrcset(const nsAString& aSrcset, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::srcset, aSrcset, aError);
|
||||
|
@ -158,26 +169,51 @@ public:
|
|||
{
|
||||
SetOrRemoveNullableStringAttr(nsGkAtoms::crossorigin, aCrossOrigin, aError);
|
||||
}
|
||||
void GetUseMap(nsAString& aUseMap)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::usemap, aUseMap);
|
||||
}
|
||||
void SetUseMap(const nsAString& aUseMap, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::usemap, aUseMap, aError);
|
||||
}
|
||||
void GetName(nsAString& aName)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::name, aName);
|
||||
}
|
||||
void SetName(const nsAString& aName, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::name, aName, aError);
|
||||
}
|
||||
void GetAlign(nsAString& aAlign)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::align, aAlign);
|
||||
}
|
||||
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
|
||||
}
|
||||
void GetLongDesc(nsAString& aLongDesc)
|
||||
{
|
||||
GetURIAttr(nsGkAtoms::longdesc, nullptr, aLongDesc);
|
||||
}
|
||||
void SetLongDesc(const nsAString& aLongDesc, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::longdesc, aLongDesc, aError);
|
||||
}
|
||||
void GetSizes(nsAString& aSizes)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::sizes, aSizes);
|
||||
}
|
||||
void SetSizes(const nsAString& aSizes, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::sizes, aSizes, aError);
|
||||
}
|
||||
void GetCurrentSrc(nsAString& aValue);
|
||||
void GetBorder(nsAString& aBorder)
|
||||
{
|
||||
GetHTMLAttr(nsGkAtoms::border, aBorder);
|
||||
}
|
||||
void SetBorder(const nsAString& aBorder, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::border, aBorder, aError);
|
||||
|
@ -199,7 +235,10 @@ public:
|
|||
|
||||
int32_t X();
|
||||
int32_t Y();
|
||||
// Uses XPCOM GetLowsrc.
|
||||
void GetLowsrc(nsAString& aLowsrc)
|
||||
{
|
||||
GetURIAttr(nsGkAtoms::lowsrc, nullptr, aLowsrc);
|
||||
}
|
||||
void SetLowsrc(const nsAString& aLowsrc, ErrorResult& aError)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::lowsrc, aLowsrc, aError);
|
||||
|
@ -347,6 +386,8 @@ protected:
|
|||
|
||||
// Override for nsImageLoadingContent.
|
||||
nsIContent* AsContent() override { return this; }
|
||||
NS_IMETHOD GetNaturalWidth(uint32_t* aNaturalWidth) override;
|
||||
NS_IMETHOD GetNaturalHeight(uint32_t* aNaturalHeight) override;
|
||||
|
||||
// This is a weak reference that this element and the HTMLFormElement
|
||||
// cooperate in maintaining.
|
||||
|
|
|
@ -19,31 +19,6 @@
|
|||
[uuid(ec18e71c-4f5c-4cc3-aa36-5273168644dc)]
|
||||
interface nsIDOMHTMLImageElement : nsISupports
|
||||
{
|
||||
attribute DOMString alt;
|
||||
attribute DOMString src;
|
||||
attribute DOMString srcset;
|
||||
attribute DOMString sizes;
|
||||
attribute DOMString useMap;
|
||||
attribute boolean isMap;
|
||||
attribute unsigned long width;
|
||||
attribute unsigned long height;
|
||||
readonly attribute unsigned long naturalWidth;
|
||||
readonly attribute unsigned long naturalHeight;
|
||||
readonly attribute boolean complete;
|
||||
|
||||
|
||||
attribute DOMString name;
|
||||
attribute DOMString align;
|
||||
attribute DOMString border;
|
||||
attribute long hspace;
|
||||
attribute DOMString longDesc;
|
||||
attribute long vspace;
|
||||
attribute DOMString lowsrc;
|
||||
|
||||
readonly attribute DOMString currentSrc;
|
||||
|
||||
// These attributes are offsets from the closest view (to mimic
|
||||
// NS4's "offset-from-layer" behavior).
|
||||
readonly attribute long x;
|
||||
readonly attribute long y;
|
||||
};
|
||||
|
|
|
@ -68,7 +68,7 @@ partial interface HTMLImageElement {
|
|||
|
||||
// Mozilla extensions.
|
||||
partial interface HTMLImageElement {
|
||||
[CEReactions]
|
||||
[CEReactions, SetterThrows]
|
||||
attribute DOMString lowsrc;
|
||||
|
||||
// These attributes are offsets from the closest view (to mimic
|
||||
|
|
Загрузка…
Ссылка в новой задаче