[Mac] Radio buttons and checkboxes vanish when redrawn
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jun 2014 05:25:32 +0000 (05:25 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jun 2014 05:25:32 +0000 (05:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134335

Reviewed by Dan Bernstein.

I screwed up when landing r170343 by moving some code around
which broke the logic. We need to query the animation
state for controls after we draw (both statically and animated).

* platform/mac/ThemeMac.mm:
(WebCore::paintToggleButton): We need to check the state of animation again, after
we draw.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170467 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/ThemeMac.mm

index 0fed9c93bfc637c8288b9d34fbecc32255dd0069..93e79b6a49c98c98950079f743fca03d737c3c63 100644 (file)
@@ -1,3 +1,18 @@
+2014-06-25  Dean Jackson  <dino@apple.com>
+
+        [Mac] Radio buttons and checkboxes vanish when redrawn
+        https://bugs.webkit.org/show_bug.cgi?id=134335
+
+        Reviewed by Dan Bernstein.
+
+        I screwed up when landing r170343 by moving some code around
+        which broke the logic. We need to query the animation
+        state for controls after we draw (both statically and animated).
+
+        * platform/mac/ThemeMac.mm:
+        (WebCore::paintToggleButton): We need to check the state of animation again, after
+        we draw.
+
 2014-06-25  Brady Eidson  <beidson@apple.com>
 
         Add HID-based gamepad implementation for Mac
 2014-06-25  Brady Eidson  <beidson@apple.com>
 
         Add HID-based gamepad implementation for Mac
index dfb5f690a0436c0999b73d369dc81d6f83c1c74c..56d0a2b39f000b56a3c99a69b69339cd50d2798e 100644 (file)
@@ -449,7 +449,9 @@ static void paintToggleButton(ControlPart buttonType, ControlStates* controlStat
         needsRepaint = drawCellFocusRing(toggleButtonCell, inflatedRect, view);
     [toggleButtonCell setControlView:nil];
 
         needsRepaint = drawCellFocusRing(toggleButtonCell, inflatedRect, view);
     [toggleButtonCell setControlView:nil];
 
-    needsRepaint |= isAnimating;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
+    needsRepaint |= [toggleButtonCell _stateAnimationRunning];
+#endif
     controlStates->setNeedsRepaint(needsRepaint);
     if (needsRepaint)
         controlStates->setPlatformControl(toggleButtonCell);
     controlStates->setNeedsRepaint(needsRepaint);
     if (needsRepaint)
         controlStates->setPlatformControl(toggleButtonCell);