Changeset 49619 in webkit


Ignore:
Timestamp:
Oct 15, 2009 5:49:25 AM (15 years ago)
Author:
eric@webkit.org
Message:

2009-10-15 Shu Chang <Chang.Shu@nokia.com>

Reviewed by Adele Peterson.

Change behavior so that <a> element is always mouse-focusable.

  • fast/events/click-focus-anchor-expected.txt:
  • fast/events/click-focus-anchor.html:

2009-10-15 Shu Chang <Chang.Shu@nokia.com>

Reviewed by Adele Peterson.

Anchor elements should be mouse focusable regardless isLink flag.
https://bugs.webkit.org/show_bug.cgi?id=26856

  • html/HTMLAnchorElement.cpp:
  • html/HTMLAnchorElement.h:
Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r49616 r49619  
     12009-10-15  Shu Chang  <Chang.Shu@nokia.com>
     2
     3        Reviewed by Adele Peterson.
     4
     5        Change behavior so that <a> element is always mouse-focusable.
     6
     7        * fast/events/click-focus-anchor-expected.txt:
     8        * fast/events/click-focus-anchor.html:
     9
    1102009-10-15  Yury Semikhatsky  <yurys@chromium.org>
    211
  • trunk/LayoutTests/fast/events/click-focus-anchor-expected.txt

    r48106 r49619  
    1 This test ensures that we can click to focus an a element with a tab index. Click on the element below.
     1This test ensures that we can click to focus an a element. Click on the element below.
    22
    3 Focusable
     3Focusable anchor with tab index
     4
     5Focusable anchor
    46
    57Result
    68
    79PASS
     10PASS
  • trunk/LayoutTests/fast/events/click-focus-anchor.html

    r48211 r49619  
    55<body>
    66
    7 <p>This test ensures that we can click to focus an a element with a tab index.
     7<p>This test ensures that we can click to focus an a element.
    88Click on the element below.
    99
    10 <p><a tabindex=0 onfocus="pass()" id=t>Focusable</a>
     10<p><a tabindex=0 onfocus="pass('r1')" id=t1>Focusable anchor with tab index</a>
     11<p><a onfocus="pass('r2')" id=t2 href="#">Focusable anchor</a>
    1112
    1213<p>Result
    1314
    14 <pre>FAIL</pre>
     15<pre id=r1>FAIL</pre>
     16<pre id=r2>FAIL</pre>
    1517
    1618<script>
    1719
    18 function pass()
     20function pass(id)
    1921{
    20     var el = document.querySelector('pre');
     22    var el = document.getElementById(id);
    2123    el.textContent = 'PASS';
    2224}
     
    3234        return;
    3335
    34     var aElement = document.getElementById('t');
     36    var aElement = document.getElementById('t1');
     37    eventSender.mouseMoveTo(aElement.offsetLeft + 2, aElement.offsetTop + 2);
     38    eventSender.mouseDown();   
     39
     40    aElement = document.getElementById('t2');
    3541    eventSender.mouseMoveTo(aElement.offsetLeft + 2, aElement.offsetTop + 2);
    3642    eventSender.mouseDown();   
  • trunk/WebCore/ChangeLog

    r49617 r49619  
     12009-10-15  Shu Chang  <Chang.Shu@nokia.com>
     2
     3        Reviewed by Adele Peterson.
     4
     5        Anchor elements should be mouse focusable regardless isLink flag.
     6        https://bugs.webkit.org/show_bug.cgi?id=26856
     7
     8        * html/HTMLAnchorElement.cpp:
     9        * html/HTMLAnchorElement.h:
     10
    1112009-10-15  Nikolas Zimmermann  <nzimmermann@rim.com>
    212
  • trunk/WebCore/html/HTMLAnchorElement.cpp

    r48107 r49619  
    6868{
    6969    // Anchor elements should be mouse focusable, https://bugs.webkit.org/show_bug.cgi?id=26856
    70 #if !PLATFORM(GTK)
     70#if PLATFORM(MAC)
    7171    if (isLink())
    7272        return false;
Note: See TracChangeset for help on using the changeset viewer.