| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 if (cssBox && cssBox->isImage()) | 271 if (cssBox && cssBox->isImage()) |
| 272 return ImageMapRole; | 272 return ImageMapRole; |
| 273 return LinkRole; | 273 return LinkRole; |
| 274 } | 274 } |
| 275 if (cssBox && cssBox->isListItem()) | 275 if (cssBox && cssBox->isListItem()) |
| 276 return ListItemRole; | 276 return ListItemRole; |
| 277 if (m_renderer->isListMarker()) | 277 if (m_renderer->isListMarker()) |
| 278 return ListMarkerRole; | 278 return ListMarkerRole; |
| 279 if (isHTMLButtonElement(node)) | 279 if (isHTMLButtonElement(node)) |
| 280 return buttonRoleType(); | 280 return buttonRoleType(); |
| 281 if (isHTMLDetailsElement(node)) |
| 282 return DetailsRole; |
| 281 if (isHTMLLegendElement(node)) | 283 if (isHTMLLegendElement(node)) |
| 282 return LegendRole; | 284 return LegendRole; |
| 283 if (m_renderer->isText()) | 285 if (m_renderer->isText()) |
| 284 return StaticTextRole; | 286 return StaticTextRole; |
| 285 if (cssBox && cssBox->isImage()) { | 287 if (cssBox && cssBox->isImage()) { |
| 286 if (isHTMLInputElement(node)) | 288 if (isHTMLInputElement(node)) |
| 287 return ariaHasPopup() ? PopUpButtonRole : ButtonRole; | 289 return ariaHasPopup() ? PopUpButtonRole : ButtonRole; |
| 288 if (isSVGImage()) | 290 if (isSVGImage()) |
| 289 return SVGRootRole; | 291 return SVGRootRole; |
| 290 return ImageRole; | 292 return ImageRole; |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 | 678 |
| 677 if (roleValue() == DialogRole) | 679 if (roleValue() == DialogRole) |
| 678 return false; | 680 return false; |
| 679 | 681 |
| 680 if (roleValue() == FigcaptionRole) | 682 if (roleValue() == FigcaptionRole) |
| 681 return false; | 683 return false; |
| 682 | 684 |
| 683 if (roleValue() == FigureRole) | 685 if (roleValue() == FigureRole) |
| 684 return false; | 686 return false; |
| 685 | 687 |
| 688 if (roleValue() == DetailsRole) |
| 689 return false; |
| 690 |
| 686 // if this element has aria attributes on it, it should not be ignored. | 691 // if this element has aria attributes on it, it should not be ignored. |
| 687 if (supportsARIAAttributes()) | 692 if (supportsARIAAttributes()) |
| 688 return false; | 693 return false; |
| 689 | 694 |
| 690 // <span> tags are inline tags and not meant to convey information if they h
ave no other aria | 695 // <span> tags are inline tags and not meant to convey information if they h
ave no other aria |
| 691 // information on them. If we don't ignore them, they may emit signals expec
ted to come from | 696 // information on them. If we don't ignore them, they may emit signals expec
ted to come from |
| 692 // their parent. In addition, because included spans are GroupRole objects,
and GroupRole | 697 // their parent. In addition, because included spans are GroupRole objects,
and GroupRole |
| 693 // objects are often containers with meaningful information, the inclusion o
f a span can have | 698 // objects are often containers with meaningful information, the inclusion o
f a span can have |
| 694 // the side effect of causing the immediate parent accessible to be ignored.
This is especially | 699 // the side effect of causing the immediate parent accessible to be ignored.
This is especially |
| 695 // problematic for platforms which have distinct roles for textual block ele
ments. | 700 // problematic for platforms which have distinct roles for textual block ele
ments. |
| (...skipping 1648 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 |