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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 if (m_renderer->isText()) | 290 if (m_renderer->isText()) |
291 return StaticTextRole; | 291 return StaticTextRole; |
292 if (cssBox && cssBox->isImage()) { | 292 if (cssBox && cssBox->isImage()) { |
293 if (isHTMLInputElement(node)) | 293 if (isHTMLInputElement(node)) |
294 return ariaHasPopup() ? PopUpButtonRole : ButtonRole; | 294 return ariaHasPopup() ? PopUpButtonRole : ButtonRole; |
295 if (isSVGImage()) | 295 if (isSVGImage()) |
296 return SVGRootRole; | 296 return SVGRootRole; |
297 return ImageRole; | 297 return ImageRole; |
298 } | 298 } |
299 | 299 |
| 300 // This is for the case where the fallback content kicks in. |
| 301 // The normal case should be handled in the case above |
| 302 if (node && node->hasTagName(HTMLNames::imgTag)) |
| 303 return ImageRole; |
| 304 |
300 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas
. | 305 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas
. |
301 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) | 306 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) |
302 return CanvasRole; | 307 return CanvasRole; |
303 | 308 |
304 if (cssBox && cssBox->isRenderView()) | 309 if (cssBox && cssBox->isRenderView()) |
305 return WebAreaRole; | 310 return WebAreaRole; |
306 | 311 |
307 if (cssBox && cssBox->isTextField()) | 312 if (cssBox && cssBox->isTextField()) |
308 return TextFieldRole; | 313 return TextFieldRole; |
309 | 314 |
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2371 if (label && label->renderer()) { | 2376 if (label && label->renderer()) { |
2372 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2377 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2373 result.unite(labelRect); | 2378 result.unite(labelRect); |
2374 } | 2379 } |
2375 } | 2380 } |
2376 | 2381 |
2377 return result; | 2382 return result; |
2378 } | 2383 } |
2379 | 2384 |
2380 } // namespace blink | 2385 } // namespace blink |
OLD | NEW |