зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1524893 - Override IsInteractiveHTMLContent() for HTMLDetailsElement. r=smaug
When nsGenericHTMLElement::IsInteractiveHTMLContent() was introduced, HTMLDetailsElement didn't exist yet. It's better to override IsInteractiveHTMLContent() for HTMLDetailsElement than check the details tag in its parent class. Differential Revision: https://phabricator.services.mozilla.com/D18792 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ceee0ec744
Коммит
4c5d8d08a1
|
@ -32,6 +32,7 @@ class HTMLDetailsElement final : public nsGenericHTMLElement {
|
|||
|
||||
nsresult Clone(NodeInfo* aNodeInfo, nsINode** aResult) const override;
|
||||
|
||||
// Element
|
||||
nsChangeHint GetAttributeChangeHint(const nsAtom* aAttribute,
|
||||
int32_t aModType) const override;
|
||||
|
||||
|
@ -39,6 +40,10 @@ class HTMLDetailsElement final : public nsGenericHTMLElement {
|
|||
const nsAttrValueOrString* aValue,
|
||||
bool aNotify) override;
|
||||
|
||||
bool IsInteractiveHTMLContent(bool aIgnoreTabindex) const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
// HTMLDetailsElement WebIDL
|
||||
bool Open() const { return GetBoolAttr(nsGkAtoms::open); }
|
||||
|
||||
|
|
|
@ -1470,8 +1470,7 @@ already_AddRefed<nsINodeList> nsGenericHTMLElement::Labels() {
|
|||
|
||||
bool nsGenericHTMLElement::IsInteractiveHTMLContent(
|
||||
bool aIgnoreTabindex) const {
|
||||
return IsAnyOfHTMLElements(nsGkAtoms::details, nsGkAtoms::embed,
|
||||
nsGkAtoms::keygen) ||
|
||||
return IsAnyOfHTMLElements(nsGkAtoms::embed, nsGkAtoms::keygen) ||
|
||||
(!aIgnoreTabindex && HasAttr(kNameSpaceID_None, nsGkAtoms::tabindex));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче