OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, Google 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 bool AXNodeObject::isChecked() const | 653 bool AXNodeObject::isChecked() const |
654 { | 654 { |
655 Node* node = this->node(); | 655 Node* node = this->node(); |
656 if (!node) | 656 if (!node) |
657 return false; | 657 return false; |
658 | 658 |
659 // First test for native checkedness semantics | 659 // First test for native checkedness semantics |
660 if (isHTMLInputElement(*node)) | 660 if (isHTMLInputElement(*node)) |
661 return toHTMLInputElement(*node).shouldAppearChecked(); | 661 return toHTMLInputElement(*node).shouldAppearChecked(); |
662 | 662 |
663 // Else, if this is an ARIA checkbox or radio, respect the aria-checked attr
ibute | 663 // Else, if this is an ARIA checkbox or radio OR ARIA role menuitemcheckbox |
| 664 // or menuitemradio, respect the aria-checked attribute |
664 AccessibilityRole ariaRole = ariaRoleAttribute(); | 665 AccessibilityRole ariaRole = ariaRoleAttribute(); |
665 if (ariaRole == RadioButtonRole || ariaRole == CheckBoxRole) { | 666 if (ariaRole == RadioButtonRole || ariaRole == CheckBoxRole |
| 667 || ariaRole == MenuItemCheckBoxRole || ariaRole == MenuItemRadioRole) { |
666 if (equalIgnoringCase(getAttribute(aria_checkedAttr), "true")) | 668 if (equalIgnoringCase(getAttribute(aria_checkedAttr), "true")) |
667 return true; | 669 return true; |
668 return false; | 670 return false; |
669 } | 671 } |
670 | 672 |
671 // Otherwise it's not checked | 673 // Otherwise it's not checked |
672 return false; | 674 return false; |
673 } | 675 } |
674 | 676 |
675 bool AXNodeObject::isClickable() const | 677 bool AXNodeObject::isClickable() const |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 float range = maxValueForRange() - minValueForRange(); | 1743 float range = maxValueForRange() - minValueForRange(); |
1742 float value = valueForRange(); | 1744 float value = valueForRange(); |
1743 | 1745 |
1744 value += range * (percentChange / 100); | 1746 value += range * (percentChange / 100); |
1745 setValue(String::number(value)); | 1747 setValue(String::number(value)); |
1746 | 1748 |
1747 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru
e); | 1749 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru
e); |
1748 } | 1750 } |
1749 | 1751 |
1750 } // namespace blink | 1752 } // namespace blink |
OLD | NEW |