Bug 40403

Summary: Autoscroll on selection should take scrollbars into account as outside of the content.
Product: WebKit Reporter: Hajime Morrita <morrita>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: hyatt, mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Description Flags
patch v0 ojan: review+

Description Hajime Morrita 2010-06-09 23:07:05 PDT
Created attachment 58331 [details]

How to reproduce:
- Resize window to about 500x500
- Open reproduce HTML
- Mouse down somewhere on the text
- Drag mouse cursor (caret) to rightmost scrollbar

What to expect:
- Window start to scroll to right

Happens instead:
- No scroll happens.
Comment 1 Hajime Morrita 2010-06-09 23:08:30 PDT
Scrollbars with "overflow:scroll" work well. This happens only with outermost scrollbars.
Comment 2 Hajime Morrita 2010-06-24 22:54:57 PDT
How other applications  behave:
- Firefox and IE8 also start autoscroll when the cursor is over the scrollbar
- TextEdit.app is also same.
Comment 3 Hajime Morrita 2010-06-28 03:32:10 PDT
Created attachment 59889 [details]
patch v0
Comment 4 Hajime Morrita 2010-06-28 03:36:36 PDT
Could anyone can take a look at this?
This type of autoscroll matters for fullscreen-oriented devices such as tablet and netbooks.
Other apps also support this.
Comment 5 mitz 2010-06-28 08:11:41 PDT
Is there a reason why this cannot be tested with DumpRenderTree?
Comment 6 Hajime Morrita 2010-06-28 22:22:54 PDT
HI mitz, thank you for taking a look!

(In reply to comment #5)
> Is there a reason why this cannot be tested with DumpRenderTree?
I tried, but couldn't figure out how.
I tried to send mouse events using eventSender.mouseMove(), 
But nothing happen when the pointer's position is over the scrollbar.
When the position is inside the content area (not over the scrollbar), 
events are delivered to WebCore. But with scrollbar, they aren't. 

I suspect invoking NSView.mouseMoved() or NSView.mouseDragged() isn't sufficient to
deliver events to the scrollbar. But I'm not sure.
Comment 7 Hajime Morrita 2010-07-22 19:36:35 PDT
Committed r63943: <http://trac.webkit.org/changeset/63943>