Bug 13685

Summary: REGRESSION (r21368-r21388): Highlighting text in scrolled textareas behaves oddly
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: adele, mitz
Priority: P1 Keywords: NeedsReduction, Regression
Version: 523.x (Safari 3)   
Hardware: Macintosh   
OS: OS X 10.4   
Description Flags
Test case
Patch darin: review+

Description David Kilzer (:ddkilzer) 2007-05-11 17:39:35 PDT
When highlighting text in a scrolled textarea element, the text itself is not highlighted initially during either mouse drags or shift-arrow-key movements.

1. Open Safari/WebKit.
2. Open the soon-to-be-attached test case.
3. Scroll the textarea down so that at least half of it is not blank lines.
4. Position the mouse pointer to the right of any text.
5. Click-and-hold, then move the mouse up and down.

6. Click once to the right of the text to position the cursor at the end of a line of text.
7. Holding the Shift key down, use the arrow keys to create a highlight region.

Text should be highlighted when it's supposed to be highlighted.

Text is not highlighted when it's supposed to be highlighted.

This is a recent (last 24-48 hours) regression in ToT WebKit as well as from shipping Safari.

- Tested with a local debug build of WebKit r21422 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135).
Comment 1 David Kilzer (:ddkilzer) 2007-05-11 17:41:00 PDT
Created attachment 14498 [details]
Test case

Could probably be reduced further.  I just copied/pasted HTML source from a Yahoo! Mail reply page (which is where I first saw the issue).
Comment 2 mitz 2007-05-12 01:14:37 PDT
Looks like a bug that has been fixed once, where the scroll offset was not factored into repaint rect computation.
Comment 3 mitz 2007-05-12 01:16:30 PDT
(In reply to comment #2)
> Looks like a bug that has been fixed once, where the scroll offset was not
> factored into repaint rect computation.

That was bug 12590.
Comment 4 mitz 2007-05-12 01:35:56 PDT
Probably regressed in <http://trac.webkit.org/projects/webkit/changeset/21387> (fix for <rdar://problem/4100616>).
Comment 5 mitz 2007-05-12 03:40:12 PDT
I have a patch (essentially the same as for bug 13695), I'm just hunting for an already-failing pixel test so that I don't have to add a new one :)
Comment 6 mitz 2007-05-12 03:55:29 PDT
Created attachment 14514 [details]
Comment 7 Darin Adler 2007-05-12 07:43:26 PDT
Comment on attachment 14514 [details]

Comment 8 Sam Weinig 2007-05-12 19:35:15 PDT
Landed in r21435.
Comment 9 David Kilzer (:ddkilzer) 2007-06-24 12:04:55 PDT
Mass removal of NeedsRadar keyword from my bugs that have already been RESOLVED.