RESOLVED FIXED 154769
Contents inside a shadow host with a negative tabindex should not be tab focusable
https://bugs.webkit.org/show_bug.cgi?id=154769
Summary Contents inside a shadow host with a negative tabindex should not be tab focu...
Ryosuke Niwa
Reported 2016-02-26 19:18:57 PST
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.
Attachments
Fixes the bug (14.02 KB, patch)
2016-02-26 19:45 PST, Ryosuke Niwa
no flags
Fixes the bug (14.16 KB, patch)
2016-02-29 14:58 PST, Ryosuke Niwa
no flags
Minor cleanup (14.15 KB, patch)
2016-02-29 14:59 PST, Ryosuke Niwa
koivisto: review+
Ryosuke Niwa
Comment 1 2016-02-26 19:45:43 PST
Created attachment 272393 [details] Fixes the bug
Ryosuke Niwa
Comment 2 2016-02-26 20:22:41 PST
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...
Ryosuke Niwa
Comment 3 2016-02-29 14:58:09 PST
Created attachment 272521 [details] Fixes the bug
Ryosuke Niwa
Comment 4 2016-02-29 14:59:48 PST
Created attachment 272522 [details] Minor cleanup
Antti Koivisto
Comment 5 2016-03-01 13:28:10 PST
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()
Ryosuke Niwa
Comment 6 2016-03-01 21:29:48 PST
(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!
Ryosuke Niwa
Comment 7 2016-03-01 21:31:17 PST
Note You need to log in before you can comment on or make changes to this bug.