[webkit-dev] Selection highlight painting ("gaps"?)

Maciej Stachowiak mjs at apple.com
Thu Oct 22 16:22:54 PDT 2009

On Oct 22, 2009, at 2:38 PM, Evan Martin wrote:

> On Mon, Oct 19, 2009 at 1:22 PM, David Hyatt <hyatt at apple.com> wrote:
>>> I've actually been super frustrated with WebKit's selection  
>>> behavior for a
>>> long time, precisely because it tries to let you select  
>>> everything.  In
>> Concrete examples of where something weird happens would be  
>> helpful.  The
>> gap code is obviously not perfect and so there's plenty of room for
>> improving it, which will help out Chrome on Mac users even if  
>> Chrome on
>> Windows goes to a different style of behavior.
> This likely isn't what PK was talking about, but it's a good example
> in its irony.  Try selecting a paragraph on the front page of
> webkit.org; you'll see weird gap painting over the navbar on the left.
> http://imgur.com/fd1Ck  (happens on Safari too, just was easier to
> screenshot locally)

Seems like a bug to me. Selection draws over content that won't get  
copied. You also get some double-drawn selection if you Select All on  
the webkit.org front page. Please file. http://daringfireball.net/ is  
another site that has the same problem, likely for the very same  
reason. I expect this will happen on any site  uses a large left  
margin on the main content to lay out around an absolute-positioned  
sidebar. Some sites use floats for this kind of thing and are not  
affected. I'm not sure what the best fix is. Maybe we should be  
stopping selection painting at the border box and not draw into  
margins. I'm not sure if this would have negative consequences on  
other sites.


More information about the webkit-dev mailing list