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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 | 580 |
581 // find out if this element is inside of a label element. | 581 // find out if this element is inside of a label element. |
582 // if so, it may be ignored because it's the label for a checkbox or radio b
utton | 582 // if so, it may be ignored because it's the label for a checkbox or radio b
utton |
583 AXObject* controlObject = correspondingControlForLabelElement(); | 583 AXObject* controlObject = correspondingControlForLabelElement(); |
584 if (controlObject && !controlObject->exposesTitleUIElement() && controlObjec
t->isCheckboxOrRadio()) | 584 if (controlObject && !controlObject->exposesTitleUIElement() && controlObjec
t->isCheckboxOrRadio()) |
585 return true; | 585 return true; |
586 | 586 |
587 // NOTE: BRs always have text boxes now, so the text box check here can be r
emoved | 587 // NOTE: BRs always have text boxes now, so the text box check here can be r
emoved |
588 if (m_renderer->isText()) { | 588 if (m_renderer->isText()) { |
589 // static text beneath MenuItems and MenuButtons are just reported along
with the menu item, so it's ignored on an individual level | 589 // static text beneath MenuItems and MenuButtons are just reported along
with the menu item, so it's ignored on an individual level |
590 AXObject* parent = parentObjectUnignored(); | 590 if (AXObject* parent = parentObjectUnignored()) { |
591 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || parent->ar
iaRoleAttribute() == MenuButtonRole)) | 591 AccessibilityRole role = parent->ariaRoleAttribute(); |
592 return true; | 592 if (role == MenuItemRole || role == MenuItemRadioRole || role == Men
uItemCheckBoxRole || role == MenuButtonRole) |
| 593 return true; |
| 594 } |
593 RenderText* renderText = toRenderText(m_renderer); | 595 RenderText* renderText = toRenderText(m_renderer); |
594 if (m_renderer->isBR() || !renderText->firstTextBox()) | 596 if (m_renderer->isBR() || !renderText->firstTextBox()) |
595 return true; | 597 return true; |
596 | 598 |
597 // Don't ignore static text in editable text controls. | 599 // Don't ignore static text in editable text controls. |
598 for (AXObject* parent = parentObject(); parent; parent = parent->parentO
bject()) { | 600 for (AXObject* parent = parentObject(); parent; parent = parent->parentO
bject()) { |
599 if (parent->roleValue() == TextFieldRole || parent->roleValue() == T
extAreaRole) | 601 if (parent->roleValue() == TextFieldRole || parent->roleValue() == T
extAreaRole) |
600 return false; | 602 return false; |
601 } | 603 } |
602 | 604 |
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2408 if (label && label->renderer()) { | 2410 if (label && label->renderer()) { |
2409 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2411 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2410 result.unite(labelRect); | 2412 result.unite(labelRect); |
2411 } | 2413 } |
2412 } | 2414 } |
2413 | 2415 |
2414 return result; | 2416 return result; |
2415 } | 2417 } |
2416 | 2418 |
2417 } // namespace blink | 2419 } // namespace blink |
OLD | NEW |