Bug 10049 - REGRESSION: thick focus ring is drawn around popup menus
Summary: REGRESSION: thick focus ring is drawn around popup menus
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P1 Normal
Assignee: Nobody
URL: http://www.superbus.co.il
Keywords: HasReduction, InRadar, Regression
Depends on:
Blocks:
 
Reported: 2006-07-21 11:54 PDT by Alexey Proskuryakov
Modified: 2012-05-03 10:55 PDT (History)
10 users (show)

See Also:


Attachments
Test case reduction (575 bytes, text/html)
2006-08-02 17:36 PDT, jonathanjohnsson
no flags Details
Test case (596 bytes, text/html)
2007-08-09 10:52 PDT, mitz
no flags Details
Clip to the enclosing rectangle if you decide to paint all of it (1.51 KB, patch)
2007-08-11 01:12 PDT, mitz
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2006-07-21 11:54:32 PDT
Steps to reproduce:

1) Open <http://www.superbus.co.il>.
2) Open and close one of the popup menus in the top menu.

Results: the focus ring apparently gets drawn multiple times, so it becomes solid color.
Comment 1 Darin Adler 2006-07-21 19:47:31 PDT
Wow, that's a really neat effect!
Comment 2 jonathanjohnsson 2006-08-02 17:36:56 PDT
Created attachment 9842 [details]
Test case reduction
Comment 3 jonathanjohnsson 2006-08-02 17:40:20 PDT
Changing to "HasReduction", even if it might be possible to make the current one shorter. I fiddled with it quite a bit without being able to reduce it more.
Comment 4 Stephanie Lewis 2006-11-06 18:48:40 PST
radar 4769769
Comment 5 Joost de Valk (AlthA) 2007-01-19 04:50:08 PST
Why is this P1? Moving to P2...
Comment 6 Joost de Valk (AlthA) 2007-01-19 04:51:19 PST
And I did notice that it's a regression, yet, somehow this doesn't seem that much of a priority to me :)
Comment 7 mitz 2007-05-16 23:37:00 PDT
(In reply to comment #6)
> And I did notice that it's a regression, yet, somehow this doesn't seem that
> much of a priority to me :)
> 

A variant of this bug, with a search field instead of a popup, affects <http://www.apple.com/buy/locator/>.
Comment 8 Dave Hyatt 2007-05-16 23:42:20 PDT
Regression = p1.
Comment 9 mitz 2007-08-09 10:52:42 PDT
Created attachment 15883 [details]
Test case

This test case demonstrates that the overpainting happens when WebHTMLView takes the "use unioned rect" code path, the focus ring lies in the "unioned rect" but not in any of the actual damaged rects.

I think the reason is that in that case, the -[WebClipView _focusRingVisibleRect] includes the non-damaged area (which is clipped out for normal drawing).
Comment 10 mitz 2007-08-11 01:12:58 PDT
Created attachment 15926 [details]
Clip to the enclosing rectangle if you decide to paint all of it

The idea here is that if WebHTMLView decides to paint the "unioned rect" instead of individual rects, it should clip to that.

This patch may be a no-go due to performance considerations -- obviously the paint() methods will do the same amount of work, but maybe Core Graphics will have to work a lot harder.

Another problem with this patch is that it makes the fast/repaint tests ineffective (another way to look at it is that it will often allow incremental repaint bugs to go unnoticed).

And now while typing this comment I got the impression that this patch made "focus rings around text controls" bugs much more noticeable.
Comment 11 mitz 2007-09-01 01:33:59 PDT
I'm also seeing doubly-painted focus rings in Gmail under certain Safari/OS combinations.
Comment 12 Alexey Proskuryakov 2008-07-28 02:20:27 PDT
Only the last reduction ("Test case") fails for me now.
Comment 13 Alexey Proskuryakov 2010-06-15 10:03:04 PDT
See also: bug 40597.
Comment 14 Andy Estes 2010-10-15 17:11:28 PDT
I see doubly-painted focus rings when I focus the search input field on http://developer.apple.com.
Comment 15 Jon Lee 2011-08-23 16:14:29 PDT
For what it's worth it looks like this has been fixed in WK2, but still exists in WK1.