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 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1617 | 1617 |
1618 HTMLLabelElement* AXNodeObject::labelElementContainer() const | 1618 HTMLLabelElement* AXNodeObject::labelElementContainer() const |
1619 { | 1619 { |
1620 if (!node()) | 1620 if (!node()) |
1621 return 0; | 1621 return 0; |
1622 | 1622 |
1623 // the control element should not be considered part of the label | 1623 // the control element should not be considered part of the label |
1624 if (isControl()) | 1624 if (isControl()) |
1625 return 0; | 1625 return 0; |
1626 | 1626 |
| 1627 // the link element should not be considered part of the label |
| 1628 if (isLink()) |
| 1629 return 0; |
| 1630 |
1627 // find if this has a ancestor that is a label | 1631 // find if this has a ancestor that is a label |
1628 return Traversal<HTMLLabelElement>::firstAncestorOrSelf(*node()); | 1632 return Traversal<HTMLLabelElement>::firstAncestorOrSelf(*node()); |
1629 } | 1633 } |
1630 | 1634 |
1631 void AXNodeObject::setFocused(bool on) | 1635 void AXNodeObject::setFocused(bool on) |
1632 { | 1636 { |
1633 if (!canSetFocusAttribute()) | 1637 if (!canSetFocusAttribute()) |
1634 return; | 1638 return; |
1635 | 1639 |
1636 Document* document = this->document(); | 1640 Document* document = this->document(); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 float range = maxValueForRange() - minValueForRange(); | 1824 float range = maxValueForRange() - minValueForRange(); |
1821 float value = valueForRange(); | 1825 float value = valueForRange(); |
1822 | 1826 |
1823 value += range * (percentChange / 100); | 1827 value += range * (percentChange / 100); |
1824 setValue(String::number(value)); | 1828 setValue(String::number(value)); |
1825 | 1829 |
1826 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); | 1830 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
true); |
1827 } | 1831 } |
1828 | 1832 |
1829 } // namespace blink | 1833 } // namespace blink |
OLD | NEW |