| 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 | 662 |
| 663 bool AXNodeObject::isEnabled() const | 663 bool AXNodeObject::isEnabled() const |
| 664 { | 664 { |
| 665 if (equalIgnoringCase(getAttribute(aria_disabledAttr), "true")) | 665 if (equalIgnoringCase(getAttribute(aria_disabledAttr), "true")) |
| 666 return false; | 666 return false; |
| 667 | 667 |
| 668 Node* node = this->node(); | 668 Node* node = this->node(); |
| 669 if (!node || !node->isElementNode()) | 669 if (!node || !node->isElementNode()) |
| 670 return true; | 670 return true; |
| 671 | 671 |
| 672 return !node->isInert() && !toElement(node)->isDisabledFormControl(); | 672 return !toElement(node)->isDisabledFormControl(); |
| 673 } | 673 } |
| 674 | 674 |
| 675 bool AXNodeObject::isIndeterminate() const | 675 bool AXNodeObject::isIndeterminate() const |
| 676 { | 676 { |
| 677 Node* node = this->node(); | 677 Node* node = this->node(); |
| 678 if (!node || !node->hasTagName(inputTag)) | 678 if (!node || !node->hasTagName(inputTag)) |
| 679 return false; | 679 return false; |
| 680 | 680 |
| 681 return toHTMLInputElement(node)->shouldAppearIndeterminate(); | 681 return toHTMLInputElement(node)->shouldAppearIndeterminate(); |
| 682 } | 682 } |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 // <li><a href="#1">Chapter 2</a></li> | 1083 // <li><a href="#1">Chapter 2</a></li> |
| 1084 // </ul> | 1084 // </ul> |
| 1085 // </div> | 1085 // </div> |
| 1086 // | 1086 // |
| 1087 // The goal is to return a reasonable title for the outer container div, bec
ause | 1087 // The goal is to return a reasonable title for the outer container div, bec
ause |
| 1088 // it's focusable - but without making its title be the full inner text, whi
ch is | 1088 // it's focusable - but without making its title be the full inner text, whi
ch is |
| 1089 // quite long. As a heuristic, skip links, controls, and elements that are u
sually | 1089 // quite long. As a heuristic, skip links, controls, and elements that are u
sually |
| 1090 // containers with lots of children. | 1090 // containers with lots of children. |
| 1091 | 1091 |
| 1092 // Skip hidden children | 1092 // Skip hidden children |
| 1093 if (equalIgnoringCase(obj->getAttribute(aria_hiddenAttr), "true")) | 1093 if (obj->ariaIsHidden()) |
| 1094 return false; | 1094 return false; |
| 1095 | 1095 |
| 1096 // Skip focusable children, so we don't include the text of links and contro
ls. | 1096 // Skip focusable children, so we don't include the text of links and contro
ls. |
| 1097 if (obj->canSetFocusAttribute()) | 1097 if (obj->canSetFocusAttribute()) |
| 1098 return false; | 1098 return false; |
| 1099 | 1099 |
| 1100 // Skip big container elements like lists, tables, etc. | 1100 // Skip big container elements like lists, tables, etc. |
| 1101 if (obj->isList() || obj->isAXTable() || obj->isTree() || obj->isCanvas()) | 1101 if (obj->isList() || obj->isAXTable() || obj->isTree() || obj->isCanvas()) |
| 1102 return false; | 1102 return false; |
| 1103 | 1103 |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1804 useTextUnderElement = true; | 1804 useTextUnderElement = true; |
| 1805 | 1805 |
| 1806 if (useTextUnderElement) { | 1806 if (useTextUnderElement) { |
| 1807 String text = textUnderElement(); | 1807 String text = textUnderElement(); |
| 1808 if (!text.isEmpty()) | 1808 if (!text.isEmpty()) |
| 1809 textOrder.append(AccessibilityText(text, ChildrenText)); | 1809 textOrder.append(AccessibilityText(text, ChildrenText)); |
| 1810 } | 1810 } |
| 1811 } | 1811 } |
| 1812 | 1812 |
| 1813 } // namespace WebCore | 1813 } // namespace WebCore |
| OLD | NEW |