Bug 16424 - Enable auto-scroll in page by mouse middle click
: Enable auto-scroll in page by mouse middle click
Status: RESOLVED FIXED
: WebKit
New Bugs
: 528+ (Nightly build)
: PC Windows XP
: P4 Enhancement
Assigned To:
:
: InRadar
:
: 19971
  Show dependency treegraph
 
Reported: 2007-12-13 11:18 PST by
Modified: 2008-07-10 09:17 PST (History)


Attachments
Add the feature without the icon yet (9.10 KB, patch)
2008-06-19 13:16 PST, Maxime Britto
hyatt: review-
Review Patch | Details | Formatted Diff | Diff
patch attempt (26.36 KB, patch)
2008-07-02 18:53 PST, Maxime Britto
no flags Review Patch | Details | Formatted Diff | Diff
patch (26.95 KB, patch)
2008-07-03 12:02 PST, Maxime Britto
no flags Review Patch | Details | Formatted Diff | Diff
new patch (32.84 KB, patch)
2008-07-08 11:24 PST, Maxime Britto
adele: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-12-13 11:18:49 PST
Is there a reason for not having this feature?
Since Firefox and Opera supports it, seems reasonablt for webkit to have it too.

I couldn't find any bug concerning this problem so I'm going to file one myself.
Please tell me if this is not an appropriate place to talk about this.
thanks.
------- Comment #1 From 2007-12-13 11:23:42 PST -------
<rdar://5603777>
------- Comment #2 From 2008-02-18 14:01:19 PST -------
There is no reason to keeping enhancement requests in an unconfirmed state.
------- Comment #3 From 2008-06-19 13:16:08 PST -------
Created an attachment (id=21848) [details]
Add the feature without the icon yet

This patch adds the requested feature. I also need to work on the icon which should be displayed at the original middle click location (and stay still while scrolling) and will be issued in a future patch.
------- Comment #4 From 2008-06-19 14:00:42 PST -------
(From update of attachment 21848 [details])
This patch contains tabs.  Can you re-attach a tab-free version?
------- Comment #5 From 2008-06-19 14:12:35 PST -------
The pan scroll shouldn't trigger if you can't scroll the clicked area.

Firefox pan scrolls only documents, and does not pan scroll overflow:auto sections.  This honestly looks like a bug to me.  Your code is doing the same thing, but I think overflow:auto sections should pan scroll....

You might want to test what IE does with overflow sections on Windows when it pan scrolls.
------- Comment #6 From 2008-06-19 14:22:23 PST -------
(From update of attachment 21848 [details])
+    else if (mouseEvent.button() == MiddleButton && !mev.isOverLink()) {
+        startPanScroll();
+        invalidateClick();
+        return false;

I don't think !mev.isOverLink() is a good enough check here. You probably wouldn't want the pan to occur when you middle-click on a button.

In general, we may not want the pan to occur if event.preventDefault() is called. We should test in Firefox and IE to see if calling event.preventDefault() on a middle-click event prevents the pan from occurring. We should match their behavior in this regard.
------- Comment #7 From 2008-07-02 18:53:14 PST -------
Created an attachment (id=22057) [details]
patch attempt

Works only on windows.
Icon added.
------- Comment #8 From 2008-07-03 09:55:49 PST -------
(From update of attachment 22057 [details])
I noticed some cosmetic changes so don't review this one, I'm preparing a new one.
------- Comment #9 From 2008-07-03 12:02:46 PST -------
Created an attachment (id=22068) [details]
patch

Made some functional and cosmetic corrections.
------- Comment #10 From 2008-07-08 11:24:40 PST -------
Created an attachment (id=22159) [details]
new patch

This version fix 2 problems I found with the previous one :
- It was possible to trigger multiple panScroll on frameset (one on each frame)
- It was possible to trigger the panScroll event when the object was not scrollable
------- Comment #11 From 2008-07-09 17:31:49 PST -------
Fixed in r35083
------- Comment #12 From 2008-07-09 22:26:18 PST -------
Why the patch is not reviewed?
------- Comment #13 From 2008-07-09 22:33:43 PST -------
It has been reviewed by email this afternoon by Adele Peterson. She will mark it reviewed tomorrow on bugzilla I guess.
------- Comment #14 From 2008-07-10 09:17:58 PST -------
(From update of attachment 22159 [details])
I reviewed this yesterday.