| 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 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2209 if (!cssBox || !cssBox->isRenderImage()) | 2209 if (!cssBox || !cssBox->isRenderImage()) |
| 2210 return; | 2210 return; |
| 2211 | 2211 |
| 2212 HTMLMapElement* map = toRenderImage(cssBox)->imageMap(); | 2212 HTMLMapElement* map = toRenderImage(cssBox)->imageMap(); |
| 2213 if (!map) | 2213 if (!map) |
| 2214 return; | 2214 return; |
| 2215 | 2215 |
| 2216 for (Element* current = ElementTraversal::firstWithin(map); current; current
= ElementTraversal::next(current, map)) { | 2216 for (Element* current = ElementTraversal::firstWithin(map); current; current
= ElementTraversal::next(current, map)) { |
| 2217 // add an <area> element for this child if it has a link | 2217 // add an <area> element for this child if it has a link |
| 2218 if (isHTMLAreaElement(current) && current->isLink()) { | 2218 if (isHTMLAreaElement(current) && current->isLink()) { |
| 2219 AccessibilityImageMapLink* areaObject = static_cast<AccessibilityIma
geMapLink*>(axObjectCache()->getOrCreate(ImageMapLinkRole)); | 2219 AccessibilityImageMapLink* areaObject = toAccessibilityImageMapLink(
axObjectCache()->getOrCreate(ImageMapLinkRole)); |
| 2220 areaObject->setHTMLAreaElement(toHTMLAreaElement(current)); | 2220 areaObject->setHTMLAreaElement(toHTMLAreaElement(current)); |
| 2221 areaObject->setHTMLMapElement(map); | 2221 areaObject->setHTMLMapElement(map); |
| 2222 areaObject->setParent(this); | 2222 areaObject->setParent(this); |
| 2223 if (!areaObject->accessibilityIsIgnored()) | 2223 if (!areaObject->accessibilityIsIgnored()) |
| 2224 m_children.append(areaObject); | 2224 m_children.append(areaObject); |
| 2225 else | 2225 else |
| 2226 axObjectCache()->remove(areaObject->axObjectID()); | 2226 axObjectCache()->remove(areaObject->axObjectID()); |
| 2227 } | 2227 } |
| 2228 } | 2228 } |
| 2229 } | 2229 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 if (label && label->renderer()) { | 2375 if (label && label->renderer()) { |
| 2376 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2376 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
| 2377 result.unite(labelRect); | 2377 result.unite(labelRect); |
| 2378 } | 2378 } |
| 2379 } | 2379 } |
| 2380 | 2380 |
| 2381 return result; | 2381 return result; |
| 2382 } | 2382 } |
| 2383 | 2383 |
| 2384 } // namespace WebCore | 2384 } // namespace WebCore |
| OLD | NEW |