Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1133)

Side by Side Diff: Source/modules/accessibility/AXNodeObject.cpp

Issue 767183002: ARIA state/property aria-pressed is not exposed(Blink). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698