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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return String(); | 138 return String(); |
139 } | 139 } |
140 | 140 |
141 LayoutRect AccessibilityImageMapLink::elementRect() const | 141 LayoutRect AccessibilityImageMapLink::elementRect() const |
142 { | 142 { |
143 if (!m_mapElement.get() || !m_areaElement.get()) | 143 if (!m_mapElement.get() || !m_areaElement.get()) |
144 return LayoutRect(); | 144 return LayoutRect(); |
145 | 145 |
146 RenderObject* renderer; | 146 RenderObject* renderer; |
147 if (m_parent && m_parent->isAccessibilityRenderObject()) | 147 if (m_parent && m_parent->isAccessibilityRenderObject()) |
148 renderer = static_cast<AccessibilityRenderObject*>(m_parent)->renderer()
; | 148 renderer = toAccessibilityRenderObject(m_parent)->renderer(); |
149 else | 149 else |
150 renderer = m_mapElement->renderer(); | 150 renderer = m_mapElement->renderer(); |
151 | 151 |
152 if (!renderer) | 152 if (!renderer) |
153 return LayoutRect(); | 153 return LayoutRect(); |
154 | 154 |
155 return m_areaElement->computeRect(renderer); | 155 return m_areaElement->computeRect(renderer); |
156 } | 156 } |
157 | 157 |
158 } // namespace WebCore | 158 } // namespace WebCore |
OLD | NEW |