<?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>57509</bug_id>
          
          <creation_ts>2011-03-30 15:45:34 -0700</creation_ts>
          <short_desc>Regression: VO cursor doesn&apos;t follow KB focus back into HTML view</short_desc>
          <delta_ts>2011-03-30 17:45:18 -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>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></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>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>376745</commentid>
    <comment_count>0</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2011-03-30 15:45:34 -0700</bug_when>
    <thetext>1. Load attached test case with VO with WK2.
2. Tab into the text field. VO cursor follows.
3. Shift+Tab back to the &quot;new tab&quot; button. VO cursor follows.
4. Tab into the text field. 

* RESULTS
VO cursor stays on the &quot;new tab&quot; button.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376798</commentid>
    <comment_count>1</comment_count>
      <attachid>87641</attachid>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2011-03-30 17:23:29 -0700</bug_when>
    <thetext>Created attachment 87641
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376812</commentid>
    <comment_count>2</comment_count>
      <attachid>87641</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-03-30 17:37:48 -0700</bug_when>
    <thetext>Comment on attachment 87641
patch

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

&gt; Source/WebCore/page/FocusController.cpp:173
&gt; +    bool advance = advanceFocus(direction, event, true);

I would name the local variable “didAdvanceFocus”.

&gt; Source/WebCore/page/FocusController.cpp:179
&gt; +    // If focus is being set initially, accessibility needs to be informed that system focus has moved 
&gt; +    // into the web area again, even if focus did not change within WebCore. PostNotification is called instead
&gt; +    // of handleFocusedUIElementChanged, because this will send the notification even if the element is the same.
&gt; +    if (AXObjectCache::accessibilityEnabled())
&gt; +        focusedOrMainFrame()-&gt;document()-&gt;axObjectCache()-&gt;postNotification(focusedOrMainFrame()-&gt;document()-&gt;renderer(), AXObjectCache::AXFocusedUIElementChanged, true);

Is it correct to do this even if advanceFocus returned false?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376815</commentid>
    <comment_count>3</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2011-03-30 17:40:42 -0700</bug_when>
    <thetext>
&gt; &gt; Source/WebCore/page/FocusController.cpp:179
&gt; &gt; +    // If focus is being set initially, accessibility needs to be informed that system focus has moved 
&gt; &gt; +    // into the web area again, even if focus did not change within WebCore. PostNotification is called instead
&gt; &gt; +    // of handleFocusedUIElementChanged, because this will send the notification even if the element is the same.
&gt; &gt; +    if (AXObjectCache::accessibilityEnabled())
&gt; &gt; +        focusedOrMainFrame()-&gt;document()-&gt;axObjectCache()-&gt;postNotification(focusedOrMainFrame()-&gt;document()-&gt;renderer(), AXObjectCache::AXFocusedUIElementChanged, true);
&gt; 
&gt; Is it correct to do this even if advanceFocus returned false?

I believe so, because we want to inform that focus is now in the web area, even if it did not move. 

The consequence of this not being correct is minimal since the focused UI element will be the one that is already focused and the user won&apos;t see any difference.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376821</commentid>
    <comment_count>4</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2011-03-30 17:45:18 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/82525</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>87641</attachid>
            <date>2011-03-30 17:23:29 -0700</date>
            <delta_ts>2011-03-30 17:37:48 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>2146</size>
            <attacher name="chris fleizach">cfleizach</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDgyNTI0KQorKysgU291cmNlL1dlYkNvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTkgQEAKKzIwMTEtMDMtMzAgIENocmlzIEZs
ZWl6YWNoICA8Y2ZsZWl6YWNoQGFwcGxlLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JP
RFkgKE9PUFMhKS4KKworICAgICAgICBSZWdyZXNzaW9uOiBWTyBjdXJzb3IgZG9lc24ndCBmb2xs
b3cgS0IgZm9jdXMgYmFjayBpbnRvIEhUTUwgdmlldworICAgICAgICBodHRwczovL2J1Z3Mud2Vi
a2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NTc1MDkKKworICAgICAgICBJbiBXSzIsIGJlY2F1c2Ug
dGhlIHdlYiBhcmVhIG5ldmVyIGJlbGlldmVzIGZvY3VzIGxlYXZlIHRoZSBhcmVhLCBzZW5kaW5n
IHRoZSBpbml0aWFsCisgICAgICAgIGZvY3VzIG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0aWFsRm9jdXMpCg==
</data>
<flag name="review"
          id="80068"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>