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

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

Issue 1012663002: Aria disabled does not apply to descendant elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed methods names to ..DisabledNode() Created 5 years, 8 months 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
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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 // Note: we can't call node()->willRespondToMouseClickEvents() because t hat triggers a style recalc and can delete this. 723 // Note: we can't call node()->willRespondToMouseClickEvents() because t hat triggers a style recalc and can delete this.
724 if (node()->hasEventListeners(EventTypeNames::mouseup) || node()->hasEve ntListeners(EventTypeNames::mousedown) || node()->hasEventListeners(EventTypeNam es::click) || node()->hasEventListeners(EventTypeNames::DOMActivate)) 724 if (node()->hasEventListeners(EventTypeNames::mouseup) || node()->hasEve ntListeners(EventTypeNames::mousedown) || node()->hasEventListeners(EventTypeNam es::click) || node()->hasEventListeners(EventTypeNames::DOMActivate))
725 return true; 725 return true;
726 } 726 }
727 727
728 return AXObject::isClickable(); 728 return AXObject::isClickable();
729 } 729 }
730 730
731 bool AXNodeObject::isEnabled() const 731 bool AXNodeObject::isEnabled() const
732 { 732 {
733 if (equalIgnoringCase(getAttribute(aria_disabledAttr), "true")) 733 if (isDescendantOfDisabledNode())
734 return false; 734 return false;
735 735
736 Node* node = this->node(); 736 Node* node = this->node();
737 if (!node || !node->isElementNode()) 737 if (!node || !node->isElementNode())
738 return true; 738 return true;
739 739
740 return !toElement(node)->isDisabledFormControl(); 740 return !toElement(node)->isDisabledFormControl();
741 } 741 }
742 742
743 AccessibilityExpanded AXNodeObject::isExpanded() const 743 AccessibilityExpanded AXNodeObject::isExpanded() const
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 float range = maxValueForRange() - minValueForRange(); 1996 float range = maxValueForRange() - minValueForRange();
1997 float value = valueForRange(); 1997 float value = valueForRange();
1998 1998
1999 value += range * (percentChange / 100); 1999 value += range * (percentChange / 100);
2000 setValue(String::number(value)); 2000 setValue(String::number(value));
2001 2001
2002 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); 2002 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true);
2003 } 2003 }
2004 2004
2005 } // namespace blink 2005 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/accessibility/aria-disabled-expected.txt ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698