Add ability for image maps to be focused via tabbing
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jan 2010 18:06:41 +0000 (18:06 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jan 2010 18:06:41 +0000 (18:06 +0000)
commitbc08890336646a6cb651edeb533f3719ef798f97
tree20d41fac583e09b8c94814de37d4a10687b38cbb
parentf60dfbe3c4f549e1458a638498ca4c82dd9d7178
Add ability for image maps to be focused via tabbing
https://bugs.webkit.org/show_bug.cgi?id=17513

Reviewed by Darin Adler.

WebCore:

Test: fast/events/tab-imagemap.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedImageMapUIElement):
(WebCore::AXObjectCache::focusedUIElementForPage):
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityImageMapLink.h:
(WebCore::AccessibilityImageMapLink::areaElement):
(WebCore::AccessibilityImageMapLink::mapElement):
(WebCore::AccessibilityImageMapLink::isImageMapLink):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isImageMapLink):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::getPath):
(WebCore::HTMLAreaElement::getRect):
(WebCore::HTMLAreaElement::imageElement):
(WebCore::HTMLAreaElement::isKeyboardFocusable):
(WebCore::HTMLAreaElement::isFocusable):
(WebCore::HTMLAreaElement::dispatchBlurEvent):
(WebCore::HTMLAreaElement::updateFocusAppearance):
(WebCore::HTMLAreaElement::supportsFocus):
* html/HTMLAreaElement.h:
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
* html/HTMLMapElement.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/haiku/GraphicsContextHaiku.cpp:
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::drawFocusRingToContext):
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/wince/GraphicsContextWince.cpp:
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/wx/GraphicsContextWx.cpp:
(WebCore::GraphicsContext::drawFocusRing):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paint):
(WebCore::RenderImage::paintFocusRings):
(WebCore::RenderImage::imageMap):
* rendering/RenderImage.h:
* rendering/RenderReplaced.h:

LayoutTests:

* fast/events/resources/tabindex-focus-blur-all.js:
(test):
(testProgrammaticFocus):
* fast/events/tab-imagemap-expected.txt: Added.
* fast/events/tab-imagemap.html: Added.
* fast/events/tabindex-focus-blur-all-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/resources/tabindex-focus-blur-all.js
LayoutTests/fast/events/tab-imagemap-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/tab-imagemap.html [new file with mode: 0644]
LayoutTests/fast/events/tabindex-focus-blur-all-expected.txt
WebCore/ChangeLog
WebCore/accessibility/AXObjectCache.cpp
WebCore/accessibility/AXObjectCache.h
WebCore/accessibility/AccessibilityImageMapLink.h
WebCore/accessibility/AccessibilityObject.h
WebCore/accessibility/AccessibilityRenderObject.cpp
WebCore/html/HTMLAreaElement.cpp
WebCore/html/HTMLAreaElement.h
WebCore/html/HTMLMapElement.cpp
WebCore/html/HTMLMapElement.h
WebCore/platform/graphics/GraphicsContext.h
WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
WebCore/platform/graphics/mac/GraphicsContextMac.mm
WebCore/platform/graphics/qt/GraphicsContextQt.cpp
WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
WebCore/platform/graphics/wince/GraphicsContextWince.cpp
WebCore/platform/graphics/wx/GraphicsContextWx.cpp
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderImage.h
WebCore/rendering/RenderReplaced.h