| 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 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1616     // called during render layouts, minimal work should be done. | 1616     // called during render layouts, minimal work should be done. | 
| 1617     // If AX elements are created now, they could interrogate the render tree wh
      ile it's in a funky state. | 1617     // If AX elements are created now, they could interrogate the render tree wh
      ile it's in a funky state. | 
| 1618     // At the same time, process ARIA live region changes. | 1618     // At the same time, process ARIA live region changes. | 
| 1619     for (AXObject* parent = this; parent; parent = parent->parentObjectIfExists(
      )) { | 1619     for (AXObject* parent = this; parent; parent = parent->parentObjectIfExists(
      )) { | 
| 1620         parent->setNeedsToUpdateChildren(); | 1620         parent->setNeedsToUpdateChildren(); | 
| 1621 | 1621 | 
| 1622         // These notifications always need to be sent because screenreaders are 
      reliant on them to perform. | 1622         // These notifications always need to be sent because screenreaders are 
      reliant on them to perform. | 
| 1623         // In other words, they need to be sent even when the screen reader has 
      not accessed this live region since the last update. | 1623         // In other words, they need to be sent even when the screen reader has 
      not accessed this live region since the last update. | 
| 1624 | 1624 | 
| 1625         // If this element supports ARIA live regions, then notify the AT of cha
      nges. | 1625         // If this element supports ARIA live regions, then notify the AT of cha
      nges. | 
| 1626         if (parent->supportsARIALiveRegion()) | 1626         if (parent->isLiveRegion()) | 
| 1627             axObjectCache()->postNotification(parent, parent->document(), AXObje
      ctCacheImpl::AXLiveRegionChanged, true); | 1627             axObjectCache()->postNotification(parent, parent->document(), AXObje
      ctCacheImpl::AXLiveRegionChanged, true); | 
| 1628 | 1628 | 
| 1629         // If this element is an ARIA text box or content editable, post a "valu
      e changed" notification on it | 1629         // If this element is an ARIA text box or content editable, post a "valu
      e changed" notification on it | 
| 1630         // so that it behaves just like a native input element or textarea. | 1630         // so that it behaves just like a native input element or textarea. | 
| 1631         if (isNonNativeTextControl()) | 1631         if (isNonNativeTextControl()) | 
| 1632             axObjectCache()->postNotification(parent, parent->document(), AXObje
      ctCacheImpl::AXValueChanged, true); | 1632             axObjectCache()->postNotification(parent, parent->document(), AXObje
      ctCacheImpl::AXValueChanged, true); | 
| 1633     } | 1633     } | 
| 1634 } | 1634 } | 
| 1635 | 1635 | 
| 1636 void AXNodeObject::selectionChanged() | 1636 void AXNodeObject::selectionChanged() | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 1647 void AXNodeObject::textChanged() | 1647 void AXNodeObject::textChanged() | 
| 1648 { | 1648 { | 
| 1649     // If this element supports ARIA live regions, or is part of a region with a
      n ARIA editable role, | 1649     // If this element supports ARIA live regions, or is part of a region with a
      n ARIA editable role, | 
| 1650     // then notify the AT of changes. | 1650     // then notify the AT of changes. | 
| 1651     AXObjectCacheImpl* cache = axObjectCache(); | 1651     AXObjectCacheImpl* cache = axObjectCache(); | 
| 1652     for (Node* parentNode = node(); parentNode; parentNode = parentNode->parentN
      ode()) { | 1652     for (Node* parentNode = node(); parentNode; parentNode = parentNode->parentN
      ode()) { | 
| 1653         AXObject* parent = cache->get(parentNode); | 1653         AXObject* parent = cache->get(parentNode); | 
| 1654         if (!parent) | 1654         if (!parent) | 
| 1655             continue; | 1655             continue; | 
| 1656 | 1656 | 
| 1657         if (parent->supportsARIALiveRegion()) | 1657         if (parent->isLiveRegion()) | 
| 1658             cache->postNotification(parentNode, AXObjectCacheImpl::AXLiveRegionC
      hanged, true); | 1658             cache->postNotification(parentNode, AXObjectCacheImpl::AXLiveRegionC
      hanged, true); | 
| 1659 | 1659 | 
| 1660         // If this element is an ARIA text box or content editable, post a "valu
      e changed" notification on it | 1660         // If this element is an ARIA text box or content editable, post a "valu
      e changed" notification on it | 
| 1661         // so that it behaves just like a native input element or textarea. | 1661         // so that it behaves just like a native input element or textarea. | 
| 1662         if (parent->isNonNativeTextControl()) | 1662         if (parent->isNonNativeTextControl()) | 
| 1663             cache->postNotification(parentNode, AXObjectCacheImpl::AXValueChange
      d, true); | 1663             cache->postNotification(parentNode, AXObjectCacheImpl::AXValueChange
      d, true); | 
| 1664     } | 1664     } | 
| 1665 } | 1665 } | 
| 1666 | 1666 | 
| 1667 void AXNodeObject::updateAccessibilityRole() | 1667 void AXNodeObject::updateAccessibilityRole() | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1760     float range = maxValueForRange() - minValueForRange(); | 1760     float range = maxValueForRange() - minValueForRange(); | 
| 1761     float value = valueForRange(); | 1761     float value = valueForRange(); | 
| 1762 | 1762 | 
| 1763     value += range * (percentChange / 100); | 1763     value += range * (percentChange / 100); | 
| 1764     setValue(String::number(value)); | 1764     setValue(String::number(value)); | 
| 1765 | 1765 | 
| 1766     axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
       true); | 1766     axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged,
       true); | 
| 1767 } | 1767 } | 
| 1768 | 1768 | 
| 1769 } // namespace blink | 1769 } // namespace blink | 
| OLD | NEW | 
|---|