[Webkit-unassigned] [Bug 203292] Accessory bar next/previous buttons do not work on inputs in shadow roots
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Oct 26 10:09:51 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=203292
--- Comment #29 from Tetsuharu Ohzeki <tetsuharu.ohzeki at gmail.com> ---
(In reply to Ryosuke Niwa from comment #28)
> Comment on attachment 412272 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=412272&action=review
>
> > LayoutTests/fast/shadow-dom/ios/accessory-bar-work-on-input-with-tabindex-in-shadow-tree.html:130
> > +class Testcase {
> > + constructor(documentOrShadowRoot, inputGetter) {
>
> It seems that we can just have a helper function that creates a simple
> dictionary instead of a class with a getter.
> For tests, we should strive to make things as simple as possible because we
> don't want to be debugging test code.
As a viewpoint to simplify the tests, how do you think about change `runTest()` in this patch to following?:
```
async function runTest() {
const NUMBER_OF_INPUT_ELEMENTS_SHOULD_BE_FOCUSED = 10;
for (let i = 0; i < NUMBER_OF_INPUT_ELEMENTS_SHOULD_BE_FOCUED; ++i) {
await UIHelper.moveToNextByKeyboardAccessoryBar();
}
for (let i = NUMBER_OF_INPUT_ELEMENTS_SHOULD_BE_FOCUED; -1 < i; --i) {
await UIHelper.moveToPrevByKeyboardAccessoryBar();
}
}
```
I had thought this pattern is at first, but I also thought that
1. this might be hard to debug failures in CI job.
2. this might be a oversimplified.
So I chose the current patch's approach.
What do you think about this?
> > LayoutTests/fast/shadow-dom/ios/accessory-bar-work-on-input-with-tabindex-in-shadow-tree.html:181
> > + for (const [i, { documentOrShadowRoot, inputElement, }] of stack.entries()) {
>
> Why not just start at i=1 instead?
This is because my refactoring was not enough....
> > LayoutTests/fast/shadow-dom/ios/accessory-bar-work-on-input-with-tabindex-in-shadow-tree.html:196
> > + for (let i = stack.length - 1; -1 < i; --i) {
> > + if (stack.length - 1 === i) {
>
Ditto.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201026/fdf73f6c/attachment.htm>
More information about the webkit-unassigned
mailing list