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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
720 // Note: we can't call node()->willRespondToMouseClickEvents() because t hat triggers a style recalc and can delete this. | 720 // Note: we can't call node()->willRespondToMouseClickEvents() because t hat triggers a style recalc and can delete this. |
721 if (node()->hasEventListeners(EventTypeNames::mouseup) || node()->hasEve ntListeners(EventTypeNames::mousedown) || node()->hasEventListeners(EventTypeNam es::click) || node()->hasEventListeners(EventTypeNames::DOMActivate)) | 721 if (node()->hasEventListeners(EventTypeNames::mouseup) || node()->hasEve ntListeners(EventTypeNames::mousedown) || node()->hasEventListeners(EventTypeNam es::click) || node()->hasEventListeners(EventTypeNames::DOMActivate)) |
722 return true; | 722 return true; |
723 } | 723 } |
724 | 724 |
725 return AXObject::isClickable(); | 725 return AXObject::isClickable(); |
726 } | 726 } |
727 | 727 |
728 bool AXNodeObject::isEnabled() const | 728 bool AXNodeObject::isEnabled() const |
729 { | 729 { |
730 if (equalIgnoringCase(getAttribute(aria_disabledAttr), "true")) | 730 for (AXObject* axObject = const_cast<AXNodeObject*>(this); axObject; axObjec t = axObject->parentObject()) { |
dmazzoni
2015/03/16 15:45:03
I'm trying to avoid code that iterates over all an
| |
731 return false; | 731 const AtomicString& disabled = axObject->getAttribute(aria_disabledAttr) ; |
732 if (equalIgnoringCase(disabled, "true")) | |
733 return false; | |
734 } | |
732 | 735 |
733 Node* node = this->node(); | 736 Node* node = this->node(); |
734 if (!node || !node->isElementNode()) | 737 if (!node || !node->isElementNode()) |
735 return true; | 738 return true; |
736 | 739 |
737 return !toElement(node)->isDisabledFormControl(); | 740 return !toElement(node)->isDisabledFormControl(); |
738 } | 741 } |
739 | 742 |
740 AccessibilityExpanded AXNodeObject::isExpanded() const | 743 AccessibilityExpanded AXNodeObject::isExpanded() const |
741 { | 744 { |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1992 float range = maxValueForRange() - minValueForRange(); | 1995 float range = maxValueForRange() - minValueForRange(); |
1993 float value = valueForRange(); | 1996 float value = valueForRange(); |
1994 | 1997 |
1995 value += range * (percentChange / 100); | 1998 value += range * (percentChange / 100); |
1996 setValue(String::number(value)); | 1999 setValue(String::number(value)); |
1997 | 2000 |
1998 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); | 2001 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); |
1999 } | 2002 } |
2000 | 2003 |
2001 } // namespace blink | 2004 } // namespace blink |
OLD | NEW |