Bug 24403

Summary: When Inspector is docked, selection cause the page to scroll
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web Inspector (Deprecated)Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: ain, alexanderkahn, boards, bweinstein, darin, farukates, hyatt, jimmy, jon.evans, pmuellr, rik, timothy
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Screenshot demonstrating erratic scroll behavior with pull-down menus.
none
Proposed Patch sullivan: review+, timothy: commit-queue-

Joseph Pecoraro
Reported 2009-03-05 14:27:12 PST
When the Web Inspector is open, when attempting to highlight/select text (or anything) on the original webpage. Steps to Reproduce: 1. Go to: http://www.google.com/search?&q=test (or any page where scrolling would be noticeable) 2. Open the Web Inspector (&#8997;&#8984;I) 3. Click and Drag on the Google Results to select some content. (at this point the page should start scrolling uncontrollably). 4. If you close the Web Inspector you can select content normally. Notes: Just clicking and holding does nothing. However, once you click and drag, moving a single pixel, the uncontrollable scrolling starts. This is just an annoyance that I didn't see mentioned in other bug reports.
Attachments
Screenshot demonstrating erratic scroll behavior with pull-down menus. (178.59 KB, image/png)
2009-11-09 17:35 PST, Dave Land
no flags
Proposed Patch (3.63 KB, patch)
2010-01-19 23:29 PST, Timothy Hatcher
sullivan: review+
timothy: commit-queue-
Patrick Mueller
Comment 1 2009-03-20 07:36:20 PDT
I'm unable to reproduce this on r41844 on a Mac. I wonder if there are some other conditions that need to be made to get this to happen. Any other thoughts?
Joseph Pecoraro
Comment 2 2009-03-20 08:04:22 PDT
Video Demo of Text Selection Uncontrolled Scolling with Inspector Open: http://screencast.com/t/VEA864MtwwT Video Demo of Typing in Textarea and Uncontrolled Scrolling with Inspector Open: http://screencast.com/t/VBMcxSPa Clarify Text Selection: I should be more clear. Double Click Text Selection is fine, its only "click and drag" selection that seems to produce the problem. Maybe, with the two different video demos I have these should be 2 bugs or this 1 should be renamed to "Unexpected (and Uncontrollable) Scrolling Behavior when Web Inspector is Open."
Joseph Pecoraro
Comment 3 2009-03-20 08:07:29 PDT
This only happens when the Web Inspector is docked.
Patrick Mueller
Comment 4 2009-03-20 08:35:43 PDT
Yup, was just going to say, works fine when undocked, reproduceable when docked.
Timothy Hatcher
Comment 5 2009-04-06 10:11:17 PDT
This happens while docked because the Web Inspector is a WebView inside another WebView with the WebFrameView of the main page at a shorter size.
Timothy Hatcher
Comment 6 2009-09-11 17:40:44 PDT
*** Bug 29208 has been marked as a duplicate of this bug. ***
Alexander Kahn
Comment 7 2009-10-14 06:51:34 PDT
This is a very troublesome bug for me. It actually makes the Web Inspector a lot less useful for certain kinds of testing/development. For example, I'm testing a form that submits using AJAX. So I would like to enter some values in the form's fields, click submit, and read my debug messages in the console. But entering any text in a form field, or tabbing to the next field causes the browser to scroll to the bottom of the page, obscuring the field I am focused in. I can type, but I can't see the field anymore. So for this I either have to use Firefox with Firebug, or close and open the Web Inspector before and after each form submission. I'd prefer to just leave the Inspector open all the time. If it were up to me I'd raise this up to 'Normal' importance.
Brian Weinstein
Comment 8 2009-11-04 17:26:38 PST
This looks to be a Mac only bug, doesn't reproduce on Windows.
Dave Land
Comment 9 2009-11-09 17:35:08 PST
Created attachment 42814 [details] Screenshot demonstrating erratic scroll behavior with pull-down menus. Also occurs when a pull-down menu (such as a SELECT element) is activated when the inspector is open. To reproduce: 1) Go to Google Language Tools 2) Open the Inspector 3) Click the "My Language:" pull-down under the "Search for:" box 4) Observe out-of-control scrolling (including display of the expanded pull-down menu above the top of the screen, as shown)
Timothy Hatcher
Comment 10 2009-12-04 09:50:18 PST
*** Bug 31735 has been marked as a duplicate of this bug. ***
Timothy Hatcher
Comment 11 2009-12-04 09:50:55 PST
Timothy Hatcher
Comment 12 2010-01-19 08:50:16 PST
*** Bug 33845 has been marked as a duplicate of this bug. ***
Timothy Hatcher
Comment 13 2010-01-19 20:20:37 PST
I have a fix I am testing.
Timothy Hatcher
Comment 14 2010-01-19 23:29:26 PST
This regressed with r44379, a change Darin made for viewless WebKit. http://trac.webkit.org/changeset/44379/trunk/WebKit/mac/WebCoreSupport/WebChromeClient.mm The scrollRect.move(scrollView->scrollOffset()); call to convert the rect assumes the frame view is the same size as the WebView. Using the NSView convertRect:fromView: fixes it. But I think we also do a reducdant scroll here, since WebCore already scrolls the main frame. Patch forthcoming.
Timothy Hatcher
Comment 15 2010-01-19 23:29:43 PST
Created attachment 46983 [details] Proposed Patch I'd like Darin or Hyatt to review this, since they touched this code in the past.
Timothy Hatcher
Comment 16 2010-01-19 23:31:43 PST
I meant a "a redundant scroll".
Darin Adler
Comment 17 2010-01-19 23:35:37 PST
Comment on attachment 46983 [details] Proposed Patch Why did you dump the _usesDocumentViews code path?
Darin Adler
Comment 18 2010-01-19 23:36:36 PST
Comment on attachment 46983 [details] Proposed Patch Oh, OK. I read the comments. I'll try to review tomorrow if no one has looked at it by now.
Darin Adler
Comment 19 2010-01-20 08:12:33 PST
Comment on attachment 46983 [details] Proposed Patch OK, seems fine to me too.
Timothy Hatcher
Comment 20 2010-01-20 11:10:03 PST
Landed in r53556.
Note You need to log in before you can comment on or make changes to this bug.