Bug 24477

Summary: REGRESSION (r41467): Page Down key scrolls two pages
Product: WebKit Reporter: nobody <a4list>
Component: WebKit Misc.Assignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Major CC: adele, alice.barraclough, ap, dharris+webkit, jwalden+bwo, nickptar, rajiv, tony, zwarich
Priority: P1 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
patch to fix double page down/page up bug adele: review-

Description nobody 2009-03-09 20:00:16 PDT
hitting "Page Down" keyboard button broken (scrolls more than one "page", i.e. more than one screen distance)

problem observed in r41521, not sure if that is first appearance of problem, but this bug appeared very recently.
Comment 1 Alexey Proskuryakov 2009-03-10 09:02:40 PDT
Are you seeing this on all sites? I cannot reproduce the problem with r41550 (although I have a notebook, so it's Fn+Down, not PgDown for me).
Comment 2 nobody 2009-03-10 10:57:30 PDT
Yes, every website.

The "Page Down" key is located on keyboard among Home/End/Delete/Page Up/Page Down/Insert buttons.

(btw, "Page Up" scrolls the wrong distance, also.)

Problem continues in r41545.
Comment 3 Alexey Proskuryakov 2009-03-10 11:39:29 PDT
Weird, it suddenly started to happen to me. Maybe I was testing an old version previously.

Logging editing commands, I see that doCommandBySelector:"scrollPageDown:" is invoked twice for each PageDown.
Comment 4 Rajiv Aaron Manglani 2009-03-10 20:38:08 PDT
i'm seeing this in WebKit r41545 with safari 4 public beta installed: Version 4 Public Beta (5528.16, r41545), on a mac with an "extended keyboard" with actual page up/page down keys.

the problem is not just with page down but also with page up.
Comment 5 Alexey Proskuryakov 2009-03-12 02:41:59 PDT
<rdar://problem/6674184>
Comment 6 Rajiv Aaron Manglani 2009-03-12 23:02:15 PDT
this was broken in Changeset 41467 for trunk/WebKit/mac/WebView/WebHTMLView.mm in order to fix bug #24079. see http://trac.webkit.org/changeset/41467

building webkit r41660 with that change reversed fixes the problems described in this bug.
Comment 7 Rajiv Aaron Manglani 2009-03-12 23:30:29 PDT
Created attachment 28572 [details]
patch to fix double page down/page up bug

since the selector is passed to super, consider the event handled.

code originally introduced in http://trac.webkit.org/changeset/39549
Comment 8 Adele Peterson 2009-03-12 23:35:01 PDT
Comment on attachment 28572 [details]
patch to fix double page down/page up bug

This will cause https://bugs.webkit.org/show_bug.cgi?id=23060 to show up again.  To reproduce that bug, try running Mail.app with your patched WebKit.  Focus a message in the preview pane, and you'll see that Home, End, Page Up, and Page Down don't work.
Comment 9 Adele Peterson 2009-03-13 09:07:26 PDT
Here's an experiment we should try.  If we added the selectors for Page Up/Down and Home/End to the Editor command table in WebCore, would we still need eventHandled to be false here to get the Mail testcase to work?
Comment 10 Darin Adler 2009-03-17 16:23:52 PDT
I値l take this one.
Comment 11 Darin Adler 2009-03-17 17:06:41 PDT
http://trac.webkit.org/changeset/41793
Comment 12 Mark Rowe (bdash) 2009-03-17 17:24:52 PDT
*** Bug 24660 has been marked as a duplicate of this bug. ***
Comment 13 nobody 2009-03-19 05:11:19 PDT
This problem is not fixed.

Some recent versions seemed OK.

r41760 again scrolls too far. 

It seems to be not quite a full page extra, but it is scrolling the wrong distance.
Comment 14 Darin Adler 2009-03-19 07:39:38 PDT
The difference in distance scrolled is probably due to the fact that we now use WebCore's scrolling code instead of WebFrameView's.

The old bug was absolutely critical, the new bug simply makes the Mac version match the Windows version. While I want to fix the new bug, it's *not* the same thing, so reopening this bug report isn't quite right.
Comment 15 Doug Harris 2009-03-19 08:01:02 PDT
(In reply to comment #13)
> This problem is not fixed.
> 
> Some recent versions seemed OK.
> 
> r41760 again scrolls too far. 

According to comment #12, this was committed in r41793 -- which is after r41760.

There has been no new nightly build since r41760 (I don't know why).

Comment 16 Darin Adler 2009-03-19 10:03:02 PDT
Please try again with a version newer than r41793.
Comment 17 nobody 2009-03-19 18:57:44 PDT
seems to be OK in r41844.

Thanks!
Comment 18 Cameron Zwarich (cpst) 2009-03-20 02:17:01 PDT
*** Bug 24698 has been marked as a duplicate of this bug. ***