We shouldn't tab-focus a focusable element inside a shadow host with a negative tab index per discussion on https://github.com/w3c/webcomponents/issues/399.
Created attachment 272393 [details] Fixes the bug
Comment on attachment 272393 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=272393&action=review > LayoutTests/fast/shadow-dom/negative-tabindex-on-shadow-host-expected.txt:7 > +2. Shadow host with a positive tabindex WTF is this. There's some weird bug somewhere...
Created attachment 272521 [details] Fixes the bug
Created attachment 272522 [details] Minor cleanup
Comment on attachment 272522 [details] Minor cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=272522&action=review > Source/WebCore/dom/Element.cpp:222 > +bool Element::tabIndexSetExplicitly() const > +{ > + return hasRareData() && elementRareData()->tabIndexSetExplicitly(); > +} > + > bool Element::supportsFocus() const > { > return hasRareData() && elementRareData()->tabIndexSetExplicitly(); supportsFocus() should probably just call tabIndexSetExplicitly()
(In reply to comment #5) > Comment on attachment 272522 [details] > Minor cleanup > > View in context: > https://bugs.webkit.org/attachment.cgi?id=272522&action=review > > > Source/WebCore/dom/Element.cpp:222 > > +bool Element::tabIndexSetExplicitly() const > > +{ > > + return hasRareData() && elementRareData()->tabIndexSetExplicitly(); > > +} > > + > > bool Element::supportsFocus() const > > { > > return hasRareData() && elementRareData()->tabIndexSetExplicitly(); > > supportsFocus() should probably just call tabIndexSetExplicitly() Done that. Thanks for the review!
Committed r197439: <http://trac.webkit.org/changeset/197439>