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 | |
305 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas
. | 300 // Note: if JavaScript is disabled, the renderer won't be a RenderHTMLCanvas
. |
306 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) | 301 if (isHTMLCanvasElement(node) && m_renderer->isCanvas()) |
307 return CanvasRole; | 302 return CanvasRole; |
308 | 303 |
309 if (cssBox && cssBox->isRenderView()) | 304 if (cssBox && cssBox->isRenderView()) |
310 return WebAreaRole; | 305 return WebAreaRole; |
311 | 306 |
312 if (cssBox && cssBox->isTextField()) | 307 if (cssBox && cssBox->isTextField()) |
313 return TextFieldRole; | 308 return TextFieldRole; |
314 | 309 |
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2411 if (label && label->renderer()) { | 2406 if (label && label->renderer()) { |
2412 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2407 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2413 result.unite(labelRect); | 2408 result.unite(labelRect); |
2414 } | 2409 } |
2415 } | 2410 } |
2416 | 2411 |
2417 return result; | 2412 return result; |
2418 } | 2413 } |
2419 | 2414 |
2420 } // namespace blink | 2415 } // namespace blink |
OLD | NEW |