<?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>45061</bug_id>
          
          <creation_ts>2010-09-01 14:00:42 -0700</creation_ts>
          <short_desc>[chromium] fast/forms/focus2.html fails</short_desc>
          <delta_ts>2013-04-09 16:27:56 -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>Tools / Tests</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>WONTFIX</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="Tony Chang">tony</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>shinyak</cc>
    
    <cc>yosin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>272996</commentid>
    <comment_count>0</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-09-01 14:00:42 -0700</bug_when>
    <thetext>The test is checking to see what elements get focus when tab is pressed.  For some reason, an anchor is skipped over in chromium.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>687754</commentid>
    <comment_count>1</comment_count>
    <who name="">yosin</who>
    <bug_when>2012-08-05 22:04:49 -0700</bug_when>
    <thetext>Chromium DumpRenderTree sets tabsToLinks to false[1].
http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/chromium/WebPreferences.cpp#L111

So, links aren&apos;t be tab stop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>687757</commentid>
    <comment_count>2</comment_count>
    <who name="">yosin</who>
    <bug_when>2012-08-05 22:12:14 -0700</bug_when>
    <thetext>Update test expectation for Chromium:
http://trac.webkit.org/changeset/124731</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>687791</commentid>
    <comment_count>3</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-08-05 23:28:32 -0700</bug_when>
    <thetext>How does this test pass on Apple Mac&apos;s port?  They also set tabsToLinks to NO:
http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm#L629

If chromium DRT gets a different result from Apple Mac DRT, we need to understand why we&apos;re getting a different result, not just check in a new baseline.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>687830</commentid>
    <comment_count>4</comment_count>
    <who name="">yosin</who>
    <bug_when>2012-08-06 00:52:38 -0700</bug_when>
    <thetext>fast/forms/focus2.html sends Option+Tab key events[1]. As of Safari, Option+Tab set focus to anchor. This is a reason why behavior of Chromium DRT and Mac DRT is different.

Note: Win port skipped this test, because Alt+Tab in Windows is handled by system, switching foreground process.


[1] http://trac.webkit.org/browser/trunk/LayoutTests/fast/forms/focus2.html?rev=121008#L112

function dispatchOptionTab(element, shiftKey)
{
    var event = document.createEvent(&quot;KeyboardEvents&quot;);
    var tabKeyIdentifier = &quot;U+0009&quot;;

    event.initKeyboardEvent(
        &quot;keydown&quot;, // type
        true, // canBubble
        true, // cancelable
        document.defaultView, // view
        tabKeyIdentifier, // keyIdentifier
        0, // KeyLocation
        false, // ctrlKey
        true, // altKey *****
        shiftKey,
        false, // metaKey
        false); // altGraphKey
    element.dispatchEvent(event);
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>687880</commentid>
    <comment_count>5</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-08-06 02:11:09 -0700</bug_when>
    <thetext>Do we pass the test on Chromium Mac?

We should fix the test so it is not OS specific.  What does options+tab do on OSX?  What would be the equivalent key combination on Win/Linux to Options+Tab on OSX?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>687884</commentid>
    <comment_count>6</comment_count>
    <who name="">yosin</who>
    <bug_when>2012-08-06 02:14:11 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Do we pass the test on Chromium Mac?

Yes. Chromium Mac doesn&apos;t handle Option+Tab as Safari/Mac. There is a flag in 
chrome://setteings page whether Tab key sets focus on anchor or not. Chrome Linux/Mac/Win checks this settings rather than special key combination.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>687896</commentid>
    <comment_count>7</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-08-06 02:26:13 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Do we pass the test on Chromium Mac?
&gt; 
&gt; Yes. Chromium Mac doesn&apos;t handle Option+Tab as Safari/Mac. There is a flag in 
&gt; chrome://setteings page whether Tab key sets focus on anchor or not. Chrome Linux/Mac/Win checks this settings rather than special key combination.

I see, so on Safari Mac, Option+Tab always sets focus on anchor.  It seems like a bug that Chromium Mac doesn&apos;t obey this key combination.  We normally try to match platform convention for keyboard shortcuts.

It sounds like the different behavior is expected on Win/Linux, but perhaps we should move this test into the platform/mac directory.  We could also split this into two tests: 1 test for the cross platform behavior and 1 test for the mac specific behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>688643</commentid>
    <comment_count>8</comment_count>
    <who name="">yosin</who>
    <bug_when>2012-08-06 18:19:49 -0700</bug_when>
    <thetext>To make Option+Tab (Alt+Tab) to set focus on anchor if preferences sets tabs-to-link as false, it seems we can add PLATFORM(CHROMIUM) &amp;&amp; OS(MAC) to EventHandler::eventInvertsTabsToLinksClientCallResult[1].

bool EventHandler::eventInvertsTabsToLinksClientCallResult(KeyboardEvent* event)
{
#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(EFL)
    return EventHandler::isKeyboardOptionTab(event);
#else
    return false;
#endif
}

This function is called by EventHandler::tabsToLinks.


[1] http://trac.webkit.org/browser/trunk/Source/WebCore/page/EventHandler.cpp#L3308</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872280</commentid>
    <comment_count>9</comment_count>
    <who name="Stephen Chenney">schenney</who>
    <bug_when>2013-04-09 16:27:56 -0700</bug_when>
    <thetext>Marking test failures as WontFix. Bug is still accessible and recording in TestExpectations.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>