[Webkit-unassigned] [Bug 34544] [Chromium] RenderTheme does not draw focus rings on SL for checkboxes, radio buttons

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 5 10:38:25 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=34544


David Levin <levin at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48143|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #6 from David Levin <levin at chromium.org>  2010-02-05 10:38:24 PST ---
(From update of attachment 48143)
I don't feel comfortable reviewing Objective-C but I can help with general
stuff to make it easier for an Objective-C reviewer.


> Index: WebCore/platform/chromium/ThemeChromiumMac.mm
> @@ -47,6 +48,7 @@ using namespace std;
>  //   rendering.
>  // - In updateStates() the code to update the cells' inactive state.
>  // - In paintButton() the code to save/restore the window's default button cell.
> +// - The Fix7604051 code and the calls to it.

How about:
// - A focus indication fix for radio buttons/checkboxes on Snow Leopard.
instead?


> +// --- START FIX FOR RADAR 7604051 ---

Is there a better name for the bug other than "RADAR 7604051" (like "START FIX
FOR radio button/checkbox focus indication on Snow Leopard.)


How about shortening the comment to this?

On Snow Leopard in the focus ring drawing code, it calls +[NSView focusView] to
get 
the currently focused view. The focus ring drawing code then calls a
rect-returning
method on that view, and uses that rect to clip.  If there is no focus view,
the rect
returned from that method is garbage which results in clipping out the
selection glow
entirely.

To fix this, do some quick swizzling to make sure that the focus ring code is
works
properly if a test of drawing the focus ring into contexts fails.

FIXME: After rdar://problem/7604051 is fixed on all supported platforms, remove
this code.


> + at interface TCMVisibleView : NSView
> +
> + at end
> +
> + at implementation TCMVisibleView
> +
> +- (struct CGRect)_focusRingVisibleRect {

Braces for functions start on the next line (many instances of this but I'm
only flagging the first).


> +namespace Fix7604051 {

Perhaps FocusIndicationFix 

> +    return (pixel == 0);

WebKit style is to avoid comparisons to 0. Use "return !pixel;" instead.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list