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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 | 748 |
749 bool AXNodeObject::isPressed() const | 749 bool AXNodeObject::isPressed() const |
750 { | 750 { |
751 if (!isButton()) | 751 if (!isButton()) |
752 return false; | 752 return false; |
753 | 753 |
754 Node* node = this->node(); | 754 Node* node = this->node(); |
755 if (!node) | 755 if (!node) |
756 return false; | 756 return false; |
757 | 757 |
758 // If this is an ARIA button, check the aria-pressed attribute rather than n
ode()->active() | 758 // ARIA button with aria-pressed not undefined, then check for aria-pressed
attribute rather than node()->active() |
759 if (ariaRoleAttribute() == ButtonRole) { | 759 if (ariaRoleAttribute() == ToggleButtonRole) { |
760 if (equalIgnoringCase(getAttribute(aria_pressedAttr), "true")) | 760 if (equalIgnoringCase(getAttribute(aria_pressedAttr), "true") |
| 761 || equalIgnoringCase(getAttribute(aria_pressedAttr), "mixed")) |
761 return true; | 762 return true; |
762 return false; | 763 return false; |
763 } | 764 } |
764 | 765 |
765 return node->active(); | 766 return node->active(); |
766 } | 767 } |
767 | 768 |
768 bool AXNodeObject::isReadOnly() const | 769 bool AXNodeObject::isReadOnly() const |
769 { | 770 { |
770 Node* node = this->node(); | 771 Node* node = this->node(); |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 float range = maxValueForRange() - minValueForRange(); | 1821 float range = maxValueForRange() - minValueForRange(); |
1821 float value = valueForRange(); | 1822 float value = valueForRange(); |
1822 | 1823 |
1823 value += range * (percentChange / 100); | 1824 value += range * (percentChange / 100); |
1824 setValue(String::number(value)); | 1825 setValue(String::number(value)); |
1825 | 1826 |
1826 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); | 1827 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); |
1827 } | 1828 } |
1828 | 1829 |
1829 } // namespace blink | 1830 } // namespace blink |
OLD | NEW |