An <area> element remains focusable even though its associated <img> is not rendered.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 18:51:52 +0000 (18:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 18:51:52 +0000 (18:51 +0000)
commit7ae7b46925e24b34d9be5287742129ed191f0dda
tree5b289483929471637b6604cc2ff398373d75ef50
parent76fe54125fb290259984815b2398d3366fce6766
An <area> element remains focusable even though its associated <img> is not rendered.
https://bugs.webkit.org/show_bug.cgi?id=71788

Patch by Antaryami Pandia <antaryami.pandia@motorola.com> on 2012-03-26
Reviewed by Andy Estes.

Source/WebCore:

HTMLAreaElement::isFocusable() needs to consider the display and
visibility state.

Test: fast/events/tab-test-not-visible-imagemap.html

* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement):
(WebCore::HTMLAreaElement::isFocusable):
* html/HTMLAreaElement.h: Make imageElement() const.
(HTMLAreaElement):

LayoutTests:

Test sequential focus navigation.

* fast/events/tab-test-not-visible-imagemap-expected.txt: Added.
* fast/events/tab-test-not-visible-imagemap.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/tab-test-not-visible-imagemap-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/tab-test-not-visible-imagemap.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/html/HTMLAreaElement.h