<rdar://problem/10542095> Focus rings are not drawn around push buttons, radio button...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Dec 2011 18:15:02 +0000 (18:15 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Dec 2011 18:15:02 +0000 (18:15 +0000)
commit35540cfa69fc892c78242c8e8e753aa3f10c806d
treee1938372c4ff0ed8b2f77c725ac8fa9a201d68de
parente4975419225a1892dcd84fd654d034c642e8e934
<rdar://problem/10542095> Focus rings are not drawn around push buttons, radio buttons and checkboxes

Reviewed by Darin Adler.

Instead of relying on -setShowsFirstResponder: to make -drawWithFrame:inView: draw the focus
ring, use -drawFocusRingMaskWithFrame:inView:.

* platform/mac/ThemeMac.mm:
(-[NSCell _web_drawFocusRingWithFrame:inView:]): Added. Sets up the focus ring style and a
transparency layer, then uses -drawFocusRingMaskWithFrame:inView: to draw the focus ring.
(WebCore::updateStates): Eliminated calls to get and set showsFirstResponder.
(WebCore::paintCheckbox): Changed to use -_web_drawFocusRingWithFrame:inView:.
(WebCore::paintRadio): Ditto.
(WebCore::paintButton): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/ThemeMac.mm