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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 | 706 |
707 Node* node = this->node(); | 707 Node* node = this->node(); |
708 if (!node || !node->isElementNode()) | 708 if (!node || !node->isElementNode()) |
709 return true; | 709 return true; |
710 | 710 |
711 return !toElement(node)->isDisabledFormControl(); | 711 return !toElement(node)->isDisabledFormControl(); |
712 } | 712 } |
713 | 713 |
714 AccessibilityExpanded AXNodeObject::isExpanded() const | 714 AccessibilityExpanded AXNodeObject::isExpanded() const |
715 { | 715 { |
| 716 if (node() && isHTMLSummaryElement(*node())) { |
| 717 if (node()->parentNode() && isHTMLDetailsElement(node()->parentNode())) |
| 718 return toElement(node()->parentNode())->hasAttribute(openAttr) ? Exp
andedExpanded : ExpandedCollapsed; |
| 719 } |
| 720 |
716 const AtomicString& expanded = getAttribute(aria_expandedAttr); | 721 const AtomicString& expanded = getAttribute(aria_expandedAttr); |
717 if (equalIgnoringCase(expanded, "true")) | 722 if (equalIgnoringCase(expanded, "true")) |
718 return ExpandedExpanded; | 723 return ExpandedExpanded; |
719 if (equalIgnoringCase(expanded, "false")) | 724 if (equalIgnoringCase(expanded, "false")) |
720 return ExpandedCollapsed; | 725 return ExpandedCollapsed; |
721 | 726 |
722 return ExpandedUndefined; | 727 return ExpandedUndefined; |
723 } | 728 } |
724 | 729 |
725 bool AXNodeObject::isIndeterminate() const | 730 bool AXNodeObject::isIndeterminate() const |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1774 float range = maxValueForRange() - minValueForRange(); | 1779 float range = maxValueForRange() - minValueForRange(); |
1775 float value = valueForRange(); | 1780 float value = valueForRange(); |
1776 | 1781 |
1777 value += range * (percentChange / 100); | 1782 value += range * (percentChange / 100); |
1778 setValue(String::number(value)); | 1783 setValue(String::number(value)); |
1779 | 1784 |
1780 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); | 1785 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); |
1781 } | 1786 } |
1782 | 1787 |
1783 } // namespace blink | 1788 } // namespace blink |
OLD | NEW |