Bug 1167816 - Do not treat anchor element without href attribute an interactive content. r=smaug

This commit is contained in:
Tooru Fujisawa 2015-05-29 18:23:08 +09:00
parent c9c82eeaa3
commit 195dc34454
3 changed files with 9 additions and 4 deletions

View File

@ -43,6 +43,13 @@ HTMLAnchorElement::~HTMLAnchorElement()
{
}
bool
HTMLAnchorElement::IsInteractiveHTMLContent(bool aIgnoreTabindex) const
{
return HasAttr(kNameSpaceID_None, nsGkAtoms::href) ||
nsGenericHTMLElement::IsInteractiveHTMLContent(aIgnoreTabindex);
}
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLAnchorElement)
NS_INTERFACE_TABLE_INHERITED(HTMLAnchorElement,
nsIDOMHTMLAnchorElement,

View File

@ -43,10 +43,7 @@ public:
virtual bool Draggable() const override;
// Element
virtual bool IsInteractiveHTMLContent(bool aIgnoreTabindex) const override
{
return true;
}
virtual bool IsInteractiveHTMLContent(bool aIgnoreTabindex) const override;
// nsIDOMHTMLAnchorElement
NS_DECL_NSIDOMHTMLANCHORELEMENT

View File

@ -33,6 +33,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=229925
<textarea class="yes" cols="1" rows="1"></textarea>
<video class="yes" controls></video>
<a class="no">a</a>
<audio class="no"></audio>
<img class="no" src="data:image/png,">
<input class="no" type="hidden">