OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2009, 2011 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2009, 2011 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 break; | 168 break; |
169 case Unknown: | 169 case Unknown: |
170 break; | 170 break; |
171 } | 171 } |
172 | 172 |
173 return path; | 173 return path; |
174 } | 174 } |
175 | 175 |
176 HTMLImageElement* HTMLAreaElement::imageElement() const | 176 HTMLImageElement* HTMLAreaElement::imageElement() const |
177 { | 177 { |
178 Element* mapElement = parentElement(); | 178 if (HTMLMapElement* mapElement = Traversal<HTMLMapElement>::firstAncestor(*t
his)) |
179 while (mapElement && !isHTMLMapElement(*mapElement)) | 179 return mapElement->imageElement(); |
180 mapElement = mapElement->parentElement(); | 180 return 0; |
181 | |
182 if (!mapElement) | |
183 return 0; | |
184 | |
185 return toHTMLMapElement(*mapElement).imageElement(); | |
186 } | 181 } |
187 | 182 |
188 bool HTMLAreaElement::isKeyboardFocusable() const | 183 bool HTMLAreaElement::isKeyboardFocusable() const |
189 { | 184 { |
190 return isFocusable(); | 185 return isFocusable(); |
191 } | 186 } |
192 | 187 |
193 bool HTMLAreaElement::isMouseFocusable() const | 188 bool HTMLAreaElement::isMouseFocusable() const |
194 { | 189 { |
195 return isFocusable(); | 190 return isFocusable(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 return; | 223 return; |
229 | 224 |
230 HTMLImageElement* imageElement = this->imageElement(); | 225 HTMLImageElement* imageElement = this->imageElement(); |
231 if (!imageElement) | 226 if (!imageElement) |
232 return; | 227 return; |
233 | 228 |
234 imageElement->updateFocusAppearance(restorePreviousSelection); | 229 imageElement->updateFocusAppearance(restorePreviousSelection); |
235 } | 230 } |
236 | 231 |
237 } | 232 } |
OLD | NEW |