Bug 20229 - REGRESSION: WebKit double-draws selections in some cases
Summary: REGRESSION: WebKit double-draws selections in some cases
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Nobody
URL: http://www.mathewgross.com/about
Keywords: NeedsReduction, Regression
: 270786 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-30 10:16 PDT by Eric Seidel (no email)
Modified: 2024-03-11 16:37 PDT (History)
7 users (show)

See Also:


Attachments
example of double-drawn selection (78.19 KB, image/png)
2008-07-30 10:16 PDT, Eric Seidel (no email)
no flags Details
Proposed Patch (19.68 KB, patch)
2012-03-26 08:39 PDT, Parag Radke
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-03 (10.02 MB, application/zip)
2012-03-26 09:30 PDT, WebKit Review Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-07-30 10:16:27 PDT
See the attached image.

Go to:
http://www.mathewgross.com/about
and select the top portion of the page.  Notice how the selection is drawn twice in some areas.  Firefox leaves large blank spaces (which isn't better).  But the double-draw makes the text hard to read.

WebKit should instead clip around the existing selection (I think) when drawing new selection rects so that they don't overlap.
Comment 1 Eric Seidel (no email) 2008-07-30 10:16:51 PDT
Created attachment 22555 [details]
example of double-drawn selection
Comment 2 Pierre-Luc Beaudoin 2008-07-30 12:48:29 PDT
It looks like the selection isn't double drawn but that it is drawn in a translucent way. What I see in your screen shot is a big selection for the 2nd line which overlaps the other line's selection.

I think this bug should be named "Overlapping selection highlight".  The bug might simply be that the 2nd line ("Submitted by Mathew Gross on February 18, 2008 - 4:01pm.") selection's highlight is too high.
Comment 3 Dave Hyatt 2008-07-30 18:08:22 PDT
Confirmed.  One of the lines is getting a crazy tall selection highlight.  This is a regression from Safari 3.1.
Comment 4 Dave Hyatt 2008-07-30 18:12:30 PDT
Padding and border on inline elements is being incorporated into selection top and bottom since we use overflow.  We need to change selection away from using painting overflow and to be its own unique values.

This is a regression because an empty inline element is now present (because of fixes to make sure those show up).  (<span class=taxonomy>)

Comment 5 ivank 2009-08-15 16:16:54 PDT
I encountered a double-drawn selection when I was hiding and unhiding divs. I have a simple reproduction of this:

http://ludios.net/webkit_bugs/selection_bugs.html  (it is the first bug listed)
Comment 6 Parag Radke 2012-03-26 08:39:28 PDT
Created attachment 133821 [details]
Proposed Patch

Patch to fix double-draws selections.
Comment 7 Parag Radke 2012-03-26 08:42:28 PDT
This patch will cause some pixel tests to fail on chromium port because of propagation.
Comment 8 WebKit Review Bot 2012-03-26 09:30:22 PDT
Comment on attachment 133821 [details]
Proposed Patch

Attachment 133821 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12132863

New failing tests:
editing/pasteboard/subframe-dragndrop-1.html
editing/selection/3690703-2.html
editing/selection/3690703.html
editing/selection/inline-closest-leaf-child.html
fast/repaint/4774354.html
fast/replaced/selection-rect-transform.html
editing/selection/contains-boundaries.html
fast/repaint/block-selection-gap-in-composited-layer.html
fast/writing-mode/vertical-lr-replaced-selection.html
fast/replaced/selection-rect-in-table-cell.html
fast/writing-mode/horizontal-bt-replaced-selection.html
editing/selection/3690719.html
fast/replaced/selection-rect.html
fast/writing-mode/vertical-rl-replaced-selection.html
Comment 9 WebKit Review Bot 2012-03-26 09:30:29 PDT
Created attachment 133831 [details]
Archive of layout-test-results from ec2-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-03  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 10 Parag Radke 2012-03-27 01:52:08 PDT
Comment on attachment 133821 [details]
Proposed Patch

This change is not correct to avoid double selection 'll upload a new patch for this.
Comment 11 Alexey Proskuryakov 2024-03-11 15:18:42 PDT
*** Bug 270786 has been marked as a duplicate of this bug. ***