OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 Apple 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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 | 712 |
713 bool AXObject::supportsRangeValue() const | 713 bool AXObject::supportsRangeValue() const |
714 { | 714 { |
715 return isProgressIndicator() | 715 return isProgressIndicator() |
716 || isMeter() | 716 || isMeter() |
717 || isSlider() | 717 || isSlider() |
718 || isScrollbar() | 718 || isScrollbar() |
719 || isSpinButton(); | 719 || isSpinButton(); |
720 } | 720 } |
721 | 721 |
| 722 bool AXObject::supportsSetSizeAndPosInSet() const |
| 723 { |
| 724 AXObject* parent = parentObject(); |
| 725 if (!parent) |
| 726 return false; |
| 727 int role = roleValue(); |
| 728 int parentRole = parent->roleValue(); |
| 729 |
| 730 if ((role == ListBoxOptionRole && parentRole == ListBoxRole) |
| 731 || (role == ListItemRole && parentRole == ListRole) |
| 732 || (role == MenuItemRole && parentRole == MenuRole) |
| 733 || (role == RadioButtonRole && parentRole == RadioGroupRole) |
| 734 || (role == TabRole && parentRole == TabListRole) |
| 735 || (role == TreeItemRole && parentRole == TreeRole)) |
| 736 return true; |
| 737 |
| 738 return false; |
| 739 } |
| 740 |
722 void AXObject::ariaTreeRows(AccessibilityChildrenVector& result) | 741 void AXObject::ariaTreeRows(AccessibilityChildrenVector& result) |
723 { | 742 { |
724 for (const auto& child : children()) { | 743 for (const auto& child : children()) { |
725 // Add tree items as the rows. | 744 // Add tree items as the rows. |
726 if (child->roleValue() == TreeItemRole) | 745 if (child->roleValue() == TreeItemRole) |
727 result.append(child); | 746 result.append(child); |
728 | 747 |
729 // Now see if this item also has rows hiding inside of it. | 748 // Now see if this item also has rows hiding inside of it. |
730 child->ariaTreeRows(result); | 749 child->ariaTreeRows(result); |
731 } | 750 } |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 } | 1319 } |
1301 | 1320 |
1302 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) | 1321 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) |
1303 { | 1322 { |
1304 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo
leNameVector(); | 1323 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo
leNameVector(); |
1305 | 1324 |
1306 return internalRoleNameVector->at(role); | 1325 return internalRoleNameVector->at(role); |
1307 } | 1326 } |
1308 | 1327 |
1309 } // namespace blink | 1328 } // namespace blink |
OLD | NEW |