Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Issue 2947013002: TabBox will now select hidden tabs through arrow keys.

Created:
3 years, 6 months ago by skym
Modified:
3 years, 6 months ago
Reviewers:
calamity
CC:
chromium-reviews, oshima+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

TabBox will now select hidden tabs through arrow keys. BUG=734917 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Patch Set 1 #

Total comments: 5

Patch Set 2 : Updates for calamity. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M ui/webui/resources/js/cr/ui/tabs.js View 1 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 16 (10 generated)
skym
PTAL
3 years, 6 months ago (2017-06-20 19:35:13 UTC) #5
calamity
Can we write a test for this somewhere? https://codereview.chromium.org/2947013002/diff/1/ui/webui/resources/js/cr/ui/tabs.js File ui/webui/resources/js/cr/ui/tabs.js (right): https://codereview.chromium.org/2947013002/diff/1/ui/webui/resources/js/cr/ui/tabs.js#newcode177 ui/webui/resources/js/cr/ui/tabs.js:177: // ...
3 years, 6 months ago (2017-06-21 07:22:31 UTC) #8
skym
Can you point me to an example of a test that you think would be ...
3 years, 6 months ago (2017-06-21 17:00:36 UTC) #11
skym
On 2017/06/21 17:00:36, skym wrote: > Can you point me to an example of a ...
3 years, 6 months ago (2017-06-21 17:06:29 UTC) #12
calamity
On 2017/06/21 17:06:29, skym wrote: > On 2017/06/21 17:00:36, skym wrote: > > Can you ...
3 years, 6 months ago (2017-06-22 03:32:59 UTC) #15
calamity
3 years, 6 months ago (2017-06-22 05:49:02 UTC) #16
https://codereview.chromium.org/2947013002/diff/1/ui/webui/resources/js/cr/ui...
File ui/webui/resources/js/cr/ui/tabs.js (right):

https://codereview.chromium.org/2947013002/diff/1/ui/webui/resources/js/cr/ui...
ui/webui/resources/js/cr/ui/tabs.js:178: while
(tabbox.querySelector('tabs').children[next].hidden &&
On 2017/06/21 17:00:36, skym wrote:
> On 2017/06/21 07:22:31, calamity wrote:
> > How about
> > 
> > var next;
> > do {
> >   next = (next + delta + count) % count;
> > } while (!this.children[next].offsetParent && index != next);
> > 
> 
> Switched to do/while and this.children. I don't see why you'd want to check
> offsetParent instead of hidden, it is so much less readable.

offsetParent deals with display: none in general (the behavior of hidden is
actually defined in local stylesheets). There's a tradeoff between readability
and consistency here.

Powered by Google App Engine
This is Rietveld 408576698