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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
739 HTMLInputElement& input = toHTMLInputElement(*node); | 739 HTMLInputElement& input = toHTMLInputElement(*node); |
740 if (input.isTextField()) | 740 if (input.isTextField()) |
741 return input.isReadOnly(); | 741 return input.isReadOnly(); |
742 } | 742 } |
743 | 743 |
744 return !node->hasEditableStyle(); | 744 return !node->hasEditableStyle(); |
745 } | 745 } |
746 | 746 |
747 bool AXNodeObject::isRequired() const | 747 bool AXNodeObject::isRequired() const |
748 { | 748 { |
749 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true")) | |
750 return true; | |
751 | |
752 Node* n = this->node(); | 749 Node* n = this->node(); |
753 if (n && (n->isElementNode() && toElement(n)->isFormControlElement())) | 750 if (n && (n->isElementNode() && toElement(n)->isFormControlElement())) |
754 return toHTMLFormControlElement(n)->isRequired(); | 751 return toHTMLFormControlElement(n)->isRequired(); |
755 | 752 |
753 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true")) | |
shreeramk
2014/12/05 07:32:54
Spec says http://w3c.github.io/aria/aria/aria.html
| |
754 return true; | |
755 | |
756 return false; | 756 return false; |
757 } | 757 } |
758 | 758 |
759 bool AXNodeObject::canSetFocusAttribute() const | 759 bool AXNodeObject::canSetFocusAttribute() const |
760 { | 760 { |
761 Node* node = this->node(); | 761 Node* node = this->node(); |
762 if (!node) | 762 if (!node) |
763 return false; | 763 return false; |
764 | 764 |
765 if (isWebArea()) | 765 if (isWebArea()) |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1741 float range = maxValueForRange() - minValueForRange(); | 1741 float range = maxValueForRange() - minValueForRange(); |
1742 float value = valueForRange(); | 1742 float value = valueForRange(); |
1743 | 1743 |
1744 value += range * (percentChange / 100); | 1744 value += range * (percentChange / 100); |
1745 setValue(String::number(value)); | 1745 setValue(String::number(value)); |
1746 | 1746 |
1747 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); | 1747 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); |
1748 } | 1748 } |
1749 | 1749 |
1750 } // namespace blink | 1750 } // namespace blink |
OLD | NEW |