wpt
wpt copied to clipboard
Click anchor without link for summary inside details element should trigger open/close
Currently, HTMLAnchorElement::HasActivationBehavior() always return true. This causes the HTMLSummaryElement::IsClickableControl() to also return true and then, the HTMLSummaryElement::DefaultEventHandler will not toggle open the <details> element.
However, the activation behavior for <a> should be to do nothing if no href attribute was found [1]. The fix is to change HTMLAnchorElement::HasActivationBehavior() to return true only if a link is found.
[1] https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element:activation-behaviour
Change-Id: Ibc1889d91e9a39d05343e3371cb3202e7104db74 Fixed: 1230025
Reviewed-on: https://chromium-review.googlesource.com/3818032 WPT-Export-Revision: af6ed541290c7c84efd3ec64dba848ed3db7c344