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 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2079 return 0; | 2079 return 0; |
2080 | 2080 |
2081 ImageResource* cachedImage = toRenderImage(m_renderer)->cachedImage(); | 2081 ImageResource* cachedImage = toRenderImage(m_renderer)->cachedImage(); |
2082 if (!cachedImage) | 2082 if (!cachedImage) |
2083 return 0; | 2083 return 0; |
2084 | 2084 |
2085 Image* image = cachedImage->image(); | 2085 Image* image = cachedImage->image(); |
2086 if (!image || !image->isSVGImage()) | 2086 if (!image || !image->isSVGImage()) |
2087 return 0; | 2087 return 0; |
2088 | 2088 |
2089 SVGImage* svgImage = static_cast<SVGImage*>(image); | 2089 FrameView* frameView = toSVGImage(image)->frameView(); |
2090 FrameView* frameView = svgImage->frameView(); | |
2091 if (!frameView) | 2090 if (!frameView) |
2092 return 0; | 2091 return 0; |
2093 Document* doc = frameView->frame().document(); | 2092 Document* doc = frameView->frame().document(); |
2094 if (!doc || !doc->isSVGDocument()) | 2093 if (!doc || !doc->isSVGDocument()) |
2095 return 0; | 2094 return 0; |
2096 | 2095 |
2097 SVGSVGElement* rootElement = toSVGDocument(doc)->rootElement(); | 2096 SVGSVGElement* rootElement = toSVGDocument(doc)->rootElement(); |
2098 if (!rootElement) | 2097 if (!rootElement) |
2099 return 0; | 2098 return 0; |
2100 RenderObject* rendererRoot = rootElement->renderer(); | 2099 RenderObject* rendererRoot = rootElement->renderer(); |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2376 if (label && label->renderer()) { | 2375 if (label && label->renderer()) { |
2377 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2376 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2378 result.unite(labelRect); | 2377 result.unite(labelRect); |
2379 } | 2378 } |
2380 } | 2379 } |
2381 | 2380 |
2382 return result; | 2381 return result; |
2383 } | 2382 } |
2384 | 2383 |
2385 } // namespace WebCore | 2384 } // namespace WebCore |
OLD | NEW |