Bug 92584 - i and j keys no longer scroll in results.html
Summary: i and j keys no longer scroll in results.html
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ojan Vafai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-28 14:55 PDT by Simon Fraser (smfr)
Modified: 2012-07-31 19:49 PDT (History)
4 users (show)

See Also:


Attachments
Patch (10.22 KB, patch)
2012-07-31 14:07 PDT, Ojan Vafai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-07-28 14:55:07 PDT
I added support for the i, j, k, l keys in results.html, and they should scroll to the selected result. The scrolling no longer works. I can hear the baby jesus crying.
Comment 1 Simon Fraser (smfr) 2012-07-30 16:49:31 PDT
This broke in http://trac.webkit.org/changeset/122880 when the style was changed to body { display: -webkit-flex; }
Comment 2 Ojan Vafai 2012-07-31 14:07:12 PDT
Created attachment 155631 [details]
Patch
Comment 3 Simon Fraser (smfr) 2012-07-31 14:14:27 PDT
Comment on attachment 155631 [details]
Patch

Why all this craziness, and not just a normal scrolling document?
Comment 4 Tony Chang 2012-07-31 14:25:36 PDT
Comment on attachment 155631 [details]
Patch

Sorry, didn't see Simon's comment.
Comment 5 Ojan Vafai 2012-07-31 14:28:19 PDT
(In reply to comment #3)
> (From update of attachment 155631 [details])
> Why all this craziness, and not just a normal scrolling document?

It's not actually that much craziness, is it? It's an extra container flexbox div and scrolling a div element instead of the window. The rest of the code changes are just fixing unrelated bugs I stumbled upon as I was testing this.

It's so the flagged tests always show up at the bottom of the viewport. I was watching people over their shoulders using flagging and they didn't understand what flagging did because the text box was scrolled out of view. Also, it bugs me when I flag things and I need to scroll to get the text box.
Comment 6 Simon Fraser (smfr) 2012-07-31 14:33:33 PDT
Can't the flagging box just be position:fixed, bottom: 10px?
Comment 7 Ojan Vafai 2012-07-31 14:46:25 PDT
(In reply to comment #6)
> Can't the flagging box just be position:fixed, bottom: 10px?

Then it overlaps the content at the end of the page.
Comment 8 Ojan Vafai 2012-07-31 16:11:21 PDT
Comment on attachment 155631 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=155631&action=review

> LayoutTests/fast/harness/results.html:1121
> +    var container = document.querySelector('.content-container');
>      // rowRect is in client coords (i.e. relative to viewport), so we just want to add its top to the current scroll position.
> -    window.scrollTo(window.scrollX, window.scrollY + rowRect.top - 20);
> +    container.scrollTop += rowRect.top - 20;

To be clear, this is the only part of this patch that is needed for fixing the scrolling. The rest is to make navigating/flagging unexpected passes work.
Comment 9 Ojan Vafai 2012-07-31 18:28:26 PDT
Comment on attachment 155631 [details]
Patch

Marking cq+. Simon, it doesn't seem like you object to this getting committed. If you do, feel free to cq- or rollout if this get committed before you notice.
Comment 10 Simon Fraser (smfr) 2012-07-31 19:00:24 PDT
I'm ok with it.
Comment 11 WebKit Review Bot 2012-07-31 19:49:33 PDT
Comment on attachment 155631 [details]
Patch

Clearing flags on attachment: 155631

Committed r124287: <http://trac.webkit.org/changeset/124287>
Comment 12 WebKit Review Bot 2012-07-31 19:49:37 PDT
All reviewed patches have been landed.  Closing bug.