<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>145933</bug_id>
          
          <creation_ts>2015-06-12 11:46:17 -0700</creation_ts>
          <short_desc>AX: Changing state of radio buttons causes VoiceOver to go busy for a short time.</short_desc>
          <delta_ts>2015-06-29 02:53:49 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="chris fleizach">cfleizach</reporter>
          <assigned_to name="chris fleizach">cfleizach</assigned_to>
          <cc>adam.g.helm</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>dino</cc>
    
    <cc>mario</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1101660</commentid>
    <comment_count>0</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2015-06-12 11:46:17 -0700</bug_when>
    <thetext>If I use plain arrows to change between the three radio buttons on this page, VO goes busy after the third or fourth movement.

&lt;rdar://problem/19801366&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1101662</commentid>
    <comment_count>1</comment_count>
      <attachid>254812</attachid>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2015-06-12 11:49:10 -0700</bug_when>
    <thetext>Created attachment 254812
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1101969</commentid>
    <comment_count>2</comment_count>
      <attachid>254812</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2015-06-15 11:00:55 -0700</bug_when>
    <thetext>Comment on attachment 254812
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254812&amp;action=review

&gt; Source/WebCore/platform/mac/ThemeMac.mm:202
&gt; +    // The animated state cause this thread to start and stop repeatedly on CoreAnimation synchronize calls.
&gt; +    // This short burts of activity in between are not long enough for VoiceOver to retrieve accessibility attributes and makes the process appear unresponsive.
&gt; +    if (AXObjectCache::accessibilityEnhancedUserInterfaceEnabled())
&gt; +        useAnimation = false;

Is this the right thing to do? Does the rest of OS X turn off radio button animation when VoiceOver is on? Or is this rule specific to WebKit? Is there some way we can share the logic with the rest of the OS?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1101975</commentid>
    <comment_count>3</comment_count>
      <attachid>254812</attachid>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2015-06-15 11:10:23 -0700</bug_when>
    <thetext>Comment on attachment 254812
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254812&amp;action=review

&gt;&gt; Source/WebCore/platform/mac/ThemeMac.mm:202
&gt;&gt; +        useAnimation = false;
&gt; 
&gt; Is this the right thing to do? Does the rest of OS X turn off radio button animation when VoiceOver is on? Or is this rule specific to WebKit? Is there some way we can share the logic with the rest of the OS?

it looks like this doesn&apos;t happen elsewhere in the system for focused controls when VoiceOver is on (although in general turning off animations when VoiceOver is on is done occasionally). 
more investigation will be required to figure out the difference, although I fear we&apos;ll run out of time without getting to the root cause, which may be a thread scheduling issue or something as deep</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1101977</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2015-06-15 11:21:01 -0700</bug_when>
    <thetext>Maybe WebKit’s implementation of the animation is synchronous and the AppKit version is not?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1101981</commentid>
    <comment_count>5</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2015-06-15 11:39:30 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Maybe WebKit’s implementation of the animation is synchronous and the AppKit
&gt; version is not?

What I saw was that there was a lot of blocking on CGSynchronize(). So a little bit of work was done, then it would synchronize and hang the thread briefly. 

My guess is that in AppKit that is not hanging the thread but either the run loop continues spinning or it happens on a different thread</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1102026</commentid>
    <comment_count>6</comment_count>
      <attachid>254812</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2015-06-15 13:42:41 -0700</bug_when>
    <thetext>Comment on attachment 254812
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254812&amp;action=review

&gt;&gt;&gt; Source/WebCore/platform/mac/ThemeMac.mm:202
&gt;&gt;&gt; +        useAnimation = false;
&gt;&gt; 
&gt;&gt; Is this the right thing to do? Does the rest of OS X turn off radio button animation when VoiceOver is on? Or is this rule specific to WebKit? Is there some way we can share the logic with the rest of the OS?
&gt; 
&gt; it looks like this doesn&apos;t happen elsewhere in the system for focused controls when VoiceOver is on (although in general turning off animations when VoiceOver is on is done occasionally). 
&gt; more investigation will be required to figure out the difference, although I fear we&apos;ll run out of time without getting to the root cause, which may be a thread scheduling issue or something as deep

The difference between WebKit and the rest of the OS is that we call redraw manually lots of times, drawing with CG, until AppKit tells us the animation is done. Other parts of the system just run a CA animation.

I&apos;m ok with turning the animation off for this particular case, if Chris can&apos;t find another solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1102028</commentid>
    <comment_count>7</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2015-06-15 13:47:23 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Comment on attachment 254812 [details]

&gt; The difference between WebKit and the rest of the OS is that we call redraw
&gt; manually lots of times, drawing with CG, until AppKit tells us the animation
&gt; is done. Other parts of the system just run a CA animation.

Which explains why you were seeing the CG syncs. Unfortunately we can&apos;t use the system animation because it would force us to layerize content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1102099</commentid>
    <comment_count>8</comment_count>
      <attachid>254812</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-06-15 17:41:09 -0700</bug_when>
    <thetext>Comment on attachment 254812
patch

Clearing flags on attachment: 254812

Committed r185573: &lt;http://trac.webkit.org/changeset/185573&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1102100</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-06-15 17:41:13 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>254812</attachid>
            <date>2015-06-12 11:49:10 -0700</date>
            <delta_ts>2015-06-15 17:41:09 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <size>2123</size>
            <attacher name="chris fleizach">cfleizach</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE4NTUxNykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDIxIEBACisyMDE1LTA2LTEyICBDaHJpcyBG
bGVpemFjaCAgPGNmbGVpemFjaEBhcHBsZS5jb20+CisKKyAgICAgICAgQVg6IENoYW5naW5nIHN0
YXRlIG9mIHJhZGlvIGJ1dHRvbnMgY2F1c2VzIFZvaWNlT3ZlciB0by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