[Webkit-unassigned] [Bug 71788] <area>-tag within <map> can get focus when it is hidden
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 21 02:45:51 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=71788
--- Comment #13 from Antaryami Pandia <antaryami.pandia at motorola.com> 2012-03-21 02:45:50 PST ---
(In reply to comment #11)
> > Source/WebCore/html/HTMLAreaElement.cpp:205
> > + if (!(imageElem && imageElem->renderer()))
> > + return false;
>
> As I said before, this check won't handle the case where the image has 'visibility:hidden' set, but that case is already handled by Node's implementation of isFocusable(). I think you can just change these two lines to:
>
> return image->isFocusable();
If I do "image->isFocusable()" the below test cases fails:-
fast/events/imagemap-norender-crash.html = TEXT
fast/events/mouse-focus-imagemap.html = TEXT
fast/events/tab-imagemap.html = TEXT
The reason being, in "Node::supportsFocus()" the check for "hasRareData()" fails.
So i think we can check for the display/visibility case in "HTMLAreaElement::isFocusable()" as:-
bool HTMLAreaElement::isFocusable() const
{
HTMLImageElement* image = imageElement();
if (!(image && image->renderer()) || image->renderer()->style()->visibility() != VISIBLE)
return false;
return supportsFocus() && Element::tabIndex() >= 0;
}
Please provide your feedback.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list