| 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 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2081 return 0; | 2081 return 0; |
| 2082 | 2082 |
| 2083 Image* image = cachedImage->image(); | 2083 Image* image = cachedImage->image(); |
| 2084 if (!image || !image->isSVGImage()) | 2084 if (!image || !image->isSVGImage()) |
| 2085 return 0; | 2085 return 0; |
| 2086 | 2086 |
| 2087 SVGImage* svgImage = static_cast<SVGImage*>(image); | 2087 SVGImage* svgImage = static_cast<SVGImage*>(image); |
| 2088 FrameView* frameView = svgImage->frameView(); | 2088 FrameView* frameView = svgImage->frameView(); |
| 2089 if (!frameView) | 2089 if (!frameView) |
| 2090 return 0; | 2090 return 0; |
| 2091 Frame* frame = frameView->frame(); | 2091 Document* doc = frameView->frame().document(); |
| 2092 Document* doc = frame->document(); | |
| 2093 if (!doc || !doc->isSVGDocument()) | 2092 if (!doc || !doc->isSVGDocument()) |
| 2094 return 0; | 2093 return 0; |
| 2095 | 2094 |
| 2096 SVGSVGElement* rootElement = toSVGDocument(doc)->rootElement(); | 2095 SVGSVGElement* rootElement = toSVGDocument(doc)->rootElement(); |
| 2097 if (!rootElement) | 2096 if (!rootElement) |
| 2098 return 0; | 2097 return 0; |
| 2099 RenderObject* rendererRoot = rootElement->renderer(); | 2098 RenderObject* rendererRoot = rootElement->renderer(); |
| 2100 if (!rendererRoot) | 2099 if (!rendererRoot) |
| 2101 return 0; | 2100 return 0; |
| 2102 | 2101 |
| 2103 AccessibilityObject* rootSVGObject = frame->document()->axObjectCache()->get
OrCreate(rendererRoot); | 2102 AccessibilityObject* rootSVGObject = doc->axObjectCache()->getOrCreate(rende
rerRoot); |
| 2104 | 2103 |
| 2105 // In order to connect the AX hierarchy from the SVG root element from the l
oaded resource | 2104 // In order to connect the AX hierarchy from the SVG root element from the l
oaded resource |
| 2106 // the parent must be set, because there's no other way to get back to who c
reated the image. | 2105 // the parent must be set, because there's no other way to get back to who c
reated the image. |
| 2107 ASSERT(rootSVGObject && rootSVGObject->isAccessibilitySVGRoot()); | 2106 ASSERT(rootSVGObject && rootSVGObject->isAccessibilitySVGRoot()); |
| 2108 if (!rootSVGObject->isAccessibilitySVGRoot()) | 2107 if (!rootSVGObject->isAccessibilitySVGRoot()) |
| 2109 return 0; | 2108 return 0; |
| 2110 | 2109 |
| 2111 return toAccessibilitySVGRoot(rootSVGObject); | 2110 return toAccessibilitySVGRoot(rootSVGObject); |
| 2112 } | 2111 } |
| 2113 | 2112 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 if (label && label->renderer()) { | 2374 if (label && label->renderer()) { |
| 2376 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2375 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
| 2377 result.unite(labelRect); | 2376 result.unite(labelRect); |
| 2378 } | 2377 } |
| 2379 } | 2378 } |
| 2380 | 2379 |
| 2381 return result; | 2380 return result; |
| 2382 } | 2381 } |
| 2383 | 2382 |
| 2384 } // namespace WebCore | 2383 } // namespace WebCore |
| OLD | NEW |