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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 if (m_renderer->isText()) | 282 if (m_renderer->isText()) |
283 return StaticTextRole; | 283 return StaticTextRole; |
284 if (cssBox && cssBox->isImage()) { | 284 if (cssBox && cssBox->isImage()) { |
285 if (isHTMLInputElement(node)) | 285 if (isHTMLInputElement(node)) |
286 return ariaHasPopup() ? PopUpButtonRole : ButtonRole; | 286 return ariaHasPopup() ? PopUpButtonRole : ButtonRole; |
287 if (isSVGImage()) | 287 if (isSVGImage()) |
288 return SVGRootRole; | 288 return SVGRootRole; |
289 return ImageRole; | 289 return ImageRole; |
290 } | 290 } |
291 | 291 |
| 292 // This is for the case where the fallback content kicks in. |
| 293 // The normal case should be handled in the case above |
| 294 if (node && node->hasTagName(HTMLNames::imgTag)) |
| 295 return ImageRole; |
| 296 |
292 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas
. | 297 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas
. |
293 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) | 298 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) |
294 return CanvasRole; | 299 return CanvasRole; |
295 | 300 |
296 if (cssBox && cssBox->isRenderView()) | 301 if (cssBox && cssBox->isRenderView()) |
297 return WebAreaRole; | 302 return WebAreaRole; |
298 | 303 |
299 if (cssBox && cssBox->isTextField()) | 304 if (cssBox && cssBox->isTextField()) |
300 return TextFieldRole; | 305 return TextFieldRole; |
301 | 306 |
(...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2344 if (label && label->renderer()) { | 2349 if (label && label->renderer()) { |
2345 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2350 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2346 result.unite(labelRect); | 2351 result.unite(labelRect); |
2347 } | 2352 } |
2348 } | 2353 } |
2349 | 2354 |
2350 return result; | 2355 return result; |
2351 } | 2356 } |
2352 | 2357 |
2353 } // namespace blink | 2358 } // namespace blink |
OLD | NEW |