OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2149 void AXRenderObject::addImageMapChildren() | 2149 void AXRenderObject::addImageMapChildren() |
2150 { | 2150 { |
2151 RenderBoxModelObject* cssBox = renderBoxModelObject(); | 2151 RenderBoxModelObject* cssBox = renderBoxModelObject(); |
2152 if (!cssBox || !cssBox->isRenderImage()) | 2152 if (!cssBox || !cssBox->isRenderImage()) |
2153 return; | 2153 return; |
2154 | 2154 |
2155 HTMLMapElement* map = toRenderImage(cssBox)->imageMap(); | 2155 HTMLMapElement* map = toRenderImage(cssBox)->imageMap(); |
2156 if (!map) | 2156 if (!map) |
2157 return; | 2157 return; |
2158 | 2158 |
2159 for (Element* current = ElementTraversal::firstWithin(*map); current; curren
t = ElementTraversal::next(*current, map)) { | 2159 for (HTMLAreaElement* area = Traversal<HTMLAreaElement>::firstWithin(*map);
area; area = Traversal<HTMLAreaElement>::next(*area, map)) { |
2160 // add an <area> element for this child if it has a link | 2160 // add an <area> element for this child if it has a link |
2161 if (isHTMLAreaElement(*current) && current->isLink()) { | 2161 if (area->isLink()) { |
2162 AXImageMapLink* areaObject = toAXImageMapLink(axObjectCache()->getOr
Create(ImageMapLinkRole)); | 2162 AXImageMapLink* areaObject = toAXImageMapLink(axObjectCache()->getOr
Create(ImageMapLinkRole)); |
2163 areaObject->setHTMLAreaElement(toHTMLAreaElement(current)); | 2163 areaObject->setHTMLAreaElement(area); |
2164 areaObject->setHTMLMapElement(map); | 2164 areaObject->setHTMLMapElement(map); |
2165 areaObject->setParent(this); | 2165 areaObject->setParent(this); |
2166 if (!areaObject->accessibilityIsIgnored()) | 2166 if (!areaObject->accessibilityIsIgnored()) |
2167 m_children.append(areaObject); | 2167 m_children.append(areaObject); |
2168 else | 2168 else |
2169 axObjectCache()->remove(areaObject->axObjectID()); | 2169 axObjectCache()->remove(areaObject->axObjectID()); |
2170 } | 2170 } |
2171 } | 2171 } |
2172 } | 2172 } |
2173 | 2173 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2319 if (label && label->renderer()) { | 2319 if (label && label->renderer()) { |
2320 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2320 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2321 result.unite(labelRect); | 2321 result.unite(labelRect); |
2322 } | 2322 } |
2323 } | 2323 } |
2324 | 2324 |
2325 return result; | 2325 return result; |
2326 } | 2326 } |
2327 | 2327 |
2328 } // namespace WebCore | 2328 } // namespace WebCore |
OLD | NEW |